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

Commit 48a3cb69 authored by Hangyu Kuang's avatar Hangyu Kuang Committed by Android (Google) Code Review
Browse files

Merge "media: Add 3gpp output format to MediaMuxer."

parents ddb80216 03299f9c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -22162,6 +22162,7 @@ package android.media {
  }
  public static final class MediaMuxer.OutputFormat {
    field public static final int MUXER_OUTPUT_3GPP = 2; // 0x2
    field public static final int MUXER_OUTPUT_MPEG_4 = 0; // 0x0
    field public static final int MUXER_OUTPUT_WEBM = 1; // 0x1
  }
+1 −0
Original line number Diff line number Diff line
@@ -23768,6 +23768,7 @@ package android.media {
  }
  public static final class MediaMuxer.OutputFormat {
    field public static final int MUXER_OUTPUT_3GPP = 2; // 0x2
    field public static final int MUXER_OUTPUT_MPEG_4 = 0; // 0x0
    field public static final int MUXER_OUTPUT_WEBM = 1; // 0x1
  }
+1 −0
Original line number Diff line number Diff line
@@ -22254,6 +22254,7 @@ package android.media {
  }
  public static final class MediaMuxer.OutputFormat {
    field public static final int MUXER_OUTPUT_3GPP = 2; // 0x2
    field public static final int MUXER_OUTPUT_MPEG_4 = 0; // 0x0
    field public static final int MUXER_OUTPUT_WEBM = 1; // 0x1
  }
+6 −2
Original line number Diff line number Diff line
@@ -83,13 +83,17 @@ final public class MediaMuxer {
        private OutputFormat() {}
        /** MPEG4 media file format*/
        public static final int MUXER_OUTPUT_MPEG_4 = 0;
        /** WEBM media file format*/
        public static final int MUXER_OUTPUT_WEBM   = 1;
        /** 3GPP media file format*/
        public static final int MUXER_OUTPUT_3GPP   = 2;
    };

    /** @hide */
    @IntDef({
        OutputFormat.MUXER_OUTPUT_MPEG_4,
        OutputFormat.MUXER_OUTPUT_WEBM,
        OutputFormat.MUXER_OUTPUT_3GPP,
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface Format {}
@@ -166,8 +170,8 @@ final public class MediaMuxer {
    }

    private void setUpMediaMuxer(@NonNull FileDescriptor fd, @Format int format) throws IOException {
        if (format != OutputFormat.MUXER_OUTPUT_MPEG_4 &&
                format != OutputFormat.MUXER_OUTPUT_WEBM) {
        if (format != OutputFormat.MUXER_OUTPUT_MPEG_4 && format != OutputFormat.MUXER_OUTPUT_WEBM
                && format != OutputFormat.MUXER_OUTPUT_3GPP) {
            throw new IllegalArgumentException("format: " + format + " is invalid");
        }
        mNativeObject = nativeSetup(fd, format);