ZegoLiveRoom
zego-api-camera.h
Go to the documentation of this file.
1#ifndef zego_api_camera_h
2#define zego_api_camera_h
3
4#include "zego-api-defines.h"
5
6#if defined(__APPLE__)
7#include "TargetConditionals.h"
8#endif
9
10namespace ZEGO
11{
12 namespace CAMERA
13 {
14#if defined(ANDROID) || defined(_OS_OHOS_)
16 enum ZegoAVAPIFocusMode
17 {
22 ZEGO_FOCUS_MODE_AUTO = 0,
27 ZEGO_FOCUS_MODE_INFINITY = 1,
33 ZEGO_FOCUS_MODE_MACRO = 2,
40 ZEGO_FOCUS_MODE_FIXED = 3,
46 ZEGO_FOCUS_MODE_EDOF = 4,
50 ZEGO_FOCUS_MODE_CONTINUOUS_VIDEO = 5,
51
56 ZEGO_FOCUS_MODE_AUTO_FOCUS_COMMON = 8,
61 ZEGO_FOCUS_MODE_CONTINUOUS_AUTO_FOCUS_COMMON = 9
62 };
63
65 enum ZegoAVAPIExposureMode
66 {
67 ZEGO_EXPOSURE_MODE_AUTO = 0,
68 ZEGO_EXPOURE_MODE_CUSTOM = 1,
70 ZEGO_EXPOSURE_MODE_AUTO_EXPOSURE_COMMON = 4,
71 ZEGO_EXPOSURE_MODE_CONTINUOUS_AUTO_EXPOSURE_COMMON = 5
72 };
73
85 ZEGOAVKIT_API bool SetCamFocusPoint(float fx, float fy, AV::PublishChannelIndex idx = AV::PUBLISH_CHN_MAIN);
86
100 ZEGOAVKIT_API bool SetCamFocusMode(ZegoAVAPIFocusMode mode, AV::PublishChannelIndex idx = AV::PUBLISH_CHN_MAIN);
101
111 ZEGOAVKIT_API bool SetCamExposureMode(ZegoAVAPIExposureMode mode, AV::PublishChannelIndex idx = AV::PUBLISH_CHN_MAIN);
112
113#endif
114
115#if TARGET_OS_IPHONE
116
118 enum ZegoAVAPIFocusMode
119 {
121 ZegoAVAPIFocusModeLocked = 0,
123 ZegoAVAPIFocusModeAutoFocus = 1,
125 ZegoAVAPIFocusModeContinuousAutoFocus = 2,
126
128 ZegoAVAPIFocusModeAutoFocusCommon = 8,
130 ZegoAVAPIFocusModeContinuousAutoFocusCommon = 9
131 };
132
134 enum ZegoAVAPIExposureMode
135 {
137 ZegoAVAPIExposureModeLocked = 0,
139 ZegoAVAPIExposureModeAutoExpose = 1,
141 ZegoAVAPIExposureModeContinuousAutoExposure = 2,
142
144 ZegoAVAPIExposureModeAutoExposeCommon = 4,
146 ZegoAVAPIExposureModeContinuousAutoExposureCommon = 5
147 };
148
160 ZEGOAVKIT_API bool SetCamFocusMode(ZegoAVAPIFocusMode mode, AV::PublishChannelIndex idx = AV::PUBLISH_CHN_MAIN);
161
171 ZEGOAVKIT_API bool SetCamExposureMode(ZegoAVAPIExposureMode mode, AV::PublishChannelIndex idx = AV::PUBLISH_CHN_MAIN);
172#endif
173
174#if TARGET_OS_IPHONE || defined(ANDROID) || defined(_OS_OHOS_)
175
186 ZEGOAVKIT_API bool SetCamExposureCompensation(float value, AV::PublishChannelIndex idx = AV::PUBLISH_CHN_MAIN);
187
198 ZEGOAVKIT_API bool SetCamExposurePoint(float x, float y, AV::PublishChannelIndex idx = AV::PUBLISH_CHN_MAIN);
199
211 ZEGOAVKIT_API bool SetCamFocusPointInPreview(float x, float y, AV::PublishChannelIndex index = AV::PUBLISH_CHN_MAIN);
212
223 ZEGOAVKIT_API bool SetCamExposurePointInPreview(float x, float y, AV::PublishChannelIndex index = AV::PUBLISH_CHN_MAIN);
224
234 ZEGOAVKIT_API bool SetCamZoomFactor(float zoomFactor, AV::PublishChannelIndex index = AV::PUBLISH_CHN_MAIN);
235
243 ZEGOAVKIT_API float GetCamMaxZoomFactor(AV::PublishChannelIndex index = AV::PUBLISH_CHN_MAIN);
244
253 ZEGOAVKIT_API bool IsCamFocusSupported(AV::PublishChannelIndex index = AV::PUBLISH_CHN_MAIN);
254
255#endif
256
272 ZEGOAVKIT_API void EnableCamAdaptiveFPS(bool enable, int minFPS, int maxFPS, AV::PublishChannelIndex index = AV::PUBLISH_CHN_MAIN);
273 }
274
275}
276
277#endif /* zego_api_camera_h */
PublishChannelIndex
Definition: zego-api-defines.h:976
@ PUBLISH_CHN_MAIN
Definition: zego-api-defines.h:977
ZEGOAVKIT_API void EnableCamAdaptiveFPS(bool enable, int minFPS, int maxFPS, AV::PublishChannelIndex index=AV::PUBLISH_CHN_MAIN)
Definition: AVDefines.h:17
#define ZEGOAVKIT_API
Definition: zego-api-defines.h:59