2627 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
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
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
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
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
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
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
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
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
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
olly
f8e47553e8 Destroy GL context when releasing dummy surface
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165293386
2017-08-17 22:40:32 +01:00
olly
00547c5783 Disable secure dummy surface on all Samsung N devices
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165291627
2017-08-17 22:38:01 +01:00
olly
08d16c55d4 Some Leanback extension + minVersion bump fixes
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165219604
2017-08-17 22:36:47 +01:00
mdoucleff
d9cd4641f2 Add flag to CachedContentIndex to disable encryption. This allows the encryption feature
to be disabled gracefully: encrypted index files may be read, but plaintext will be written.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165196508
2017-08-17 22:35:27 +01:00
olly
cf6534ea5b SegmentDownloader loadManifest cleanup.
- HlsDownloader.loadManifest (previously called getHlsPlaylist)
  suppressed errors for the offline case, where-as the DashUtil
  equivalent method did not. This change makes them consistent
  and moves both other to use ParsingLoadable.
- Enable GZIP for manifest loads in both cases.
- Use Uri rather than String to represent Uris. Previously the
  strings were parsed into Uris quite deep in the code, which
  isn't ideal if the parsing fails; you'd probably prefer the
  error to occur early at the top level.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165181398
2017-08-17 22:32:57 +01:00
olly
fb83872365 Remove unused method
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165168924
2017-08-17 22:30:26 +01:00
olly
870c8ae4df Fix canAcquireSession for ClearKey
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=165159376
2017-08-17 22:29:13 +01:00
Danny Brain
571f98f546 Fix possible subrip timing line NPE 2017-08-17 21:30:46 +10:00
WeiChungChang
469780f7ea Support H262 video in MP4 2017-08-17 13:49:41 +08:00
Oliver Woodman
1829d71d29 Restrict usage of secure DummySurface for all Samsung devices. 2017-08-11 15:47:03 +01:00
Oliver Woodman
730d2dd18f Formatting cleanup 2017-08-11 15:46:49 +01:00
ojw28
2e950633c7 Merge pull request #3161 from DolbyLaboratories/dev-v2-eac3-7.1
Support 7.1 EAC3 in MP4, DASH and HLS formats
2017-08-11 15:43:43 +01:00
olly
c661ed42de Add possibility of forcing a specific license URL in HttpMediaDrmCallback
Resubmit of https://github.com/google/ExoPlayer/pull/3136

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=164971900
2017-08-11 15:03:02 +01:00