media/libraries
samrobinson d0afb96c40 Implement repeat mode for CompositionPlayer.
-----

Context:
* Each sequence is wrapped as a single MediaSource, each being played
by an underlying ExoPlayer.
* Repeat mode is typically implemented in Players as a seek to the next
item in the playlist.

-----

This CL:

Repeat mode is triggered by listening for when the main input player
sees a play when ready change due to the end of the media item.

There is a slight delay at the end of the playback, before it repeats.
Setting repeat mode on the underlying players addresses this, but means
that the players will seek without waiting for the CompositionPlayer,
and as such previewAudioPipeline does not get the correct signals
around blocking/flushing.

PreviewAudioPipeline - The seek position can validly be C.TIME_UNSET,
however preview pipeline did not handle this case.

CompositionPlayer getContentPosition is given (through a lambda) as a
supplier to the State object, which means any comparisons between
previous/new state for this value does not work. In SimpleBasePlayer,
there is logic to use the positionDiscontinuityPositionUs for the
position change (see getPositionInfo called from
updateStateAndInformListeners), however this logic is not considered in
getMediaItemTransitionReason, so a condition needed to be added for
this case.

-----

Tests:
* Dump files clearly show the position and data is repeated.
* Assertions on the reasons for transitions or position
discontinuities.
PiperOrigin-RevId: 653210278
2024-07-17 06:22:02 -07:00
..
cast Formatting fixes and additional plumbin in legacy controller 2024-06-14 17:47:03 +01:00
common Implement repeat mode for CompositionPlayer. 2024-07-17 06:22:02 -07:00
container Allow negative presentation time in ReorderingSeiMessageQueue 2024-07-17 03:43:34 -07:00
database Do not trim audio samples by changing their timestamp 2023-06-29 22:50:04 +00:00
datasource Bump minSdk to 21 and remove resulting simple dead code 2024-07-12 08:11:01 -07:00
datasource_cronet Support multiple DataSource configurations in DataSourceContractTest 2024-07-10 05:01:33 -07:00
datasource_okhttp Remove OkHttpDataSource constructors & OkHttDataSourceFactory 2024-05-23 10:03:12 -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 Replace or suppress deprecated usages 2024-01-26 10:06:18 -08:00
decoder_ffmpeg Replace or suppress deprecated usages 2024-01-26 10:06:18 -08:00
decoder_flac Rollback of 8e2869278c 2024-02-15 02:35:12 -08:00
decoder_iamf/src Add skeleton of the IAMF JNI wrapper for the native decoder in libiamf. 2024-07-16 02:54:21 -07:00
decoder_midi Add missing module registrations 2024-05-23 04:50:01 -07:00
decoder_opus Rollback of 8e2869278c 2024-02-15 02:35:12 -08:00
decoder_vp9 Rollback of 8e2869278c 2024-02-15 02:35:12 -08:00
effect implement getDurationAfterEffectApplied in TimestampAdjustment Effect 2024-07-17 06:07:27 -07:00
exoplayer Rollback of 9151dbf9e6 2024-07-17 05:08:52 -07:00
exoplayer_dash Rollback of 9151dbf9e6 2024-07-17 05:08:52 -07:00
exoplayer_hls Rename DummyTrackOutput and DummyExtractorOutput 2024-06-25 05:07:56 -07:00
exoplayer_ima Remove Bundleable type & Bundleable.Creator<Foo> CREATOR fields 2024-06-11 08:05:32 -07:00
exoplayer_rtsp Add NAL unit parsing needed for stereo MV-HEVC playback. 2024-06-27 08:39:12 -07:00
exoplayer_smoothstreaming Default to parse subtitles while extracting, instead of while rendering 2024-05-16 01:42:56 -07:00
exoplayer_workmanager Remove exoplayer2-only javadoc machinery from media3 2023-06-05 09:47:58 +00:00
extractor Add H264_ prefix to NalUnitUtil.NAL_UNIT_TYPE_* constants 2024-07-12 08:02:24 -07:00
muxer Add support for 3gpp h263 codec in Mp4Muxer. 2024-07-17 04:53:28 -07:00
session Enable lint errors in session tests 2024-07-17 03:50:05 -07:00
test_data Implement repeat mode for CompositionPlayer. 2024-07-17 06:22:02 -07:00
test_exoplayer_playback Bump minSdk to 21 and remove resulting simple dead code 2024-07-12 08:11:01 -07:00
test_session_common Improve automatic error replication for legacy browsers 2024-07-01 09:47:25 -07:00
test_session_current Further unapplied rotation clean-up 2024-07-16 03:35:46 -07:00
test_utils Remove dead code related to MediaCodec now minSdk is 21 2024-07-15 08:51:35 -07:00
test_utils_robolectric Bump minSdk to 21 and remove resulting simple dead code 2024-07-12 08:11:01 -07:00
transformer Implement repeat mode for CompositionPlayer. 2024-07-17 06:22:02 -07:00
ui Further unapplied rotation clean-up 2024-07-16 03:35:46 -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