• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * @addtogroup OH_Camera
18  * @{
19  *
20  * @brief Provide the definition of the C interface for the camera module.
21  *
22  * @syscap SystemCapability.Multimedia.Camera.Core
23  *
24  * @since 11
25  * @version 1.0
26  */
27 
28 /**
29  * @file capture_session.h
30  *
31  * @brief Declare the capture Session concepts.
32  *
33  * @library libohcamera.so
34  * @syscap SystemCapability.Multimedia.Camera.Core
35  * @since 11
36  * @version 1.0
37  */
38 
39 #ifndef NATIVE_INCLUDE_CAMERA_CAMERA_SESSION_H
40 #define NATIVE_INCLUDE_CAMERA_CAMERA_SESSION_H
41 
42 #include <stdint.h>
43 #include <stdio.h>
44 #include "camera.h"
45 #include "camera_input.h"
46 #include "preview_output.h"
47 #include "photo_output.h"
48 #include "video_output.h"
49 #include "metadata_output.h"
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
55 /**
56  * @brief Capture session object
57  *
58  * A pointer can be created using {@link Camera_CaptureSession} method.
59  *
60  * @since 11
61  * @version 1.0
62  */
63 typedef struct Camera_CaptureSession Camera_CaptureSession;
64 
65 /**
66  * @brief Capture session focus state callback to be called in {@link CaptureSession_Callbacks}.
67  *
68  * @param session the {@link Camera_CaptureSession} which deliver the callback.
69  * @param focusState the {@link Camera_FocusState} which delivered by the callback.
70  * @since 11
71  */
72 typedef void (*OH_CaptureSession_OnFocusStateChange)(Camera_CaptureSession* session, Camera_FocusState focusState);
73 
74 /**
75  * @brief Capture session error callback to be called in {@link CaptureSession_Callbacks}.
76  *
77  * @param session the {@link Camera_CaptureSession} which deliver the callback.
78  * @param errorCode the {@link Camera_ErrorCode} of the capture session.
79  *
80  * @see CAMERA_SERVICE_FATAL_ERROR
81  * @since 11
82  */
83 typedef void (*OH_CaptureSession_OnError)(Camera_CaptureSession* session, Camera_ErrorCode errorCode);
84 
85 /**
86  * @brief A listener for capture session.
87  *
88  * @see OH_CaptureSession_RegisterCallback
89  * @since 11
90  * @version 1.0
91  */
92 typedef struct CaptureSession_Callbacks {
93     /**
94      * Capture session focus state change event.
95      */
96     OH_CaptureSession_OnFocusStateChange onFocusStateChange;
97 
98     /**
99      * Capture session error event.
100      */
101     OH_CaptureSession_OnError onError;
102 } CaptureSession_Callbacks;
103 
104 /**
105  * @brief Register capture session event callback.
106  *
107  * @param session the {@link Camera_CaptureSession} instance.
108  * @param callback the {@link CaptureSession_Callbacks} to be registered.
109  * @return {@link #CAMERA_OK} if the method call succeeds.
110  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
111  * @since 11
112  */
113 Camera_ErrorCode OH_CaptureSession_RegisterCallback(Camera_CaptureSession* session,
114     CaptureSession_Callbacks* callback);
115 
116 /**
117  * @brief Unregister capture session event callback.
118  *
119  * @param session the {@link Camera_CaptureSession} instance.
120  * @param callback the {@link CaptureSession_Callbacks} to be unregistered.
121  * @return {@link #CAMERA_OK} if the method call succeeds.
122  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
123  * @since 11
124  */
125 Camera_ErrorCode OH_CaptureSession_UnregisterCallback(Camera_CaptureSession* session,
126     CaptureSession_Callbacks* callback);
127 
128 /**
129  * @brief Begin capture session config.
130  *
131  * @param session the {@link Camera_CaptureSession} instance.
132  * @return {@link #CAMERA_OK} if the method call succeeds.
133  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
134  *         {@link #CAMERA_SESSION_CONFIG_LOCKED} if session config locked.
135  * @since 11
136  */
137 Camera_ErrorCode OH_CaptureSession_BeginConfig(Camera_CaptureSession* session);
138 
139 /**
140  * @brief Commit capture session config.
141  *
142  * @param session the {@link Camera_CaptureSession} instance.
143  * @return {@link #CAMERA_OK} if the method call succeeds.
144  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
145  *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
146  *         {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error.
147  * @since 11
148  */
149 Camera_ErrorCode OH_CaptureSession_CommitConfig(Camera_CaptureSession* session);
150 
151 /**
152  * @brief Add a camera input.
153  *
154  * @param session the {@link Camera_CaptureSession} instance.
155  * @param cameraInput the target {@link Camera_Input} to add.
156  * @return {@link #CAMERA_OK} if the method call succeeds.
157  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
158  *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
159  * @since 11
160  */
161 Camera_ErrorCode OH_CaptureSession_AddInput(Camera_CaptureSession* session, Camera_Input* cameraInput);
162 
163 /**
164  * @brief Remove a camera input.
165  *
166  * @param session the {@link Camera_CaptureSession} instance.
167  * @param cameraInput the target {@link Camera_Input} to remove.
168  * @return {@link #CAMERA_OK} if the method call succeeds.
169  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
170  *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
171  * @since 11
172  */
173 Camera_ErrorCode OH_CaptureSession_RemoveInput(Camera_CaptureSession* session, Camera_Input* cameraInput);
174 
175 /**
176  * @brief Add a preview output.
177  *
178  * @param session the {@link Camera_CaptureSession} instance.
179  * @param previewOutput the target {@link Camera_PreviewOutput} to add.
180  * @return {@link #CAMERA_OK} if the method call succeeds.
181  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
182  *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
183  * @since 11
184  */
185 Camera_ErrorCode OH_CaptureSession_AddPreviewOutput(Camera_CaptureSession* session,
186     Camera_PreviewOutput* previewOutput);
187 
188 /**
189  * @brief Remove a preview output.
190  *
191  * @param session the {@link Camera_CaptureSession} instance.
192  * @param previewOutput the target {@link Camera_PreviewOutput} to remove.
193  * @return {@link #CAMERA_OK} if the method call succeeds.
194  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
195  *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
196  * @since 11
197  */
198 Camera_ErrorCode OH_CaptureSession_RemovePreviewOutput(Camera_CaptureSession* session,
199     Camera_PreviewOutput* previewOutput);
200 
201 /**
202  * @brief Add a photo output.
203  *
204  * @param session the {@link Camera_CaptureSession} instance.
205  * @param photoOutput the target {@link Camera_PhotoOutput} to add.
206  * @return {@link #CAMERA_OK} if the method call succeeds.
207  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
208  *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
209  * @since 11
210  */
211 Camera_ErrorCode OH_CaptureSession_AddPhotoOutput(Camera_CaptureSession* session, Camera_PhotoOutput* photoOutput);
212 
213 /**
214  * @brief Remove a photo output.
215  *
216  * @param session the {@link Camera_CaptureSession} instance.
217  * @param photoOutput the target {@link Camera_PhotoOutput} to remove.
218  * @return {@link #CAMERA_OK} if the method call succeeds.
219  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
220  *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
221  * @since 11
222  */
223 Camera_ErrorCode OH_CaptureSession_RemovePhotoOutput(Camera_CaptureSession* session, Camera_PhotoOutput* photoOutput);
224 
225 /**
226  * @brief Add a video output.
227  *
228  * @param session the {@link Camera_CaptureSession} instance.
229  * @param videoOutput the target {@link Camera_VideoOutput} to add.
230  * @return {@link #CAMERA_OK} if the method call succeeds.
231  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
232  *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
233  * @since 11
234  */
235 Camera_ErrorCode OH_CaptureSession_AddVideoOutput(Camera_CaptureSession* session, Camera_VideoOutput* videoOutput);
236 
237 /**
238  * @brief Remove a video output.
239  *
240  * @param session the {@link Camera_CaptureSession} instance.
241  * @param videoOutput the target {@link Camera_VideoOutput} to remove.
242  * @return {@link #CAMERA_OK} if the method call succeeds.
243  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
244  *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
245  * @since 11
246  */
247 Camera_ErrorCode OH_CaptureSession_RemoveVideoOutput(Camera_CaptureSession* session, Camera_VideoOutput* videoOutput);
248 
249 /**
250  * @brief Add a metadata output.
251  *
252  * @param session the {@link Camera_CaptureSession} instance.
253  * @param metadataOutput the target {@link Camera_MetadataOutput} to add.
254  * @return {@link #CAMERA_OK} if the method call succeeds.
255  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
256  *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
257  * @since 11
258  */
259 Camera_ErrorCode OH_CaptureSession_AddMetadataOutput(Camera_CaptureSession* session,
260     Camera_MetadataOutput* metadataOutput);
261 
262 /**
263  * @brief Remove a metadata output.
264  *
265  * @param session the {@link Camera_CaptureSession} instance.
266  * @param metadataOutput the target {@link Camera_MetadataOutput} to remove.
267  * @return {@link #CAMERA_OK} if the method call succeeds.
268  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
269  *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
270  * @since 11
271  */
272 Camera_ErrorCode OH_CaptureSession_RemoveMetadataOutput(Camera_CaptureSession* session,
273     Camera_MetadataOutput* metadataOutput);
274 
275 /**
276  * @brief Start capture session.
277  *
278  * @param session the {@link Camera_CaptureSession} instance to be started.
279  * @return {@link #CAMERA_OK} if the method call succeeds.
280  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
281  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
282  *         {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error.
283  * @since 11
284  */
285 Camera_ErrorCode OH_CaptureSession_Start(Camera_CaptureSession* session);
286 
287 /**
288  * @brief Stop capture session.
289  *
290  * @param session the {@link Camera_CaptureSession} instance to be stoped.
291  * @return {@link #CAMERA_OK} if the method call succeeds.
292  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
293  *         {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error.
294  * @since 11
295  */
296 Camera_ErrorCode OH_CaptureSession_Stop(Camera_CaptureSession* session);
297 
298 /**
299  * @brief Release capture session.
300  *
301  * @param session the {@link Camera_CaptureSession} instance to be release.
302  * @return {@link #CAMERA_OK} if the method call succeeds.
303  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
304  *         {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error.
305  * @since 11
306  */
307 Camera_ErrorCode OH_CaptureSession_Release(Camera_CaptureSession* session);
308 
309 /**
310  * @brief Check if device has flash light.
311  *
312  * @param session the {@link Camera_CaptureSession} instance.
313  * @param hasFlash the result of whether flash supported.
314  * @return {@link #CAMERA_OK} if the method call succeeds.
315  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
316  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
317  * @since 11
318  */
319 Camera_ErrorCode OH_CaptureSession_HasFlash(Camera_CaptureSession* session, bool* hasFlash);
320 
321 /**
322  * @brief Check whether a specified flash mode is supported.
323  *
324  * @param session the {@link Camera_CaptureSession} instance.
325  * @param flashMode the {@link Camera_FlashMode} to be checked.
326  * @param isSupported the result of whether flash mode supported.
327  * @return {@link #CAMERA_OK} if the method call succeeds.
328  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
329  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
330  * @since 11
331  */
332 Camera_ErrorCode OH_CaptureSession_IsFlashModeSupported(Camera_CaptureSession* session,
333     Camera_FlashMode flashMode, bool* isSupported);
334 
335 /**
336  * @brief Get current flash mode.
337  *
338  * @param session the {@link Camera_CaptureSession} instance.
339  * @param flashMode the current {@link Camera_FlashMode}.
340  * @return {@link #CAMERA_OK} if the method call succeeds.
341  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
342  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
343  * @since 11
344  */
345 Camera_ErrorCode OH_CaptureSession_GetFlashMode(Camera_CaptureSession* session, Camera_FlashMode* flashMode);
346 
347 /**
348  * @brief Set flash mode.
349  *
350  * @param session the {@link Camera_CaptureSession} instance.
351  * @param flashMode the target {@link Camera_FlashMode} to set.
352  * @return {@link #CAMERA_OK} if the method call succeeds.
353  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
354  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
355  * @since 11
356  */
357 Camera_ErrorCode OH_CaptureSession_SetFlashMode(Camera_CaptureSession* session, Camera_FlashMode flashMode);
358 
359 /**
360  * @brief Check whether a specified exposure mode is supported.
361  *
362  * @param session the {@link Camera_CaptureSession} instance.
363  * @param exposureMode the {@link Camera_ExposureMode} to be checked.
364  * @param isSupported the result of whether exposure mode supported.
365  * @return {@link #CAMERA_OK} if the method call succeeds.
366  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
367  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
368  * @since 11
369  */
370 Camera_ErrorCode OH_CaptureSession_IsExposureModeSupported(Camera_CaptureSession* session,
371     Camera_ExposureMode exposureMode, bool* isSupported);
372 
373 /**
374  * @brief Get current exposure mode.
375  *
376  * @param session the {@link Camera_CaptureSession} instance.
377  * @param exposureMode the current {@link Camera_ExposureMode}.
378  * @return {@link #CAMERA_OK} if the method call succeeds.
379  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
380  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
381  * @since 11
382  */
383 Camera_ErrorCode OH_CaptureSession_GetExposureMode(Camera_CaptureSession* session, Camera_ExposureMode* exposureMode);
384 
385 /**
386  * @brief Set exposure mode.
387  *
388  * @param session the {@link Camera_CaptureSession} instance.
389  * @param exposureMode the target {@link Camera_ExposureMode} to set.
390  * @return {@link #CAMERA_OK} if the method call succeeds.
391  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
392  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
393  * @since 11
394  */
395 Camera_ErrorCode OH_CaptureSession_SetExposureMode(Camera_CaptureSession* session, Camera_ExposureMode exposureMode);
396 
397 /**
398  * @brief Get current metering point.
399  *
400  * @param session the {@link Camera_CaptureSession} instance.
401  * @param point the current {@link Camera_Point} metering point.
402  * @return {@link #CAMERA_OK} if the method call succeeds.
403  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
404  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
405  * @since 11
406  */
407 Camera_ErrorCode OH_CaptureSession_GetMeteringPoint(Camera_CaptureSession* session, Camera_Point* point);
408 
409 /**
410  * @brief Set the center point of the metering area.
411  *
412  * @param session the {@link Camera_CaptureSession} instance.
413  * @param point the target {@link Camera_Point} to set.
414  * @return {@link #CAMERA_OK} if the method call succeeds.
415  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
416  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
417  * @since 11
418  */
419 Camera_ErrorCode OH_CaptureSession_SetMeteringPoint(Camera_CaptureSession* session, Camera_Point point);
420 
421 /**
422  * @brief Query the exposure compensation range.
423  *
424  * @param session the {@link Camera_CaptureSession} instance.
425  * @param minExposureBias the minimum of exposure compensation.
426  * @param maxExposureBias the Maximum of exposure compensation.
427  * @param step the step of exposure compensation between each level.
428  * @return {@link #CAMERA_OK} if the method call succeeds.
429  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
430  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
431  * @since 11
432  */
433 Camera_ErrorCode OH_CaptureSession_GetExposureBiasRange(Camera_CaptureSession* session, float* minExposureBias,
434     float* maxExposureBias, float* step);
435 
436 /**
437  * @brief Set exposure compensation.
438  *
439  * @param session the {@link Camera_CaptureSession} instance.
440  * @param exposureBias the target exposure compensation to set.
441  * @return {@link #CAMERA_OK} if the method call succeeds.
442  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
443  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
444  * @since 11
445  */
446 Camera_ErrorCode OH_CaptureSession_SetExposureBias(Camera_CaptureSession* session, float exposureBias);
447 
448 /**
449  * @brief Get current exposure compensation.
450  *
451  * @param session the {@link Camera_CaptureSession} instance.
452  * @param exposureBias the current exposure compensation.
453  * @return {@link #CAMERA_OK} if the method call succeeds.
454  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
455  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
456  * @since 11
457  */
458 Camera_ErrorCode OH_CaptureSession_GetExposureBias(Camera_CaptureSession* session, float* exposureBias);
459 
460 /**
461  * @brief Check whether a specified focus mode is supported.
462  *
463  * @param session the {@link Camera_CaptureSession} instance.
464  * @param focusMode the {@link Camera_FocusMode} to be checked.
465  * @param isSupported the result of whether focus mode supported.
466  * @return {@link #CAMERA_OK} if the method call succeeds.
467  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
468  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
469  * @since 11
470  */
471 Camera_ErrorCode OH_CaptureSession_IsFocusModeSupported(Camera_CaptureSession* session,
472     Camera_FocusMode focusMode, bool* isSupported);
473 
474 /**
475  * @brief Get current focus mode.
476  *
477  * @param session the {@link Camera_CaptureSession} instance.
478  * @param exposureBias the current {@link Camera_FocusMode}.
479  * @return {@link #CAMERA_OK} if the method call succeeds.
480  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
481  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
482  * @since 11
483  */
484 Camera_ErrorCode OH_CaptureSession_GetFocusMode(Camera_CaptureSession* session, Camera_FocusMode* focusMode);
485 
486 /**
487  * @brief Set focus mode.
488  *
489  * @param session the {@link Camera_CaptureSession} instance.
490  * @param focusMode the target {@link Camera_FocusMode} to set.
491  * @return {@link #CAMERA_OK} if the method call succeeds.
492  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
493  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
494  * @since 11
495  */
496 Camera_ErrorCode OH_CaptureSession_SetFocusMode(Camera_CaptureSession* session, Camera_FocusMode focusMode);
497 
498 /**
499  * @brief Get current focus point.
500  *
501  * @param session the {@link Camera_CaptureSession} instance.
502  * @param focusPoint the current {@link Camera_Point}.
503  * @return {@link #CAMERA_OK} if the method call succeeds.
504  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
505  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
506  * @since 11
507  */
508 Camera_ErrorCode OH_CaptureSession_GetFocusPoint(Camera_CaptureSession* session, Camera_Point* focusPoint);
509 
510 /**
511  * @brief Set focus point.
512  *
513  * @param session the {@link Camera_CaptureSession} instance.
514  * @param focusPoint the target {@link Camera_Point} to set.
515  * @return {@link #CAMERA_OK} if the method call succeeds.
516  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
517  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
518  * @since 11
519  */
520 Camera_ErrorCode OH_CaptureSession_SetFocusPoint(Camera_CaptureSession* session, Camera_Point focusPoint);
521 
522 /**
523  * @brief Get all supported zoom ratio range.
524  *
525  * @param session the {@link Camera_CaptureSession} instance.
526  * @param minZoom the minimum of zoom ratio range.
527  * @param maxZoom the Maximum of zoom ratio range.
528  * @return {@link #CAMERA_OK} if the method call succeeds.
529  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
530  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
531  * @since 11
532  */
533 Camera_ErrorCode OH_CaptureSession_GetZoomRatioRange(Camera_CaptureSession* session, float* minZoom, float* maxZoom);
534 
535 /**
536  * @brief Get current zoom ratio.
537  *
538  * @param session the {@link Camera_CaptureSession} instance.
539  * @param zoom the current zoom ratio.
540  * @return {@link #CAMERA_OK} if the method call succeeds.
541  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
542  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
543  * @since 11
544  */
545 Camera_ErrorCode OH_CaptureSession_GetZoomRatio(Camera_CaptureSession* session, float* zoom);
546 
547 /**
548  * @brief Set zoom ratio.
549  *
550  * @param session the {@link Camera_CaptureSession} instance.
551  * @param zoom the target zoom ratio to set.
552  * @return {@link #CAMERA_OK} if the method call succeeds.
553  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
554  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
555  * @since 11
556  */
557 Camera_ErrorCode OH_CaptureSession_SetZoomRatio(Camera_CaptureSession* session, float zoom);
558 
559 /**
560  * @brief Check whether a specified video stabilization mode is supported.
561  *
562  * @param session the {@link Camera_CaptureSession} instance.
563  * @param mode the {@link Camera_VideoStabilizationMode} to be checked.
564  * @param isSupported the result of whether video stabilization mode supported.
565  * @return {@link #CAMERA_OK} if the method call succeeds.
566  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
567  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
568  * @since 11
569  */
570 Camera_ErrorCode OH_CaptureSession_IsVideoStabilizationModeSupported(Camera_CaptureSession* session,
571     Camera_VideoStabilizationMode mode, bool* isSupported);
572 
573 /**
574  * @brief Get current video stabilization mode.
575  *
576  * @param session the {@link Camera_CaptureSession} instance.
577  * @param mode the current {@link Camera_VideoStabilizationMode}.
578  * @return {@link #CAMERA_OK} if the method call succeeds.
579  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
580  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
581  * @since 11
582  */
583 Camera_ErrorCode OH_CaptureSession_GetVideoStabilizationMode(Camera_CaptureSession* session,
584     Camera_VideoStabilizationMode* mode);
585 
586 /**
587  * @brief Set video stabilization mode.
588  *
589  * @param session the {@link Camera_CaptureSession} instance.
590  * @param mode the target {@link Camera_VideoStabilizationMode} to set.
591  * @return {@link #CAMERA_OK} if the method call succeeds.
592  *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
593  *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
594  * @since 11
595  */
596 Camera_ErrorCode OH_CaptureSession_SetVideoStabilizationMode(Camera_CaptureSession* session,
597     Camera_VideoStabilizationMode mode);
598 
599 #ifdef __cplusplus
600 }
601 #endif
602 
603 #endif // NATIVE_INCLUDE_CAMERA_CAMERA_SESSION_H
604 /** @} */