summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Santiago Seifert <aquilescanta@google.com> 2020-01-24 16:32:42 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-01-24 16:32:42 +0000
commit2e7965bb48a1014446537bc392ac61dc842d9a65 (patch)
tree5bdf7a363e90bd51a758d3b01047c215524acff9
parent069dc4277ee3336d6487c387f7def9cd9489defd (diff)
parent418cd1d7f413cfb90d5bd72829dca993dedc7528 (diff)
Merge "Add KEY_CODECS_STRING to MediaFormat"
-rw-r--r--api/current.txt1
-rw-r--r--media/java/android/media/MediaFormat.java12
2 files changed, 13 insertions, 0 deletions
diff --git a/api/current.txt b/api/current.txt
index 326ae6b54b0b..2dfa2e54ce05 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -25986,6 +25986,7 @@ package android.media {
field public static final String KEY_CAPTURE_RATE = "capture-rate";
field public static final String KEY_CHANNEL_COUNT = "channel-count";
field public static final String KEY_CHANNEL_MASK = "channel-mask";
+ field public static final String KEY_CODECS_STRING = "codecs-string";
field public static final String KEY_COLOR_FORMAT = "color-format";
field public static final String KEY_COLOR_RANGE = "color-range";
field public static final String KEY_COLOR_STANDARD = "color-standard";
diff --git a/media/java/android/media/MediaFormat.java b/media/java/android/media/MediaFormat.java
index f408ac344d7c..f61d55ef2a30 100644
--- a/media/java/android/media/MediaFormat.java
+++ b/media/java/android/media/MediaFormat.java
@@ -20,6 +20,8 @@ import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.compat.annotation.UnsupportedAppUsage;
+import android.media.MediaCodec;
+import android.media.MediaParser;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -45,6 +47,7 @@ import java.util.stream.Collectors;
* <table>
* <tr><th>Name</th><th>Value Type</th><th>Description</th></tr>
* <tr><td>{@link #KEY_MIME}</td><td>String</td><td>The type of the format.</td></tr>
+ * <tr><td>{@link #KEY_CODECS_STRING}</td><td>String</td><td>optional, the RFC 6381 codecs string of the MediaFormat</td></tr>
* <tr><td>{@link #KEY_MAX_INPUT_SIZE}</td><td>Integer</td><td>optional, maximum size of a buffer of input data</td></tr>
* <tr><td>{@link #KEY_PIXEL_ASPECT_RATIO_WIDTH}</td><td>Integer</td><td>optional, the pixel aspect ratio width</td></tr>
* <tr><td>{@link #KEY_PIXEL_ASPECT_RATIO_HEIGHT}</td><td>Integer</td><td>optional, the pixel aspect ratio height</td></tr>
@@ -217,6 +220,15 @@ public final class MediaFormat {
public static final String KEY_MIME = "mime";
/**
+ * A key describing the codecs string of the MediaFormat. See RFC 6381 section 3.2 for the
+ * syntax of the value. The value does not hold {@link MediaCodec}-exposed codec names.
+ * The associated value is a string.
+ *
+ * @see MediaParser.TrackData#mediaFormat
+ */
+ public static final String KEY_CODECS_STRING = "codecs-string";
+
+ /**
* An optional key describing the low latency decoding mode. This is an optional parameter
* that applies only to decoders. If enabled, the decoder doesn't hold input and output
* data more than required by the codec standards.