mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Add subtitle parsing support in HLS for TS files
PiperOrigin-RevId: 582714493
This commit is contained in:
parent
d5fbf0007b
commit
b750ad50f9
@ -72,8 +72,6 @@
|
|||||||
* Add experimental support for parsing subtitles during extraction. You
|
* Add experimental support for parsing subtitles during extraction. You
|
||||||
can enable this using
|
can enable this using
|
||||||
`HlsMediaSource.Factory.experimentalParseSubtitlesDuringExtraction()`.
|
`HlsMediaSource.Factory.experimentalParseSubtitlesDuringExtraction()`.
|
||||||
This works for standalone WebVTT subtitles and IMSC1 subtitles muxed
|
|
||||||
into MP4.
|
|
||||||
* DASH Extension:
|
* DASH Extension:
|
||||||
* Extend experimental support for parsing subtitles during extraction to
|
* Extend experimental support for parsing subtitles during extraction to
|
||||||
work with standalone text files (previously it only worked with
|
work with standalone text files (previously it only worked with
|
||||||
|
@ -207,12 +207,16 @@ public final class DefaultHlsExtractorFactory implements HlsExtractorFactory {
|
|||||||
? new SubtitleTranscodingExtractor(mp4Extractor, subtitleParserFactory)
|
? new SubtitleTranscodingExtractor(mp4Extractor, subtitleParserFactory)
|
||||||
: mp4Extractor;
|
: mp4Extractor;
|
||||||
case FileTypes.TS:
|
case FileTypes.TS:
|
||||||
return createTsExtractor(
|
Extractor tsExtractor =
|
||||||
payloadReaderFactoryFlags,
|
createTsExtractor(
|
||||||
exposeCea608WhenMissingDeclarations,
|
payloadReaderFactoryFlags,
|
||||||
format,
|
exposeCea608WhenMissingDeclarations,
|
||||||
muxedCaptionFormats,
|
format,
|
||||||
timestampAdjuster);
|
muxedCaptionFormats,
|
||||||
|
timestampAdjuster);
|
||||||
|
return subtitleParserFactory != null
|
||||||
|
? new SubtitleTranscodingExtractor(tsExtractor, subtitleParserFactory)
|
||||||
|
: tsExtractor;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user