MediaRecorder.SetVideoEncodingProfileLevel 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
设置录制所需的视频编码配置文件和级别。
[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
参数
- profile
- MediaCodecProfileType
在 中 MediaCodecInfo.CodecProfileLevel
声明。
- level
- Int32
在 中 MediaCodecInfo.CodecProfileLevel
声明。
- 属性
注解
设置录制所需的视频编码配置文件和级别。 配置文件和级别必须对 由 #setVideoEncoder
设置的视频编码器有效。 此方法可以在之前或之后 #setVideoEncoder
调用,但必须在 之前 #prepare
调用。 prepare()
可能会对 参数执行其他检查,以确保指定的配置文件和级别适用,有时,由于编解码器的上限或确保视频录制能够根据平台的功能顺利进行,有时传递的配置文件或级别将被丢弃。 <br>应用程序还可以使用 MediaCodecInfo.CodecCapabilities#profileLevels
来查询相应格式的配置文件和级别的适用组合。 请注意,此 MediaRecorder 实例实际使用的编解码器可能不支持请求的配置文件/级别。
的 android.media.MediaRecorder.setVideoEncodingProfileLevel(int, int)
Java 文档。
此页面的某些部分是基于 创建和共享的工作进行的修改,并根据 署名许可中所述的条款使用。