summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Wonsik Kim <wonsik@google.com> 2024-11-07 19:24:15 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-11-07 19:24:15 +0000
commitfc0bd9865258909ca8f3ad580d0c0ea22e1ef595 (patch)
treebbb485f32942e368a14e33fb23a8b91f8f64fbea
parent4942247e7146eb138b547fa6d6394498d8bbad73 (diff)
parent153710daf0f5b30cd0ce113992c8580725006bba (diff)
Merge "Add KEY_NUM_SLOTS to android.media.MediaFormat" into main
-rw-r--r--core/api/current.txt1
-rw-r--r--media/java/android/media/MediaFormat.java12
2 files changed, 13 insertions, 0 deletions
diff --git a/core/api/current.txt b/core/api/current.txt
index 0380dd8afae2..9a5e0de1f9b0 100644
--- a/core/api/current.txt
+++ b/core/api/current.txt
@@ -23754,6 +23754,7 @@ package android.media {
field public static final String KEY_MPEGH_COMPATIBLE_SETS = "mpegh-compatible-sets";
field public static final String KEY_MPEGH_PROFILE_LEVEL_INDICATION = "mpegh-profile-level-indication";
field public static final String KEY_MPEGH_REFERENCE_CHANNEL_LAYOUT = "mpegh-reference-channel-layout";
+ field @FlaggedApi("android.media.codec.num_input_slots") public static final String KEY_NUM_SLOTS = "num-slots";
field public static final String KEY_OPERATING_RATE = "operating-rate";
field public static final String KEY_OUTPUT_REORDER_DEPTH = "output-reorder-depth";
field public static final String KEY_PCM_ENCODING = "pcm-encoding";
diff --git a/media/java/android/media/MediaFormat.java b/media/java/android/media/MediaFormat.java
index b08a86ee8f46..bd65b2ecb76a 100644
--- a/media/java/android/media/MediaFormat.java
+++ b/media/java/android/media/MediaFormat.java
@@ -17,6 +17,7 @@
package android.media;
import static android.media.codec.Flags.FLAG_IN_PROCESS_SW_AUDIO_CODEC;
+import static android.media.codec.Flags.FLAG_NUM_INPUT_SLOTS;
import static android.media.codec.Flags.FLAG_REGION_OF_INTEREST;
import static android.media.codec.Flags.FLAG_APV_SUPPORT;
@@ -1777,6 +1778,17 @@ public final class MediaFormat {
public static final String KEY_SECURITY_MODEL = "security-model";
/**
+ * A key describing the number of slots used in the codec. When present in input format,
+ * the associated value indicates the number of input slots. The entry is set by the codec
+ * if configured with (@link MediaCodec#CONFIGURE_FLAG_BLOCK_MODEL), and will be ignored if set
+ * by the application.
+ * <p>
+ * The associated value is an integer.
+ */
+ @FlaggedApi(FLAG_NUM_INPUT_SLOTS)
+ public static final String KEY_NUM_SLOTS = "num-slots";
+
+ /**
* QpOffsetRect constitutes the metadata required for encoding a region of interest in an
* image or a video frame. The region of interest is represented by a rectangle. The four
* integer coordinates of the rectangle are stored in fields left, top, right, bottom.