media/library
ibaker 58e307c6b0 Keep secure MediaCodec instances when disabling the renderer
A renderer is disabled (without being reset) in two situations:
* When transitioning into a period that starts with a discontinuity
* When stopping the player with setForegroundMode(true)

Before this change the behaviour of `MediaCodecRenderer` when disabled
(but not reset) depended on whether the content being decoded had an
associated `DrmSession`:
* For content without an associated DRM session the MediaCodec instance
  was kept alive.
* For content with an associated DRM session, the MediaCodec instance
  was released. This was to prevent the DRM session from staying alive
  and continuing to make license refresh network requests while the
  player was stopped in 'foreground mode'.

This change removes the second bullet, and keeps MediaCodec instances
alive in both the secure and insecure case. This will result in the
DRM machinery making occasional license refresh network requests (at
a frequency defined by the license policy) while the player is stopped
and in 'foreground mode'. This network usage is considered to be a
'limited resource' as described by the `ExoPlayer#setForegroundMode`
javadoc.

This means that switches between secure content (or between secure and
clear content when `MediaItem.drmConfiguration.sessionForClearTypes`
indicates a secure decoder should be used for clear content) should
keep the same video decoder, thus avoiding the 'black flash' that occurs
on some devices when switching the surface away from a secure decoder.

Issue: #8842

#minor-release

PiperOrigin-RevId: 376825501
2021-06-01 15:48:18 +01:00
..
all Include RTSP module in gradle project 2021-05-10 23:41:50 +01:00
common Allow to specify the number of removed ad groups in AdPlaybackState. 2021-05-27 18:49:53 +01:00
core Keep secure MediaCodec instances when disabling the renderer 2021-06-01 15:48:18 +01:00
dash Remove deprecated MediaSource.getTag 2021-05-12 11:52:03 +01:00
extractor Add test for ColorInfo in MP4 2021-05-27 10:44:50 +01:00
hls Fix issue where getFirstSampleIndex was called on spliced in chunks. 2021-05-21 12:05:23 +01:00
rtsp Use more factory method to create ParserException. 2021-05-27 16:04:10 +01:00
smoothstreaming Remove deprecated MediaSource.getTag 2021-05-12 11:52:03 +01:00
transformer Format Java source files 2021-05-06 13:32:25 +01:00
ui Allow to specify the number of removed ad groups in AdPlaybackState. 2021-05-27 18:49:53 +01:00
README.md Tweak and add READMEs + remove refs to V1 2017-08-17 22:59:34 +01:00

ExoPlayer library

The ExoPlayer library is split into multiple modules. See ExoPlayer's top level README for more information about the available library modules and how to use them.