Class Mp3Extractor

  • All Implemented Interfaces:
    Extractor

    public final class Mp3Extractor
    extends Object
    implements Extractor
    Extracts data from the MP3 container format.
    • Field Detail

      • FLAG_ENABLE_CONSTANT_BITRATE_SEEKING

        public static final int FLAG_ENABLE_CONSTANT_BITRATE_SEEKING
        Flag to force enable seeking using a constant bitrate assumption in cases where seeking would otherwise not be possible.

        This flag is ignored if FLAG_ENABLE_INDEX_SEEKING is set.

        See Also:
        Constant Field Values
      • FLAG_ENABLE_INDEX_SEEKING

        public static final int FLAG_ENABLE_INDEX_SEEKING
        Flag to force index seeking, in which a time-to-byte mapping is built as the file is read.

        This seeker may require to scan a significant portion of the file to compute a seek point. Therefore, it should only be used if one of the following is true:

        • The file is small.
        • The bitrate is variable (or it's unknown whether it's variable) and the file does not provide precise enough seeking metadata.
        See Also:
        Constant Field Values
      • FLAG_DISABLE_ID3_METADATA

        public static final int FLAG_DISABLE_ID3_METADATA
        Flag to disable parsing of ID3 metadata. Can be set to save memory if ID3 metadata is not required.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Mp3Extractor

        public Mp3Extractor()
      • Mp3Extractor

        public Mp3Extractor​(@Flags
                            int flags)
        Parameters:
        flags - Flags that control the extractor's behavior.
      • Mp3Extractor

        public Mp3Extractor​(@Flags
                            int flags,
                            long forcedFirstSampleTimestampUs)
        Parameters:
        flags - Flags that control the extractor's behavior.
        forcedFirstSampleTimestampUs - A timestamp to force for the first sample, or C.TIME_UNSET if forcing is not required.