Sdílet prostřednictvím


MediaRecorder.SetVideoEncodingProfileLevel Method

Definition

Sets the desired video encoding profile and level for recording.

[Android.Runtime.Register("setVideoEncodingProfileLevel", "(II)V", "GetSetVideoEncodingProfileLevel_IIHandler", ApiSince=26)]
public virtual void SetVideoEncodingProfileLevel (Android.Media.MediaCodecProfileType profile, int level);
[<Android.Runtime.Register("setVideoEncodingProfileLevel", "(II)V", "GetSetVideoEncodingProfileLevel_IIHandler", ApiSince=26)>]
abstract member SetVideoEncodingProfileLevel : Android.Media.MediaCodecProfileType * int -> unit
override this.SetVideoEncodingProfileLevel : Android.Media.MediaCodecProfileType * int -> unit

Parameters

profile
MediaCodecProfileType

declared in MediaCodecInfo.CodecProfileLevel.

level
Int32

declared in MediaCodecInfo.CodecProfileLevel.

Attributes

Remarks

Sets the desired video encoding profile and level for recording. The profile and level must be valid for the video encoder set by #setVideoEncoder. This method can called before or after #setVideoEncoder but it must be called before #prepare. prepare() may perform additional checks on the parameter to make sure that the specified profile and level are applicable, and sometimes the passed profile or level will be discarded due to codec capablity or to ensure the video recording can proceed smoothly based on the capabilities of the platform. <br>Application can also use the MediaCodecInfo.CodecCapabilities#profileLevels to query applicable combination of profile and level for the corresponding format. Note that the requested profile/level may not be supported by the codec that is actually being used by this MediaRecorder instance.

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