media/libraries
tonihei 939643af13 Move playback speed update at period transitions to reading period.
In some cases we need to update the PlaybackParameters at period
boundaries, for example when switching from live to VOD and live
playback speed adjustment was still active at the point of switching.

Currently, we send the update when the playing MediaPeriod changes in
EPII, which is slightly too late because the new speed gets only applied
after the entire existing AudioTrack buffer has been played out.

We can time the update slightly better by updating the values at the
point where we change the reading period. This makes the update slightly
too early because it also applies to all samples currently in the
decoder. But generally, this is a lot better because the time spent
in the decoder is likely to be considerably lower than the duration of
the AudioTrack buffer.

Note that this change isn't perfectly aligning to the period boundary,
but reduces the number of samples with the wrong speed to a minimum.
If we are getting around to add additional code that allows updating
the speed at exactly the boundary, it also needs to be triggered from
the reading period update, so the new code location is also helpful in
the future.

Issue: google/ExoPlayer#9018
PiperOrigin-RevId: 424540551
2022-01-28 08:48:41 +00:00
..
cast Fix some lint warnings 2022-01-28 08:46:46 +00:00
common Fix some lint warnings 2022-01-28 08:46:46 +00:00
database Update to androidx.media3 2021-10-27 09:12:46 +01:00
datasource Change DefaultHttpDataSourceTest to an instrumentation test 2022-01-05 10:00:46 +00:00
datasource_cronet Fix some lint warnings 2022-01-28 08:46:46 +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 Rename StyledPlayerView to PlayerView 2022-01-25 18:10:42 +00:00
decoder_ffmpeg Add a builder to DefaultAudioSink 2021-12-07 17:37:45 +00:00
decoder_flac Add a builder to DefaultAudioSink 2021-12-07 17:37:45 +00:00
decoder_opus Fix 1 ErrorProneStyle finding: 2022-01-05 12:15:12 +00:00
decoder_vp9 Fix 1 ErrorProneStyle finding: 2022-01-25 19:16:31 +00:00
exoplayer Move playback speed update at period transitions to reading period. 2022-01-28 08:48:41 +00:00
exoplayer_dash Fix some lint warnings 2022-01-28 08:46:46 +00:00
exoplayer_hls Disable live speed adjustment where it has no benefit 2022-01-25 18:04:02 +00:00
exoplayer_ima Fix some lint warnings 2022-01-28 08:46:46 +00:00
exoplayer_rtsp Ignore invalid RTP-Info header value. 2022-01-25 19:08:54 +00:00
exoplayer_smoothstreaming Remove setTag from (Ss|Hls|Dash)MediaSource.Factory 2022-01-11 13:44:06 +00:00
exoplayer_workmanager Update to androidx.media3 2021-10-27 09:12:46 +01:00
extractor Merge pull request #9893 from moneytoo:mkv-vtt 2022-01-28 08:45:44 +00:00
session Fix some lint warnings 2022-01-28 08:46:46 +00:00
test_data Merge pull request #9893 from moneytoo:mkv-vtt 2022-01-28 08:45:44 +00:00
test_exoplayer_playback Extend support for audio spatialization in MediaCodecAudioRenderer 2022-01-25 18:59:43 +00:00
test_session_common Fix flaky MediaBrowserListenerTest 2022-01-25 18:34:25 +00:00
test_session_current Fix flaky MediaBrowserListenerTest 2022-01-25 18:34:25 +00:00
test_utils Remove Transformer-specific things from MediaCodecAdapter. 2022-01-25 18:05:31 +00:00
test_utils_robolectric Merge pull request #9864 from OxygenCobalt:vorbis-comments 2022-01-28 08:42:33 +00:00
transformer Apply suggested AVC profile depending on the API version. 2022-01-28 08:41:12 +00:00
ui Fix some lint warnings 2022-01-28 08:46:46 +00:00
ui_leanback Fixes for some minor misc issues 2021-11-19 14:44:25 +00:00