CameraCapturerConfiguration
摄像头采集配置。
public class CameraCapturerConfiguration
{
public CameraCapturerConfiguration()
{
deviceId = "";
cameraDirection = CAMERA_DIRECTION.CAMERA_FRONT;
format = new VideoFormat();
this.followEncodeDimensionRatio = true;
}
public CameraCapturerConfiguration(string deviceId, VideoFormat format,
CAMERA_DIRECTION cameraDirection, bool followEncodeDimensionRatio)
{
this.deviceId = deviceId;
this.format = format;
this.cameraDirection = cameraDirection;
this.followEncodeDimensionRatio = followEncodeDimensionRatio;
}
public string deviceId { set; get; }
public VideoFormat format { set; get; }
public bool followEncodeDimensionRatio { set; get; }
public CAMERA_DIRECTION cameraDirection { set; get; }
}
属性
- cameraDirection
-
注意: 该参数仅适用于 Android 和 iOS 平台。摄像头方向设置。详见 CAMERA_DIRECTION。
- format
- 视频帧格式。详见 VideoFormat。
- deviceId
-
注意: 该参数仅适用于 Windows 平台。摄像头的 ID。
- followEncodeDimensionRatio
- 是否跟随 SetVideoEncoderConfiguration 中设置的视频宽高比:
true
:(默认) 跟随。SDK 会将采集到的视频按照已设置的视频宽高比进行裁剪,会同步改变本地预览画面、OnCaptureVideoFrame 和 OnPreEncodeVideoFrame 中的视频画面。false
:不跟随。SDK不改变采集到的视频帧宽高比。