mirror of
https://github.com/androidx/media.git
synced 2025-05-18 13:09:56 +08:00

- The HlsSampleSource now owns the extractor. TsChunk is more or less dumb. The previous model was weird, because you'd end up "reading" samples from TsChunk objects that were actually parsed from the previous chunk (due to the way the extractor was shared and maintained internal queues). - Split out consuming and reading in the extractor. - Make it so we consume 5s ahead. This is a window we allow for uneven interleaving, whilst preventing huge read-ahead (e.g. in the case of sparse ID3 samples). - Avoid flushing the extractor for a discontinuity until it has been fully drained of previously parsed samples. This avoids skipping media shortly before discontinuities. - Also made start-up faster by avoiding double-loading the first segment. Issue: #3