mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00

This replaces all the duplicated logic previously implemented in FakeSampleStream and more closely follows the pattern of how SampleStreams are used from real MediaPeriods. Some tests needed adjustments because using real the SampleQueue improved behaviour: - Waiting for isLoading is only needed once even across period boundaries because the real SampleQueue doesn't have the on/off pattern. - AnalyticsCollectorTest.playlistOperations() was wrongly asserting that some pre-buffering events. The new version is more intuitively correct we pre-buffer the second item during the initial loading phase (thus period1seq1) and keep the buffer in the queue after the removal operation. PiperOrigin-RevId: 348440255