9768 Commits

Author SHA1 Message Date
olly
185be99d61 Split trivial changes from 2.12 into a 2.11.8 release
PiperOrigin-RevId: 327599049
2020-08-21 12:51:05 +01:00
jaewan
25c26cdbb4 Return state masked Player values from SessionPlayerConnector
Before this CL, SessionPlayerConnector getters had returned
UNKNOWN_TIME in idle state. It was because
SessionPlayerConnector had followed AndroidX media2
MediaPlayer's behavior, which was the baseline code of the
SessionPlayerConnector.

With this CL, SessionPlayerConnector getters directly return
underlying Player's value, rather than considering calls
in IDLE state as an exception and fallbacks to the default
UNKNOWN_TIME.

PiperOrigin-RevId: 327420940
2020-08-21 12:50:56 +01:00
ibaker
3af82b2a8b Skip WV tests on devices where WV is unsupported
PiperOrigin-RevId: 327392056
2020-08-21 12:50:47 +01:00
ibaker
b85ff574a9 Relax ExoHostedTest#MAX_PLAYING_TIME_DISCREPANCY_MS
PiperOrigin-RevId: 327391755
2020-08-21 12:50:38 +01:00
jaewan
e965ed92f8 Rename DefaultMediaItemProvider to MediaIdMediaItemProvider
PiperOrigin-RevId: 327307736
2020-08-21 12:50:29 +01:00
olly
8c5af10ab0 Don't pass INDEX_UNSET to ExoPlayer seek methods
It's not valid, and will cause IllegalSeekPositionException to be thrown

PiperOrigin-RevId: 327301325
2020-08-21 12:50:20 +01:00
olly
ee743870d8 Media2 extension: Make DefaultMediaItemConverter more useful
- Remove throwing of IllegalStateException
- Make it non-final so additional metadata can be more easily filled in

PiperOrigin-RevId: 327292208
2020-08-21 12:50:11 +01:00
jaewan
bddb29c431 Ban FileMediaItem and CallbackMediaItem
PiperOrigin-RevId: 327268964
2020-08-21 12:50:01 +01:00
jaewan
2299c4e609 Update SessionPlayerConnector documentation
ExoPlayer is now the trusted source of playlist and can be
used by other components without breaking
SessionPlayerConnector's cached playlist.

PiperOrigin-RevId: 327266929
2020-08-21 12:49:52 +01:00
jaewan
4782e227eb Rename androidX MediaItem to media2 MediaItem
In AndroidX, both media1 and media2 have MediaItem classes,
so change the naming to remove ambiguity.

PiperOrigin-RevId: 327261260
2020-08-21 12:49:43 +01:00
jaewan
e6d36e8b92 Add SessionPlayerConnector ctor that use DefaultMediaItemConverter
PiperOrigin-RevId: 327258863
2020-08-21 12:49:34 +01:00
jaewan
b39721f4b5 Make ExoPlayer as the trusted source of playlist
Playlist can now be obtained directly from Timeline windows
in any state. So make ExoPlayer as the trusted source of
playlist, instead of SessionPlayerConnector.

PlayerWrapper still need to keep the list of media items.
It's used to detect whether the Timeline change is caused by
changes in media items or not, and only notify
SessionPlayer.PlayerCallback#onPlaylistChanged() only when
the playlist is really changed.

PiperOrigin-RevId: 327231820
2020-08-21 12:49:25 +01:00
aquilescanta
79a846eb5e Fix check in placeholder session acquisition
PiperOrigin-RevId: 327223824
2020-08-21 12:49:16 +01:00
aquilescanta
41e6577dca Remove DrmSessionManager.acquirePlaceholderSession
In order to acquire a placeholder session, clients can call acquireSession
with a format with a null drmInitData.

PiperOrigin-RevId: 327220249
2020-08-21 12:49:06 +01:00
jaewan
be98509e03 Workaround test failure with stable release of media2.session
MediaSession requires prepared Looper in 1.0.3-stable release,
which is the latest stable release for now.

The requirement would be removed in 1.1.0-stable, but workaround
is needed meanwhile.

PiperOrigin-RevId: 327220042
2020-08-21 12:48:57 +01:00
olly
d0d5e8ec8f Clean up release notes for 2.12: Start fixing core notes
PiperOrigin-RevId: 327203178
2020-08-21 12:48:48 +01:00
olly
7588c26b60 Remove support for cbc1 and cens encryptions schemes
PiperOrigin-RevId: 327199833
2020-08-21 12:48:39 +01:00
ibaker
54c92080bf Fix nullness warnings in testutil package
PiperOrigin-RevId: 327190676
2020-08-21 12:48:29 +01:00
Oliver Woodman
1475f78dc6 Fix tests 2020-08-20 00:00:38 +01:00
olly
bcc4f797b2 Demo app: Fix DRM support check for ClearKey
Issue: Issue: #7735
PiperOrigin-RevId: 325900705
2020-08-19 18:42:26 +01:00
Oliver Woodman
4faee07d57 Tweak release note 2020-08-19 18:38:36 +01:00
Oliver Woodman
629fe637f7 Bump version to 2.11.8 2020-08-19 18:35:35 +01:00
olly
1c7c6fb90d Increase flexibility of ISM URL handling
PiperOrigin-RevId: 326025335
2020-08-19 18:33:35 +01:00
olly
590e81e5ae Infer ISM content type from URL specified extension
PiperOrigin-RevId: 326012248
2020-08-19 18:27:23 +01:00
olly
fc2e4ef4fa TS EsInfo: Be robust against a invalid descriptor length
Issue: Issue: #7722
PiperOrigin-RevId: 325431839
2020-08-19 18:21:12 +01:00
olly
62829be1ce FMP4: Correctly handle multiple sbgp and sgpd boxes
Find sbgp and sgpd boxes with grouping_type == seig in the case they don't
come first. Previoulsy we would only find them if they came first.

Issue: Issue: #7716
PiperOrigin-RevId: 325407819
2020-08-19 18:21:05 +01:00
olly
36efdc7492 Fix MP4 sniffing for very short files
The sniffer sniffs boxes at the start of the file to try and determine
whether the file is fragmented. However, if the file is extremely short
then it's possible that sniffing will try and read beyond the end of
the file, resulting i EOFException being thrown.

In general it's OK for sniffing to throw EOFException if the file is
not of the correct type. The problem in this case is that EOFException
can be thrown for an actual MP4 file, due to the sniffer continuing up
sniff atoms up to bytesToSearch in case the file is fragmented.

PiperOrigin-RevId: 325205389
2020-08-19 18:14:45 +01:00
kimvde
43b80fbb78 FragmentedMp4Extractor: allow both first_sample_flags and sample_flags
Having both in the trun box is not allowed (see section section 8.8.8.1
of ISO/IEC 14496-12:2015) but this CL makes the code more robust in case
this happens. Before this change, the first sample flag was not read,
making subsequent reads incorrect.

Issue: #7698
PiperOrigin-RevId: 325212160
2020-08-19 18:12:29 +01:00
ibaker
d0875ce790 Document that ConditionVariable instances start closed
PiperOrigin-RevId: 324002247
2020-08-19 18:10:43 +01:00
krocard
8c8ffe601d OMX.broadcom.video_decoder.tunnel.secure needs EOS workaround
The passthrough codec does not propagate
the EOS back to ExoPlayer.

Issue: https://github.com/google/ExoPlayer/issues/7647
PiperOrigin-RevId: 323758941
2020-08-19 18:10:34 +01:00
olly
c010d28b14 FLV: Ignore invalid SCRIPTDATA name type, rather than fail playback
Issue: #7675
PiperOrigin-RevId: 323371286
2020-08-19 18:07:20 +01:00
olly
3198c51bdb Remove invalid documentation that causes javadoc to crash
PiperOrigin-RevId: 322311636
2020-08-19 18:04:08 +01:00
krocard
53d12747e5 Name [-1,1] the "nominal" range of float samples
Float values are allowed to be > 0dbfs,
it is just not nominal as it will might
distort the signal when played without
attenuation.

This is also consistent with
[AudioTrack.write(FloatBuffer)](https://developer.android.com/reference/android/media/AudioTrack#write(float[],%20int,%20int,%20int)) that explicitly
allows it up to 3dbfs.

PiperOrigin-RevId: 321345077
2020-08-19 18:00:37 +01:00
olly
c5edc1c2f5 Clip float point PCM to its allowed range before resampling
PiperOrigin-RevId: 321340777
2020-08-19 17:57:16 +01:00
andrewlewis
c0cd73f5fd Upgrade IMA SDK to 3.19.4
This brings in a fix for the IMA SDK ignoring the media load timeout.

Issue: #7170
PiperOrigin-RevId: 320557386
2020-08-19 17:57:10 +01:00
kimvde
3b7669ff72 Fix saiz and senc sample count checks for FMP4
Issue: #7592
PiperOrigin-RevId: 320556981
2020-08-19 17:56:22 +01:00
andrewlewis
4633a63546 Upgrade IMA to 3.19.2
PiperOrigin-RevId: 319764381
2020-08-19 17:51:43 +01:00
kimvde
f1dd1894fa Add compatible brands to MP4 sniffer
Issue: #7584
PiperOrigin-RevId: 319744023
2020-08-19 17:51:33 +01:00
William King
b7739283e0 add back removed tests 2020-08-18 21:25:48 -07:00
William King
081c5900bf add mkv samples 2020-08-18 21:21:11 -07:00
kimvde
99d245f7a6 Open source MetadataRetriever
Issue: #3609
PiperOrigin-RevId: 327176362
2020-08-18 08:12:05 +01:00
insun
b853978a91 Fix bug to show 'play' button at the end of stream
PiperOrigin-RevId: 327158791
2020-08-18 08:11:54 +01:00
kimvde
103bb98dba Revert Copybara config to avoid error when syncing the dev-v2 branch.
PiperOrigin-RevId: 327013751
2020-08-17 16:20:03 +01:00
aquilescanta
4cd8f00d72 Avoid setting a PMT reader if one exists for the same PID
This change should only affect HLS, where we don't remove the
PAT reader after reading a PAT.

Issue: #7756
PiperOrigin-RevId: 327008936
2020-08-17 16:14:57 +01:00
olly
f2d2e6475a Bump release to 2.12.0
PiperOrigin-RevId: 327005645
2020-08-17 16:14:48 +01:00
olly
513b301e77 ExoPlaybackException: Align some method naming
PiperOrigin-RevId: 327003695
2020-08-17 16:14:39 +01:00
olly
7ef31e2208 Tweak DefaultMediaSourceFactory documentation
PiperOrigin-RevId: 327000958
2020-08-17 16:14:30 +01:00
olly
02ed809a18 Tweak offload disable Javadoc
PiperOrigin-RevId: 326998407
2020-08-17 16:14:21 +01:00
kimvde
10fa745fab Open source MetadataRetriever
Issue: #3609
PiperOrigin-RevId: 326991376
2020-08-17 16:14:12 +01:00
ibaker
5950557086 Add a release note about WebView-based subtitle output
Also re-word some existing subtitle notes

PiperOrigin-RevId: 326989276
2020-08-17 16:14:02 +01:00