CameraCapturerConfiguration
- Unreal C++
更新时间
摄像头采集配置。
struct CameraCapturerConfiguration {
#if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IOS)
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;
CameraCapturerConfiguration() : format(VideoFormat(0, 0, 0)) {}
};属性
| 参数名 | 描述 |
|---|---|
cameraDirection | (可选)摄像头方向。详见 CAMERA_DIRECTION。 注意: 该参数仅适用于 Android 和 iOS 平台。 |
cameraId | (可选)摄像头 ID。默认为前置摄像头对应的摄像头 ID。你可以通过 Android 原生系统 API 获取摄像头 ID,详见 Camera.open() 和 CameraManager.getCameraIdList()。 注意:
|
cameraFocalLengthType | (可选)摄像头的焦距类型。详见 CAMERA_FOCAL_LENGTH_TYPE。 注意:
|
format | (可选)视频帧格式。详见 VideoFormat。 |
deviceId | (可选)摄像头的 ID。最大长度为 MAX_DEVICE_ID_LENGTH_TYPE。 注意: 该参数仅适用于 Windows 和 macOS。 |
followEncodeDimensionRatio | (可选)是否跟随 setVideoEncoderConfiguration 中设置的视频宽高比:
|