mirror of
https://github.com/samsonjs/media.git
synced 2026-04-11 12:15:47 +00:00
This change introduces two new types of method to `SubtitleParser`: 1. `parse()` methods that take a `Consumer<CuesWithTiming>` and return `void` 2. `parseToLegacySubtitle` method that returns `Subtitle` (1) ensures that in the new 'parse before SampleQueue' world we can write cues to the `SampleQueue` as soon as they're ready - this is especially important when parsing monolithic text files, e.g. for a whole movie. (2) ensures that during the transition, the legacy 'parse after SampleQueue' behaviour doesn't see any regressions in 'time to first cue being shown'. Previously we had a single implementation to convert from `List<CuesWithTiming>` to `Subtitle`, but this relies on the complete list of cues being available, which can take a long time for large files in some formats (with ExoPlayer's current parsing logic). By allowing implementations to customise the way they create a `Subtitle`, we can directly re-use the existing logic, so that the 'time to first cue being shown' should stay the same. This change migrates all **usages** to the new methods, but doesn't migrate any **implementations**. I will migrate the implementations in follow-up CLs before deleting the old list-returning `parse()` methods. PiperOrigin-RevId: 565057945 |
||
|---|---|---|
| .. | ||
| cast | ||
| common | ||
| container | ||
| database | ||
| datasource | ||
| datasource_cronet | ||
| datasource_okhttp | ||
| datasource_rtmp | ||
| decoder | ||
| decoder_av1 | ||
| decoder_ffmpeg | ||
| decoder_flac | ||
| decoder_midi | ||
| decoder_opus | ||
| decoder_vp9 | ||
| effect | ||
| exoplayer | ||
| exoplayer_dash | ||
| exoplayer_hls | ||
| exoplayer_ima | ||
| exoplayer_rtsp | ||
| exoplayer_smoothstreaming | ||
| exoplayer_workmanager | ||
| extractor | ||
| muxer | ||
| session | ||
| test_data | ||
| test_exoplayer_playback | ||
| test_session_common | ||
| test_session_current | ||
| test_utils | ||
| test_utils_robolectric | ||
| transformer | ||
| ui | ||
| ui_leanback | ||