mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
This plumbs a duration through `SampleQueue` which will make it easier to handle transcoding muxed subtitles from e.g. SubRip to `text/x-exoplayer-cues`. This change is a no-op to the end-to-end behaviour of ExoPlayer because currently we only support parsing sideloaded subtitles before `SampleQueue`, and by adding the duration we don't affect the cues that are ultimately output by `Player.Listener.onCues` (as shown by no change to the golden files for `WebvttPlaybackTest` in this commit). I considered making `CuesWithStartTimeAndDuration` implement `Bundleable` (and deleting `CueEncoder/Decoder`) but decided against it because we are deliberately not encoding `startTimeUs` (since that's encoded as the sample time in `SampleQueue`). I also considered introducing another type that only has `List<Cue>` and `durationUs` fields, but it didn't seem necessary, since we want `startTimeUs` everywhere else (except inside `SampleQueue`). PiperOrigin-RevId: 545226847 |
||
|---|---|---|
| .. | ||
| src | ||
| build.gradle | ||
| proguard-rules.txt | ||
| README.md | ||