summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/current.txt1
-rw-r--r--media/java/android/media/MediaFormat.java13
2 files changed, 13 insertions, 1 deletions
diff --git a/api/current.txt b/api/current.txt
index aa5daf6983b2..e7a8ae3b1cd5 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -25093,6 +25093,7 @@ package android.media {
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";
+ field public static final String KEY_PREPEND_HEADER_TO_SYNC_FRAMES = "prepend-sps-pps-to-idr-frames";
field public static final String KEY_PRIORITY = "priority";
field public static final String KEY_PROFILE = "profile";
field public static final String KEY_PUSH_BLANK_BUFFERS_ON_STOP = "push-blank-buffers-on-shutdown";
diff --git a/media/java/android/media/MediaFormat.java b/media/java/android/media/MediaFormat.java
index 27499c6160d3..8686c5905af7 100644
--- a/media/java/android/media/MediaFormat.java
+++ b/media/java/android/media/MediaFormat.java
@@ -413,7 +413,18 @@ public final class MediaFormat {
*/
public static final String KEY_INTRA_REFRESH_PERIOD = "intra-refresh-period";
- /**
+ /**
+ * An optional key describing whether encoders prepend headers to sync frames (e.g.
+ * SPS and PPS to IDR frames for H.264). This is an optional parameter that applies only
+ * to video encoders. A video encoder may not support this feature; check the output
+ * format to verify that this feature was enabled.
+ *
+ * The value is an integer, with 1 indicating to prepend headers to every sync frames,
+ * or 0 otherwise. The default value is 0.
+ */
+ public static final String KEY_PREPEND_HEADER_TO_SYNC_FRAMES = "prepend-sps-pps-to-idr-frames";
+
+ /**
* A key describing the temporal layering schema. This is an optional parameter
* that applies only to video encoders. Use {@link MediaCodec#getOutputFormat}
* after {@link MediaCodec#configure configure} to query if the encoder supports