Merge "media: Add 3gpp output format to MediaMuxer."
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user