CameraCapturerConfiguration
- C++
更新时间不可用
配置摄像头采集偏好。
struct CameraCapturerConfiguration {
#if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IOS) || defined(__OHOS__)
Optional<CAMERA_DIRECTION> cameraDirection;
Optional<CAMERA_FOCAL_LENGTH_TYPE> cameraFocalLengthType;
#else
Optional<const char *> deviceId;
#endif
#if defined(__ANDROID__)
Optional<const char *> cameraId;
#endif
Optional<bool> followEncodeDimensionRatio;
VideoFormat format;
};属性
| 参数名 | 描述 |
|---|---|
cameraDirection | |
cameraFocalLengthType | (可选)摄像头焦距类型,详见 CAMERA_FOCAL_LENGTH_TYPE。 注: 该参数仅适用于 Android 和 iOS 平台。
两种方法的区别在于,方法一的超广角尺寸不可调节,而方法二支持自由调节变焦因子。 |
deviceId | |
cameraId | |
followEncodeDimensionRatio | (可选)是否遵循 setVideoEncoderConfiguration 中设置的视频宽高比:
|
format | (可选)视频帧的格式,详见 VideoFormat。 |