diff --git a/media/java/android/media/MediaFormat.java b/media/java/android/media/MediaFormat.java index c1412661c6492..d74aa81a6bd2b 100644 --- a/media/java/android/media/MediaFormat.java +++ b/media/java/android/media/MediaFormat.java @@ -55,8 +55,12 @@ import java.util.Map; * {@link #KEY_INTRA_REFRESH_PERIOD}Integerencoder-only, optional * {@link #KEY_MAX_WIDTH}Integerdecoder-only, optional, max-resolution width * {@link #KEY_MAX_HEIGHT}Integerdecoder-only, optional, max-resolution height - * {@link #KEY_REPEAT_PREVIOUS_FRAME_AFTER}Longvideo encoder in surface-mode only - * {@link #KEY_PUSH_BLANK_BUFFERS_ON_STOP}Integer(1)video decoder rendering to a surface only + * {@link #KEY_REPEAT_PREVIOUS_FRAME_AFTER}Longencoder in surface-mode + * only, optional + * {@link #KEY_PUSH_BLANK_BUFFERS_ON_STOP}Integer(1)decoder rendering + * to a surface only, optional + * {@link #KEY_TEMPORAL_LAYERING}Stringencoder only, optional, + * temporal-layering schema * * Specify both {@link #KEY_MAX_WIDTH} and {@link #KEY_MAX_HEIGHT} to enable * adaptive playback (seamless resolution change) for a video decoder that @@ -293,12 +297,18 @@ public final class MediaFormat { /** * A key describing the temporal layering schema. This is an optional parameter - * that applies only to video encoders. Use {@link MediaCodec#getInputFormat} + * that applies only to video encoders. Use {@link MediaCodec#getOutputFormat} * after {@link MediaCodec#configure configure} to query if the encoder supports - * the desired schema. Supported values are {@code webrtc.vp8.1-layer}, - * {@code webrtc.vp8.2-layer}, {@code webrtc.vp8.3-layer}, and {@code none}. - * If the encoder does not support temporal layering, the input format will - * not have an entry with this key. + * the desired schema. Supported values are {@code webrtc.vp8.N-layer}, + * {@code android.generic.N}, {@code android.generic.N+M} and {@code none}, where + * {@code N} denotes the total number of non-bidirectional layers (which must be at least 1) + * and {@code M} denotes the total number of bidirectional layers (which must be non-negative). + *

{@code android.generic.*} schemas have been added in {@link + * android.os.Build.VERSION_CODES#N_MR1}. + *

+ * The encoder may support fewer temporal layers, in which case the output format + * will contain the configured schema. If the encoder does not support temporal + * layering, the output format will not have an entry with this key. * The associated value is a string. */ public static final String KEY_TEMPORAL_LAYERING = "ts-schema";