media/libraries
ibaker 97294f0693 Retry creating a MediaCodec instance in MediaCodecRenderer
It's been observed that some devices fail when releasing a secure codec
attached to a surface and immediately trying to create a new codec
(secure or insecure) attached to the same surface. This change catches
all exceptions thrown during codec creation, sleeps for a short time,
and then retries the codec creation. This is observed to fix the problem
(we believe this is because it allows enough time for some background
part of the previous codec release operation to complete).

This change should have no effect on the control flow when codec
creation succeeds first time. It will introduce a slight delay when
creating the preferred codec fails (while we sleep and retry), which
will either delay propagating a permanent error or attempting to
initialize a fallback decoder. We can't avoid the extra delay to
instantiating the fallback decoder because we can't know whether we
expect the second attempt to create the preferred decoder to succeed or
fail. The benefit to always retrying the preferred decoder creation
(fixing playback failures) outweighs the unfortunate additional delay
to instantiating fallback decoders.

Issue: google/ExoPlayer#8696
#minor-release
PiperOrigin-RevId: 414671743
2021-12-07 17:37:45 +00:00
..
cast Upgrade Cast dependency for Android 12 compatibility 2021-12-07 16:46:40 +00:00
common GL: Document ambiguous parameter names in comments. 2021-12-07 17:37:31 +00:00
database Update to androidx.media3 2021-10-27 09:12:46 +01:00
datasource Remove null keys from DefaultHttpDataSource#getResponseHeaders 2021-11-19 14:56:43 +00:00
datasource_cronet Update dependency versions 2021-11-19 14:42:25 +00:00
datasource_okhttp Update to androidx.media3 2021-10-27 09:12:46 +01:00
datasource_rtmp Make package in test manifest consistent 2021-11-08 15:18:26 +00:00
decoder Make package in test manifest consistent 2021-11-08 15:18:26 +00:00
decoder_av1 Update to androidx.media3 2021-10-27 09:12:46 +01:00
decoder_ffmpeg Make package in test manifest consistent 2021-11-08 15:18:26 +00:00
decoder_flac Make package in test manifest consistent 2021-11-08 15:18:26 +00:00
decoder_opus Make package in test manifest consistent 2021-11-08 15:18:26 +00:00
decoder_vp9 Make package in test manifest consistent 2021-11-08 15:18:26 +00:00
exoplayer Retry creating a MediaCodec instance in MediaCodecRenderer 2021-12-07 17:37:45 +00:00
exoplayer_dash Add optional id to TrackGroup. 2021-12-02 11:56:42 +00:00
exoplayer_hls Shorten log tags to 23 char limit 2021-12-07 17:37:31 +00:00
exoplayer_ima Don't drop updates of the playing period for skipped SSI ads 2021-12-02 09:58:49 +00:00
exoplayer_rtsp Merge pull request #9606 from ened:rtsp-socket-factory 2021-12-07 16:43:17 +00:00
exoplayer_smoothstreaming Add optional id to TrackGroup. 2021-12-02 11:56:42 +00:00
exoplayer_workmanager Update to androidx.media3 2021-10-27 09:12:46 +01:00
extractor Fix 1 ErrorProneStyle finding 2021-12-02 11:55:55 +00:00
session Remove setters for showing actions in Notification 2021-12-07 17:37:31 +00:00
test_data Fix re-encoding after flattening 2021-12-07 17:37:31 +00:00
test_exoplayer_playback Shorten log tags to 23 char limit 2021-12-07 17:37:31 +00:00
test_session_common Migrate media3.session references from Window to MediaItem 2021-11-08 15:13:41 +00:00
test_session_current Shorten log tags to 23 char limit 2021-12-07 17:37:31 +00:00
test_utils Shorten log tags to 23 char limit 2021-12-07 17:37:31 +00:00
test_utils_robolectric Migrate usages of Window-based Player methods 2021-11-09 10:07:30 +00:00
transformer Fix re-encoding after flattening 2021-12-07 17:37:31 +00:00
ui Document that channelNameResourceId needs to be set 2021-12-02 10:03:06 +00:00
ui_leanback Fixes for some minor misc issues 2021-11-19 14:44:25 +00:00