AgoraCameraCapturer 接口。该接口中包含管理摄像头采集行为的方法。采集行为的设置会影响本地用户和远端用户所见。
◆ setCameraSource()
int io.agora.streaming.AgoraCameraCapturer.setCameraSource |
( |
@CameraSource int |
source | ) |
|
◆ getCameraSource()
int io.agora.streaming.AgoraCameraCapturer.getCameraSource |
( |
| ) |
|
◆ isZoomSupported()
boolean io.agora.streaming.AgoraCameraCapturer.isZoomSupported |
( |
| ) |
|
检查设备摄像头是否支持变焦。
- 返回
- true: 设备摄像头支持变焦。
- false: 设备摄像头不支持变焦。
◆ setZoom()
int io.agora.streaming.AgoraCameraCapturer.setZoom |
( |
float |
zoomValue | ) |
|
设置摄像头变焦倍数。
如果你需要放大摄像头采集的视频图像,请依次进行如下操作:
- 参数
-
- 返回
-
◆ getMaxZoom()
float io.agora.streaming.AgoraCameraCapturer.getMaxZoom |
( |
| ) |
|
获取设备摄像头支持的最大变焦倍数。
调用 isZoomSupported 确认设备的摄像头支持变焦后,你可以调用本方法获取摄像头支持的最大变焦倍数。
- 返回
- 设备摄像头支持的最大变焦倍数。
◆ isFocusSupported()
boolean io.agora.streaming.AgoraCameraCapturer.isFocusSupported |
( |
| ) |
|
检查设备摄像头是否支持手动对焦。
- 返回
- true: 设备摄像头支持手动对焦。
- false: 设备摄像头不支持手动对焦。
◆ setFocus()
int io.agora.streaming.AgoraCameraCapturer.setFocus |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
设置手动对焦。
调用 isFocusSupported 确认设备的摄像头支持手动对焦后, 你可以调用本方法指定摄像头对焦的位置并进行手动对焦。
如果你希望摄像头对人脸进行自动对焦,你可以调用 setAutoFaceFocus。
- 注解
- 该方法需在摄像头启动后调用。
- 参数
-
x | 触摸点相对于视图的 x 坐标。取值范围为 [0.0f,1.0f]。 |
y | 触摸点相对于视图的 y 坐标。取值范围为 [0.0f,1.0f]。 |
- 返回
-
◆ isAutoFaceFocusSupported()
boolean io.agora.streaming.AgoraCameraCapturer.isAutoFaceFocusSupported |
( |
| ) |
|
检查设备摄像头是否支持人脸自动对焦。
- 返回
- true: 设备摄像头支持人脸自动对焦。
- false:设备摄像头不支持人脸自动对焦。
◆ setAutoFaceFocus()
int io.agora.streaming.AgoraCameraCapturer.setAutoFaceFocus |
( |
boolean |
enable | ) |
|
设置是否开启人脸自动对焦。
调用 isAutoFaceFocusSupported 确认设备的摄像头支持人脸自动对焦后, 你可以调用本方法开启/关闭人脸自动对焦功能。
如果你希望进行手动对焦,你可以调用 setFocus。
- 注解
- 该方法需在摄像头启动后调用。
- 参数
-
enable | 是否开启人脸自动对焦:
- true: 开启人脸自动对焦。
- false:(默认)关闭人脸自动对焦。
|
- 返回
-
◆ registerEventHandler()
注册摄像头事件句柄。
- 参数
-
- 返回
- true: 方法调用成功。
- false: 方法调用失败。
◆ unregisterEventHandler()
取消注册摄像头事件句柄。
- 参数
-
- 返回
- true: 方法调用成功。
- false: 方法调用失败。