Udostępnij za pośrednictwem


MediaRecorder.SetVideoEncoder(VideoEncoder) Method

Definition

Sets the video encoder to be used for recording.

[Android.Runtime.Register("setVideoEncoder", "(I)V", "GetSetVideoEncoder_IHandler")]
public virtual void SetVideoEncoder (Android.Media.VideoEncoder video_encoder);
[<Android.Runtime.Register("setVideoEncoder", "(I)V", "GetSetVideoEncoder_IHandler")>]
abstract member SetVideoEncoder : Android.Media.VideoEncoder -> unit
override this.SetVideoEncoder : Android.Media.VideoEncoder -> unit

Parameters

video_encoder
VideoEncoder

the video encoder to use.

Attributes

Exceptions

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

Remarks

Sets the video encoder to be used for recording. If this method is not called, the output file will not contain an video track. Call this after setOutputFormat() and before prepare().

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