|
Agora C++ API Reference for All Platforms
|
Public Member Functions | |
| CameraCapturerConfiguration () | |
Public Attributes | |
| Optional< CAMERA_DIRECTION > | cameraDirection |
| Optional< CAMERA_FOCAL_LENGTH_TYPE > | cameraFocalLengthType |
| Optional< const char * > | deviceId |
| Optional< const char * > | cameraId |
| Optional< bool > | followEncodeDimensionRatio |
| VideoFormat | format |
|
inline |
| Optional<CAMERA_DIRECTION> agora::rtc::CameraCapturerConfiguration::cameraDirection |
Camera direction settings (for Android/iOS only). See: CAMERA_DIRECTION. (Optional) The camera direction. See CAMERA_DIRECTION.
| Optional<CAMERA_FOCAL_LENGTH_TYPE> agora::rtc::CameraCapturerConfiguration::cameraFocalLengthType |
(Optional) The camera focal length type. See CAMERA_FOCAL_LENGTH_TYPE.
cameraDirection, and not supported to specify it through cameraId.CAMERA_FOCAL_LENGTH_ULTRA_WIDE (2) (ultra-wide lens).CAMERA_FOCAL_LENGTH_DEFAULT (0) (standard lens), then call setCameraZoomFactor to set the camera's zoom factor to a value less than 1.0, with the minimum setting being 0.5. The difference is that the size of the ultra-wide angle in method one is not adjustable, whereas method two supports adjusting the camera's zoom factor freely. | Optional<const char *> agora::rtc::CameraCapturerConfiguration::deviceId |
The camera ID. The maximum length is MAX_DEVICE_ID_LENGTH_TYPE.
| Optional<const char *> agora::rtc::CameraCapturerConfiguration::cameraId |
(Optional) The camera ID. The default value is the camera ID of the front camera. You can get the camera ID through the Android native system API, see Camera.open() and CameraManager.getCameraIdList() for details.
cameraDirection are mutually exclusive in specifying the camera; you can choose one based on your needs. The differences are as follows:cameraDirection is more straightforward. You only need to indicate the camera direction (front or rear), without specifying a specific camera ID; the SDK will retrieve and confirm the actual camera ID through Android native system APIs.cameraId allows for more precise identification of a particular camera. For devices with multiple cameras, where cameraDirection cannot recognize or access all available cameras, it is recommended to use cameraId to specify the desired camera ID directly. | Optional<bool> agora::rtc::CameraCapturerConfiguration::followEncodeDimensionRatio |
(Optional) 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 system default audio playback device. The SDK does not change the aspect ratio of the captured video frame. | VideoFormat agora::rtc::CameraCapturerConfiguration::format |
(Optional) The format of the video frame. See VideoFormat.
1.8.18