Package androidx.media3.extractor.mp4
Class THEOplayerFragmentedMp4Extractor
-
- All Implemented Interfaces:
-
androidx.media3.extractor.Extractor
@UnstableApi() public class THEOplayerFragmentedMp4Extractor implements Extractor
Extracts data from the FMP4 container format. This is copied from androidx.media 1.8 and tweaked with the fix for calculation of presentation time of EMSG when SIDX is present
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public @interfaceTHEOplayerFragmentedMp4Extractor.FlagsFlags controlling the behavior of the extractor. Possible flag values are FLAG_WORKAROUND_EVERY_VIDEO_FRAME_IS_SYNC_FRAME, FLAG_WORKAROUND_IGNORE_TFDT_BOX, FLAG_ENABLE_EMSG_TRACK, FLAG_WORKAROUND_IGNORE_EDIT_LISTS, FLAG_EMIT_RAW_SUBTITLE_DATA, FLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIES, FLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIES_H265 and FLAG_MERGE_FRAGMENTED_SIDX.
-
Field Summary
Fields Modifier and Type Field Description public final static intFLAG_WORKAROUND_EVERY_VIDEO_FRAME_IS_SYNC_FRAMEpublic final static intFLAG_WORKAROUND_IGNORE_TFDT_BOXpublic final static intFLAG_ENABLE_EMSG_TRACKpublic final static intFLAG_WORKAROUND_IGNORE_EDIT_LISTSpublic final static intFLAG_EMIT_RAW_SUBTITLE_DATApublic final static intFLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIESpublic final static intFLAG_READ_WITHIN_GOP_SAMPLE_DEPENDENCIES_H265public final static intFLAG_MERGE_FRAGMENTED_SIDXpublic final static ExtractorsFactoryFACTORYpublic final static intRESULT_CONTINUEpublic final static intRESULT_SEEKpublic final static intRESULT_END_OF_INPUT
-
Constructor Summary
Constructors Constructor Description THEOplayerFragmentedMp4Extractor()THEOplayerFragmentedMp4Extractor(SubtitleParser.Factory subtitleParserFactory)Constructs an instance. THEOplayerFragmentedMp4Extractor(int flags)THEOplayerFragmentedMp4Extractor(SubtitleParser.Factory subtitleParserFactory, int flags)Constructs an instance. THEOplayerFragmentedMp4Extractor(int flags, TimestampAdjuster timestampAdjuster)THEOplayerFragmentedMp4Extractor(int flags, TimestampAdjuster timestampAdjuster, Track sideloadedTrack)THEOplayerFragmentedMp4Extractor(int flags, TimestampAdjuster timestampAdjuster, Track sideloadedTrack, List<Format> closedCaptionFormats)THEOplayerFragmentedMp4Extractor(int flags, TimestampAdjuster timestampAdjuster, Track sideloadedTrack, List<Format> closedCaptionFormats, TrackOutput additionalEmsgTrackOutput)THEOplayerFragmentedMp4Extractor(SubtitleParser.Factory subtitleParserFactory, int flags, TimestampAdjuster timestampAdjuster, Track sideloadedTrack, List<Format> closedCaptionFormats, TrackOutput additionalEmsgTrackOutput)Constructs an instance.
-
Method Summary
Modifier and Type Method Description static ExtractorsFactorynewFactory(SubtitleParser.Factory subtitleParserFactory)Creates a factory for THEOplayerFragmentedMp4Extractor instances with the provided . static intcodecsToParseWithinGopSampleDependenciesAsFlags(@C.VideoCodecFlags() int videoCodecFlags)Returns Flags denoting if an extractor should parse within GOP sample dependencies. booleansniff(ExtractorInput input)ImmutableList<SniffFailure>getSniffFailureDetails()voidinit(ExtractorOutput output)voidseek(long position, long timeUs)voidrelease()intread(ExtractorInput input, PositionHolder seekPosition)TrackmodifyTrack(@Nullable() Track track)-
-
Constructor Detail
-
THEOplayerFragmentedMp4Extractor
THEOplayerFragmentedMp4Extractor()
-
THEOplayerFragmentedMp4Extractor
THEOplayerFragmentedMp4Extractor(SubtitleParser.Factory subtitleParserFactory)
Constructs an instance.- Parameters:
subtitleParserFactory- The SubtitleParser.Factory for parsing subtitles during extraction.
-
THEOplayerFragmentedMp4Extractor
THEOplayerFragmentedMp4Extractor(int flags)
-
THEOplayerFragmentedMp4Extractor
THEOplayerFragmentedMp4Extractor(SubtitleParser.Factory subtitleParserFactory, int flags)
Constructs an instance.- Parameters:
subtitleParserFactory- The SubtitleParser.Factory for parsing subtitles during extraction.flags- Flags that control the extractor's behavior.
-
THEOplayerFragmentedMp4Extractor
THEOplayerFragmentedMp4Extractor(int flags, TimestampAdjuster timestampAdjuster)
-
THEOplayerFragmentedMp4Extractor
THEOplayerFragmentedMp4Extractor(int flags, TimestampAdjuster timestampAdjuster, Track sideloadedTrack)
-
THEOplayerFragmentedMp4Extractor
THEOplayerFragmentedMp4Extractor(int flags, TimestampAdjuster timestampAdjuster, Track sideloadedTrack, List<Format> closedCaptionFormats)
-
THEOplayerFragmentedMp4Extractor
THEOplayerFragmentedMp4Extractor(int flags, TimestampAdjuster timestampAdjuster, Track sideloadedTrack, List<Format> closedCaptionFormats, TrackOutput additionalEmsgTrackOutput)
-
THEOplayerFragmentedMp4Extractor
THEOplayerFragmentedMp4Extractor(SubtitleParser.Factory subtitleParserFactory, int flags, TimestampAdjuster timestampAdjuster, Track sideloadedTrack, List<Format> closedCaptionFormats, TrackOutput additionalEmsgTrackOutput)
Constructs an instance.- Parameters:
subtitleParserFactory- The SubtitleParser.Factory for parsing subtitles during extraction.flags- Flags that control the extractor's behavior.timestampAdjuster- Adjusts sample timestamps.sideloadedTrack- Sideloaded track information, in the case that the extractor will not receive a moov box in the input data.closedCaptionFormats- For tracks that contain SEI messages, the formats of the closed caption channels to expose.additionalEmsgTrackOutput- An extra track output that will receive all emsg messages targeting the player, even if FLAG_ENABLE_EMSG_TRACK is not set.
-
-
Method Detail
-
newFactory
static ExtractorsFactory newFactory(SubtitleParser.Factory subtitleParserFactory)
Creates a factory for THEOplayerFragmentedMp4Extractor instances with the provided .
-
codecsToParseWithinGopSampleDependenciesAsFlags
@THEOplayerFragmentedMp4Extractor.Flags() static int codecsToParseWithinGopSampleDependenciesAsFlags(@C.VideoCodecFlags() int videoCodecFlags)
Returns Flags denoting if an extractor should parse within GOP sample dependencies.
- Parameters:
videoCodecFlags- The set of codecs for which to parse within GOP sample dependencies.
-
sniff
boolean sniff(ExtractorInput input)
-
getSniffFailureDetails
ImmutableList<SniffFailure> getSniffFailureDetails()
-
init
void init(ExtractorOutput output)
-
seek
void seek(long position, long timeUs)
-
release
void release()
-
read
int read(ExtractorInput input, PositionHolder seekPosition)
-
modifyTrack
@Nullable() Track modifyTrack(@Nullable() Track track)
-
-
-
-