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

Commit 49b08a46 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add the "enable emsg" flag" into rvc-dev am: 73113a69 am: 31a63169 am: e71253ad

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11986788

Change-Id: I5ad531724dd83acf95eae0be72f7402d87a619a7
parents f00f46fc e71253ad
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -870,6 +870,14 @@ public final class MediaParser {
     */
    public static final String PARAMETER_OVERRIDE_IN_BAND_CAPTION_DECLARATIONS =
            "android.media.mediaParser.overrideInBandCaptionDeclarations";
    /**
     * Sets whether a track for EMSG events should be exposed in case of parsing a container that
     * supports them. {@code boolean} expected. Default value is {@link false}.
     *
     * @hide
     */
    public static final String PARAMETER_EXPOSE_EMSG_TRACK =
            "android.media.mediaParser.exposeEmsgTrack";

    // Private constants.

@@ -1309,6 +1317,10 @@ public final class MediaParser {
                                : 0;
                return new MatroskaExtractor(flags);
            case PARSER_NAME_FMP4:
                flags |=
                        getBooleanParameter(PARAMETER_EXPOSE_EMSG_TRACK)
                                ? FragmentedMp4Extractor.FLAG_ENABLE_EMSG_TRACK
                                : 0;
                flags |=
                        getBooleanParameter(PARAMETER_MP4_IGNORE_EDIT_LISTS)
                                ? FragmentedMp4Extractor.FLAG_WORKAROUND_IGNORE_EDIT_LISTS
@@ -2108,6 +2120,7 @@ public final class MediaParser {
                PARAMETER_EXPOSE_CHUNK_INDEX_AS_MEDIA_FORMAT, Boolean.class);
        expectedTypeByParameterName.put(
                PARAMETER_OVERRIDE_IN_BAND_CAPTION_DECLARATIONS, Boolean.class);
        expectedTypeByParameterName.put(PARAMETER_EXPOSE_EMSG_TRACK, Boolean.class);
        // We do not check PARAMETER_EXPOSE_CAPTION_FORMATS here, and we do it in setParameters
        // instead. Checking that the value is a List is insufficient to catch wrong parameter
        // value types.