media/libraries
michaelkatz 2a1e71b203 Reduce needless loading period resets in clipping mediasource playlists
When a `SampleQueue` is prepared prior to playback, the start position may be less than the timestamp of the first sample in the queue and still be valid. This scenario can come about with specific clipping values and if all samples are sync samples. Currently, with `ClippingMediaPeriods` around `ProgressiveMediaPeriods`, if the `SampleQueue` has already been reset through the seekTo operation in `onPrepared`, then in the aforementioned scenario the seekTo operation in `handleDiscontinuity` will remove all samples and reset the loading periods unnecessarily.

The solution is that if the `ProgressiveMediaPeriod` has already handled a seekTo operation for the same position and the sample queue has not been read yet, then loading does not need to be reset.

The tests in `MergingPlaylistPlaybackTest` were specifically causing this behavior through its setup of `MergingMediaSources` around clipped `FilteringMediaSources`. Since the video content was not 'all sync samples', there would always be a discontinuity to handle and the audio content being 'all sync samples' would start with samples post start time.

These changes also remove the flakiness from the `MergingPlaylistPlaybackTest`.

PiperOrigin-RevId: 686858444
2024-10-17 04:20:50 -07:00
..
cast Remove @DoNotInline annotations 2024-09-18 04:47:39 -07:00
common Make VideoGraph and VideoFrameProcessor listener methods optional 2024-10-17 02:38:03 -07:00
common_ktx Add jvmTarget and kotlin-android plugin to common_ktx module 2024-08-15 10:36:10 -07:00
container Rename Atom to Mp4Box, and move it to container module 2024-08-15 05:44:32 -07:00
database Do not trim audio samples by changing their timestamp 2023-06-29 22:50:04 +00:00
datasource Update StatsDataSource.lastOpenedUri & responseHeader in finally 2024-10-14 06:38:56 -07:00
datasource_cronet Run CronetDataSource contract test for all Cronet providers 2024-08-01 10:49:37 -07:00
datasource_okhttp Automated Code Change 2024-08-07 12:28:25 -07:00
datasource_rtmp Remove exoplayer2-only javadoc machinery from media3 2023-06-05 09:47:58 +00:00
decoder MediaCodecVideoRenderer skips decoder inputs unused as reference 2024-07-09 03:43:06 -07:00
decoder_av1 Add 16 KB page support for decoder extensions on Android 15 2024-10-10 10:18:20 -07:00
decoder_ffmpeg Add 16 KB page support for decoder extensions on Android 15 2024-10-10 10:18:20 -07:00
decoder_flac Re-enable disabled tests in FlacExtractorSeekTest 2024-10-11 04:38:25 -07:00
decoder_iamf Simplify Flac extension build process 2024-10-11 03:09:32 -07:00
decoder_midi Add missing module registrations 2024-05-23 04:50:01 -07:00
decoder_opus Simplify Flac extension build process 2024-10-11 03:09:32 -07:00
decoder_vp9 Add 16 KB page support for decoder extensions on Android 15 2024-10-10 10:18:20 -07:00
effect Make VideoGraph and VideoFrameProcessor listener methods optional 2024-10-17 02:38:03 -07:00
exoplayer Reduce needless loading period resets in clipping mediasource playlists 2024-10-17 04:20:50 -07:00
exoplayer_dash Remove unused CapturingRenderersFactory from DASH playback test 2024-10-15 04:11:42 -07:00
exoplayer_hls Attach a Surface in HlsPlaybackTest.cmcdEnabled_withInitSegment 2024-10-16 05:46:22 -07:00
exoplayer_ima Account for missing preroll when converting adPodIndex to adGroupIndex 2024-10-04 08:11:04 -07:00
exoplayer_rtsp Format with google-java-format 2024-09-12 04:47:05 +00:00
exoplayer_smoothstreaming Formatting and javadoc 2024-10-09 13:50:30 +01:00
exoplayer_workmanager Remove exoplayer2-only javadoc machinery from media3 2023-06-05 09:47:58 +00:00
extractor Add ForwardingTrackOutput implementation 2024-10-16 04:20:33 -07:00
muxer Add VP9 test to Mp4MuxerEndToEndNonParameterizedAndroidTest 2024-10-16 08:37:41 -07:00
session Cache children when subscribing 2024-10-15 10:40:29 -07:00
test_data Add VP9 test to Mp4MuxerEndToEndNonParameterizedAndroidTest 2024-10-16 08:37:41 -07:00
test_exoplayer_playback Revert erroneous changes 2024-07-24 16:17:02 +01:00
test_session_common Cache children when subscribing 2024-10-15 10:40:29 -07:00
test_session_current Use SessionError error codes to make lint happy 2024-10-17 03:43:59 -07:00
test_utils Remove allocator param from MediaSourceTestRunner constructor 2024-10-17 02:00:08 -07:00
test_utils_robolectric Bump minSdk to 21 and remove resulting simple dead code 2024-07-12 08:11:01 -07:00
transformer Remove deprecated DefaultEncoderFactory constructors. 2024-10-17 01:53:23 -07:00
ui Disable the language/role flag preferences when selecting "none" 2024-10-04 10:42:27 -07:00
ui_leanback Bump effect and leanback minSdk to 19 2024-01-10 07:22:00 -08:00
lint.xml Update recommended way to suppress @UnstableApi errors in lint.xml 2023-11-15 02:34:40 -08:00