|
Agora Java API Reference for Android
|
The camera capturer preference. More...
Classes | |
| enum | CAMERA_DIRECTION |
| The camera direction. More... | |
| enum | CAMERA_FOCAL_LENGTH_TYPE |
| The camera focal length types. More... | |
| class | CaptureFormat |
| The format of the video frame. More... | |
Public Member Functions | |
| CameraCapturerConfiguration (CAMERA_DIRECTION cameraDirection) | |
| CameraCapturerConfiguration (CAMERA_DIRECTION cameraDirection, CAMERA_FOCAL_LENGTH_TYPE cameraFocalLengthType) | |
| CameraCapturerConfiguration (CaptureFormat captureFormat) | |
| CameraCapturerConfiguration (CAMERA_DIRECTION cameraDirection, CaptureFormat captureFormat) | |
| CameraCapturerConfiguration (CAMERA_DIRECTION cameraDirection, CAMERA_FOCAL_LENGTH_TYPE cameraFocalLengthType, CaptureFormat captureFormat) | |
| CAMERA_DIRECTION | getCameraDirection () |
| String | getCameraId () |
| CAMERA_FOCAL_LENGTH_TYPE | getCameraFocalLengthType () |
| CaptureFormat | getCaptureFormat () |
| Boolean | isFollowEncodeDimensionRatio () |
| String | toString () |
Public Attributes | |
| CAMERA_DIRECTION | cameraDirection = null |
| String | cameraId = null |
| CAMERA_FOCAL_LENGTH_TYPE | cameraFocalLengthType = null |
| CaptureFormat | captureFormat |
| Boolean | followEncodeDimensionRatio = null |
The camera capturer preference.
| io.agora.rtc2.video.CameraCapturerConfiguration.CameraCapturerConfiguration | ( | CAMERA_DIRECTION | cameraDirection | ) |
The camera capture configuration.
| cameraDirection | The camera direction. For details, see CAMERA_DIRECTION. |
| io.agora.rtc2.video.CameraCapturerConfiguration.CameraCapturerConfiguration | ( | CaptureFormat | captureFormat | ) |
The camera capture configuration.
| captureFormat | The camera capture format. For details, see {}. |
| io.agora.rtc2.video.CameraCapturerConfiguration.CameraCapturerConfiguration | ( | CAMERA_DIRECTION | cameraDirection, |
| CaptureFormat | captureFormat | ||
| ) |
The camera capture configuration.
| cameraDirection | The camera direction. For details, see CAMERA_DIRECTION. |
| captureFormat | The camera capture format. For details, see {}. |
| CAMERA_DIRECTION io.agora.rtc2.video.CameraCapturerConfiguration.cameraDirection = null |
(Optional) The camera direction. See CAMERA_DIRECTION.
| String io.agora.rtc2.video.CameraCapturerConfiguration.cameraId = null |
(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. | CAMERA_FOCAL_LENGTH_TYPE io.agora.rtc2.video.CameraCapturerConfiguration.cameraFocalLengthType = null |
(Optional) The camera focal length type. See CAMERA_FOCAL_LENGTH_TYPE.
cameraDirection, and not supported to specify it through cameraId. | CaptureFormat io.agora.rtc2.video.CameraCapturerConfiguration.captureFormat |
(Optional) The format of the video frame. See CaptureFormat.
| Boolean io.agora.rtc2.video.CameraCapturerConfiguration.followEncodeDimensionRatio = null |
(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.
1.8.18