10006 Commits

Author SHA1 Message Date
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
ibaker
f0ae8afd80 Separate the dump files from the test assets
This allows us to more easily create different dumps derived from the
same assets.

This moves media/source files from `assets/` to `assets/media/` and
dump files from `assets/` to `assets/extractordumps/` and
`assets/audiosinkdumps/` as appropriate. I intend to add
`assets/playbackdumps/` in a future CL.

PiperOrigin-RevId: 326986283
2020-08-17 16:13:53 +01:00
insun
333ccedf80 Improve error message and correct reference to proper layout
PiperOrigin-RevId: 326944292
2020-08-17 16:13:43 +01:00
olly
49bf83a169 Media2: Remove MediaSourceFactory + DataSourceCallback
- Applications should generally use DefaultMediaSourceFactory,
  or their own custom implementation if they need one. Having the
  media2 extension implement its own version directly doesn't seem
  that useful.
- Remove support for CallbackMediaItem. This type of MediaItem
  doesn't go cross-process, and it seems like there would never
  be a use case where an app would need to generate one locally.
  If an app needs to provide data from a custom source, it should
  hook into ExoPlayer's way of doing this (i.e., use a UriMediaItem
  with a custom scheme, and inject a custom DataSource that can
  handle this scheme).

PiperOrigin-RevId: 326914465
2020-08-17 16:13:34 +01:00
olly
42cf213aea Media2 tests: Simplify code
- Use ExoPlayer DataSource instrumentation to intercept reads
- Use ExoPlayer Resource URIs
- Use ExoPlayer DefaultMediaSourceFactory

PiperOrigin-RevId: 326912324
2020-08-17 16:13:25 +01:00
olly
94b66f4c24 Specify which function is triggering a TimeoutException
PiperOrigin-RevId: 326666629
2020-08-17 16:13:16 +01:00
andrewlewis
977f0d1ed0 Scale AudioTrack buffer size for AudioTrack speed adjustment
PiperOrigin-RevId: 326642908
2020-08-17 16:13:07 +01:00
samrobinson
eabc486b58 Keep AudioTrack on seek - experimental.
PiperOrigin-RevId: 326622573
2020-08-17 16:12:58 +01:00
jaewan
c2ac33af1b Clean up PlayerWrapper exception log
PlayerWrapper throws Exception if getters is called in the
STATE_IDLE. In that case, log may print 50+ lines of stack
traces. It's verbose and can be considered as serious issue.

This CL include folloing changes
  - Change to use ExoPlayer's log class
  - Adjust log level, because it would be consumed by caller
  - Leave log when the debug flag is turned on.

Another CL will remove exceptions between PlayerWrapper and
and SessionPlayerConnector, not to use Exception for ordinary
control flow as the Effective Java suggests.

PiperOrigin-RevId: 326614559
2020-08-17 16:12:48 +01:00
olly
cdf07f1745 Media2 tests: Clean up assets
Even after this change, it's unclear to me why we need so many
assets for these tests. Just doing a minimal pass for now though!

PiperOrigin-RevId: 326613941
2020-08-17 16:12:39 +01:00
insun
602d880841 Fix StyledControlView's minimal mode bug and setShow{*}Button bug
There were two bugs in StyledPlayerControlView:
- Center icons are shown when toggling control view in minimal mode.
- `StyledControlView#setShow{*}Button` methods and corresponding
  `set_show_*_button` attributes didn't work properly.

This CL fixes bugs by controlling the buttons' visibility in one place,
StyledPlayerControlViewLayoutManager.

PiperOrigin-RevId: 326567213
2020-08-17 16:12:30 +01:00
jaewan
e6bf7bd0ff Migrate to use Player's top level playlist API
Being specific, this includes following changes
  - Remove PlaylistManager and TimelinePlaylistManager
    and use Player's playlist API directly.
  - Replace ConcatenatingMediaSource uses with
    ExoPlayer MediaItem.
  - Replace PlaybackPreparer uses with Player#prepare()
  - Add MediaItemConverter for developers to customize
    converting AndroidX MediaItems to ExoPlayer MediaItems
    and vice-versa.
  - Add DefaultMediaItemConverter for providing default
    implementation of both MediaItemConverter
    and MediaSourceFactory.

Note that removing PlaylistManager loses the ability
to suppress individual playlist API. But decided to remove
for simpler API set. The feature can be added back later
via explicit request.

PiperOrigin-RevId: 326463492
2020-08-17 16:12:21 +01:00
samrobinson
1b9992cf7a Add a GTS test for MediaFormat change occurring at the correct time.
PiperOrigin-RevId: 326428782
2020-08-17 16:12:12 +01:00
olly
339e3f899d Clean up release notes for 2.12: UI, downloads, DRM
PiperOrigin-RevId: 326427225
2020-08-17 16:12:03 +01:00