CameraCapturerConfiguration
The camera capturer preference.
struct CameraCapturerConfiguration { #if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IOS) CAMERA_DIRECTION cameraDirection; #else char deviceId[MAX_DEVICE_ID_LENGTH]; #endif VideoFormat format; bool followEncodeDimensionRatio; CameraCapturerConfiguration() : followEncodeDimensionRatio(true) { #if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IOS) cameraDirection = CAMERA_REAR; #else memset(deviceId, 0, sizeof(deviceId)); #endif } };
Attributes
- cameraDirection
-
Attention: This parameter applies to Android and iOS only.The camera direction. See CAMERA_DIRECTION.
- format
- The format of the video frame. See VideoFormat.
- deviceId
-
Attention: This method applies to Windows only.The ID of the camera. The maximum length is MAX_DEVICE_ID_LENGTH_TYPE.
- followEncodeDimensionRatio
- Whether to follow the video aspect ratio set in setVideoEncoderConfiguration:
true
: (Default) Follow the set video aspect ratio. The SDK crops the captured video according to the set video aspect ratio and synchronously changes the local preview screen and the video frame in onCaptureVideoFrame and onPreEncodeVideoFrame.false
: Do not follow the set video aspect ratio. The SDK does not change the aspect ratio of the captured video frame.