Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e22678e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Make parameters parser-implementation independent" into rvc-dev am: 6beb0929

Change-Id: I943ed77404e4cddae4db86ddad20282ce8e86b83
parents 1e38cfda 6beb0929
Loading
Loading
Loading
Loading
+56 −57
Original line number Original line Diff line number Diff line
@@ -443,60 +443,64 @@ public final class MediaParser {
    // Public constants.
    // Public constants.


    /**
    /**
     * Sets whether constant bitrate seeking should be enabled for exo.AdtsParser. {@code boolean}
     * Sets whether constant bitrate seeking should be enabled for ADTS parsing. {@code boolean}
     * expected. Default value is {@code false}.
     * expected. Default value is {@code false}.
     */
     */
    public static final String PARAMETER_ADTS_ENABLE_CBR_SEEKING =
    public static final String PARAMETER_ADTS_ENABLE_CBR_SEEKING =
            "exo.AdtsParser.enableCbrSeeking";
            "android.media.mediaparser.adts.enableCbrSeeking";
    /**
    /**
     * Sets whether constant bitrate seeking should be enabled for exo.AmrParser. {@code boolean}
     * Sets whether constant bitrate seeking should be enabled for AMR. {@code boolean} expected.
     * expected. Default value is {@code false}.
     * Default value is {@code false}.
     */
     */
    public static final String PARAMETER_AMR_ENABLE_CBR_SEEKING = "exo.AmrParser.enableCbrSeeking";
    public static final String PARAMETER_AMR_ENABLE_CBR_SEEKING =
            "android.media.mediaparser.amr.enableCbrSeeking";
    /**
    /**
     * Sets whether the ID3 track should be disabled for exo.FlacParser. {@code boolean} expected.
     * Sets whether the ID3 track should be disabled for FLAC. {@code boolean} expected. Default
     * Default value is {@code false}.
     * value is {@code false}.
     */
     */
    public static final String PARAMETER_FLAC_DISABLE_ID3 = "exo.FlacParser.disableId3";
    public static final String PARAMETER_FLAC_DISABLE_ID3 =
            "android.media.mediaparser.flac.disableId3";
    /**
    /**
     * Sets whether exo.FragmentedMp4Parser should ignore edit lists. {@code boolean} expected.
     * Sets whether MP4 parsing should ignore edit lists. {@code boolean} expected. Default value is
     * Default value is {@code false}.
     * {@code false}.
     */
     */
    public static final String PARAMETER_FMP4_IGNORE_EDIT_LISTS =
    public static final String PARAMETER_MP4_IGNORE_EDIT_LISTS =
            "exo.FragmentedMp4Parser.ignoreEditLists";
            "android.media.mediaparser.mp4.ignoreEditLists";
    /**
    /**
     * Sets whether exo.FragmentedMp4Parser should ignore the tfdt box. {@code boolean} expected.
     * Sets whether MP4 parsing should ignore the tfdt box. {@code boolean} expected. Default value
     * Default value is {@code false}.
     * is {@code false}.
     */
     */
    public static final String PARAMETER_FMP4_IGNORE_TFDT_BOX =
    public static final String PARAMETER_MP4_IGNORE_TFDT_BOX =
            "exo.FragmentedMp4Parser.ignoreTfdtBox";
            "android.media.mediaparser.mp4.ignoreTfdtBox";
    /**
    /**
     * Sets whether exo.FragmentedMp4Parser should treat all video frames as key frames. {@code
     * Sets whether MP4 parsing should treat all video frames as key frames. {@code boolean}
     * boolean} expected. Default value is {@code false}.
     * expected. Default value is {@code false}.
     */
     */
    public static final String PARAMETER_FMP4_TREAT_VIDEO_FRAMES_AS_KEYFRAMES =
    public static final String PARAMETER_MP4_TREAT_VIDEO_FRAMES_AS_KEYFRAMES =
            "exo.FragmentedMp4Parser.treatVideoFramesAsKeyframes";
            "android.media.mediaparser.mp4.treatVideoFramesAsKeyframes";
    /**
    /**
     * Sets whether exo.MatroskaParser should avoid seeking to the cues element. {@code boolean}
     * Sets whether Matroska parsing should avoid seeking to the cues element. {@code boolean}
     * expected. Default value is {@code false}.
     * expected. Default value is {@code false}.
     *
     *
     * <p>If this flag is enabled and the cues element occurs after the first cluster, then the
     * <p>If this flag is enabled and the cues element occurs after the first cluster, then the
     * media is treated as unseekable.
     * media is treated as unseekable.
     */
     */
    public static final String PARAMETER_MATROSKA_DISABLE_CUES_SEEKING =
    public static final String PARAMETER_MATROSKA_DISABLE_CUES_SEEKING =
            "exo.MatroskaParser.disableCuesSeeking";
            "android.media.mediaparser.matroska.disableCuesSeeking";
    /**
    /**
     * Sets whether the ID3 track should be disabled for exo.Mp3Parser. {@code boolean} expected.
     * Sets whether the ID3 track should be disabled for MP3. {@code boolean} expected. Default
     * Default value is {@code false}.
     * value is {@code false}.
     */
     */
    public static final String PARAMETER_MP3_DISABLE_ID3 = "exo.Mp3Parser.disableId3";
    public static final String PARAMETER_MP3_DISABLE_ID3 =
            "android.media.mediaparser.mp3.disableId3";
    /**
    /**
     * Sets whether constant bitrate seeking should be enabled for exo.Mp3Parser. {@code boolean}
     * Sets whether constant bitrate seeking should be enabled for MP3. {@code boolean} expected.
     * expected. Default value is {@code false}.
     * Default value is {@code false}.
     */
     */
    public static final String PARAMETER_MP3_ENABLE_CBR_SEEKING = "exo.Mp3Parser.enableCbrSeeking";
    public static final String PARAMETER_MP3_ENABLE_CBR_SEEKING =
            "android.media.mediaparser.mp3.enableCbrSeeking";
    /**
    /**
     * Sets whether exo.Mp3Parser should generate a time-to-byte mapping. {@code boolean} expected.
     * Sets whether MP3 parsing should generate a time-to-byte mapping. {@code boolean} expected.
     * Default value is {@code false}.
     * Default value is {@code false}.
     *
     *
     * <p>Enabling this flag may require to scan a significant portion of the file to compute a seek
     * <p>Enabling this flag may require to scan a significant portion of the file to compute a seek
@@ -509,18 +513,13 @@ public final class MediaParser {
     * </ul>
     * </ul>
     */
     */
    public static final String PARAMETER_MP3_ENABLE_INDEX_SEEKING =
    public static final String PARAMETER_MP3_ENABLE_INDEX_SEEKING =
            "exo.Mp3Parser.enableIndexSeeking";
            "android.media.mediaparser.mp3.enableIndexSeeking";
    /**
    /**
     * Sets whether exo.Mp4Parser should ignore edit lists. {@code boolean} expected. Default value
     * Sets the operation mode for TS parsing. {@code String} expected. Valid values are {@code
     * is {@code false}.
     */
    public static final String PARAMETER_MP4_IGNORE_EDIT_LISTS = "exo.Mp4Parser.ignoreEditLists";
    /**
     * Sets the operation mode for exo.TsParser. {@code String} expected. Valid values are {@code
     * "single_pmt"}, {@code "multi_pmt"}, and {@code "hls"}. Default value is {@code "single_pmt"}.
     * "single_pmt"}, {@code "multi_pmt"}, and {@code "hls"}. Default value is {@code "single_pmt"}.
     *
     *
     * <p>The operation modes alter the way exo.TsParser behaves so that it can handle certain kinds
     * <p>The operation modes alter the way TS behaves so that it can handle certain kinds of
     * of commonly-occurring malformed media.
     * commonly-occurring malformed media.
     *
     *
     * <ul>
     * <ul>
     *   <li>{@code "single_pmt"}: Only the first found PMT is parsed. Others are ignored, even if
     *   <li>{@code "single_pmt"}: Only the first found PMT is parsed. Others are ignored, even if
@@ -529,47 +528,48 @@ public final class MediaParser {
     *   <li>{@code "hls"}: Enable {@code "single_pmt"} mode, and ignore continuity counters.
     *   <li>{@code "hls"}: Enable {@code "single_pmt"} mode, and ignore continuity counters.
     * </ul>
     * </ul>
     */
     */
    public static final String PARAMETER_TS_MODE = "exo.TsParser.mode";
    public static final String PARAMETER_TS_MODE = "android.media.mediaparser.ts.mode";
    /**
    /**
     * Sets whether exo.TsParser should treat samples consisting of non-IDR I slices as
     * Sets whether TS should treat samples consisting of non-IDR I slices as synchronization
     * synchronization samples (key-frames). {@code boolean} expected. Default value is {@code
     * samples (key-frames). {@code boolean} expected. Default value is {@code false}.
     * false}.
     */
     */
    public static final String PARAMETER_TS_ALLOW_NON_IDR_AVC_KEYFRAMES =
    public static final String PARAMETER_TS_ALLOW_NON_IDR_AVC_KEYFRAMES =
            "exo.TsParser.allowNonIdrAvcKeyframes";
            "android.media.mediaparser.ts.allowNonIdrAvcKeyframes";
    /**
    /**
     * Sets whether exo.TsParser should ignore AAC elementary streams. {@code boolean} expected.
     * Sets whether TS parsing should ignore AAC elementary streams. {@code boolean} expected.
     * Default value is {@code false}.
     * Default value is {@code false}.
     */
     */
    public static final String PARAMETER_TS_IGNORE_AAC_STREAM = "exo.TsParser.ignoreAacStream";
    public static final String PARAMETER_TS_IGNORE_AAC_STREAM =
            "android.media.mediaparser.ts.ignoreAacStream";
    /**
    /**
     * Sets whether exo.TsParser should ignore AVC elementary streams. {@code boolean} expected.
     * Sets whether TS parsing should ignore AVC elementary streams. {@code boolean} expected.
     * Default value is {@code false}.
     * Default value is {@code false}.
     */
     */
    public static final String PARAMETER_TS_IGNORE_AVC_STREAM = "exo.TsParser.ignoreAvcStream";
    public static final String PARAMETER_TS_IGNORE_AVC_STREAM =
            "android.media.mediaparser.ts.ignoreAvcStream";
    /**
    /**
     * Sets whether exo.TsParser should ignore splice information streams. {@code boolean} expected.
     * Sets whether TS parsing should ignore splice information streams. {@code boolean} expected.
     * Default value is {@code false}.
     * Default value is {@code false}.
     */
     */
    public static final String PARAMETER_TS_IGNORE_SPLICE_INFO_STREAM =
    public static final String PARAMETER_TS_IGNORE_SPLICE_INFO_STREAM =
            "exo.TsParser.ignoreSpliceInfoStream";
            "android.media.mediaparser.ts.ignoreSpliceInfoStream";
    /**
    /**
     * Sets whether exo.TsParser should split AVC stream into access units based on slice headers.
     * Sets whether TS parsing should split AVC stream into access units based on slice headers.
     * {@code boolean} expected. Default value is {@code false}.
     * {@code boolean} expected. Default value is {@code false}.
     *
     *
     * <p>This flag should be left disabled if the stream contains access units delimiters in order
     * <p>This flag should be left disabled if the stream contains access units delimiters in order
     * to avoid unnecessary computational costs.
     * to avoid unnecessary computational costs.
     */
     */
    public static final String PARAMETER_TS_DETECT_ACCESS_UNITS =
    public static final String PARAMETER_TS_DETECT_ACCESS_UNITS =
            "exo.TsParser.ignoreDetectAccessUnits";
            "android.media.mediaparser.ts.ignoreDetectAccessUnits";
    /**
    /**
     * Sets whether exo.TsParser should handle HDMV DTS audio streams. {@code boolean} expected.
     * Sets whether TS parsing should handle HDMV DTS audio streams. {@code boolean} expected.
     * Default value is {@code false}.
     * Default value is {@code false}.
     *
     *
     * <p>Enabling this flag will disable the detection of SCTE subtitles.
     * <p>Enabling this flag will disable the detection of SCTE subtitles.
     */
     */
    public static final String PARAMETER_TS_ENABLE_HDMV_DTS_AUDIO_STREAMS =
    public static final String PARAMETER_TS_ENABLE_HDMV_DTS_AUDIO_STREAMS =
            "exo.TsParser.enableHdmvDtsAudioStreams";
            "android.media.mediaparser.ts.enableHdmvDtsAudioStreams";


    // Private constants.
    // Private constants.


@@ -1185,15 +1185,14 @@ public final class MediaParser {
        expectedTypeByParameterName.put(PARAMETER_ADTS_ENABLE_CBR_SEEKING, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_ADTS_ENABLE_CBR_SEEKING, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_AMR_ENABLE_CBR_SEEKING, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_AMR_ENABLE_CBR_SEEKING, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_FLAC_DISABLE_ID3, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_FLAC_DISABLE_ID3, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_FMP4_IGNORE_EDIT_LISTS, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_MP4_IGNORE_EDIT_LISTS, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_FMP4_IGNORE_TFDT_BOX, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_MP4_IGNORE_TFDT_BOX, Boolean.class);
        expectedTypeByParameterName.put(
        expectedTypeByParameterName.put(
                PARAMETER_FMP4_TREAT_VIDEO_FRAMES_AS_KEYFRAMES, Boolean.class);
                PARAMETER_MP4_TREAT_VIDEO_FRAMES_AS_KEYFRAMES, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_MATROSKA_DISABLE_CUES_SEEKING, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_MATROSKA_DISABLE_CUES_SEEKING, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_MP3_DISABLE_ID3, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_MP3_DISABLE_ID3, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_MP3_ENABLE_CBR_SEEKING, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_MP3_ENABLE_CBR_SEEKING, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_MP3_ENABLE_INDEX_SEEKING, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_MP3_ENABLE_INDEX_SEEKING, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_MP4_IGNORE_EDIT_LISTS, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_TS_MODE, String.class);
        expectedTypeByParameterName.put(PARAMETER_TS_MODE, String.class);
        expectedTypeByParameterName.put(PARAMETER_TS_ALLOW_NON_IDR_AVC_KEYFRAMES, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_TS_ALLOW_NON_IDR_AVC_KEYFRAMES, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_TS_IGNORE_AAC_STREAM, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_TS_IGNORE_AAC_STREAM, Boolean.class);
+17 −18
Original line number Original line Diff line number Diff line
@@ -26428,24 +26428,23 @@ package android.media {
    method public void seek(@NonNull android.media.MediaParser.SeekPoint);
    method public void seek(@NonNull android.media.MediaParser.SeekPoint);
    method @NonNull public android.media.MediaParser setParameter(@NonNull String, @NonNull Object);
    method @NonNull public android.media.MediaParser setParameter(@NonNull String, @NonNull Object);
    method public boolean supportsParameter(@NonNull String);
    method public boolean supportsParameter(@NonNull String);
    field public static final String PARAMETER_ADTS_ENABLE_CBR_SEEKING = "exo.AdtsParser.enableCbrSeeking";
    field public static final String PARAMETER_ADTS_ENABLE_CBR_SEEKING = "android.media.mediaparser.adts.enableCbrSeeking";
    field public static final String PARAMETER_AMR_ENABLE_CBR_SEEKING = "exo.AmrParser.enableCbrSeeking";
    field public static final String PARAMETER_AMR_ENABLE_CBR_SEEKING = "android.media.mediaparser.amr.enableCbrSeeking";
    field public static final String PARAMETER_FLAC_DISABLE_ID3 = "exo.FlacParser.disableId3";
    field public static final String PARAMETER_FLAC_DISABLE_ID3 = "android.media.mediaparser.flac.disableId3";
    field public static final String PARAMETER_FMP4_IGNORE_EDIT_LISTS = "exo.FragmentedMp4Parser.ignoreEditLists";
    field public static final String PARAMETER_MATROSKA_DISABLE_CUES_SEEKING = "android.media.mediaparser.matroska.disableCuesSeeking";
    field public static final String PARAMETER_FMP4_IGNORE_TFDT_BOX = "exo.FragmentedMp4Parser.ignoreTfdtBox";
    field public static final String PARAMETER_MP3_DISABLE_ID3 = "android.media.mediaparser.mp3.disableId3";
    field public static final String PARAMETER_FMP4_TREAT_VIDEO_FRAMES_AS_KEYFRAMES = "exo.FragmentedMp4Parser.treatVideoFramesAsKeyframes";
    field public static final String PARAMETER_MP3_ENABLE_CBR_SEEKING = "android.media.mediaparser.mp3.enableCbrSeeking";
    field public static final String PARAMETER_MATROSKA_DISABLE_CUES_SEEKING = "exo.MatroskaParser.disableCuesSeeking";
    field public static final String PARAMETER_MP3_ENABLE_INDEX_SEEKING = "android.media.mediaparser.mp3.enableIndexSeeking";
    field public static final String PARAMETER_MP3_DISABLE_ID3 = "exo.Mp3Parser.disableId3";
    field public static final String PARAMETER_MP4_IGNORE_EDIT_LISTS = "android.media.mediaparser.mp4.ignoreEditLists";
    field public static final String PARAMETER_MP3_ENABLE_CBR_SEEKING = "exo.Mp3Parser.enableCbrSeeking";
    field public static final String PARAMETER_MP4_IGNORE_TFDT_BOX = "android.media.mediaparser.mp4.ignoreTfdtBox";
    field public static final String PARAMETER_MP3_ENABLE_INDEX_SEEKING = "exo.Mp3Parser.enableIndexSeeking";
    field public static final String PARAMETER_MP4_TREAT_VIDEO_FRAMES_AS_KEYFRAMES = "android.media.mediaparser.mp4.treatVideoFramesAsKeyframes";
    field public static final String PARAMETER_MP4_IGNORE_EDIT_LISTS = "exo.Mp4Parser.ignoreEditLists";
    field public static final String PARAMETER_TS_ALLOW_NON_IDR_AVC_KEYFRAMES = "android.media.mediaparser.ts.allowNonIdrAvcKeyframes";
    field public static final String PARAMETER_TS_ALLOW_NON_IDR_AVC_KEYFRAMES = "exo.TsParser.allowNonIdrAvcKeyframes";
    field public static final String PARAMETER_TS_DETECT_ACCESS_UNITS = "android.media.mediaparser.ts.ignoreDetectAccessUnits";
    field public static final String PARAMETER_TS_DETECT_ACCESS_UNITS = "exo.TsParser.ignoreDetectAccessUnits";
    field public static final String PARAMETER_TS_ENABLE_HDMV_DTS_AUDIO_STREAMS = "android.media.mediaparser.ts.enableHdmvDtsAudioStreams";
    field public static final String PARAMETER_TS_ENABLE_HDMV_DTS_AUDIO_STREAMS = "exo.TsParser.enableHdmvDtsAudioStreams";
    field public static final String PARAMETER_TS_IGNORE_AAC_STREAM = "android.media.mediaparser.ts.ignoreAacStream";
    field public static final String PARAMETER_TS_IGNORE_AAC_STREAM = "exo.TsParser.ignoreAacStream";
    field public static final String PARAMETER_TS_IGNORE_AVC_STREAM = "android.media.mediaparser.ts.ignoreAvcStream";
    field public static final String PARAMETER_TS_IGNORE_AVC_STREAM = "exo.TsParser.ignoreAvcStream";
    field public static final String PARAMETER_TS_IGNORE_SPLICE_INFO_STREAM = "android.media.mediaparser.ts.ignoreSpliceInfoStream";
    field public static final String PARAMETER_TS_IGNORE_SPLICE_INFO_STREAM = "exo.TsParser.ignoreSpliceInfoStream";
    field public static final String PARAMETER_TS_MODE = "android.media.mediaparser.ts.mode";
    field public static final String PARAMETER_TS_MODE = "exo.TsParser.mode";
  }
  }
  public static interface MediaParser.InputReader {
  public static interface MediaParser.InputReader {