353 Commits

Author SHA1 Message Date
andrewlewis
abe3c8ce1d Fix check for E-AC3 JOC in DASH
Issue: #6636
PiperOrigin-RevId: 281972403
2019-11-22 16:58:33 +00:00
ibaker
79b7af656b Rollback of <unknown commit>
*** Original commit ***

Disable test coverage again

https://issuetracker.google.com/issues/37019591 causes local variables can't be found while debugging.

***

PiperOrigin-RevId: 280666758
2019-11-17 00:33:26 +00:00
andrewlewis
0351177611 Handle new signaling for E-AC3 JOC in DASH
Issue: #6636
PiperOrigin-RevId: 279666771
2019-11-15 05:13:31 +00:00
olly
4570cd37c5 Testutils: Add missing Javadoc + Misc cleanup
PiperOrigin-RevId: 278835106
2019-11-15 05:11:36 +00:00
ibaker
f554dc4ea4 Increase 2 timeouts to reduce test flakiness
PiperOrigin-RevId: 277710160
2019-11-05 16:14:51 +00:00
aquilescanta
8138424d92 Replace usages of SampleQueue.hasNextSample with isReady
PiperOrigin-RevId: 277259448
2019-10-30 08:51:42 +00:00
aquilescanta
b68a698806 Make SampleQueue populate FormatHolder.drmSession
Also add unit tests for SampleQueue read for samples with
DRM requirements.

PiperOrigin-RevId: 277037826
2019-10-30 08:50:34 +00:00
ibaker
93f2dd8deb Switch test usages of ConditionVariable#block(timeout) to CountDownLatch
ConditionVariable.block(timeout) doesn't work in Robolectric, because it
relies on the system clock which doesn't advance.

PiperOrigin-RevId: 275798281
2019-10-30 08:46:33 +00:00
andrewlewis
5f71e86335 Handle legacy DASH audio channel configuration
Issue: #6523
PiperOrigin-RevId: 274160232
2019-10-13 12:41:24 +01:00
Oliver Woodman
4026c8a01e Merge pull request #6502 from caiiiyua:bug_default_dash_chunk_source_wrong_segmentnumshift
PiperOrigin-RevId: 273549830
2019-10-08 20:55:25 +01:00
Cai Yuanqing
d2b221b95b Issue: #6501 Wrong segmentNumShift was calculated in copyWithNewRepresentation
When newIndex overlaps oldIndex with newstarttime < oldstarttime, according to the segNum of endtime
in newIndex and oldIndexLastSegnum to calculate the segmentNumShift.
2019-10-08 09:07:27 +13:00
olly
b052ea9bed Parse Label elements for adaptation sets
Issue: #6297
PiperOrigin-RevId: 273297284
2019-10-07 16:32:50 +01:00
olly
e377e13d50 Clean up DashManifestParserTest
Also improve some tests by asserting the parser is left in
the correct position (assertNextTag).

PiperOrigin-RevId: 272614768
2019-10-04 13:31:33 +01:00
Cai Yuanqing
9ec94a4bdc Check the new index contains the old index based on stat time instead of segNum 2019-10-04 13:55:25 +13:00
tonihei
4f640bc62e Add SequencableLoader.isLoading
This method allows the player to figure out whether we still have an ongoing
load even if LoadControl.shouldContinueLoading returns false.

PiperOrigin-RevId: 272445577
2019-10-02 21:30:07 +01:00
ibaker
db68aa9490 Rollback of 01f484cbe9
*** Original commit ***

Modify EventMessageDecoder to return null if decoding fails (currently throws exceptions)

This matches the documentation on MetadataDecoder.decode:
"@return The decoded metadata object, or null if the metadata could not be decoded."

***

PiperOrigin-RevId: 272405287
2019-10-02 21:29:30 +01:00
tonihei
dd4f9bcaae Add Timeline.Window.isLive
This flag is currently merged into Window.isDynamic, which isn't always true
because
1. A window can be dynamic for other reasons (e.g. when the duration is still
missing).
2. A live stream can be become non-dynamic when it ends.

Issue:#2668
Issue:#5973
PiperOrigin-RevId: 271999378
2019-10-02 21:28:43 +01:00
Cai Yuanqing
c2d9960a6e Issue: #6501 Wrong segmentNumShift was calculated in copyWithNewRepresentation
In DefaultDashChunkSource.copyWithNewRepresentation, it will handle the logic that
new MPD manifest file is updated and calculate a newSegmentNumShift for furthermore
segNum index calculation in getSegmentUrl, when a shorter window MPD updated and then
back to a longer window MPD, copyWithNewRepresentation will go into the overlap case
but the new index actually contains the old index..
2019-10-02 13:25:26 +13:00
aquilescanta
18b9304f25 Call prepare and release from MediaSources
Issue:#4721
PiperOrigin-RevId: 270342454
2019-09-22 00:16:07 +01:00
aquilescanta
9863cd33fa Avoid retrying fatal errors
Also clear fatal errors on seek operations

PiperOrigin-RevId: 269780886
2019-09-18 23:23:21 +01:00
tonihei
77ed930251 Add Timeline.Window.uid.
This allows to uniquely identify a window within a Timeline. The value is set
correctly for all Window instances, but is not used anywhere yet.

PiperOrigin-RevId: 267556516
2019-09-10 10:27:07 +01:00
Toni
75435b4210 Merge pull request #6286 from sr1990:dev-v2
PiperOrigin-RevId: 267323559
2019-09-05 10:56:35 +01:00
sr1990
33eb49ca0d Support negative value of the @r attrbute of S in SegmentTimeline element 2019-09-05 10:48:46 +01:00
sr1990
b4a1d55fe4 Support negative value of the @r attrbute of S in SegmentTimeline element 2019-09-05 10:48:46 +01:00
olly
2d0b10a73a Use constant to define androidx annotation version
PiperOrigin-RevId: 266801762
2019-09-05 10:45:08 +01:00
olly
a02237de20 Fix imports
PiperOrigin-RevId: 266676413
2019-09-01 22:03:52 +01:00
tonihei
20fd4e16d2 Deprecate setTag parameter in Timeline.getWindow.
There is no point in having this parameter as the tag should always be a single
immutable object instantiated at the time the Timeline is created or earlier.

So there is no preformance benefit and it's error-prone in case people
forget to set setTag=true.

PiperOrigin-RevId: 264117041
2019-08-23 17:00:53 +01:00
ibaker
01f484cbe9 Modify EventMessageDecoder to return null if decoding fails (currently throws exceptions)
This matches the documentation on MetadataDecoder.decode:
"@return The decoded metadata object, or null if the metadata could not be decoded."

PiperOrigin-RevId: 263767144
2019-08-23 16:59:50 +01:00
sr1990
3198b9efac Support negative value of the @r attrbute of S in SegmentTimeline element 2019-08-19 18:07:56 -07:00
aquilescanta
a572fb3f22 Add a metadata argument to Format factory methods used in HLS
Required for propagation of HlsMetadataEntry's in chunkless preparation.

PiperOrigin-RevId: 263324345
2019-08-15 14:41:51 +01:00
tonihei
0e33123938 Turn on non-null-by-default for some core library packages.
And add missing some missing annotations to the publicly visible API of these
packages.

PiperOrigin-RevId: 263134804
2019-08-15 14:41:51 +01:00
sr1990
4e50682fa7 Support negative value of the @r attrbute of S in SegmentTimeline element 2019-08-12 18:18:12 -07:00
tonihei
389eca6e07 Merge robolectric_testutils into testutils.
We no longer need two modules as AndroidX-Test takes care of the system
abstraction and we no longer have Robolectric Handler/Looper workarounds.

PiperOrigin-RevId: 262363201
2019-08-09 18:36:32 +01:00
tonihei
074b6f8ebd Fix DASH module API nullability issues and add package-level non-null-by-default
PiperOrigin-RevId: 262123595
2019-08-09 18:33:58 +01:00
ibaker
3b9288b805 Migrate literal usages of 1000 to (new) C.MILLIS_PER_SECOND
This only covers calls to scaleLargeTimestamp()

PiperOrigin-RevId: 261878019
2019-08-06 15:53:37 +01:00
tonihei
17a9030e1d Update stale TrackSelections in chunk sources when keeping the streams.
If we keep streams in chunk sources after selecting new tracks, we also keep
a reference to a stale disabled TrackSelection object. Fix this by updating
the TrackSelection object when keeping the stream. The static part of the
selection (i.e. the subset of selected tracks) stays the same in all cases.

Issue:#6256
PiperOrigin-RevId: 261696082
2019-08-05 20:27:24 +01:00
olly
fb0481c520 Bump annotations dependency + update release notes
PiperOrigin-RevId: 261353271
2019-08-02 19:04:56 +01:00
olly
d77d661e52 Default viewport constraints to match primary display
PiperOrigin-RevId: 260479923
2019-07-29 21:27:46 +01:00
tonihei
3fe0b1a6fe Rename SourceInfoRefreshListener to MediaSourceCaller.
This better reflects its usage as a caller identifier and not just a listener.

PiperOrigin-RevId: 257827188
2019-07-14 16:25:18 +01:00
tonihei
ccc82cdb4a Remove some remaining references to manifests.
PiperOrigin-RevId: 257757496
2019-07-14 16:24:21 +01:00
aquilescanta
91750b8009 Plumb DrmSessionManager into DashMediaSource
PiperOrigin-RevId: 257576791
2019-07-14 16:22:22 +01:00
bachinger
49a2e5a5cb add manifest to Timeline.Window
- Remove manifest argument from callbacks of Player.EventListener and
  SourceInfoRefreshListener. Instead make it accessible through
  Player.getCurrentManifest() and Timeline.Window.manifest.
- Fix all MediaSource implementation to include the manifest in the
  Timeline instead of passing it to the SourceInfoRefreshListener.
- Refactor ExoPlayerTestRunner, FakeTimeline, FakeMediaSource to
  reflect these changes and make tests pass.

PiperOrigin-RevId: 257359662
2019-07-14 16:20:45 +01:00
Oliver Woodman
16bf7f9106 Merge pull request #5908 from sr1990:dev-v2
PiperOrigin-RevId: 256147805
2019-07-02 17:49:45 +01:00
tonihei
2a765f6b5a Visibility clean-up: Don't extend visibility of protected methods in overrides.
PiperOrigin-RevId: 255412493
2019-07-02 17:46:30 +01:00
sr1990
ec6604b4f7 [Patch V4] Support signalling of last segment number via supplemental descriptor in mpd. 2019-06-26 20:29:37 -07:00
sr1990
5f6a7fc7f1 [Patch V3] Support signalling of last segment number via supplemental descriptor in mpd. 2019-06-22 18:56:06 -07:00
sr1990
5b02f92dad [Patch V2] Support signalling of last segment number via supplemental descriptor in mpd 2019-06-10 22:22:15 -07:00
eguven
00b26a51df Modify DashDownloaderTest to test if content length is stored
PiperOrigin-RevId: 250655481
2019-05-30 15:26:32 +01:00
aquilescanta
04f3888550 Add allowOnlyClearBuffers to SampleQueue#read
Removes the need for duplicate calls to SampleQueue#read when
implementing DecryptionResources acquisition in the MediaSources.

PiperOrigin-RevId: 250298175
2019-05-30 15:25:28 +01:00
olly
3afdd7ac5a Put @Nullable annotation in the right place
PiperOrigin-RevId: 249828748
2019-05-30 15:10:55 +01:00