3732 Commits

Author SHA1 Message Date
tonihei
e15633e906 Add shuffle support to ConcatenatingMediaSource.
The media source is initialized with a DefaultShuffleOrder which can be changed at
any time. This shuffle order is then used within the corresponding timeline.

The isRepeatOneAtomic flag is extended to also suppress shuffling (now called
isAtomic only).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166197184
2017-08-29 22:46:54 +01:00
andrewlewis
8115e11489 Allow subclasses to customize the MediaFormat
Make getMediaFormat protected so that subclasses can set additional MediaFormat
keys. For example, if the decoder output needs to be read back via an
ImageReader as YUV data it is necessary to set KEY_COLOR_FORMAT to
COLOR_FormatYUV420Flexible.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166195211
2017-08-29 22:45:28 +01:00
tonihei
b27c25e880 Add fake shuffle order.
This just implements a reverse order which is different from the original order but
still deterministic for simplified testing.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166194311
2017-08-29 22:44:13 +01:00
tonihei
9fd19d0e7c Add shuffle logic to concatenated timelines.
The implementation in the abstract base class takes care to forward the queries
to the correct methods given the shuffle mode and a given shuffle order.

All concatenated timeline implementations use an unshuffled order so far. The
handling of the shuffle orders will follow in other changes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166191165
2017-08-29 22:42:56 +01:00
tonihei
4883a9ba9a Add shuffle support to infinitely looping timeline.
In addition, let unit test assert window indices for both shuffle modes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166191069
2017-08-29 22:41:39 +01:00
tonihei
bd81181892 Add shortcut methods to query next or previous window index.
This functionality is most likely needed by UI modules which currently need
to obtain the timeline, the current repeat and shuffle modes and are only then
able to query the next/previous window index using this information.

Adding these methods simplifies these cumbersome requests.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166181202
2017-08-29 22:40:13 +01:00
tonihei
2c8d5f846e Pass shuffle mode to timeline assertion helper methods.
This allows to test the expected behaviour of timeline with different shuffle modes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166181091
2017-08-29 22:38:50 +01:00
tonihei
10f1bd7396 Add shuffle mode parameter to Timeline interface methods.
This parameter is used by methods such as getNextWindowIndex
and getPreviousWindowIndex to determine the playback order.
Additionally, there are method to query the first and last
window index given the shuffle mode.

None of the timeline implementations nor the ExoPlayer
implementation supports shuffling so far.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166170229
2017-08-29 22:37:27 +01:00
Bei Yi
b084821678 Support zoom mode for AspectRatioFrameLayout 2017-08-24 16:13:44 -07:00
Bei Yi
50c485652c Support aspect ratio fill mode for AspectRatioFrameLayout 2017-08-24 14:31:33 -07:00
tonihei
5214bfa7b1 Update ExoPlayerImplInternal with shuffle mode changes.
The shuffle mode is saved using a message on the playback thread.
After setting the shuffle mode, the same media period holder verification
as for repeat mode changes gets executed.

Note: the shuffle mode is not used yet to change the playback order.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166060231
2017-08-22 16:27:18 +01:00
olly
f0bd40a5b6 Use flavorDimensions for external demo app
- This is soon becoming mandatory.
- It also looks like future versions of com.android.tools.build
  are being distributed via Google's Maven repository.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166058299
2017-08-22 16:26:03 +01:00
tonihei
6a8c99d037 Support shuffle mode in MediaSessionConnector.
Changes to the player's shuffle mode are forwarded to the media session.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166057425
2017-08-22 16:24:45 +01:00
tonihei
b9a6a40539 Add listener callback for shuffle mode changes.
The listener implementations do not do anything yet.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166056933
2017-08-22 16:23:27 +01:00
aquilescanta
52ec70dd80 Add support for KEYFORMAT and SAMPLE-AES (only parsing, not decryption)
Also add sample streams that use METHOD=SAMPLE-AES. Note that some of
the streams provide alternative EXT-X-KEY's. Support for alternative
decryption methods will be added in a later CL.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166048858
2017-08-22 16:20:45 +01:00
tonihei
c1d7e5bf9d Add set/getShuffleModeEnabled to Player interface.
And implement a basic version of the methods in all implementations.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=166041342
2017-08-22 16:19:25 +01:00
olly
f1a97317d9 Handle size==0 in MP4 atoms
Issue: #3191

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165925148
2017-08-22 16:16:48 +01:00
olly
f1b3f3a177 Fix broken link + minor doc tweak
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165920927
2017-08-22 16:15:29 +01:00
tonihei
cb45a47da1 Remove isFirstWindow/isLastWindow from Timeline.
These methods are only used in one place, and offer duplicate
functionality to checking getNext(Previous)WindowIndex == C.INDEX_UNSET.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165910258
2017-08-22 16:14:02 +01:00
andrewlewis
cec0c52c8d Allow the app to specify extra ad markers
Issue: #3184

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165895259
2017-08-22 16:12:31 +01:00
aquilescanta
9a9bb2192c Fix third_party settings.gradle for demo-cast
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165748557
2017-08-22 16:11:13 +01:00
mansfieldmark
8e67837afe Adding conservative @Nullable annotations to Exoplayer v2 Cache + CacheSpan
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165715928
2017-08-22 16:09:53 +01:00
eguven
a1add8f9e6 Fix downcasting in DownloadAction.Serializers
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165699826
2017-08-22 16:07:18 +01:00
aquilescanta
1e4f899548 Add support for the data URI scheme
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165699328
2017-08-22 16:05:58 +01:00
Oliver Woodman
cc9a93d9d9 Rm SS offline for now 2017-08-17 23:18:58 +01:00
Oliver Woodman
4fa307d654 Minor style tweaks 2017-08-17 23:13:34 +01:00
ojw28
ce3042bffc Merge pull request #3190 from google/revert-3157-dulmandakh-patch-1
Revert "expose setPropertyByteArray, setPropertyString"
2017-08-17 23:12:01 +01:00
ojw28
61078078df Revert "expose setPropertyByteArray, setPropertyString" 2017-08-17 23:11:44 +01:00
Dulmandakh
7e586c3a8f expose setPropertyByteArray, setPropertyString
export setPropertyByteArray, setPropertyString of DefaultDrmSessionManager for easy customization.
2017-08-17 23:11:30 +01:00
ojw28
6b7e0cb606 Merge pull request #3182 from WeiChungChang/Support_MP4_in_h262
Support H262 video in MP4
2017-08-17 23:10:05 +01:00
ojw28
cc5e16eccf Merge pull request #3157 from dulmandakh/dulmandakh-patch-1
expose setPropertyByteArray, setPropertyString
2017-08-17 23:09:57 +01:00
ojw28
7ddcc46cbd Merge pull request #3185 from dbrain/subrip_timing_line_crash
Fix possible subrip timing line NPE
2017-08-17 23:09:50 +01:00
olly
2470b39d95 Split metadata and text outputs from their renderer classes
There will be non-ExoPlayer players that can output text
and metadata, so the outputs should be standalone. There
may also be ExoPlayer instances that use non-standard
text and metadata renderers, for which this change also
makes sense.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165628420
2017-08-17 23:05:44 +01:00
olly
4917929a3a Improve MediaSource/MediaPeriod documentation
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165628229
2017-08-17 23:04:21 +01:00
olly
106d88df41 Some no-op LeanbackPlayerAdapter cleanup
- Have a single inner class for all listeners. This is inline
  with what we do elsewhere in the library.
- Avoid repeated getCallback() calls within methods.
- Seek to default position from ended state, rather than 0.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165603927
2017-08-17 23:02:16 +01:00
aquilescanta
e3f305b5c0 Improve FORMAT_UNSUPPORTED_DRM related documentation and logging
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165580016
2017-08-17 23:00:56 +01:00
olly
34960ad891 Tweak and add READMEs + remove refs to V1
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165578518
2017-08-17 22:59:34 +01:00
olly
4d7f37f5a9 Work around issue with Xiaomi JB devices
Issue: #3171

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165577562
2017-08-17 22:58:10 +01:00
aquilescanta
04d76fa8fc Allow easier ExoPlayer/Cast integration
This CL adds the fundamental pieces for ExoPlayer/Cast integration and includes a
demo app to showcase this functionality. However, media queues should be supported
in the first release of this extension.

Issue:#2283

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165576892
2017-08-17 22:56:52 +01:00
andrewlewis
1cfd246cd3 Update extension README with usage instructions
Issue: #3162

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165572088
2017-08-17 22:55:37 +01:00
olly
a24f2b75b0 Host GTS content ourselves + prevent spurious test passes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165561808
2017-08-17 22:54:12 +01:00
zhihuichen
c2d2d967e9 Refactor DrmSession part into a separate class to prepare for multi session scenario. NO_SQ=flaky
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165497666
2017-08-17 22:52:33 +01:00
eguven
978019a1a3 Add ProgressiveDownloadAction
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165447436
2017-08-17 22:51:14 +01:00
andrewlewis
8e45bd27df Add nullable annotations to Renderer constructors
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165437929
2017-08-17 22:49:58 +01:00
andrewlewis
bbc3b182bb Restore the interrupted flag after blocking operations
If the main thread was interrupted during
ExoPlayerImplInternal.blockingSendMessage/release, the interrupted flag was
immediately set but then wait() was called on the next iteration. wait() would
immediately throw InterruptedException, causing the main thread to spin until
the blocking operation completed.

Instead of resetting the flag immediately, reset it after the blocking
operation completes.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165426493
2017-08-17 22:48:15 +01:00
andrewlewis
e0b69b8115 Add Format.copyWithRotationDegrees
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165314250
2017-08-17 22:46:57 +01:00
olly
f72cd2b014 Add SmoothStreaming downloader and download action
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165305815
2017-08-17 22:45:35 +01:00
olly
b9f5cc7256 Add missing TrackKey class
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165296184
2017-08-17 22:44:20 +01:00
olly
4b706d9484 Add SsManifest.copy and TrackKey for SmoothStreaming downloads
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165295985
2017-08-17 22:43:05 +01:00
olly
c94bce17b4 Make data sources private in SegmentDownloader
Also fix SegmentDownloader.remove to not return early

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165295432
2017-08-17 22:41:48 +01:00