7 #pragma once // NOLINT(build/header_guard)
10 #include "AgoraRefPtr.h"
11 #include <api/cpp/aosl_ares_class.h>
16 class ICameraCaptureObserver;
88 virtual int32_t
GetDeviceName(uint32_t deviceNumber,
char* deviceNameUTF8,
89 uint32_t deviceNameLength,
char* deviceUniqueIdUTF8,
90 uint32_t deviceUniqueIdLength,
char* productUniqueIdUTF8 = 0,
91 uint32_t productUniqueIdLength = 0,
92 char* deviceTypeUTF8 = 0, uint32_t deviceTypeLength = 0) = 0;
111 const uint32_t deviceCapabilityNumber,
116 #if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IPHONE)
128 virtual int setCameraSource(
CAMERA_SOURCE source, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
144 virtual int switchCamera(aosl_ref_t ares = AOSL_REF_INVALID) = 0;
155 virtual bool isZoomSupported() = 0;
168 virtual int32_t setCameraZoom(
float zoomValue, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
178 virtual float getCameraMaxZoom() = 0;
189 virtual bool isFocusSupported() = 0;
199 virtual int32_t setCameraFocus(
float x,
float y, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
210 virtual bool isAutoFaceFocusSupported() = 0;
221 virtual int32_t setCameraAutoFaceFocus(
bool enable, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
232 virtual int32_t enableFaceDetection(
bool enable, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
241 virtual bool isCameraFaceDetectSupported() = 0;
263 virtual bool isCameraTorchSupported() = 0;
281 virtual int setCameraTorchOn(
bool on, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
294 virtual bool isCameraExposurePositionSupported() = 0;
311 virtual int setCameraExposurePosition(
float positionXinView,
float positionYinView, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
325 virtual bool isCameraExposureSupported() = 0;
337 virtual int setCameraExposureFactor(
float value, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
339 #if (defined(__APPLE__) && TARGET_OS_IOS)
351 virtual bool enableMultiCamera(
bool enable, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
359 virtual bool isCameraAutoExposureFaceModeSupported() = 0;
375 virtual int setCameraAutoExposureFaceModeEnabled(
bool enabled, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
382 virtual int setCameraStabilizationMode(CAMERA_STABILIZATION_MODE mode) = 0;
385 #elif defined(_WIN32) || (defined(__linux__) && !defined(__ANDROID__)) || \
386 (defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE)
409 virtual int initWithDeviceId(
const char* deviceId) = 0;
421 virtual int initWithDeviceName(
const char* deviceName) = 0;
424 #if defined(__APPLE__)
432 virtual bool isCenterStageSupported() = 0;
442 virtual int enableCenterStage(
bool enabled) = 0;
533 int imageWidth,
int imageHeight,
const Rectangle* vecRectangle,
const int* vecDistance,
int numFaces) {
565 virtual ~ICameraCaptureObserver() {}