6905 Commits

Author SHA1 Message Date
aquilescanta
6a55fda66d Add DRM protected content to the Cast demo APP
Allows testing DRM-protected content in the receiver app.

Includes the DRM-related data to the media items, but does not
add support for DRM content in the local player yet.

PiperOrigin-RevId: 229932329
2019-01-21 12:56:53 +00:00
andrewlewis
310925ca12 Upgrade to GVR SDK 1.190.0
Change the dependency to the new monolithic GVR SDK target.

PiperOrigin-RevId: 229931549
2019-01-21 12:56:43 +00:00
tonihei
23c07e5c4d Update buffer-based ABR to not select track in constructor.
This mimicks a similar change in the default AdaptiveTrackSelection.
Also adds an option to cap initial format height.

PiperOrigin-RevId: 229923149
2019-01-21 12:56:33 +00:00
olly
ef24125d20 Fix release notes for 2.9.4
PiperOrigin-RevId: 229841782
2019-01-21 12:56:22 +00:00
tonihei
9911c11191 Add start position to MediaSource.createPeriod.
That's the same position set in MediaPeriod.prepare (where it may be removed
in the future).

Having the position at an earlier point is necessary to fix an
issue with lazy preparation in ConcatenatingMediaSource where the prepare
position was assumed to be known but MediaPeriod.prepare hasn't been called
yet.

Issue:#5350
PiperOrigin-RevId: 229756637
2019-01-17 19:07:49 +00:00
bachinger
8bf1267495 allow developers to set the subText of the notifcation
Issue: #5344
PiperOrigin-RevId: 229527963
2019-01-17 19:03:45 +00:00
tonihei
ac86d3b5f6 Add missing @Nullable to SimpleExoPlayer fields and methods.
Issue:#5402
PiperOrigin-RevId: 229758525
2019-01-17 17:26:35 +00:00
tonihei
22413b8037 Add start position to MediaSource.createPeriod.
That's the same position set in MediaPeriod.prepare (where it may be removed
in the future).

Having the position at an earlier point is necessary to fix an
issue with lazy preparation in ConcatenatingMediaSource where the prepare
position was assumed to be known but MediaPeriod.prepare hasn't been called
yet.

Issue:#5350
PiperOrigin-RevId: 229756637
2019-01-17 17:26:24 +00:00
bachinger
76baa5724c solve nullness check warnings with asserts
PiperOrigin-RevId: 229755532
2019-01-17 17:26:14 +00:00
eguven
f2139d1b71 Add DownloadIndexUtil
This class includes helper methods to upgrade ActionFiles
and custom download records to DownloadIndex.

PiperOrigin-RevId: 229744441
2019-01-17 17:26:01 +00:00
bachinger
16a185de1d make PlayerNotificationListener better suited for foreground services
Issue: #5301
Issue: #4988
Issue: #4813
Issue: #5344
Issue: #5117
PiperOrigin-RevId: 229603354
2019-01-17 14:37:23 +00:00
eguven
ec77f737ee Make DownloadManager watch requirements directly
PiperOrigin-RevId: 229544734
2019-01-17 14:37:12 +00:00
bachinger
8adc16a623 allow developers to set the subText of the notifcation
Issue: #5344
PiperOrigin-RevId: 229527963
2019-01-17 14:37:00 +00:00
Zsolt Matyas
2621d962e7 CEA608: handling channel bits properly
[Problem]
CC1 is shown even when CC2-3-4 is selected

[Solution]
 * use incoming channel and frame information
 * Misc Codes need to handle use Frame information
 * Add checks everywhere

[Test]
* Live channels and already existing test should not show any difference
in behavior when CC1 is selected.
* Live channels might have CC2-CC3-CC4
* Sarnoff test content has specific test cases for channel support
2019-01-16 16:30:46 -08:00
tonihei
4483639f9a Fix bug where missing switch adaptation set causes multiple identical track groups.
When the extra adaptation set of a switch group isn't defined in the manifest, we
currently assume it's the first adaptation group. This either leads to wrong grouping
or duplicate track groups.

Such a case may easily happen if the manifest is filtered such that only one of the
switch adaptation sets will be present in the manifest.

PiperOrigin-RevId: 229365379
2019-01-15 15:25:45 +00:00
tonihei
4f1f4fbf49 Fix typo.
PiperOrigin-RevId: 229365333
2019-01-15 15:25:39 +00:00
tonihei
ca7675ceae Fix bug where missing switch adaptation set causes multiple identical track groups.
When the extra adaptation set of a switch group isn't defined in the manifest, we
currently assume it's the first adaptation group. This either leads to wrong grouping
or duplicate track groups.

Such a case may easily happen if the manifest is filtered such that only one of the
switch adaptation sets will be present in the manifest.

PiperOrigin-RevId: 229365379
2019-01-15 15:24:16 +00:00
tonihei
c6092bbb43 Fix typo.
PiperOrigin-RevId: 229365333
2019-01-15 15:24:03 +00:00
olly
84574d9c11 Bump version for 2.9.4 release
PiperOrigin-RevId: 229364563
2019-01-15 15:06:18 +00:00
olly
36883e6277 Bump version for 2.9.4 release
PiperOrigin-RevId: 229364563
2019-01-15 15:03:35 +00:00
Oliver Woodman
3b5e8ada31 Merge pull request #5355 from zsmatyas:dev-v2
PiperOrigin-RevId: 229364147
2019-01-15 15:03:24 +00:00
Oliver Woodman
516e02c696 Fix release branch 2019-01-15 14:32:15 +00:00
tonihei
e1b55e6d27 Add buffer flag for last sample to improve buffered position calculation.
The buffered position is currently based on the mimimum queued timestamp of
all AV tracks. If the tracks have unequal lengths, one track continues loading
without bounds as the "buffered position" will always stay at the shorter
track's duration.

This change adds an optional buffer flag to mark the last sample of the
stream. This is set in the Mp4Extractor only so far. ExtractorMediaSource
uses this flag to ignore AV streams in the buffered duration calculation if
they already finished loading.

Issue:#3670
PiperOrigin-RevId: 229359899
2019-01-15 14:31:18 +00:00
tonihei
b97b35e2e0 Add buffer flag for last sample to improve buffered position calculation.
The buffered position is currently based on the mimimum queued timestamp of
all AV tracks. If the tracks have unequal lengths, one track continues loading
without bounds as the "buffered position" will always stay at the shorter
track's duration.

This change adds an optional buffer flag to mark the last sample of the
stream. This is set in the Mp4Extractor only so far. ExtractorMediaSource
uses this flag to ignore AV streams in the buffered duration calculation if
they already finished loading.

Issue:#3670
PiperOrigin-RevId: 229359899
2019-01-15 14:29:07 +00:00
tonihei
fcda01eb5c Remove messages on release of ConcatenatingMediaSource.
That was previously handled by the player. But since we switched to Handler
messages instead of player messages, we should do that manually.

PiperOrigin-RevId: 229341747
2019-01-15 14:28:56 +00:00
tonihei
1900e94144 Do not select a track in AdaptiveTrackSelection constructor.
This is not necessary as the track selection needs to be updated with
updateSelectedTrack anyway. It's also error-prone as the selection code
calls into a protected method of a not fully initialized class.

PiperOrigin-RevId: 229331669
2019-01-15 14:28:46 +00:00
olly
546af063d6 Fix DRM protected SmoothStreaming with subtitles
Issue: #5378
PiperOrigin-RevId: 229261658
2019-01-15 14:15:38 +00:00
tonihei
66ca43ed1d Don't forget isSeekable in ExtractorMediaSource.
We currently forget whether a source is seekable at re-preparation. This was
implemented intentionally this way under the assumption that we really can't seek
until we have loaded the seek map again. However, seek operations are only
allowed after a media period is prepared. So there is no harm in remembering
whether a source is seekable.

This problem currently prevents reusing ClippingMediaSources with
ExtractorMediaSource and a non-zero start clip position.

Issue: #5351
PiperOrigin-RevId: 229169441
2019-01-15 14:13:34 +00:00
andrewlewis
34d0e0cea1 Blacklist OMX.SEC.mp3.dec for more devices
Issue: #4519
PiperOrigin-RevId: 229145790
2019-01-15 14:13:03 +00:00
tonihei
81ca7fe090 Add missing call to timeline.getWindow.
The window object is used without being filled with data. This used to work
well for most cases as the same live stream is sending regular updates and the
first update is almost never used if it's not the first item in a playlist.

It causes problems when the first timeline update of a live stream is actually
used for playback (e.g. when the live stream is lazily prepared in a playlist
and played first).

PiperOrigin-RevId: 228530232
2019-01-15 14:12:25 +00:00
tonihei
e760965595 Update README and dev guide with Java 8 config for Kotlin.
Setting the target conpatibility only seems to work for Java. Added the
equivalent Kotlin config options to the docs.

Issue:#5276
PiperOrigin-RevId: 228482496
2019-01-15 14:12:09 +00:00
olly
80645056d2 Doc fix.
PiperOrigin-RevId: 228296962
2019-01-15 14:11:25 +00:00
aquilescanta
93f4a19f07 Expand check for muxed audio media tags to include uris that match variants
Issue:#5313
PiperOrigin-RevId: 228155222
2019-01-15 14:10:59 +00:00
aquilescanta
32bad69158 Increase search size in mp4 sniffing once moov has been found
Issue:#5320
PiperOrigin-RevId: 228142567
2019-01-15 14:10:53 +00:00
andrewlewis
ff9a40f0d7 Update FakeAd overrides
These are part of published IMA SDK 3.10.2.

PiperOrigin-RevId: 227861713
2019-01-15 14:10:19 +00:00
andrewlewis
99bc13221c Treat AVERROR_INVALIDDATA as non-fatal
Also configure the FFmpeg context to ignore errors as far as possible (this
appears to have an effect only for certain decoders).

Issue: #5293
PiperOrigin-RevId: 227851397
2019-01-15 14:10:02 +00:00
andrewlewis
189e3c31be Fix nullness issue
PiperOrigin-RevId: 227822937
2019-01-15 14:09:18 +00:00
andrewlewis
a568fbdd51 Parse frame rate from 'mdta' metadata
PiperOrigin-RevId: 227813461
2019-01-15 14:09:04 +00:00
aquilescanta
4847889a2f Prevent IllegalStateException in Mp4 sniffing
If a negative value is read, sniffing should just fail.

PiperOrigin-RevId: 227689568
2019-01-15 14:07:59 +00:00
aquilescanta
61a7750f23 Enable setOutputSurfaceWorkaround for Huawei P10 lite
Issue:#5312
PiperOrigin-RevId: 227673949
2019-01-15 14:07:28 +00:00
aquilescanta
aff689a7da Fix bug when calculating EOF position in mp4 sniffing
PiperOrigin-RevId: 227668426
2019-01-15 14:07:18 +00:00
tonihei
fc16833903 Use Handler instead of ExoPlayer messages in ConcatenatingMediaSource
ExoPlayer methods must not be called from any thread besides the specified
app thread. Therefore we shouldn't use them here. Using a regular Handler
instead is fully equivalent.

Issue:#5240
PiperOrigin-RevId: 227650489
2019-01-15 14:07:05 +00:00
andrewlewis
f11abbda97 Fix replacement char check
PiperOrigin-RevId: 227646358
2019-01-15 14:06:47 +00:00
olly
6373554d6a Move syncFileDescriptor to use an experimental method
PiperOrigin-RevId: 227520168
2019-01-15 14:05:21 +00:00
andrewlewis
13638f1c29 Remove AdsLoader listeners on releasing ImaAdsLoader
Issue: #4114
PiperOrigin-RevId: 227516509
2019-01-15 14:05:00 +00:00
olly
e448ecdff8 Remove stray word
PiperOrigin-RevId: 227500707
2019-01-15 14:04:06 +00:00
andrewlewis
d3f5057d59 Handle rectangular rotation projections in Matroska
See also https://github.com/Matroska-Org/matroska-specification/issues/269.

PiperOrigin-RevId: 226758584
2019-01-15 14:03:54 +00:00
aquilescanta
c0cdf3cd2d Handle failure to get Cast context more gracefully
Issue:#4160
Issue:#4743
PiperOrigin-RevId: 225813243
2019-01-15 14:00:12 +00:00
aquilescanta
c9cf8e409d Update the Cast framework dependency
PiperOrigin-RevId: 225812585
2019-01-15 13:57:03 +00:00
tonihei
f79005ab0a Fix manifest uri in SsDownloadHelper.
This is the same as in SsMediaSource.

PiperOrigin-RevId: 225001911
2019-01-15 13:47:53 +00:00