mirror of
https://github.com/androidx/media.git
synced 2025-05-11 09:39:52 +08:00
Add support for .cmf* extension in DefaultHlsExtractorFactory
This makes extractor selection a bit more efficient for some CMAF files. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=219795105
This commit is contained in:
parent
6d84b2a496
commit
8f57d85881
@ -48,6 +48,7 @@ public final class DefaultHlsExtractorFactory implements HlsExtractorFactory {
|
||||
public static final String MP4_FILE_EXTENSION = ".mp4";
|
||||
public static final String M4_FILE_EXTENSION_PREFIX = ".m4";
|
||||
public static final String MP4_FILE_EXTENSION_PREFIX = ".mp4";
|
||||
public static final String CMF_FILE_EXTENSION_PREFIX = ".cmf";
|
||||
public static final String VTT_FILE_EXTENSION = ".vtt";
|
||||
public static final String WEBVTT_FILE_EXTENSION = ".webvtt";
|
||||
|
||||
@ -191,7 +192,8 @@ public final class DefaultHlsExtractorFactory implements HlsExtractorFactory {
|
||||
return new Mp3Extractor(/* flags= */ 0, /* forcedFirstSampleTimestampUs= */ 0);
|
||||
} else if (lastPathSegment.endsWith(MP4_FILE_EXTENSION)
|
||||
|| lastPathSegment.startsWith(M4_FILE_EXTENSION_PREFIX, lastPathSegment.length() - 4)
|
||||
|| lastPathSegment.startsWith(MP4_FILE_EXTENSION_PREFIX, lastPathSegment.length() - 5)) {
|
||||
|| lastPathSegment.startsWith(MP4_FILE_EXTENSION_PREFIX, lastPathSegment.length() - 5)
|
||||
|| lastPathSegment.startsWith(CMF_FILE_EXTENSION_PREFIX, lastPathSegment.length() - 5)) {
|
||||
return new FragmentedMp4Extractor(
|
||||
/* flags= */ 0,
|
||||
timestampAdjuster,
|
||||
|
Loading…
x
Reference in New Issue
Block a user