Condividi tramite


MediaCodec.SetVideoScalingMode(VideoScalingMode) Method

Definition

If a surface has been specified in a previous call to #configure specifies the scaling mode to use.

[Android.Runtime.Register("setVideoScalingMode", "(I)V", "")]
public void SetVideoScalingMode (Android.Media.VideoScalingMode mode);
[<Android.Runtime.Register("setVideoScalingMode", "(I)V", "")>]
member this.SetVideoScalingMode : Android.Media.VideoScalingMode -> unit

Parameters

Attributes

Exceptions

if mode is not recognized.

if in the Released state.

Remarks

If a surface has been specified in a previous call to #configure specifies the scaling mode to use. The default is "scale to fit". <p class=note> The scaling mode may be reset to the <strong>default</strong> each time an #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. <p class=note> Since the #INFO_OUTPUT_BUFFERS_CHANGED event is deprecated, this can also be done after each #INFO_OUTPUT_FORMAT_CHANGED event.

Java documentation for android.media.MediaCodec.setVideoScalingMode(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to