7 #pragma once // NOLINT(build/header_guard)
10 #include "AgoraRefPtr.h"
11 #include <api/cpp/aosl_ares_class.h>
16 class ICameraCaptureObserver;
56 #if defined(__ANDROID__) || (defined(__APPLE__) && TARGET_OS_IPHONE) || defined (__OHOS__)
68 virtual int setCameraSource(
CAMERA_SOURCE source, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
84 virtual int switchCamera(aosl_ref_t ares = AOSL_REF_INVALID) = 0;
95 virtual bool isZoomSupported() = 0;
108 virtual int32_t setCameraZoom(
float zoomValue, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
118 virtual float getCameraMaxZoom() = 0;
129 virtual bool isFocusSupported() = 0;
139 virtual int32_t setCameraFocus(
float x,
float y, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
150 virtual bool isAutoFaceFocusSupported() = 0;
161 virtual int32_t setCameraAutoFaceFocus(
bool enable, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
172 virtual int32_t enableFaceDetection(
bool enable, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
181 virtual bool isCameraFaceDetectSupported() = 0;
203 virtual bool isCameraTorchSupported() = 0;
221 virtual int setCameraTorchOn(
bool on, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
234 virtual bool isCameraExposurePositionSupported() = 0;
251 virtual int setCameraExposurePosition(
float positionXinView,
float positionYinView, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
265 virtual bool isCameraExposureSupported() = 0;
277 virtual int setCameraExposureFactor(
float value, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
279 #if (defined(__APPLE__) && TARGET_OS_IOS)
291 virtual bool enableMultiCamera(
bool enable, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
299 virtual bool isCameraAutoExposureFaceModeSupported() = 0;
315 virtual int setCameraAutoExposureFaceModeEnabled(
bool enabled, aosl_ref_t ares = AOSL_REF_INVALID) = 0;
322 virtual int setCameraStabilizationMode(CAMERA_STABILIZATION_MODE mode) = 0;
325 #elif defined(_WIN32) || (defined(__linux__) && !defined(__ANDROID__) && !defined (__OHOS__)) || \
326 (defined(__APPLE__) && TARGET_OS_MAC && !TARGET_OS_IPHONE)
339 virtual int initWithDeviceId(
const char* deviceId) = 0;
351 virtual int initWithDeviceName(
const char* deviceName) = 0;
354 #if defined(__APPLE__)
362 virtual bool isCenterStageSupported() = 0;
372 virtual int enableCenterStage(
bool enabled) = 0;
463 int imageWidth,
int imageHeight,
const Rectangle* vecRectangle,
const int* vecDistance,
int numFaces) {
495 virtual ~ICameraCaptureObserver() {}