2854 Commits

Author SHA1 Message Date
tonihei
eea8cd169c Replaced the duplicated EMPTY track group array with the one already defined
in TrackGroupArray.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175670266
2017-12-12 20:38:47 +00:00
hoangtc
8d81698d2a Continue adding Builder to MediaSource.
Add Builder pattern to SsMediaSource and mark existing constructors as
deprecated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175659618
2017-12-12 20:38:13 +00:00
aquilescanta
25dd8aa1f8 Fix cenc mode support and add support for the .mp4a extension.
Also add encrypted HLS internal sample streams.

Issue:#1661

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175577648
2017-12-12 20:37:08 +00:00
aquilescanta
79a9155438 Add support for 608/708 captions in HLS+fMP4
This also allows exposing multiple CC channels to any fMP4 extractor client.

Issue:#1661

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174458725
2017-12-12 20:36:11 +00:00
hoangtc
5bf4c249a2 Notify TrackSelection when it's enabled and disabled.
Add onEnable() and onDisable() call-backs to TrackSelection. This allows
TrackSelection to perform interesting operations (like subscribe to
NetworkStatus) and clean up after itself.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175558485
2017-12-12 20:31:58 +00:00
arnaudberry
877c89a0e1 Make it possible to extend DashManifestParser to parse revision-id.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175554723
2017-12-12 20:30:51 +00:00
hoangtc
bff221b85e Introduce Builder pattern to create MediaSource.
Start with DASH MediaSource. The number of injected arguments is getting
out-of-control.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175529031
2017-12-12 20:26:55 +00:00
Oliver Woodman
3562fe1c69 SampleStream fixes 2017-11-22 20:38:53 +00:00
Oliver Woodman
75b9062583 Send discontinuity at adjustments after shuffle/repeat mode changes. 2017-11-22 18:06:14 +00:00
Oliver Woodman
56c1c3f6a7 Revert "Make ExtractorMediaSource timeline dynamic until duration is set"
This reverts commit b688a562508e74721841aaaa770e9dc47bd378dd.
2017-11-22 17:59:36 +00:00
olly
74569bba45 Don't do work after track selection when in ended state
This causes the player to report that it's started loading
when in the ended state.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176371892
2017-11-21 13:57:46 +00:00
olly
fa3052d36b Report additional position discontinuities
- Properly report internal discontinuities
- Add DISCONTINUITY_REASON_SEEK_ADJUSTMENT to distinguish
  seek adjustments from other internal discontinuity events

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176367365
2017-11-21 13:57:16 +00:00
olly
b688a56250 Make ExtractorMediaSource timeline dynamic until duration is set
We (eventually - albeit possibly infinitely far in the future)
expect a timeline update with a window of known duration. This
also stops live radio stream playbacks transitioning to ended
state when their tracks are disabled.

As part of this fix, I found an issue where getPeriodPosition
could return null even when defaultPositionProjectionUs is 0,
which is not as documented.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176492024
2017-11-21 13:48:27 +00:00
Oliver Woodman
1439b4a3ef Mini cleanup 2017-11-21 13:46:18 +00:00
Ian Bird
494237548a Fix initializationData check for SSA subtitles 2017-11-21 13:46:12 +00:00
olly
e469269f3c Fix some lint issues.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176337058
2017-11-20 13:48:32 +00:00
eguven
8940e7b32a Replace hard coded UUID in OfflineLicenseHelper with a parameter
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176102179
2017-11-17 19:34:34 +00:00
tonihei
be0648541f Forward ad group and ad index when creating period from concatanted media sources.
Also added tests which verify the intended behaviour.

GitHub:#3452

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175656478
2017-11-17 19:32:51 +00:00
Oliver Woodman
444358521c Only set shutter color if attr is declared 2017-11-13 20:14:46 +00:00
nvalletta
427fe66855 Add an easy way to set the shutter view background color 2017-11-13 20:14:41 +00:00
yqritc
a573099f93 update bravia workaround more precisely 2017-11-13 20:14:06 +00:00
yqritc
2c495502e0 add issue link 2017-11-13 20:14:01 +00:00
yqritc
2c8c14d647 add bravia workaround to skip using setOutputSurface in MediaCodec 2017-11-13 20:13:55 +00:00
eguven
fbfbe7d6c9 Re-enable index file store at the end of the SimpleCache.initialize()
In the case converting cache files from an earlier version of
SimpleCache, there is no previous version of the index file. If the app
doesn't call any SimpleCache methods which would make the index file
stored before it exists whole data gets lost.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175153650
2017-11-13 15:47:30 +00:00
tonihei
1331f7adde Add custom callbacks to allows seeks after dynamic playlist modifications.
These callbacks are executed on the app thread after the corresponding
timeline update was triggered. This ensures that seek operations see the
updated timelines and are therefore valid, even if the seek is performed into a
window which didn't exist before.

GitHub:#3407

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175136187
2017-11-13 15:47:04 +00:00
olly
86c0198c81 Don't allow cancelation of non-cancelable loads
Issue: #3441

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175011804
2017-11-13 15:46:42 +00:00
olly
e1b3fed5e9 Add default implementations for ExoMediaDrm.* interfaces
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175010595
2017-11-13 15:46:30 +00:00
olly
681a05d004 Work around incorrect ClearKey encoding prior to O-MR1
Issue: #3138

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175006223
2017-11-13 15:46:15 +00:00
aquilescanta
52224944ae Fix DefaultHlsExtractorFactory javadoc
Issue:#2748

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174854541
2017-11-13 15:45:54 +00:00
hoangtc
26366f6c80 Fix an issue with seeking that can lead to STATE_END not delivered.
GitHub: #1897

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174841175
2017-11-13 15:45:54 +00:00
olly
3472eda6dc Be more robust against load callback failures
Issue: #2795

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174836960
2017-11-13 15:45:54 +00:00
tonihei
065091cfe3 Use helper method to disable Renderers.
Removes duplicated code and starts cleaning up handling of media clocks.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174829840
2017-11-13 15:45:54 +00:00
olly
298a66fc0e Relax parsing of ctts sample deltas
Issue: #3384

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174715851
2017-11-13 15:45:54 +00:00
olly
e6e75a536a Don't use InputStream.available in ContentDataSource
Issue: #3426

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174700804
2017-11-13 15:45:54 +00:00
olly
585e70c139 Broaden Samsung workaround to API level 25 + J7
Issue: #3257

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174686747
2017-11-13 15:45:54 +00:00
olly
b7f1368696 Simplify ContentDataSourceTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174685374
2017-11-13 15:45:54 +00:00
aquilescanta
061bcdd136 Allow playback to continue even after SingleSampleMediaPeriod load errors
This prevents users from having to check sideloaded subtitles URLs before
preparing a SingleSampleMediaSource with it.

Issue:#3140

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174475274
2017-11-13 15:45:54 +00:00
aquilescanta
c9ede15552 Relax string comparison in DASH parseContentProtection
... by making it case insensitive and null-tolerant for schemeId (as was before
adding playlist drm data merging).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174472123
2017-11-13 15:45:54 +00:00
Oliver Woodman
e4a0e977cd Remove DownloadManager test 2017-11-03 16:24:28 +00:00
olly
069466988f Bump to 2.6.0
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174467964
2017-11-03 16:15:31 +00:00
eguven
872cfc131a Fix unnecessary CachedContentIndex store() calls
First fix, prevents forced rewriting when cipher is set but encrypt is
false.

Second, removes the store() call in SimpleCache.initialize() so
initialization doesn't fail because of CachedContentIndex write issues.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174450586
2017-11-03 14:17:43 +00:00
olly
d90d04190e Allow chunk cancelation only if nothing has been consumed from it.
The mediaChunks.size() > 1 check was supposed to ensure this, and
did roughly the right thing when there was only a single stream
(although it was unnecessarily restrictive in preventing chunk
cancelation for the first chunk, where bytesLoaded != 0 and none
of the samples had been consumed).

Now we have multiple streams the check doesn't do the right thing,
and adding a back-buffer feature will make even more incorrect.
This change switches to checking the condition we actually want
to check directly :).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174449398
2017-11-03 14:16:28 +00:00
olly
b6b09ad40b Automated g4 rollback of changelist 173379623.
*** Reason for rollback ***

Breaks setting PlaybackParameters before start of playback

*** Original change description ***

Add support for float output in DefaultAudioSink

Also switch from using MIME types to C.ENCODING_* encodings in DefaultAudioSink.

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174445506
2017-11-03 14:15:06 +00:00
eguven
321bc9c24e Simplify DownloadService by removing broadcasting
Client can add this functionality by extending DownloadService.

Also made DownloadManager accept multiple listeners. So instead of
broadcast event, client can listen to DownloadManager directly.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174335820
2017-11-02 16:35:14 +00:00
aquilescanta
4cb2be2a46 Replace Queue with ArrayDequeue in HlsPlaylistParser
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174327876
2017-11-02 16:33:46 +00:00
olly
9abc1d2974 Don't call Drawable.setLayoutDirection pre-API-23
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174323423
2017-11-02 16:32:29 +00:00
olly
233a1d165f Explicitly document internal onXError are for reporting only
Issue: #3366

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174214690
2017-11-02 16:31:03 +00:00
olly
3021897383 Allow multiple listeners on TimeBar
Issue: #3406

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174214296
2017-11-02 16:29:36 +00:00
aquilescanta
8c424798c4 Fill manifest drm info with media files' pssh when needed
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174185407
2017-11-02 16:28:10 +00:00
olly
72b6791660 Use resolved position for masking when seeking to C.TIME_UNSET
Also fire onPositionDiscontinuity in this case

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174039483
2017-11-01 14:13:55 +00:00