2868 Commits

Author SHA1 Message Date
olly
8455d10366 Simplify LoopingMediaSourceTest setup
This test seems to obtain a timeline from a prepared
FakeMediaSource, but that's identical to the timeline
passed into that source to start with :).

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176117133
2017-11-17 19:00:43 +00:00
eguven
00f68b26c9 Replace hard coded UUID in OfflineLicenseHelper with a parameter
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176102179
2017-11-17 18:59:20 +00:00
tonihei
525ae7fed7 Add simplified FakeTimeline constructor.
This is helpful for tests which don't care about detailled timeline set-ups
besides the number of windows.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176097369
2017-11-17 18:57:51 +00:00
hoangtc
e349905039 Add Builder to ExtractorMediaSource.
Add Builder pattern to ExtractorMediaSource and mark existing constructors as
deprecated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=176088810
2017-11-17 18:56:25 +00:00
olly
74e74402da Deduplicate ExtractorMediaPeriod discontinuity reporting
This change makes sure progress is being made before reporting
a discontinuity. Else in cases like having no network and
playing a live stream, we allow the discontinuity to be read
each time an internal retry occurs, meaning it gets read
repeatedly. This does no harm, but is noisy and unnecessary.

We should also not allow skipping whilst there is a pending
reset or discontinuity notification, just like we don't allow
reads.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175953064
2017-11-17 18:54:55 +00:00
andrewlewis
b8aedfbf4f Add support for float output for FfmpegAudioRenderer
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175940553
2017-11-17 18:53:26 +00:00
andrewlewis
15a2f47f31 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=175936872
2017-11-17 18:51:43 +00:00
andrewlewis
6db895bd7b Use ArrayDeque for playback parameters checkpoints
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175837754
2017-11-17 18:48:42 +00:00
olly
28693ac7d6 Allow LoadControl to configure the back-buffer.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175833398
2017-11-17 18:47:14 +00:00
olly
bd0bc03f64 Inject toKeyframe discard parameter from ExoPlayerImplInternal
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175805139
2017-11-17 18:45:51 +00:00
hoangtc
28df0e133b Add Builder pattern to HlsMediaSource.
Add Builder pattern to HlsMediaSource and mark existing constructors as
deprecated.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175803853
2017-11-17 18:44:28 +00:00
olly
5301d38136 Some test cleanup
The purpose of this change isn't to fix anything. It's just to
simplify things a little bit. There will be following CLs that
make some changes to get things onto correct threads.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175800354
2017-11-17 18:41:38 +00:00
tonihei
5aa053d91d Add method to FakeMediaSource to trigger source info refresh.
This allows to remove the LazyMediaSource used within
DynamicConcatenatingMediaSourceTest and also allows to write test which
simulates dynamic timeline or manifest updates.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175680371
2017-11-17 18:37:08 +00:00
olly
22b95032b3 Reinstate buffer discard for SmoothStreaming
Now we have a ChunkSampleStream.discardBuffer, we need to call
it from SsMediaPeriod as well as for the DASH case.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175675427
2017-11-17 18:35:39 +00:00
tonihei
b30b786350 Avoid track group array error-prone reference quality check in CastPlayer.
Also 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-11-17 18:32:38 +00:00
hoangtc
fee6cf5cd8 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-11-17 18:29:50 +00:00
tonihei
b865259e63 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 18:28:21 +00:00
aquilescanta
b17ae80679 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-11-17 18:26:41 +00:00
olly
afe6f667b2 Move all buffer discard to MediaPeriod.discardBuffer
This is a step toward retaining a back-buffer in a way that
works for all MediaSource implementations. It's not possible
to adjust the discardBuffer calls in ExoPlayerImplInternal
to discard up to (position - backBufferDurationUs). Next steps
are to:

1. Find an appropriate place to specify the back buffer value,
   to be passed to the discardBuffer calls. I guess the
   LoadControl is the appropriate place to define such values.
2. Enhance discardBuffer to support a toKeyframe argument to
   pass through to discardTo.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175565363
2017-11-13 20:07:25 +00:00
hoangtc
67bbbed9fe 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-11-13 20:06:06 +00:00
arnaudberry
db7e9a548c Make it possible to extend DashManifestParser to parse revision-id.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175554723
2017-11-13 20:04:40 +00:00
Oliver Woodman
e92667ba5b Only set shutter color if attr is declared 2017-11-13 17:28:25 +00:00
ojw28
99d0a7a3da
Merge pull request #3451 from nvalletta/dev-v2-shutter-background-color
Add an easy way to set the shutter view background color
2017-11-13 17:11:39 +00:00
ojw28
73e96be85c
Merge pull request #3440 from yqritc/fix-bravia
Skip using MediaCodec.setOutputSurface on Bravia
2017-11-13 17:11:24 +00:00
hoangtc
0be4b46bb4 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-11-13 17:08:24 +00:00
hoangtc
735af5c0b0 Update several minor code/test style issues.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175180089
2017-11-13 15:15:07 +00:00
olly
eb4e05199f Expose first index in SampleQueue
This will be needed when retaining a back-buffer. Being able to
query the first index allows us to work out when we've discarded
all samples that were obtained from a particular chunk, which
we'll use to determine when to remove chunks from
ChunkSampleStream.mediaChunks.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175172085
2017-11-13 15:13:43 +00:00
eguven
694bd997cb 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:12:18 +00:00
tonihei
04baa42349 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:10:56 +00:00
tonihei
6616e6c1a9 Don't check if next period is prepared when ignoring renderer media clock.
When the renderer media clock source read its stream to end but is not ready,
this means one of two things. Either the next period is not prepared yet and
we need to stop the renderers and buffer until it's prepared, or we are
waiting for another track in the current period with a uneven (longer)
duration.

The second case was already covered by this if condition and uses the standalone
clock instead to continue.

The first case now also uses the standalone clock, but it doesn't make a
difference, because both clocks are stopped and still synchronized.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175134975
2017-11-13 15:09:35 +00:00
hoangtc
3171c86bdb Supports Out-of-band, in MPD EventStream.
MPD file may include multiple EventStreams in its Periods, which contains Events
that the application may need to handle/respond to.
This change adds support for parsing the EventStream/Event nodes from MPD
file, and exposing these EventStreams as a metadata sample stream that application
can respond in a similar way to other metadata events.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175017697
2017-11-13 15:08:09 +00:00
olly
ed2e4dd91e 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:06:25 +00:00
olly
367bb64ba0 Add default implementations for ExoMediaDrm.* interfaces
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175010595
2017-11-13 15:04:49 +00:00
olly
acf5247f6e 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:03:29 +00:00
aquilescanta
15543f13b7 Decouple TrackGroups from SampleQueues in HlsSampleStreamWrapper
This CL does not aim to introduce any functionality changes.

Issue:#3149

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174864875
2017-11-13 15:01:55 +00:00
aquilescanta
98301467dc Fix DefaultHlsExtractorFactory javadoc
Issue:#2748

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174854541
2017-11-13 15:00:32 +00:00
nvalletta
580acb4e2f Add an easy way to set the shutter view background color 2017-11-12 14:25:14 -07:00
yqritc
d5600b52e1 update bravia workaround more precisely 2017-11-09 10:56:47 +09:00
yqritc
6f729bdf97 add issue link 2017-11-08 13:41:04 +09:00
yqritc
73851144ba add bravia workaround to skip using setOutputSurface in MediaCodec 2017-11-08 11:01:47 +09:00
hoangtc
b60364600b 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-07 14:45:05 +00:00
olly
7f135f2cda Be more robust against load callback failures
Issue: #2795

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174836960
2017-11-07 14:43:38 +00:00
tonihei
f014b67d3e 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-07 14:42:24 +00:00
olly
ea80c3e456 Relax parsing of ctts sample deltas
Issue: #3384

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174715851
2017-11-07 14:41:07 +00:00
olly
2daa098a20 Don't use InputStream.available in ContentDataSource
Issue: #3426

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174700804
2017-11-07 14:39:51 +00:00
olly
decf437f17 Broaden Samsung workaround to API level 25 + J7
Issue: #3257

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174686747
2017-11-07 14:38:31 +00:00
olly
475ea19ae7 Simplify ContentDataSourceTest
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174685374
2017-11-07 14:37:12 +00:00
aquilescanta
54a2a69b05 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-07 14:35:47 +00:00
aquilescanta
ecaaed9674 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-07 14:34:22 +00:00
Oliver Woodman
1cfea62545 Remove DownloadManager test 2017-11-03 16:23:21 +00:00