Compartilhar via


MediaRecorder.SetVideoSize(Int32, Int32) Method

Definition

Sets the width and height of the video to be captured.

[Android.Runtime.Register("setVideoSize", "(II)V", "GetSetVideoSize_IIHandler")]
public virtual void SetVideoSize (int width, int height);
[<Android.Runtime.Register("setVideoSize", "(II)V", "GetSetVideoSize_IIHandler")>]
abstract member SetVideoSize : int * int -> unit
override this.SetVideoSize : int * int -> unit

Parameters

width
Int32

the width of the video to be captured

height
Int32

the height of the video to be captured

Attributes

Exceptions

if it is called after prepare() or before setOutputFormat()

Remarks

Sets the width and height of the video to be captured. Must be called after setVideoSource(). Call this after setOutputFormat() but before prepare().

Java documentation for android.media.MediaRecorder.setVideoSize(int, 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