diff --git a/media/java/android/media/MediaCodec.java b/media/java/android/media/MediaCodec.java index c73cad4c15118..5b0845c5d42b8 100644 --- a/media/java/android/media/MediaCodec.java +++ b/media/java/android/media/MediaCodec.java @@ -1290,10 +1290,10 @@ import java.util.Map; - + (16+) + (16+) 16+ - 16+ - 16+ - 16+ + (16+) (16+) - {@link #setVideoScalingMode setVideoScalingMode} @@ -2429,6 +2429,9 @@ final public class MediaCodec { * set of output buffers returned by {@link #getOutputBuffers} from * this point on. * + *

Additionally, this event signals that the video scaling mode + * may have been reset to the default.

+ * * @deprecated This return value can be ignored as {@link * #getOutputBuffers} has been deprecated. Client should * request a current buffer using on of the get-buffer or @@ -2996,6 +2999,10 @@ final public class MediaCodec { /** * If a surface has been specified in a previous call to {@link #configure} * specifies the scaling mode to use. The default is "scale to fit". + *

The scaling mode may be reset to the default each time an + * {@link #INFO_OUTPUT_BUFFERS_CHANGED} event is received from the codec; therefore, the client + * must call this method after every buffer change event (and before the first output buffer is + * released for rendering) to ensure consistent scaling mode.

* @throws IllegalArgumentException if mode is not recognized. * @throws IllegalStateException if in the Released state. */