17777dab0Sopenharmony_ci/*
27777dab0Sopenharmony_ci * Copyright (C) 2023 Huawei Device Co., Ltd.
37777dab0Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
47777dab0Sopenharmony_ci * you may not use this file except in compliance with the License.
57777dab0Sopenharmony_ci * You may obtain a copy of the License at
67777dab0Sopenharmony_ci *
77777dab0Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
87777dab0Sopenharmony_ci *
97777dab0Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
107777dab0Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
117777dab0Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
127777dab0Sopenharmony_ci * See the License for the specific language governing permissions and
137777dab0Sopenharmony_ci * limitations under the License.
147777dab0Sopenharmony_ci */
157777dab0Sopenharmony_ci
167777dab0Sopenharmony_ci/**
177777dab0Sopenharmony_ci * @addtogroup OH_Camera
187777dab0Sopenharmony_ci * @{
197777dab0Sopenharmony_ci *
207777dab0Sopenharmony_ci * @brief Provide the definition of the C interface for the camera module.
217777dab0Sopenharmony_ci *
227777dab0Sopenharmony_ci * @syscap SystemCapability.Multimedia.Camera.Core
237777dab0Sopenharmony_ci *
247777dab0Sopenharmony_ci * @since 11
257777dab0Sopenharmony_ci * @version 1.0
267777dab0Sopenharmony_ci */
277777dab0Sopenharmony_ci
287777dab0Sopenharmony_ci/**
297777dab0Sopenharmony_ci * @file capture_session.h
307777dab0Sopenharmony_ci *
317777dab0Sopenharmony_ci * @brief Declare the capture Session concepts.
327777dab0Sopenharmony_ci *
337777dab0Sopenharmony_ci * @library libohcamera.so
347777dab0Sopenharmony_ci * @kit CameraKit
357777dab0Sopenharmony_ci * @syscap SystemCapability.Multimedia.Camera.Core
367777dab0Sopenharmony_ci * @since 11
377777dab0Sopenharmony_ci * @version 1.0
387777dab0Sopenharmony_ci */
397777dab0Sopenharmony_ci
407777dab0Sopenharmony_ci#ifndef NATIVE_INCLUDE_CAMERA_CAMERA_SESSION_H
417777dab0Sopenharmony_ci#define NATIVE_INCLUDE_CAMERA_CAMERA_SESSION_H
427777dab0Sopenharmony_ci
437777dab0Sopenharmony_ci#include <stdint.h>
447777dab0Sopenharmony_ci#include <stdio.h>
457777dab0Sopenharmony_ci#include "camera.h"
467777dab0Sopenharmony_ci#include "camera_input.h"
477777dab0Sopenharmony_ci#include "preview_output.h"
487777dab0Sopenharmony_ci#include "photo_output.h"
497777dab0Sopenharmony_ci#include "video_output.h"
507777dab0Sopenharmony_ci#include "metadata_output.h"
517777dab0Sopenharmony_ci#include "native_buffer/native_buffer.h"
527777dab0Sopenharmony_ci
537777dab0Sopenharmony_ci#ifdef __cplusplus
547777dab0Sopenharmony_ciextern "C" {
557777dab0Sopenharmony_ci#endif
567777dab0Sopenharmony_ci
577777dab0Sopenharmony_ci/**
587777dab0Sopenharmony_ci * @brief Capture session object
597777dab0Sopenharmony_ci *
607777dab0Sopenharmony_ci * A pointer can be created using {@link Camera_CaptureSession} method.
617777dab0Sopenharmony_ci *
627777dab0Sopenharmony_ci * @since 11
637777dab0Sopenharmony_ci * @version 1.0
647777dab0Sopenharmony_ci */
657777dab0Sopenharmony_citypedef struct Camera_CaptureSession Camera_CaptureSession;
667777dab0Sopenharmony_ci
677777dab0Sopenharmony_ci/**
687777dab0Sopenharmony_ci * @brief Capture session focus state callback to be called in {@link CaptureSession_Callbacks}.
697777dab0Sopenharmony_ci *
707777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} which deliver the callback.
717777dab0Sopenharmony_ci * @param focusState the {@link Camera_FocusState} which delivered by the callback.
727777dab0Sopenharmony_ci * @since 11
737777dab0Sopenharmony_ci */
747777dab0Sopenharmony_citypedef void (*OH_CaptureSession_OnFocusStateChange)(Camera_CaptureSession* session, Camera_FocusState focusState);
757777dab0Sopenharmony_ci
767777dab0Sopenharmony_ci/**
777777dab0Sopenharmony_ci * @brief Capture session error callback to be called in {@link CaptureSession_Callbacks}.
787777dab0Sopenharmony_ci *
797777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} which deliver the callback.
807777dab0Sopenharmony_ci * @param errorCode the {@link Camera_ErrorCode} of the capture session.
817777dab0Sopenharmony_ci *
827777dab0Sopenharmony_ci * @see CAMERA_SERVICE_FATAL_ERROR
837777dab0Sopenharmony_ci * @since 11
847777dab0Sopenharmony_ci */
857777dab0Sopenharmony_citypedef void (*OH_CaptureSession_OnError)(Camera_CaptureSession* session, Camera_ErrorCode errorCode);
867777dab0Sopenharmony_ci
877777dab0Sopenharmony_ci/**
887777dab0Sopenharmony_ci * @brief Capture session smooth zoom info callback.
897777dab0Sopenharmony_ci *
907777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} which deliver the callback.
917777dab0Sopenharmony_ci * @param smoothZoomInfo the {@link Camera_SmoothZoomInfo} which delivered by the callback.
927777dab0Sopenharmony_ci * @since 12
937777dab0Sopenharmony_ci */
947777dab0Sopenharmony_citypedef void (*OH_CaptureSession_OnSmoothZoomInfo)(Camera_CaptureSession* session,
957777dab0Sopenharmony_ci    Camera_SmoothZoomInfo* smoothZoomInfo);
967777dab0Sopenharmony_ci
977777dab0Sopenharmony_ci/**
987777dab0Sopenharmony_ci * @brief A listener for capture session.
997777dab0Sopenharmony_ci *
1007777dab0Sopenharmony_ci * @see OH_CaptureSession_RegisterCallback
1017777dab0Sopenharmony_ci * @since 11
1027777dab0Sopenharmony_ci * @version 1.0
1037777dab0Sopenharmony_ci */
1047777dab0Sopenharmony_citypedef struct CaptureSession_Callbacks {
1057777dab0Sopenharmony_ci    /**
1067777dab0Sopenharmony_ci     * Capture session focus state change event.
1077777dab0Sopenharmony_ci     */
1087777dab0Sopenharmony_ci    OH_CaptureSession_OnFocusStateChange onFocusStateChange;
1097777dab0Sopenharmony_ci
1107777dab0Sopenharmony_ci    /**
1117777dab0Sopenharmony_ci     * Capture session error event.
1127777dab0Sopenharmony_ci     */
1137777dab0Sopenharmony_ci    OH_CaptureSession_OnError onError;
1147777dab0Sopenharmony_ci} CaptureSession_Callbacks;
1157777dab0Sopenharmony_ci
1167777dab0Sopenharmony_ci/**
1177777dab0Sopenharmony_ci * @brief Register capture session event callback.
1187777dab0Sopenharmony_ci *
1197777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
1207777dab0Sopenharmony_ci * @param callback the {@link CaptureSession_Callbacks} to be registered.
1217777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
1227777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
1237777dab0Sopenharmony_ci * @since 11
1247777dab0Sopenharmony_ci */
1257777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_RegisterCallback(Camera_CaptureSession* session,
1267777dab0Sopenharmony_ci    CaptureSession_Callbacks* callback);
1277777dab0Sopenharmony_ci
1287777dab0Sopenharmony_ci/**
1297777dab0Sopenharmony_ci * @brief Unregister capture session event callback.
1307777dab0Sopenharmony_ci *
1317777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
1327777dab0Sopenharmony_ci * @param callback the {@link CaptureSession_Callbacks} to be unregistered.
1337777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
1347777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
1357777dab0Sopenharmony_ci * @since 11
1367777dab0Sopenharmony_ci */
1377777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_UnregisterCallback(Camera_CaptureSession* session,
1387777dab0Sopenharmony_ci    CaptureSession_Callbacks* callback);
1397777dab0Sopenharmony_ci
1407777dab0Sopenharmony_ci/**
1417777dab0Sopenharmony_ci * @brief Register smooth zoom information event callback.
1427777dab0Sopenharmony_ci *
1437777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
1447777dab0Sopenharmony_ci * @param smoothZoomInfoCallback the {@link OH_CaptureSession_OnSmoothZoomInfo} to be registered.
1457777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
1467777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
1477777dab0Sopenharmony_ci * @since 12
1487777dab0Sopenharmony_ci */
1497777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_RegisterSmoothZoomInfoCallback(Camera_CaptureSession* session,
1507777dab0Sopenharmony_ci    OH_CaptureSession_OnSmoothZoomInfo smoothZoomInfoCallback);
1517777dab0Sopenharmony_ci
1527777dab0Sopenharmony_ci/**
1537777dab0Sopenharmony_ci * @brief Unregister smooth zoom information event callback.
1547777dab0Sopenharmony_ci *
1557777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
1567777dab0Sopenharmony_ci * @param smoothZoomInfoCallback the {@link OH_CaptureSession_OnSmoothZoomInfo} to be unregistered.
1577777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
1587777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
1597777dab0Sopenharmony_ci * @since 12
1607777dab0Sopenharmony_ci */
1617777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_UnregisterSmoothZoomInfoCallback(Camera_CaptureSession* session,
1627777dab0Sopenharmony_ci    OH_CaptureSession_OnSmoothZoomInfo smoothZoomInfoCallback);
1637777dab0Sopenharmony_ci
1647777dab0Sopenharmony_ci/**
1657777dab0Sopenharmony_ci * @brief Specifies the specific mode.
1667777dab0Sopenharmony_ci *
1677777dab0Sopenharmony_ci * This interface cannot be used after {@link OH_CaptureSession_BeginConfig}.
1687777dab0Sopenharmony_ci * We recommend using this interface immediately after using {@link OH_CameraManager_CreateCaptureSession}.
1697777dab0Sopenharmony_ci *
1707777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
1717777dab0Sopenharmony_ci * @param sceneMode the {@link CaptureSession_SceneMode} instance.
1727777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
1737777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
1747777dab0Sopenharmony_ci *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
1757777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_CONFIG_LOCKED} if session config locked.
1767777dab0Sopenharmony_ci * @since 12
1777777dab0Sopenharmony_ci */
1787777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_SetSessionMode(Camera_CaptureSession* session, Camera_SceneMode sceneMode);
1797777dab0Sopenharmony_ci
1807777dab0Sopenharmony_ci/**
1817777dab0Sopenharmony_ci * @brief Add Secure output for camera.
1827777dab0Sopenharmony_ci *
1837777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
1847777dab0Sopenharmony_ci * @param previewOutput the target {@link Camera_PreviewOutput} to Set as a secure flow.
1857777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
1867777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
1877777dab0Sopenharmony_ci *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
1887777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_CONFIG_LOCKED} if session config locked.
1897777dab0Sopenharmony_ci * @since 12
1907777dab0Sopenharmony_ci */
1917777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_AddSecureOutput(Camera_CaptureSession* session, Camera_PreviewOutput* previewOutput);
1927777dab0Sopenharmony_ci
1937777dab0Sopenharmony_ci/**
1947777dab0Sopenharmony_ci * @brief Begin capture session config.
1957777dab0Sopenharmony_ci *
1967777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
1977777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
1987777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
1997777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_CONFIG_LOCKED} if session config locked.
2007777dab0Sopenharmony_ci * @since 11
2017777dab0Sopenharmony_ci */
2027777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_BeginConfig(Camera_CaptureSession* session);
2037777dab0Sopenharmony_ci
2047777dab0Sopenharmony_ci/**
2057777dab0Sopenharmony_ci * @brief Commit capture session config.
2067777dab0Sopenharmony_ci *
2077777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
2087777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
2097777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
2107777dab0Sopenharmony_ci *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
2117777dab0Sopenharmony_ci *         {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error.
2127777dab0Sopenharmony_ci * @since 11
2137777dab0Sopenharmony_ci */
2147777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_CommitConfig(Camera_CaptureSession* session);
2157777dab0Sopenharmony_ci
2167777dab0Sopenharmony_ci/**
2177777dab0Sopenharmony_ci * @brief Add a camera input.
2187777dab0Sopenharmony_ci *
2197777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
2207777dab0Sopenharmony_ci * @param cameraInput the target {@link Camera_Input} to add.
2217777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
2227777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
2237777dab0Sopenharmony_ci *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
2247777dab0Sopenharmony_ci * @since 11
2257777dab0Sopenharmony_ci */
2267777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_AddInput(Camera_CaptureSession* session, Camera_Input* cameraInput);
2277777dab0Sopenharmony_ci
2287777dab0Sopenharmony_ci/**
2297777dab0Sopenharmony_ci * @brief Remove a camera input.
2307777dab0Sopenharmony_ci *
2317777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
2327777dab0Sopenharmony_ci * @param cameraInput the target {@link Camera_Input} to remove.
2337777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
2347777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
2357777dab0Sopenharmony_ci *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
2367777dab0Sopenharmony_ci * @since 11
2377777dab0Sopenharmony_ci */
2387777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_RemoveInput(Camera_CaptureSession* session, Camera_Input* cameraInput);
2397777dab0Sopenharmony_ci
2407777dab0Sopenharmony_ci/**
2417777dab0Sopenharmony_ci * @brief Add a preview output.
2427777dab0Sopenharmony_ci *
2437777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
2447777dab0Sopenharmony_ci * @param previewOutput the target {@link Camera_PreviewOutput} to add.
2457777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
2467777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
2477777dab0Sopenharmony_ci *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
2487777dab0Sopenharmony_ci * @since 11
2497777dab0Sopenharmony_ci */
2507777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_AddPreviewOutput(Camera_CaptureSession* session,
2517777dab0Sopenharmony_ci    Camera_PreviewOutput* previewOutput);
2527777dab0Sopenharmony_ci
2537777dab0Sopenharmony_ci/**
2547777dab0Sopenharmony_ci * @brief Remove a preview output.
2557777dab0Sopenharmony_ci *
2567777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
2577777dab0Sopenharmony_ci * @param previewOutput the target {@link Camera_PreviewOutput} to remove.
2587777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
2597777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
2607777dab0Sopenharmony_ci *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
2617777dab0Sopenharmony_ci * @since 11
2627777dab0Sopenharmony_ci */
2637777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_RemovePreviewOutput(Camera_CaptureSession* session,
2647777dab0Sopenharmony_ci    Camera_PreviewOutput* previewOutput);
2657777dab0Sopenharmony_ci
2667777dab0Sopenharmony_ci/**
2677777dab0Sopenharmony_ci * @brief Add a photo output.
2687777dab0Sopenharmony_ci *
2697777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
2707777dab0Sopenharmony_ci * @param photoOutput the target {@link Camera_PhotoOutput} to add.
2717777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
2727777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
2737777dab0Sopenharmony_ci *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
2747777dab0Sopenharmony_ci * @since 11
2757777dab0Sopenharmony_ci */
2767777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_AddPhotoOutput(Camera_CaptureSession* session, Camera_PhotoOutput* photoOutput);
2777777dab0Sopenharmony_ci
2787777dab0Sopenharmony_ci/**
2797777dab0Sopenharmony_ci * @brief Remove a photo output.
2807777dab0Sopenharmony_ci *
2817777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
2827777dab0Sopenharmony_ci * @param photoOutput the target {@link Camera_PhotoOutput} to remove.
2837777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
2847777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
2857777dab0Sopenharmony_ci *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
2867777dab0Sopenharmony_ci * @since 11
2877777dab0Sopenharmony_ci */
2887777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_RemovePhotoOutput(Camera_CaptureSession* session, Camera_PhotoOutput* photoOutput);
2897777dab0Sopenharmony_ci
2907777dab0Sopenharmony_ci/**
2917777dab0Sopenharmony_ci * @brief Add a video output.
2927777dab0Sopenharmony_ci *
2937777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
2947777dab0Sopenharmony_ci * @param videoOutput the target {@link Camera_VideoOutput} to add.
2957777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
2967777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
2977777dab0Sopenharmony_ci *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
2987777dab0Sopenharmony_ci * @since 11
2997777dab0Sopenharmony_ci */
3007777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_AddVideoOutput(Camera_CaptureSession* session, Camera_VideoOutput* videoOutput);
3017777dab0Sopenharmony_ci
3027777dab0Sopenharmony_ci/**
3037777dab0Sopenharmony_ci * @brief Remove a video output.
3047777dab0Sopenharmony_ci *
3057777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
3067777dab0Sopenharmony_ci * @param videoOutput the target {@link Camera_VideoOutput} to remove.
3077777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
3087777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
3097777dab0Sopenharmony_ci *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
3107777dab0Sopenharmony_ci * @since 11
3117777dab0Sopenharmony_ci */
3127777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_RemoveVideoOutput(Camera_CaptureSession* session, Camera_VideoOutput* videoOutput);
3137777dab0Sopenharmony_ci
3147777dab0Sopenharmony_ci/**
3157777dab0Sopenharmony_ci * @brief Add a metadata output.
3167777dab0Sopenharmony_ci *
3177777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
3187777dab0Sopenharmony_ci * @param metadataOutput the target {@link Camera_MetadataOutput} to add.
3197777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
3207777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
3217777dab0Sopenharmony_ci *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
3227777dab0Sopenharmony_ci * @since 11
3237777dab0Sopenharmony_ci */
3247777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_AddMetadataOutput(Camera_CaptureSession* session,
3257777dab0Sopenharmony_ci    Camera_MetadataOutput* metadataOutput);
3267777dab0Sopenharmony_ci
3277777dab0Sopenharmony_ci/**
3287777dab0Sopenharmony_ci * @brief Remove a metadata output.
3297777dab0Sopenharmony_ci *
3307777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
3317777dab0Sopenharmony_ci * @param metadataOutput the target {@link Camera_MetadataOutput} to remove.
3327777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
3337777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
3347777dab0Sopenharmony_ci *         {@link #CAMERA_OPERATION_NOT_ALLOWED} if operation not allowed.
3357777dab0Sopenharmony_ci * @since 11
3367777dab0Sopenharmony_ci */
3377777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_RemoveMetadataOutput(Camera_CaptureSession* session,
3387777dab0Sopenharmony_ci    Camera_MetadataOutput* metadataOutput);
3397777dab0Sopenharmony_ci
3407777dab0Sopenharmony_ci/**
3417777dab0Sopenharmony_ci * @brief Start capture session.
3427777dab0Sopenharmony_ci *
3437777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance to be started.
3447777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
3457777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
3467777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
3477777dab0Sopenharmony_ci *         {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error.
3487777dab0Sopenharmony_ci * @since 11
3497777dab0Sopenharmony_ci */
3507777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_Start(Camera_CaptureSession* session);
3517777dab0Sopenharmony_ci
3527777dab0Sopenharmony_ci/**
3537777dab0Sopenharmony_ci * @brief Stop capture session.
3547777dab0Sopenharmony_ci *
3557777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance to be stoped.
3567777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
3577777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
3587777dab0Sopenharmony_ci *         {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error.
3597777dab0Sopenharmony_ci * @since 11
3607777dab0Sopenharmony_ci */
3617777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_Stop(Camera_CaptureSession* session);
3627777dab0Sopenharmony_ci
3637777dab0Sopenharmony_ci/**
3647777dab0Sopenharmony_ci * @brief Release capture session.
3657777dab0Sopenharmony_ci *
3667777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance to be release.
3677777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
3687777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
3697777dab0Sopenharmony_ci *         {@link #CAMERA_SERVICE_FATAL_ERROR} if camera service fatal error.
3707777dab0Sopenharmony_ci * @since 11
3717777dab0Sopenharmony_ci */
3727777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_Release(Camera_CaptureSession* session);
3737777dab0Sopenharmony_ci
3747777dab0Sopenharmony_ci/**
3757777dab0Sopenharmony_ci * @brief Check if device has flash light.
3767777dab0Sopenharmony_ci *
3777777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
3787777dab0Sopenharmony_ci * @param hasFlash the result of whether flash supported.
3797777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
3807777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
3817777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
3827777dab0Sopenharmony_ci * @since 11
3837777dab0Sopenharmony_ci */
3847777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_HasFlash(Camera_CaptureSession* session, bool* hasFlash);
3857777dab0Sopenharmony_ci
3867777dab0Sopenharmony_ci/**
3877777dab0Sopenharmony_ci * @brief Check whether a specified flash mode is supported.
3887777dab0Sopenharmony_ci *
3897777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
3907777dab0Sopenharmony_ci * @param flashMode the {@link Camera_FlashMode} to be checked.
3917777dab0Sopenharmony_ci * @param isSupported the result of whether flash mode supported.
3927777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
3937777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
3947777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
3957777dab0Sopenharmony_ci * @since 11
3967777dab0Sopenharmony_ci */
3977777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_IsFlashModeSupported(Camera_CaptureSession* session,
3987777dab0Sopenharmony_ci    Camera_FlashMode flashMode, bool* isSupported);
3997777dab0Sopenharmony_ci
4007777dab0Sopenharmony_ci/**
4017777dab0Sopenharmony_ci * @brief Get current flash mode.
4027777dab0Sopenharmony_ci *
4037777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
4047777dab0Sopenharmony_ci * @param flashMode the current {@link Camera_FlashMode}.
4057777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
4067777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
4077777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
4087777dab0Sopenharmony_ci * @since 11
4097777dab0Sopenharmony_ci */
4107777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_GetFlashMode(Camera_CaptureSession* session, Camera_FlashMode* flashMode);
4117777dab0Sopenharmony_ci
4127777dab0Sopenharmony_ci/**
4137777dab0Sopenharmony_ci * @brief Set flash mode.
4147777dab0Sopenharmony_ci *
4157777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
4167777dab0Sopenharmony_ci * @param flashMode the target {@link Camera_FlashMode} to set.
4177777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
4187777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
4197777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
4207777dab0Sopenharmony_ci * @since 11
4217777dab0Sopenharmony_ci */
4227777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_SetFlashMode(Camera_CaptureSession* session, Camera_FlashMode flashMode);
4237777dab0Sopenharmony_ci
4247777dab0Sopenharmony_ci/**
4257777dab0Sopenharmony_ci * @brief Check whether a specified exposure mode is supported.
4267777dab0Sopenharmony_ci *
4277777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
4287777dab0Sopenharmony_ci * @param exposureMode the {@link Camera_ExposureMode} to be checked.
4297777dab0Sopenharmony_ci * @param isSupported the result of whether exposure mode supported.
4307777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
4317777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
4327777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
4337777dab0Sopenharmony_ci * @since 11
4347777dab0Sopenharmony_ci */
4357777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_IsExposureModeSupported(Camera_CaptureSession* session,
4367777dab0Sopenharmony_ci    Camera_ExposureMode exposureMode, bool* isSupported);
4377777dab0Sopenharmony_ci
4387777dab0Sopenharmony_ci/**
4397777dab0Sopenharmony_ci * @brief Get current exposure mode.
4407777dab0Sopenharmony_ci *
4417777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
4427777dab0Sopenharmony_ci * @param exposureMode the current {@link Camera_ExposureMode}.
4437777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
4447777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
4457777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
4467777dab0Sopenharmony_ci * @since 11
4477777dab0Sopenharmony_ci */
4487777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_GetExposureMode(Camera_CaptureSession* session, Camera_ExposureMode* exposureMode);
4497777dab0Sopenharmony_ci
4507777dab0Sopenharmony_ci/**
4517777dab0Sopenharmony_ci * @brief Set exposure mode.
4527777dab0Sopenharmony_ci *
4537777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
4547777dab0Sopenharmony_ci * @param exposureMode the target {@link Camera_ExposureMode} to set.
4557777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
4567777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
4577777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
4587777dab0Sopenharmony_ci * @since 11
4597777dab0Sopenharmony_ci */
4607777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_SetExposureMode(Camera_CaptureSession* session, Camera_ExposureMode exposureMode);
4617777dab0Sopenharmony_ci
4627777dab0Sopenharmony_ci/**
4637777dab0Sopenharmony_ci * @brief Get current metering point.
4647777dab0Sopenharmony_ci *
4657777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
4667777dab0Sopenharmony_ci * @param point the current {@link Camera_Point} metering point.
4677777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
4687777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
4697777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
4707777dab0Sopenharmony_ci * @since 11
4717777dab0Sopenharmony_ci */
4727777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_GetMeteringPoint(Camera_CaptureSession* session, Camera_Point* point);
4737777dab0Sopenharmony_ci
4747777dab0Sopenharmony_ci/**
4757777dab0Sopenharmony_ci * @brief Set the center point of the metering area.
4767777dab0Sopenharmony_ci *
4777777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
4787777dab0Sopenharmony_ci * @param point the target {@link Camera_Point} to set.
4797777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
4807777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
4817777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
4827777dab0Sopenharmony_ci * @since 11
4837777dab0Sopenharmony_ci */
4847777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_SetMeteringPoint(Camera_CaptureSession* session, Camera_Point point);
4857777dab0Sopenharmony_ci
4867777dab0Sopenharmony_ci/**
4877777dab0Sopenharmony_ci * @brief Query the exposure compensation range.
4887777dab0Sopenharmony_ci *
4897777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
4907777dab0Sopenharmony_ci * @param minExposureBias the minimum of exposure compensation.
4917777dab0Sopenharmony_ci * @param maxExposureBias the Maximum of exposure compensation.
4927777dab0Sopenharmony_ci * @param step the step of exposure compensation between each level.
4937777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
4947777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
4957777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
4967777dab0Sopenharmony_ci * @since 11
4977777dab0Sopenharmony_ci */
4987777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_GetExposureBiasRange(Camera_CaptureSession* session, float* minExposureBias,
4997777dab0Sopenharmony_ci    float* maxExposureBias, float* step);
5007777dab0Sopenharmony_ci
5017777dab0Sopenharmony_ci/**
5027777dab0Sopenharmony_ci * @brief Set exposure compensation.
5037777dab0Sopenharmony_ci *
5047777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
5057777dab0Sopenharmony_ci * @param exposureBias the target exposure compensation to set.
5067777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
5077777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
5087777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
5097777dab0Sopenharmony_ci * @since 11
5107777dab0Sopenharmony_ci */
5117777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_SetExposureBias(Camera_CaptureSession* session, float exposureBias);
5127777dab0Sopenharmony_ci
5137777dab0Sopenharmony_ci/**
5147777dab0Sopenharmony_ci * @brief Get current exposure compensation.
5157777dab0Sopenharmony_ci *
5167777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
5177777dab0Sopenharmony_ci * @param exposureBias the current exposure compensation.
5187777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
5197777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
5207777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
5217777dab0Sopenharmony_ci * @since 11
5227777dab0Sopenharmony_ci */
5237777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_GetExposureBias(Camera_CaptureSession* session, float* exposureBias);
5247777dab0Sopenharmony_ci
5257777dab0Sopenharmony_ci/**
5267777dab0Sopenharmony_ci * @brief Check whether a specified focus mode is supported.
5277777dab0Sopenharmony_ci *
5287777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
5297777dab0Sopenharmony_ci * @param focusMode the {@link Camera_FocusMode} to be checked.
5307777dab0Sopenharmony_ci * @param isSupported the result of whether focus mode supported.
5317777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
5327777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
5337777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
5347777dab0Sopenharmony_ci * @since 11
5357777dab0Sopenharmony_ci */
5367777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_IsFocusModeSupported(Camera_CaptureSession* session,
5377777dab0Sopenharmony_ci    Camera_FocusMode focusMode, bool* isSupported);
5387777dab0Sopenharmony_ci
5397777dab0Sopenharmony_ci/**
5407777dab0Sopenharmony_ci * @brief Get current focus mode.
5417777dab0Sopenharmony_ci *
5427777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
5437777dab0Sopenharmony_ci * @param exposureBias the current {@link Camera_FocusMode}.
5447777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
5457777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
5467777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
5477777dab0Sopenharmony_ci * @since 11
5487777dab0Sopenharmony_ci */
5497777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_GetFocusMode(Camera_CaptureSession* session, Camera_FocusMode* focusMode);
5507777dab0Sopenharmony_ci
5517777dab0Sopenharmony_ci/**
5527777dab0Sopenharmony_ci * @brief Set focus mode.
5537777dab0Sopenharmony_ci *
5547777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
5557777dab0Sopenharmony_ci * @param focusMode the target {@link Camera_FocusMode} to set.
5567777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
5577777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
5587777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
5597777dab0Sopenharmony_ci * @since 11
5607777dab0Sopenharmony_ci */
5617777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_SetFocusMode(Camera_CaptureSession* session, Camera_FocusMode focusMode);
5627777dab0Sopenharmony_ci
5637777dab0Sopenharmony_ci/**
5647777dab0Sopenharmony_ci * @brief Get current focus point.
5657777dab0Sopenharmony_ci *
5667777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
5677777dab0Sopenharmony_ci * @param focusPoint the current {@link Camera_Point}.
5687777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
5697777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
5707777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
5717777dab0Sopenharmony_ci * @since 11
5727777dab0Sopenharmony_ci */
5737777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_GetFocusPoint(Camera_CaptureSession* session, Camera_Point* focusPoint);
5747777dab0Sopenharmony_ci
5757777dab0Sopenharmony_ci/**
5767777dab0Sopenharmony_ci * @brief Set focus point.
5777777dab0Sopenharmony_ci *
5787777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
5797777dab0Sopenharmony_ci * @param focusPoint the target {@link Camera_Point} to set.
5807777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
5817777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
5827777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
5837777dab0Sopenharmony_ci * @since 11
5847777dab0Sopenharmony_ci */
5857777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_SetFocusPoint(Camera_CaptureSession* session, Camera_Point focusPoint);
5867777dab0Sopenharmony_ci
5877777dab0Sopenharmony_ci/**
5887777dab0Sopenharmony_ci * @brief Get all supported zoom ratio range.
5897777dab0Sopenharmony_ci *
5907777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
5917777dab0Sopenharmony_ci * @param minZoom the minimum of zoom ratio range.
5927777dab0Sopenharmony_ci * @param maxZoom the Maximum of zoom ratio range.
5937777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
5947777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
5957777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
5967777dab0Sopenharmony_ci * @since 11
5977777dab0Sopenharmony_ci */
5987777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_GetZoomRatioRange(Camera_CaptureSession* session, float* minZoom, float* maxZoom);
5997777dab0Sopenharmony_ci
6007777dab0Sopenharmony_ci/**
6017777dab0Sopenharmony_ci * @brief Get current zoom ratio.
6027777dab0Sopenharmony_ci *
6037777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
6047777dab0Sopenharmony_ci * @param zoom the current zoom ratio.
6057777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
6067777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
6077777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
6087777dab0Sopenharmony_ci * @since 11
6097777dab0Sopenharmony_ci */
6107777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_GetZoomRatio(Camera_CaptureSession* session, float* zoom);
6117777dab0Sopenharmony_ci
6127777dab0Sopenharmony_ci/**
6137777dab0Sopenharmony_ci * @brief Set zoom ratio.
6147777dab0Sopenharmony_ci *
6157777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
6167777dab0Sopenharmony_ci * @param zoom the target zoom ratio to set.
6177777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
6187777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
6197777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
6207777dab0Sopenharmony_ci * @since 11
6217777dab0Sopenharmony_ci */
6227777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_SetZoomRatio(Camera_CaptureSession* session, float zoom);
6237777dab0Sopenharmony_ci
6247777dab0Sopenharmony_ci/**
6257777dab0Sopenharmony_ci * @brief Check whether a specified video stabilization mode is supported.
6267777dab0Sopenharmony_ci *
6277777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
6287777dab0Sopenharmony_ci * @param mode the {@link Camera_VideoStabilizationMode} to be checked.
6297777dab0Sopenharmony_ci * @param isSupported the result of whether video stabilization mode supported.
6307777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
6317777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
6327777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
6337777dab0Sopenharmony_ci * @since 11
6347777dab0Sopenharmony_ci */
6357777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_IsVideoStabilizationModeSupported(Camera_CaptureSession* session,
6367777dab0Sopenharmony_ci    Camera_VideoStabilizationMode mode, bool* isSupported);
6377777dab0Sopenharmony_ci
6387777dab0Sopenharmony_ci/**
6397777dab0Sopenharmony_ci * @brief Get current video stabilization mode.
6407777dab0Sopenharmony_ci *
6417777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
6427777dab0Sopenharmony_ci * @param mode the current {@link Camera_VideoStabilizationMode}.
6437777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
6447777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
6457777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
6467777dab0Sopenharmony_ci * @since 11
6477777dab0Sopenharmony_ci */
6487777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_GetVideoStabilizationMode(Camera_CaptureSession* session,
6497777dab0Sopenharmony_ci    Camera_VideoStabilizationMode* mode);
6507777dab0Sopenharmony_ci
6517777dab0Sopenharmony_ci/**
6527777dab0Sopenharmony_ci * @brief Set video stabilization mode.
6537777dab0Sopenharmony_ci *
6547777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
6557777dab0Sopenharmony_ci * @param mode the target {@link Camera_VideoStabilizationMode} to set.
6567777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
6577777dab0Sopenharmony_ci *         {@link #INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
6587777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
6597777dab0Sopenharmony_ci * @since 11
6607777dab0Sopenharmony_ci */
6617777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_SetVideoStabilizationMode(Camera_CaptureSession* session,
6627777dab0Sopenharmony_ci    Camera_VideoStabilizationMode mode);
6637777dab0Sopenharmony_ci
6647777dab0Sopenharmony_ci/**
6657777dab0Sopenharmony_ci * @brief Determines whether the camera input can be added into the session.
6667777dab0Sopenharmony_ci *
6677777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
6687777dab0Sopenharmony_ci * @param cameraInput the target {@link Camera_Input} to set.
6697777dab0Sopenharmony_ci * @param isSuccessful the result of whether the camera input can be added into the session.
6707777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
6717777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
6727777dab0Sopenharmony_ci * @since 12
6737777dab0Sopenharmony_ci */
6747777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_CanAddInput(Camera_CaptureSession* session,
6757777dab0Sopenharmony_ci    Camera_Input* cameraInput, bool* isSuccessful);
6767777dab0Sopenharmony_ci
6777777dab0Sopenharmony_ci/**
6787777dab0Sopenharmony_ci * @brief Determines whether the camera preview output can be added into the session.
6797777dab0Sopenharmony_ci *
6807777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
6817777dab0Sopenharmony_ci * @param cameraOutput the target {@link Camera_PreviewOutput} to set.
6827777dab0Sopenharmony_ci * @param isSuccessful the result of whether the camera preview output can be added into the session.
6837777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
6847777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
6857777dab0Sopenharmony_ci * @since 12
6867777dab0Sopenharmony_ci */
6877777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_CanAddPreviewOutput(Camera_CaptureSession* session,
6887777dab0Sopenharmony_ci    Camera_PreviewOutput* cameraOutput, bool* isSuccessful);
6897777dab0Sopenharmony_ci
6907777dab0Sopenharmony_ci/**
6917777dab0Sopenharmony_ci * @brief Determines whether the camera photo output can be added into the session.
6927777dab0Sopenharmony_ci *
6937777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
6947777dab0Sopenharmony_ci * @param cameraOutput the target {@link Camera_PhotoOutput} to set.
6957777dab0Sopenharmony_ci * @param isSuccessful the result of whether the camera photo output can be added into the session.
6967777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
6977777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
6987777dab0Sopenharmony_ci * @since 12
6997777dab0Sopenharmony_ci */
7007777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_CanAddPhotoOutput(Camera_CaptureSession* session,
7017777dab0Sopenharmony_ci    Camera_PhotoOutput* cameraOutput, bool* isSuccessful);
7027777dab0Sopenharmony_ci
7037777dab0Sopenharmony_ci/**
7047777dab0Sopenharmony_ci * @brief Determines whether the camera video output can be added into the session.
7057777dab0Sopenharmony_ci *
7067777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
7077777dab0Sopenharmony_ci * @param cameraOutput the target {@link Camera_VideoOutput} to set.
7087777dab0Sopenharmony_ci * @param isSuccessful the result of whether the camera video output can be added into the session.
7097777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
7107777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
7117777dab0Sopenharmony_ci * @since 12
7127777dab0Sopenharmony_ci */
7137777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_CanAddVideoOutput(Camera_CaptureSession* session,
7147777dab0Sopenharmony_ci    Camera_VideoOutput* cameraOutput, bool* isSuccessful);
7157777dab0Sopenharmony_ci
7167777dab0Sopenharmony_ci/**
7177777dab0Sopenharmony_ci * @brief Check the preconfig type is supported or not.
7187777dab0Sopenharmony_ci *
7197777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
7207777dab0Sopenharmony_ci * @param preconfigType The type {@link Camera_PreconfigType} to check support for.
7217777dab0Sopenharmony_ci * @param canPreconfig The result of whether preconfiguration supported.
7227777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
7237777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
7247777dab0Sopenharmony_ci * @since 12
7257777dab0Sopenharmony_ci */
7267777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_CanPreconfig(Camera_CaptureSession* session,
7277777dab0Sopenharmony_ci    Camera_PreconfigType preconfigType, bool* canPreconfig);
7287777dab0Sopenharmony_ci
7297777dab0Sopenharmony_ci/**
7307777dab0Sopenharmony_ci * @brief Check the preconfig type with ratio is supported or not.
7317777dab0Sopenharmony_ci *
7327777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
7337777dab0Sopenharmony_ci * @param preconfigType The type {@link Camera_PreconfigType} to check support for.
7347777dab0Sopenharmony_ci * @param preconfigRatio The ratio {@link Camera_PreconfigRatio} to check support for.
7357777dab0Sopenharmony_ci * @param canPreconfig The result of whether preconfiguration supported.
7367777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
7377777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
7387777dab0Sopenharmony_ci * @since 12
7397777dab0Sopenharmony_ci */
7407777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_CanPreconfigWithRatio(Camera_CaptureSession* session,
7417777dab0Sopenharmony_ci    Camera_PreconfigType preconfigType, Camera_PreconfigRatio preconfigRatio, bool* canPreconfig);
7427777dab0Sopenharmony_ci
7437777dab0Sopenharmony_ci/**
7447777dab0Sopenharmony_ci * @brief Set the preconfig type.
7457777dab0Sopenharmony_ci *
7467777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
7477777dab0Sopenharmony_ci * @param preconfigType The type {@link Camera_PreconfigType} to check support for.
7487777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
7497777dab0Sopenharmony_ci *         {@link #CAMERA_SERVICE_FATAL_ERROR} if the internal preconfiguration fails.
7507777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
7517777dab0Sopenharmony_ci * @since 12
7527777dab0Sopenharmony_ci */
7537777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_Preconfig(Camera_CaptureSession* session,
7547777dab0Sopenharmony_ci    Camera_PreconfigType preconfigType);
7557777dab0Sopenharmony_ci
7567777dab0Sopenharmony_ci/**
7577777dab0Sopenharmony_ci * @brief Set the preconfig type with ratio.
7587777dab0Sopenharmony_ci *
7597777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
7607777dab0Sopenharmony_ci * @param preconfigType The type {@link Camera_PreconfigType} to check support for.
7617777dab0Sopenharmony_ci * @param preconfigRatio The ratio {@link Camera_PreconfigRatio} to check support for.
7627777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
7637777dab0Sopenharmony_ci *         {@link #CAMERA_SERVICE_FATAL_ERROR} if the internal preconfiguration fails.
7647777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
7657777dab0Sopenharmony_ci * @since 12
7667777dab0Sopenharmony_ci */
7677777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_PreconfigWithRatio(Camera_CaptureSession* session,
7687777dab0Sopenharmony_ci    Camera_PreconfigType preconfigType, Camera_PreconfigRatio preconfigRatio);
7697777dab0Sopenharmony_ci
7707777dab0Sopenharmony_ci/**
7717777dab0Sopenharmony_ci * @brief Query the exposure value.
7727777dab0Sopenharmony_ci *
7737777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
7747777dab0Sopenharmony_ci * @param exposureValue the current exposure value.
7757777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
7767777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
7777777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
7787777dab0Sopenharmony_ci * @since 12
7797777dab0Sopenharmony_ci */
7807777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_GetExposureValue(Camera_CaptureSession* session, float* exposureValue);
7817777dab0Sopenharmony_ci
7827777dab0Sopenharmony_ci/**
7837777dab0Sopenharmony_ci * @brief Get current focal length.
7847777dab0Sopenharmony_ci *
7857777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
7867777dab0Sopenharmony_ci * @param focalLength the current focal length.
7877777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
7887777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
7897777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
7907777dab0Sopenharmony_ci * @since 12
7917777dab0Sopenharmony_ci */
7927777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_GetFocalLength(Camera_CaptureSession* session, float* focalLength);
7937777dab0Sopenharmony_ci
7947777dab0Sopenharmony_ci/**
7957777dab0Sopenharmony_ci * @brief Set target zoom ratio by smooth method.
7967777dab0Sopenharmony_ci *
7977777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
7987777dab0Sopenharmony_ci * @param targetZoom the target zoom ratio to set.
7997777dab0Sopenharmony_ci * @param smoothZoomMode the {@link Camera_SmoothZoomMode} instance.
8007777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
8017777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
8027777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
8037777dab0Sopenharmony_ci * @since 12
8047777dab0Sopenharmony_ci */
8057777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_SetSmoothZoom(Camera_CaptureSession* session,
8067777dab0Sopenharmony_ci    float targetZoom, Camera_SmoothZoomMode smoothZoomMode);
8077777dab0Sopenharmony_ci
8087777dab0Sopenharmony_ci/**
8097777dab0Sopenharmony_ci * @brief Get the supported color spaces.
8107777dab0Sopenharmony_ci *
8117777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
8127777dab0Sopenharmony_ci * @param colorSpace the supported {@link OH_NativeBuffer_ColorSpace} list to be filled if the method call succeeds.
8137777dab0Sopenharmony_ci * @param size the size of supported color Spaces queried.
8147777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
8157777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
8167777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
8177777dab0Sopenharmony_ci * @since 12
8187777dab0Sopenharmony_ci */
8197777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_GetSupportedColorSpaces(Camera_CaptureSession* session,
8207777dab0Sopenharmony_ci    OH_NativeBuffer_ColorSpace** colorSpace, uint32_t* size);
8217777dab0Sopenharmony_ci
8227777dab0Sopenharmony_ci/**
8237777dab0Sopenharmony_ci * @brief Delete the color spaces.
8247777dab0Sopenharmony_ci *
8257777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
8267777dab0Sopenharmony_ci * @param colorSpace the target {@link OH_NativeBuffer_ColorSpace} list to be deleted if the method call succeeds.
8277777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
8287777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
8297777dab0Sopenharmony_ci * @since 12
8307777dab0Sopenharmony_ci */
8317777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_DeleteColorSpaces(Camera_CaptureSession* session,
8327777dab0Sopenharmony_ci    OH_NativeBuffer_ColorSpace* colorSpace);
8337777dab0Sopenharmony_ci
8347777dab0Sopenharmony_ci/**
8357777dab0Sopenharmony_ci * @brief Get current color space.
8367777dab0Sopenharmony_ci *
8377777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
8387777dab0Sopenharmony_ci * @param colorSpace the current {@link OH_NativeBuffer_ColorSpace} .
8397777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
8407777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
8417777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
8427777dab0Sopenharmony_ci * @since 12
8437777dab0Sopenharmony_ci */
8447777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_GetActiveColorSpace(Camera_CaptureSession* session,
8457777dab0Sopenharmony_ci    OH_NativeBuffer_ColorSpace* colorSpace);
8467777dab0Sopenharmony_ci
8477777dab0Sopenharmony_ci/**
8487777dab0Sopenharmony_ci * @brief Set current color space.
8497777dab0Sopenharmony_ci *
8507777dab0Sopenharmony_ci * @param session the {@link Camera_CaptureSession} instance.
8517777dab0Sopenharmony_ci * @param colorSpace the target {@link OH_NativeBuffer_ColorSpace} to set.
8527777dab0Sopenharmony_ci * @return {@link #CAMERA_OK} if the method call succeeds.
8537777dab0Sopenharmony_ci *         {@link #CAMERA_INVALID_ARGUMENT} if parameter missing or parameter type incorrect.
8547777dab0Sopenharmony_ci *         {@link #CAMERA_SESSION_NOT_CONFIG} if the capture session not config.
8557777dab0Sopenharmony_ci * @since 12
8567777dab0Sopenharmony_ci */
8577777dab0Sopenharmony_ciCamera_ErrorCode OH_CaptureSession_SetActiveColorSpace(Camera_CaptureSession* session,
8587777dab0Sopenharmony_ci    OH_NativeBuffer_ColorSpace colorSpace);
8597777dab0Sopenharmony_ci
8607777dab0Sopenharmony_ci#ifdef __cplusplus
8617777dab0Sopenharmony_ci}
8627777dab0Sopenharmony_ci#endif
8637777dab0Sopenharmony_ci
8647777dab0Sopenharmony_ci#endif // NATIVE_INCLUDE_CAMERA_CAMERA_SESSION_H
8657777dab0Sopenharmony_ci/** @} */