7 #pragma once // NOLINT(build/header_guard)
10 #include "AgoraRefPtr.h"
11 #include <api/cpp/aosl_ares_class.h>
16 class ICameraCaptureObserver;
84 virtual int32_t
GetDeviceName(uint32_t deviceNumber,
char* deviceNameUTF8,
85 uint32_t deviceNameLength,
char* deviceUniqueIdUTF8,
86 uint32_t deviceUniqueIdLength,
char* productUniqueIdUTF8 = 0,
87 uint32_t productUniqueIdLength = 0,
88 char* deviceTypeUTF8 = 0, uint32_t deviceTypeLength = 0) = 0;
107 const uint32_t deviceCapabilityNumber,
112 #if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IPHONE)
124 virtual int setCameraSource(
CAMERA_SOURCE source, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
140 virtual int switchCamera(aosl_ref_t ares = AOSL_REF_INVALID) = 0;
151 virtual bool isZoomSupported() = 0;
164 virtual int32_t setCameraZoom(
float zoomValue, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
174 virtual float getCameraMaxZoom() = 0;
185 virtual bool isFocusSupported() = 0;
195 virtual int32_t setCameraFocus(
float x,
float y, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
206 virtual bool isAutoFaceFocusSupported() = 0;
217 virtual int32_t setCameraAutoFaceFocus(
bool enable, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
228 virtual int32_t enableFaceDetection(
bool enable, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
237 virtual bool isCameraFaceDetectSupported() = 0;
259 virtual bool isCameraTorchSupported() = 0;
277 virtual int setCameraTorchOn(
bool on, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
290 virtual bool isCameraExposurePositionSupported() = 0;
307 virtual int setCameraExposurePosition(
float positionXinView,
float positionYinView, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
321 virtual bool isCameraExposureSupported() = 0;
333 virtual int setCameraExposureFactor(
float value, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
335 #if (defined(__APPLE__) && TARGET_OS_IOS)
347 virtual bool enableMultiCamera(
bool enable, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
355 virtual bool isCameraAutoExposureFaceModeSupported() = 0;
371 virtual int setCameraAutoExposureFaceModeEnabled(
bool enabled, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
374 #elif defined(_WIN32) || (defined(__linux__) && !defined(__ANDROID__)) || \
375 (defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE)
398 virtual int initWithDeviceId(
const char* deviceId) = 0;
410 virtual int initWithDeviceName(
const char* deviceName) = 0;
501 int imageWidth,
int imageHeight,
const Rectangle* vecRectangle,
const int* vecDistance,
int numFaces) {
533 virtual ~ICameraCaptureObserver() {}