1# OH_Camera
2
3
4## Overview
5
6The **OH_Camera** module provides C APIs for the camera service.
7
8You can refer to the corresponding development guide and samples based on your development requirements.
9
10- [Camera Device Management](../../media/camera/native-camera-device-management.md)
11- [Device Input Management](../../media/camera/native-camera-device-input.md)
12- [Camera Session Management](../../media/camera/native-camera-session-management.md)
13- [Preview](../../media/camera/native-camera-preview.md)
14- [Secondary Processing of Preview Streams](../../media/camera/native-camera-preview-imageReceiver.md)
15- [Photo Capture](../../media/camera/native-camera-shooting.md)
16- [Deferred Photo Delivery](../../media/camera/native-camera-deferred-capture.md)
17- [Video Recording](../../media/camera/native-camera-recording.md)
18- [Camera Metadata](../../media/camera/native-camera-metadata.md)
19- [Using the Flashlight](../../media/camera/native-camera-torch-use.md)
20<!--RP1--><!--RP1End-->
21
22**System capability**: SystemCapability.Multimedia.Camera.Core
23
24**Since**: 11
25
26
27## Summary
28
29
30### File
31
32| Name| Description|
33| -------- | -------- |
34| [camera.h](camera_8h.md) | Declares the basic concepts of the camera.|
35| [camera_device.h](camera__device_8h.md) | Declares the basic concepts of the camera device.|
36| [camera_input.h](camera__input_8h.md) | Declares the camera input concepts.|
37| [camera_manager.h](camera__manager_8h.md) | Declares the camera manager concepts.|
38| [capture_session.h](capture__session_8h.md) | Declares the capture session concepts.|
39| [metadata_output.h](metadata__output_8h.md) | Declares the metadata output concepts.|
40| [photo_native.h](photo__native_8h.md) | Declares the camera photo concepts.|
41| [photo_output.h](photo__output_8h.md) | Declares the photo output concepts.|
42| [preview_output.h](preview__output_8h.md) | Declares the preview output concepts.|
43| [video_output.h](video__output_8h.md) | Declares the video output concepts.|
44
45
46### Structs
47
48| Name| Description|
49| -------- | -------- |
50| struct  [Camera_Size](_camera___size.md) | Describes the parameters related to the size.|
51| struct  [Camera_Profile](_camera___profile.md) | Describes the profile of a camera stream.|
52| struct  [Camera_FrameRateRange](_camera___frame_rate_range.md) | Describes the frame rate range.|
53| struct  [Camera_VideoProfile](_camera___video_profile.md) | Describes the video profile.|
54| struct  [Camera_OutputCapability](_camera___output_capability.md) | Describes the camera output capability.|
55| struct  [Camera_Device](_camera___device.md) | Describes the camera device.|
56| struct  [Camera_StatusInfo](_camera___status_info.md) | Describes the camera status information.|
57| struct  [Camera_Point](_camera___point.md) | Describes the parameters related to a point.|
58| struct  [Camera_Location](_camera___location.md) | Describes the location where the photo is taken.|
59| struct  [Camera_PhotoCaptureSetting](_camera___photo_capture_setting.md) | Describes the parameters related to photo capture.|
60| struct  [Camera_FrameShutterInfo](_camera___frame_shutter_info.md) | Describes the frame shutter information.|
61| struct  [Camera_CaptureEndInfo](_camera___capture_end_info.md) | Describes the capture end information.|
62| struct  [Camera_Rect](_camera___rect.md) | Describes the rectangle.|
63| struct  [Camera_MetadataObject](_camera___metadata_object.md) | Describes the camera metadata.|
64| struct  [Camera_TorchStatusInfo](_camera___torch_status_info.md) | Describes the flashlight status information.|
65| struct  [Camera_SmoothZoomInfo](_camera___smooth_zoom_info.md) | Describes the smooth zoom information.|
66| struct  [Camera_CaptureStartInfo](_camera___capture_start_info.md) | Describes the capture start information.|
67| struct  [Camera_FrameShutterEndInfo](_camera___frame_shutter_end_info.md) | Describes the frame shutter end information during capture.|
68| struct  [CameraInput_Callbacks](_camera_input___callbacks.md) | Describes the callbacks used to listen for camera input errors.|
69| struct  [CameraManager_Callbacks](_camera_manager___callbacks.md) | Describes the callbacks used to listen for camera status changes.|
70| struct  [CaptureSession_Callbacks](_capture_session___callbacks.md) | Describes the callbacks used for a capture session.|
71| struct  [MetadataOutput_Callbacks](_metadata_output___callbacks.md) | Describes the callbacks related to metadata output.|
72| struct  [PhotoOutput_Callbacks](_photo_output___callbacks.md) | Describes the callbacks related to photo output.|
73| struct  [PreviewOutput_Callbacks](_preview_output___callbacks.md) | Describes the callbacks related to preview output.|
74| struct  [VideoOutput_Callbacks](_video_output___callbacks.md) | Describes the callbacks related to video output.|
75
76
77### Types
78
79| Name| Description|
80| -------- | -------- |
81| typedef struct [Camera_Manager](#camera_manager) [Camera_Manager](#camera_manager) | Defines a struct for the camera manager.|
82| typedef enum [Camera_ErrorCode](#camera_errorcode) [Camera_ErrorCode](#camera_errorcode) | Defines an enum for the camera error codes.|
83| typedef enum [Camera_Status](#camera_status) [Camera_Status](#camera_status) | Defines an enum for the camera statuses.|
84| typedef enum [Camera_SceneMode](#camera_scenemode) [Camera_SceneMode](#camera_scenemode) | Defines an enum for the camera scene modes.|
85| typedef enum [Camera_Position](#camera_position) [Camera_Position](#camera_position) | Defines an enum for the camera positions.|
86| typedef enum [Camera_Type](#camera_type) [Camera_Type](#camera_type) | Defines an enum for the camera types.|
87| typedef enum [Camera_Connection](#camera_connection) [Camera_Connection](#camera_connection) | Defines an enum for the camera connection types.|
88| typedef enum [Camera_Format](#camera_format) [Camera_Format](#camera_format) | Defines an enum for the camera output formats.|
89| typedef enum [Camera_FlashMode](#camera_flashmode) [Camera_FlashMode](#camera_flashmode) | Defines an enum for the flash modes.|
90| typedef enum [Camera_ExposureMode](#camera_exposuremode) [Camera_ExposureMode](#camera_exposuremode) | Defines an enum for the exposure modes.|
91| typedef enum [Camera_FocusMode](#camera_focusmode) [Camera_FocusMode](#camera_focusmode) | Defines an enum for the focus modes.|
92| typedef enum [Camera_FocusState](#camera_focusstate) [Camera_FocusState](#camera_focusstate) | Defines an enum for the focus states.|
93| typedef enum [Camera_VideoStabilizationMode](#camera_videostabilizationmode) [Camera_VideoStabilizationMode](#camera_videostabilizationmode) | Defines an enum for the video stabilization modes.|
94| typedef enum [Camera_ImageRotation](#camera_imagerotation) [Camera_ImageRotation](#camera_imagerotation) | Defines an enum for the image rotation angles.|
95| typedef enum [Camera_QualityLevel](#camera_qualitylevel) [Camera_QualityLevel](#camera_qualitylevel) | Defines an enum for the image quality levels.|
96| typedef enum [Camera_MetadataObjectType](#camera_metadataobjecttype) [Camera_MetadataObjectType](#camera_metadataobjecttype) | Defines an enum for the metadata object types.|
97| typedef enum [Camera_TorchMode](#camera_torchmode) [Camera_TorchMode](#camera_torchmode) | Defines an enum for the flashlight modes.|
98| typedef enum [Camera_SmoothZoomMode](#camera_smoothzoommode) [Camera_SmoothZoomMode](#camera_smoothzoommode) | Defines an enum for the smooth zoom modes.|
99| typedef enum [Camera_PreconfigType](#camera_preconfigtype) [Camera_PreconfigType](#camera_preconfigtype) | Defines an enum for the preconfigured resolution types.|
100| typedef enum [Camera_PreconfigRatio](#camera_preconfigratio) [Camera_PreconfigRatio](#camera_preconfigratio) | Defines an enum for the preconfigured aspect ratios.|
101| typedef struct [Camera_Size](_camera___size.md) [Camera_Size](#camera_size) | Defines a struct for the parameters related to the size.|
102| typedef struct [Camera_Profile](_camera___profile.md) [Camera_Profile](#camera_profile) | Defines a struct for the profile of a camera stream.|
103| typedef struct [Camera_FrameRateRange](_camera___frame_rate_range.md) [Camera_FrameRateRange](#camera_frameraterange) | Defines a struct for the frame rate range.|
104| typedef struct [Camera_VideoProfile](_camera___video_profile.md) [Camera_VideoProfile](#camera_videoprofile) | Defines a struct for the video profile.|
105| typedef struct [Camera_OutputCapability](_camera___output_capability.md) [Camera_OutputCapability](#camera_outputcapability) | Defines a struct for the camera output capability.|
106| typedef struct [Camera_Device](_camera___device.md) [Camera_Device](#camera_device) | Defines a struct for the camera device.|
107| typedef struct [Camera_StatusInfo](_camera___status_info.md) [Camera_StatusInfo](#camera_statusinfo) | Defines a struct for the camera status information.|
108| typedef struct [Camera_Point](_camera___point.md) [Camera_Point](#camera_point) | Defines a struct for the parameters related to a point.|
109| typedef struct [Camera_Location](_camera___location.md) [Camera_Location](#camera_location) | Defines a struct for the location where the photo is taken.|
110| typedef struct [Camera_PhotoCaptureSetting](_camera___photo_capture_setting.md) [Camera_PhotoCaptureSetting](#camera_photocapturesetting) | Defines a struct for the parameters related to photo capture.|
111| typedef struct [Camera_FrameShutterInfo](_camera___frame_shutter_info.md) [Camera_FrameShutterInfo](#camera_frameshutterinfo) | Defines a struct for the frame shutter information.|
112| typedef struct [Camera_CaptureEndInfo](_camera___capture_end_info.md) [Camera_CaptureEndInfo](#camera_captureendinfo) | Defines a struct for the capture end information.|
113| typedef struct [Camera_Rect](_camera___rect.md) [Camera_Rect](#camera_rect) | Defines a struct for the rectangle.|
114| typedef struct [Camera_MetadataObject](_camera___metadata_object.md) [Camera_MetadataObject](#camera_metadataobject) | Defines a struct for the camera metadata.|
115| typedef struct [Camera_TorchStatusInfo](_camera___torch_status_info.md) [Camera_TorchStatusInfo](#camera_torchstatusinfo) | Defines a struct for the flashlight status information.|
116| typedef struct [Camera_SmoothZoomInfo](_camera___smooth_zoom_info.md) [Camera_SmoothZoomInfo](#camera_smoothzoominfo) | Defines a struct for the smooth zoom information.|
117| typedef struct [Camera_CaptureStartInfo](_camera___capture_start_info.md) [Camera_CaptureStartInfo](#camera_capturestartinfo) | Defines a struct for the capture start information.|
118| typedef struct [Camera_FrameShutterEndInfo](_camera___frame_shutter_end_info.md) [Camera_FrameShutterEndInfo](#camera_frameshutterendinfo) | Defines a struct for the frame shutter end information during capture.|
119| typedef struct [Camera_Input](#camera_input) [Camera_Input](#camera_input) | Defines a struct for the camera input object.|
120| typedef void(\* [OH_CameraInput_OnError](#oh_camerainput_onerror)) (const [Camera_Input](#camera_input) \*cameraInput, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the callback defined in the [CameraInput_Callbacks](_camera_input___callbacks.md) struct and used to report camera input errors.|
121| typedef struct [CameraInput_Callbacks](_camera_input___callbacks.md) [CameraInput_Callbacks](#camerainput_callbacks) | Defines a struct for the callbacks used to listen for camera input errors.|
122| typedef void(\* [OH_CameraManager_StatusCallback](#oh_cameramanager_statuscallback)) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_StatusInfo](_camera___status_info.md) \*status) | Defines the callback defined in the [CameraManager_Callbacks](_camera_manager___callbacks.md) struct and used to report the camera manager status.|
123| typedef void(\* [OH_CameraManager_TorchStatusCallback](#oh_cameramanager_torchstatuscallback)) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_TorchStatusInfo](_camera___torch_status_info.md) \*status) | Defines the callback invoked when the flashlight status changes.|
124| typedef struct [CameraManager_Callbacks](_camera_manager___callbacks.md) [CameraManager_Callbacks](#cameramanager_callbacks) | Defines a struct for the callbacks used to listen for camera status changes.|
125| typedef struct [Camera_CaptureSession](#camera_capturesession) [Camera_CaptureSession](#camera_capturesession) | Defines a struct for the capture session object.|
126| typedef void(\* [OH_CaptureSession_OnFocusStateChange](#oh_capturesession_onfocusstatechange)) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FocusState](#camera_focusstate) focusState) | Defines the callback defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct and used to report focus status changes of a capture session.|
127| typedef void(\* [OH_CaptureSession_OnError](#oh_capturesession_onerror)) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the callback defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct and used to report capture session errors.|
128| typedef void(\* [OH_CaptureSession_OnSmoothZoomInfo](#oh_capturesession_onsmoothzoominfo)) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_SmoothZoomInfo](_camera___smooth_zoom_info.md) \*smoothZoomInfo) | Defines the callback invoked when smooth zoom is triggered for a capture session.|
129| typedef struct [CaptureSession_Callbacks](_capture_session___callbacks.md) [CaptureSession_Callbacks](#capturesession_callbacks) | Defines a struct for the callbacks used for a capture session.|
130| typedef struct [Camera_MetadataOutput](#camera_metadataoutput) [Camera_MetadataOutput](#camera_metadataoutput) | Defines a struct for the metadata output object.|
131| typedef void(\* [OH_MetadataOutput_OnMetadataObjectAvailable](#oh_metadataoutput_onmetadataobjectavailable)) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput, [Camera_MetadataObject](_camera___metadata_object.md) \*metadataObject, uint32_t size) | Defines the callback defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct and used to report metadata output data.|
132| typedef void(\* [OH_MetadataOutput_OnError](#oh_metadataoutput_onerror)) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the callback defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct and used to report metadata output errors.|
133| typedef struct [MetadataOutput_Callbacks](_metadata_output___callbacks.md) [MetadataOutput_Callbacks](#metadataoutput_callbacks) | Defines a struct for the callbacks related to metadata output.|
134| typedef struct [OH_PhotoNative](#oh_photonative) [OH_PhotoNative](#oh_photonative) | Defines a struct for a camera photo object.|
135| typedef struct [Camera_PhotoOutput](#camera_photooutput) [Camera_PhotoOutput](#camera_photooutput) | Defines a struct for the photo output object.|
136| typedef void(\* [OH_PhotoOutput_OnFrameStart](#oh_photooutput_onframestart)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput) | Defines the callback defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct and used to report photo output frame start events.|
137| typedef void(\* [OH_PhotoOutput_OnFrameShutter](#oh_photooutput_onframeshutter)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [Camera_FrameShutterInfo](_camera___frame_shutter_info.md) \*info) | Defines the callback defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct and used to report frame shutter events.|
138| typedef void(\* [OH_PhotoOutput_OnFrameEnd](#oh_photooutput_onframeend)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, int32_t frameCount) | Defines the callback defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct and used to report photo output frame end events.|
139| typedef void(\* [OH_PhotoOutput_OnError](#oh_photooutput_onerror)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the callback defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct and used to report photo output errors.|
140| typedef void(\* [OH_PhotoOutput_CaptureEnd](#oh_photooutput_captureend)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, int32_t frameCount) | Defines the callback invoked when the capture ends.|
141| typedef void(\* [OH_PhotoOutput_CaptureStartWithInfo](#oh_photooutput_capturestartwithinfo)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [Camera_CaptureStartInfo](_camera___capture_start_info.md) \*Info) | Defines the callback invoked when the capture starts.|
142| typedef void(\* [OH_PhotoOutput_OnFrameShutterEnd](#oh_photooutput_onframeshutterend)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [Camera_FrameShutterInfo](_camera___frame_shutter_info.md) \*Info) | Defines the callback invoked when frame shutter ends.|
143| typedef void(\* [OH_PhotoOutput_CaptureReady](#oh_photooutput_captureready)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput) | Defines the callback invoked when the camera is ready to take photos. When the callback is received, the next capture can be performed.|
144| typedef void(\* [OH_PhotoOutput_EstimatedCaptureDuration](#oh_photooutput_estimatedcaptureduration)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, int64_t duration) | Defines the callback for the estimated capture duration.|
145| typedef void(\* [OH_PhotoOutput_PhotoAvailable](#oh_photooutput_photoavailable)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoNative](#oh_photonative) \*photo) | Defines the callback invoked when a high-resolution photo is available.|
146| typedef void(\* [OH_PhotoOutput_PhotoAssetAvailable](#oh_photooutput_photoassetavailable)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, OH_MediaAsset \*photoAsset) | Defines the callback invoked when a photo asset is available.|
147| typedef struct [PhotoOutput_Callbacks](_photo_output___callbacks.md) [PhotoOutput_Callbacks](#photooutput_callbacks) | Defines a struct for the callbacks related to photo output.|
148| typedef struct [Camera_PreviewOutput](#camera_previewoutput) [Camera_PreviewOutput](#camera_previewoutput) | Defines a struct for the preview output object.|
149| typedef void(\* [OH_PreviewOutput_OnFrameStart](#oh_previewoutput_onframestart)) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Defines the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used to report preview output frame start events.|
150| typedef void(\* [OH_PreviewOutput_OnFrameEnd](#oh_previewoutput_onframeend)) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, int32_t frameCount) | Defines the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used to report preview output frame end events.|
151| typedef void(\* [OH_PreviewOutput_OnError](#oh_previewoutput_onerror)) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used to report preview output errors.|
152| typedef struct [PreviewOutput_Callbacks](_preview_output___callbacks.md) [PreviewOutput_Callbacks](#previewoutput_callbacks) | Defines a struct for the callbacks related to preview output.|
153| typedef struct [Camera_VideoOutput](#camera_videooutput) [Camera_VideoOutput](#camera_videooutput) | Defines a struct for the video output object.|
154| typedef void(\* [OH_VideoOutput_OnFrameStart](#oh_videooutput_onframestart)) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Defines the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output frame start events.|
155| typedef void(\* [OH_VideoOutput_OnFrameEnd](#oh_videooutput_onframeend)) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, int32_t frameCount) | Defines the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output frame end events.|
156| typedef void(\* [OH_VideoOutput_OnError](#oh_videooutput_onerror)) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output errors.|
157| typedef struct [VideoOutput_Callbacks](_video_output___callbacks.md) [VideoOutput_Callbacks](#videooutput_callbacks) | Defines a struct for the callbacks related to video output.|
158
159
160### Enums
161
162| Name| Description|
163| -------- | -------- |
164| [Camera_ErrorCode](#camera_errorcode) {<br>CAMERA_OK = 0,<br>CAMERA_INVALID_ARGUMENT = 7400101,<br>CAMERA_OPERATION_NOT_ALLOWED = 7400102,<br>CAMERA_SESSION_NOT_CONFIG = 7400103,<br>CAMERA_SESSION_NOT_RUNNING = 7400104,<br>CAMERA_SESSION_CONFIG_LOCKED = 7400105,<br>CAMERA_DEVICE_SETTING_LOCKED = 7400106,<br>CAMERA_CONFLICT_CAMERA = 7400107,<br>CAMERA_DEVICE_DISABLED = 7400108,<br>CAMERA_DEVICE_PREEMPTED = 7400109,<br>CAMERA_UNRESOLVED_CONFLICTS_WITH_CURRENT_CONFIGURATIONS = 7400110,<br>CAMERA_SERVICE_FATAL_ERROR = 7400201} | Enumerates the camera error codes.|
165| [Camera_Status](#camera_status) {<br>CAMERA_STATUS_APPEAR = 0,<br>CAMERA_STATUS_DISAPPEAR = 1,<br>CAMERA_STATUS_AVAILABLE = 2,<br>CAMERA_STATUS_UNAVAILABLE = 3 } | Enumerates the camera statuses.|
166| [Camera_SceneMode](#camera_scenemode) {<br>NORMAL_PHOTO = 1,<br>NORMAL_VIDEO = 2,<br>SECURE_PHOTO = 12 } | Enumerates the camera scene modes.|
167| [Camera_Position](#camera_position) {<br>CAMERA_POSITION_UNSPECIFIED = 0,<br>CAMERA_POSITION_BACK = 1,<br>CAMERA_POSITION_FRONT = 2 } | Enumerates the camera positions.|
168| [Camera_Type](#camera_type) {<br>CAMERA_TYPE_DEFAULT = 0,<br>CAMERA_TYPE_WIDE_ANGLE = 1,<br>CAMERA_TYPE_ULTRA_WIDE = 2,<br>CAMERA_TYPE_TELEPHOTO = 3,<br>CAMERA_TYPE_TRUE_DEPTH = 4<br>} | Enumerates the camera types.|
169| [Camera_Connection](#camera_connection) {<br>CAMERA_CONNECTION_BUILT_IN = 0,<br>CAMERA_CONNECTION_USB_PLUGIN = 1,<br>CAMERA_CONNECTION_REMOTE = 2 } | Enumerates the camera connection types.|
170| [Camera_Format](#camera_format) {<br>CAMERA_FORMAT_RGBA_8888 = 3,<br>CAMERA_FORMAT_YUV_420_SP = 1003,<br>CAMERA_FORMAT_JPEG = 2000,<br>CAMERA_FORMAT_YCBCR_P010 = 2001,<br>CAMERA_FORMAT_YCRCB_P010 = 2002<br>} | Enumerates the camera output formats.|
171| [Camera_FlashMode](#camera_flashmode) {<br>FLASH_MODE_CLOSE = 0,<br>FLASH_MODE_OPEN = 1,<br>FLASH_MODE_AUTO = 2,<br>FLASH_MODE_ALWAYS_OPEN = 3 } | Enumerates the flash modes.|
172| [Camera_ExposureMode](#camera_exposuremode) {<br>EXPOSURE_MODE_LOCKED = 0,<br>EXPOSURE_MODE_AUTO = 1,<br>EXPOSURE_MODE_CONTINUOUS_AUTO = 2 } | Enumerates the exposure modes.|
173| [Camera_FocusMode](#camera_focusmode) {<br>FOCUS_MODE_MANUAL = 0,<br>FOCUS_MODE_CONTINUOUS_AUTO = 1,<br>FOCUS_MODE_AUTO = 2,<br>FOCUS_MODE_LOCKED = 3 } | Enumerates the focus modes.|
174| [Camera_FocusState](#camera_focusstate) {<br>FOCUS_STATE_SCAN = 0,<br>FOCUS_STATE_FOCUSED = 1,<br>FOCUS_STATE_UNFOCUSED = 2 } | Enumerates the focus states.|
175| [Camera_VideoStabilizationMode](#camera_videostabilizationmode) {<br>STABILIZATION_MODE_OFF = 0,<br>STABILIZATION_MODE_LOW = 1,<br>STABILIZATION_MODE_MIDDLE = 2,<br>STABILIZATION_MODE_HIGH = 3,<br>STABILIZATION_MODE_AUTO = 4<br>} | Enumerates the video stabilization modes.|
176| [Camera_ImageRotation](#camera_imagerotation) {<br>IAMGE_ROTATION_0 = 0,<br>IAMGE_ROTATION_90 = 90,<br>IAMGE_ROTATION_180 = 180,<br>IAMGE_ROTATION_270 = 270 } | Enumerates the image rotation angles.|
177| [Camera_QualityLevel](#camera_qualitylevel) {<br>QUALITY_LEVEL_HIGH = 0,<br>QUALITY_LEVEL_MEDIUM = 1,<br>QUALITY_LEVEL_LOW = 2 } | Enumerates the image quality levels.|
178| [Camera_MetadataObjectType](#camera_metadataobjecttype) { FACE_DETECTION = 0 } | Enumerates the metadata object types.|
179| [Camera_TorchMode](#camera_torchmode) { OFF = 0, ON = 1, AUTO = 2 } | Enumerates the flashlight modes.|
180| [Camera_SmoothZoomMode](#camera_smoothzoommode) { NORMAL = 0 } | Enumerates the smooth zoom modes.|
181| [Camera_PreconfigType](#camera_preconfigtype) {<br>PRECONFIG_720P = 0,<br>PRECONFIG_1080P = 1,<br>PRECONFIG_4K = 2,<br>PRECONFIG_HIGH_QUALITY = 3 } | Enumerates the preconfigured resolution types.|
182| [Camera_PreconfigRatio](#camera_preconfigratio) {<br>PRECONFIG_RATIO_1_1 = 0,<br>PRECONFIG_RATIO_4_3 = 1,<br>PRECONFIG_RATIO_16_9 = 2 } | Enumerates the preconfigured aspect ratios.|
183
184
185### Functions
186
187| Name| Description|
188| -------- | -------- |
189| [Camera_ErrorCode](#camera_errorcode) [OH_Camera_GetCameraManager](#oh_camera_getcameramanager) ([Camera_Manager](#camera_manager) \*\*cameraManager) | Obtains a **CameraManager** instance.|
190| [Camera_ErrorCode](#camera_errorcode) [OH_Camera_DeleteCameraManager](#oh_camera_deletecameramanager) ([Camera_Manager](#camera_manager) \*cameraManager) | Deletes a **CameraManager** instance.|
191| [Camera_ErrorCode](#camera_errorcode) [OH_CameraDevice_GetCameraOrientation](#oh_cameradevice_getcameraorientation) ([Camera_Device](_camera___device.md) \*camera, uint32_t \*orientation) | Obtains the sensor direction of a camera.|
192| [Camera_ErrorCode](#camera_errorcode) [OH_CameraInput_RegisterCallback](#oh_camerainput_registercallback) ([Camera_Input](#camera_input) \*cameraInput, [CameraInput_Callbacks](_camera_input___callbacks.md) \*callback) | Registers a callback to listen for camera input events.|
193| [Camera_ErrorCode](#camera_errorcode) [OH_CameraInput_UnregisterCallback](#oh_camerainput_unregistercallback) ([Camera_Input](#camera_input) \*cameraInput, [CameraInput_Callbacks](_camera_input___callbacks.md) \*callback) | Unregisters the callback used to listen for camera input events.|
194| [Camera_ErrorCode](#camera_errorcode) [OH_CameraInput_Open](#oh_camerainput_open) ([Camera_Input](#camera_input) \*cameraInput) | Opens a camera.|
195| [Camera_ErrorCode](#camera_errorcode) [OH_CameraInput_OpenSecureCamera](#oh_camerainput_opensecurecamera) ([Camera_Input](#camera_input) \*cameraInput, uint64_t \*secureSeqId) | Opens a camera in secure mode.|
196| [Camera_ErrorCode](#camera_errorcode) [OH_CameraInput_Close](#oh_camerainput_close) ([Camera_Input](#camera_input) \*cameraInput) | Closes a camera.|
197| [Camera_ErrorCode](#camera_errorcode) [OH_CameraInput_Release](#oh_camerainput_release) ([Camera_Input](#camera_input) \*cameraInput) | Releases a **CameraInput** instance. Either this function or [OH_CameraInput_Close](#oh_camerainput_close) needs to be called.|
198| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_RegisterCallback](#oh_cameramanager_registercallback) ([Camera_Manager](#camera_manager) \*cameraManager, [CameraManager_Callbacks](_camera_manager___callbacks.md) \*callback) | Registers a callback to listen for camera status changes.|
199| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_UnregisterCallback](#oh_cameramanager_unregistercallback) ([Camera_Manager](#camera_manager) \*cameraManager, [CameraManager_Callbacks](_camera_manager___callbacks.md) \*callback) | Unregisters the callback used to listen for camera status changes.|
200| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_RegisterTorchStatusCallback](#oh_cameramanager_registertorchstatuscallback) ([Camera_Manager](#camera_manager) \*cameraManager, [OH_CameraManager_TorchStatusCallback](#oh_cameramanager_torchstatuscallback) torchStatusCallback) | Registers a callback to listen for flashlight status changes.|
201| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_UnregisterTorchStatusCallback](#oh_cameramanager_unregistertorchstatuscallback) ([Camera_Manager](#camera_manager) \*cameraManager, [OH_CameraManager_TorchStatusCallback](#oh_cameramanager_torchstatuscallback) torchStatusCallback) | Unregisters the callback used to listen for flashlight status changes.|
202| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_GetSupportedCameras](#oh_cameramanager_getsupportedcameras) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_Device](_camera___device.md) \*\*cameras, uint32_t \*size) | Obtains supported cameras.|
203| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_DeleteSupportedCameras](#oh_cameramanager_deletesupportedcameras) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_Device](_camera___device.md) \*cameras, uint32_t size) | Deletes supported cameras.|
204| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_GetSupportedCameraOutputCapability](#oh_cameramanager_getsupportedcameraoutputcapability) ([Camera_Manager](#camera_manager) \*cameraManager, const [Camera_Device](_camera___device.md) \*camera, [Camera_OutputCapability](_camera___output_capability.md) \*\*cameraOutputCapability) | Obtains the output capability supported by a camera.|
205| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_GetSupportedCameraOutputCapabilityWithSceneMode](#oh_cameramanager_getsupportedcameraoutputcapabilitywithscenemode) ([Camera_Manager](#camera_manager) \*cameraManager, const [Camera_Device](_camera___device.md) \*camera, [Camera_SceneMode](#camera_scenemode) sceneMode, [Camera_OutputCapability](_camera___output_capability.md) \*\*cameraOutputCapability) | Obtains the output capability supported by a camera in the specified mode.|
206| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_DeleteSupportedCameraOutputCapability](#oh_cameramanager_deletesupportedcameraoutputcapability) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_OutputCapability](_camera___output_capability.md) \*cameraOutputCapability) | Deletes the output capability supported by a camera.|
207| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_IsCameraMuted](#oh_cameramanager_iscameramuted) ([Camera_Manager](#camera_manager) \*cameraManager, bool \*isCameraMuted) | Checks whether a camera is muted.|
208| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreateCaptureSession](#oh_cameramanager_createcapturesession) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_CaptureSession](#camera_capturesession) \*\*captureSession) | Creates a **CaptureSession** instance.|
209| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreateCameraInput](#oh_cameramanager_createcamerainput) ([Camera_Manager](#camera_manager) \*cameraManager, const [Camera_Device](_camera___device.md) \*camera, [Camera_Input](#camera_input) \*\*cameraInput) | Creates a **CameraInput** instance.|
210| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreateCameraInput_WithPositionAndType](#oh_cameramanager_createcamerainput_withpositionandtype) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_Position](#camera_position) position, [Camera_Type](#camera_type) type, [Camera_Input](#camera_input) \*\*cameraInput) | Creates a **CameraInput** instance with the specified location and type.|
211| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreatePreviewOutput](#oh_cameramanager_createpreviewoutput) ([Camera_Manager](#camera_manager) \*cameraManager, const [Camera_Profile](_camera___profile.md) \*profile, const char \*surfaceId, [Camera_PreviewOutput](#camera_previewoutput) \*\*previewOutput) | Creates a **PreviewOutput** instance.|
212| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreatePreviewOutputUsedInPreconfig](#oh_cameramanager_createpreviewoutputusedinpreconfig) ([Camera_Manager](#camera_manager) \*cameraManager, const char \*surfaceId, [Camera_PreviewOutput](#camera_previewoutput) \*\*previewOutput) | Creates a **PreviewOutput** instance to be used in a preconfiguration stream.|
213| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreatePhotoOutput](#oh_cameramanager_createphotooutput) ([Camera_Manager](#camera_manager) \*cameraManager, const [Camera_Profile](_camera___profile.md) \*profile, const char \*surfaceId, [Camera_PhotoOutput](#camera_photooutput) \*\*photoOutput) | Creates a **PhotoOutput** instance.|
214| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreatePhotoOutputUsedInPreconfig](#oh_cameramanager_createphotooutputusedinpreconfig) ([Camera_Manager](#camera_manager) \*cameraManager, const char \*surfaceId, [Camera_PhotoOutput](#camera_photooutput) \*\*photoOutput) | Creates a **PhotoOutput** instance to be used in a preconfiguration stream.|
215| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreatePhotoOutputWithoutSurface](#oh_cameramanager_createphotooutputwithoutsurface) ([Camera_Manager](#camera_manager) \*cameraManager, const [Camera_Profile](_camera___profile.md) \*profile, [Camera_PhotoOutput](#camera_photooutput) \*\*photoOutput) | Creates a **PhotoOutput** instance. **surfaceId** is not required in this function.|
216| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreateVideoOutput](#oh_cameramanager_createvideooutput) ([Camera_Manager](#camera_manager) \*cameraManager, const [Camera_VideoProfile](_camera___video_profile.md) \*profile, const char \*surfaceId, [Camera_VideoOutput](#camera_videooutput) \*\*videoOutput) | Creates a **VideoOutput** instance.|
217| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreateVideoOutputUsedInPreconfig](#oh_cameramanager_createvideooutputusedinpreconfig) ([Camera_Manager](#camera_manager) \*cameraManager, const char \*surfaceId, [Camera_VideoOutput](#camera_videooutput) \*\*videoOutput) | Creates a **VideoOutput** instance to be used in a preconfiguration stream.|
218| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreateMetadataOutput](#oh_cameramanager_createmetadataoutput) ([Camera_Manager](#camera_manager) \*cameraManager, const [Camera_MetadataObjectType](#camera_metadataobjecttype) \*profile, [Camera_MetadataOutput](#camera_metadataoutput) \*\*metadataOutput) | Creates a **MetadataOutput** instance.|
219| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_GetSupportedSceneModes](#oh_cameramanager_getsupportedscenemodes) ([Camera_Device](_camera___device.md) \*camera, [Camera_SceneMode](#camera_scenemode) \*\*sceneModes, uint32_t \*size) | Obtains the scene modes supported by a camera.|
220| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_DeleteSceneModes](#oh_cameramanager_deletescenemodes) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_SceneMode](#camera_scenemode) \*sceneModes) | Deletes scene modes.|
221| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_IsTorchSupported](#oh_cameramanager_istorchsupported) ([Camera_Manager](#camera_manager) \*cameraManager, bool \*isTorchSupported) | Checks whether the device supports the flashlight.|
222| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_IsTorchSupportedByTorchMode](#oh_cameramanager_istorchsupportedbytorchmode) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_TorchMode](#camera_torchmode) torchMode, bool \*isTorchSupported) | Checks whether the device supports the specified flashlight mode.|
223| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_SetTorchMode](#oh_cameramanager_settorchmode) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_TorchMode](#camera_torchmode) torchMode) | Sets a flashlight mode.|
224| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_RegisterCallback](#oh_capturesession_registercallback) ([Camera_CaptureSession](#camera_capturesession) \*session, [CaptureSession_Callbacks](_capture_session___callbacks.md) \*callback) | Registers a callback to listen for capture session events.|
225| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_UnregisterCallback](#oh_capturesession_unregistercallback) ([Camera_CaptureSession](#camera_capturesession) \*session, [CaptureSession_Callbacks](_capture_session___callbacks.md) \*callback) | Unregisters the callback used to listen for capture session events.|
226| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_RegisterSmoothZoomInfoCallback](#oh_capturesession_registersmoothzoominfocallback) ([Camera_CaptureSession](#camera_capturesession) \*session, [OH_CaptureSession_OnSmoothZoomInfo](#oh_capturesession_onsmoothzoominfo) smoothZoomInfoCallback) | Registers a callback to listen for smooth zoom events.|
227| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_UnregisterSmoothZoomInfoCallback](#oh_capturesession_unregistersmoothzoominfocallback) ([Camera_CaptureSession](#camera_capturesession) \*session, [OH_CaptureSession_OnSmoothZoomInfo](#oh_capturesession_onsmoothzoominfo) smoothZoomInfoCallback) | Unregisters the callback used to listen for smooth zoom events.|
228| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetSessionMode](#oh_capturesession_setsessionmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_SceneMode](#camera_scenemode) sceneMode) | Sets a session mode.|
229| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_AddSecureOutput](#oh_capturesession_addsecureoutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Marks a preview output stream as secure output.|
230| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_BeginConfig](#oh_capturesession_beginconfig) ([Camera_CaptureSession](#camera_capturesession) \*session) | Starts the configuration for a capture session.|
231| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_CommitConfig](#oh_capturesession_commitconfig) ([Camera_CaptureSession](#camera_capturesession) \*session) | Commits the configuration for a capture session.|
232| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_AddInput](#oh_capturesession_addinput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Input](#camera_input) \*cameraInput) | Adds a **CameraInput** instance to a session.|
233| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_RemoveInput](#oh_capturesession_removeinput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Input](#camera_input) \*cameraInput) | Removes a **CameraInput** instance from a session.|
234| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_AddPreviewOutput](#oh_capturesession_addpreviewoutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Adds a **PreviewOutput** instance to a session.|
235| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_RemovePreviewOutput](#oh_capturesession_removepreviewoutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Removes a **PreviewOutput** instance from a session.|
236| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_AddPhotoOutput](#oh_capturesession_addphotooutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PhotoOutput](#camera_photooutput) \*photoOutput) | Adds a **PhotoOutput** instance to a session.|
237| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_RemovePhotoOutput](#oh_capturesession_removephotooutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PhotoOutput](#camera_photooutput) \*photoOutput) | Removes a **PhotoOutput** instance from a session.|
238| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_AddVideoOutput](#oh_capturesession_addvideooutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Adds a **VideoOutput** instance to a session.|
239| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_RemoveVideoOutput](#oh_capturesession_removevideooutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Removes a **VideoOutput** instance from a session.|
240| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_AddMetadataOutput](#oh_capturesession_addmetadataoutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput) | Adds a **MetadataOutput** instance to a session.|
241| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_RemoveMetadataOutput](#oh_capturesession_removemetadataoutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput) | Removes a **MetadataOutput** instance from a session.|
242| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_Start](#oh_capturesession_start) ([Camera_CaptureSession](#camera_capturesession) \*session) | Starts a capture session.|
243| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_Stop](#oh_capturesession_stop) ([Camera_CaptureSession](#camera_capturesession) \*session) | Stops a capture session.|
244| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_Release](#oh_capturesession_release) ([Camera_CaptureSession](#camera_capturesession) \*session) | Releases a **CaptureSession** instance.|
245| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_HasFlash](#oh_capturesession_hasflash) ([Camera_CaptureSession](#camera_capturesession) \*session, bool \*hasFlash) | Checks whether the device has flash.|
246| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_IsFlashModeSupported](#oh_capturesession_isflashmodesupported) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FlashMode](#camera_flashmode) flashMode, bool \*isSupported) | Checks whether a flash mode is supported.|
247| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetFlashMode](#oh_capturesession_getflashmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FlashMode](#camera_flashmode) \*flashMode) | Obtains the flash mode in use.|
248| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetFlashMode](#oh_capturesession_setflashmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FlashMode](#camera_flashmode) flashMode) | Sets a flash mode for the device.|
249| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_IsExposureModeSupported](#oh_capturesession_isexposuremodesupported) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_ExposureMode](#camera_exposuremode) exposureMode, bool \*isSupported) | Checks whether an exposure mode is supported.|
250| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetExposureMode](#oh_capturesession_getexposuremode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_ExposureMode](#camera_exposuremode) \*exposureMode) | Obtains the exposure mode in use.|
251| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetExposureMode](#oh_capturesession_setexposuremode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_ExposureMode](#camera_exposuremode) exposureMode) | Sets an exposure mode for the device.|
252| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetMeteringPoint](#oh_capturesession_getmeteringpoint) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Point](_camera___point.md) \*point) | Obtains the metering point in use.|
253| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetMeteringPoint](#oh_capturesession_setmeteringpoint) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Point](_camera___point.md) point) | Sets the metering point, which is the center point of the metering rectangle.|
254| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetExposureBiasRange](#oh_capturesession_getexposurebiasrange) ([Camera_CaptureSession](#camera_capturesession) \*session, float \*minExposureBias, float \*maxExposureBias, float \*step) | Obtains the exposure compensation values of the device.|
255| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetExposureBias](#oh_capturesession_setexposurebias) ([Camera_CaptureSession](#camera_capturesession) \*session, float exposureBias) | Sets an exposure compensation value for the device.|
256| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetExposureBias](#oh_capturesession_getexposurebias) ([Camera_CaptureSession](#camera_capturesession) \*session, float \*exposureBias) | Obtains the exposure compensation value in use.|
257| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_IsFocusModeSupported](#oh_capturesession_isfocusmodesupported) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FocusMode](#camera_focusmode) focusMode, bool \*isSupported) | Checks whether a focus mode is supported.|
258| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetFocusMode](#oh_capturesession_getfocusmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FocusMode](#camera_focusmode) \*focusMode) | Obtains the focus mode in use.|
259| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetFocusMode](#oh_capturesession_setfocusmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FocusMode](#camera_focusmode) focusMode) | Sets a focus mode for the device.|
260| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetFocusPoint](#oh_capturesession_getfocuspoint) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Point](_camera___point.md) \*focusPoint) | Obtains the focal point in use.|
261| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetFocusPoint](#oh_capturesession_setfocuspoint) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Point](_camera___point.md) focusPoint) | Sets a focal point for the device.|
262| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetZoomRatioRange](#oh_capturesession_getzoomratiorange) ([Camera_CaptureSession](#camera_capturesession) \*session, float \*minZoom, float \*maxZoom) | Obtains the supported zoom ratio range.|
263| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetZoomRatio](#oh_capturesession_getzoomratio) ([Camera_CaptureSession](#camera_capturesession) \*session, float \*zoom) | Obtains the zoom ratio in use.|
264| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetZoomRatio](#oh_capturesession_setzoomratio) ([Camera_CaptureSession](#camera_capturesession) \*session, float zoom) | Sets a zoom ratio for the device.|
265| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_IsVideoStabilizationModeSupported](#oh_capturesession_isvideostabilizationmodesupported) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_VideoStabilizationMode](#camera_videostabilizationmode) mode, bool \*isSupported) | Checks whether a video stabilization mode is supported. |
266| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetVideoStabilizationMode](#oh_capturesession_getvideostabilizationmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_VideoStabilizationMode](#camera_videostabilizationmode) \*mode) | Obtains the video stabilization mode in use.|
267| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetVideoStabilizationMode](#oh_capturesession_setvideostabilizationmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_VideoStabilizationMode](#camera_videostabilizationmode) mode) | Sets a video stabilization mode for the device.|
268| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_CanAddInput](#oh_capturesession_canaddinput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Input](#camera_input) \*cameraInput, bool \*isSuccessful) | Checks whether a **CameraInput** instance can be added to a session.|
269| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_CanAddPreviewOutput](#oh_capturesession_canaddpreviewoutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreviewOutput](#camera_previewoutput) \*cameraOutput, bool \*isSuccessful) | Checks whether a **PreviewOutput** instance can be added to a session.|
270| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_CanAddPhotoOutput](#oh_capturesession_canaddphotooutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PhotoOutput](#camera_photooutput) \*cameraOutput, bool \*isSuccessful) | Checks whether a **PhotoOutput** instance can be added to a session.|
271| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_CanAddVideoOutput](#oh_capturesession_canaddvideooutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_VideoOutput](#camera_videooutput) \*cameraOutput, bool \*isSuccessful) | Checks whether a **VideoOutput** instance can be added to a session.|
272| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_CanPreconfig](#oh_capturesession_canpreconfig) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreconfigType](#camera_preconfigtype) preconfigType, bool \*canPreconfig) | Checks whether a preconfigured resolution type is supported.|
273| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_CanPreconfigWithRatio](#oh_capturesession_canpreconfigwithratio) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreconfigType](#camera_preconfigtype) preconfigType, [Camera_PreconfigRatio](#camera_preconfigratio) preconfigRatio, bool \*canPreconfig) | Checks whether a preconfigured resolution type with an aspect ratio is supported.|
274| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_Preconfig](#oh_capturesession_preconfig) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreconfigType](#camera_preconfigtype) preconfigType) | Sets a preconfigured resolution type.|
275| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_PreconfigWithRatio](#oh_capturesession_preconfigwithratio) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreconfigType](#camera_preconfigtype) preconfigType, [Camera_PreconfigRatio](#camera_preconfigratio) preconfigRatio) | Sets a preconfigured resolution type with an aspect ratio.|
276| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetExposureValue](#oh_capturesession_getexposurevalue) ([Camera_CaptureSession](#camera_capturesession) \*session, float \*exposureValue) | Obtains the exposure value.|
277| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetFocalLength](#oh_capturesession_getfocallength) ([Camera_CaptureSession](#camera_capturesession) \*session, float \*focalLength) | Obtains the current focal length.|
278| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetSmoothZoom](#oh_capturesession_setsmoothzoom) ([Camera_CaptureSession](#camera_capturesession) \*session, float targetZoom, [Camera_SmoothZoomMode](#camera_smoothzoommode) smoothZoomMode) | Sets smooth zoom.|
279| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetSupportedColorSpaces](#oh_capturesession_getsupportedcolorspaces) ([Camera_CaptureSession](#camera_capturesession) \*session, OH_NativeBuffer_ColorSpace \*\*colorSpace, uint32_t \*size) | Obtains the supported color spaces.|
280| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_DeleteColorSpaces](#oh_capturesession_deletecolorspaces) ([Camera_CaptureSession](#camera_capturesession) \*session, OH_NativeBuffer_ColorSpace \*colorSpace) | Deletes color spaces.|
281| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetActiveColorSpace](#oh_capturesession_getactivecolorspace) ([Camera_CaptureSession](#camera_capturesession) \*session, OH_NativeBuffer_ColorSpace \*colorSpace) | Obtains the active color space.|
282| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetActiveColorSpace](#oh_capturesession_setactivecolorspace) ([Camera_CaptureSession](#camera_capturesession) \*session, OH_NativeBuffer_ColorSpace colorSpace) | Sets the active color space.|
283| [Camera_ErrorCode](#camera_errorcode) [OH_MetadataOutput_RegisterCallback](#oh_metadataoutput_registercallback) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput, [MetadataOutput_Callbacks](_metadata_output___callbacks.md) \*callback) | Registers a callback to listen for metadata output events.|
284| [Camera_ErrorCode](#camera_errorcode) [OH_MetadataOutput_UnregisterCallback](#oh_metadataoutput_unregistercallback) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput, [MetadataOutput_Callbacks](_metadata_output___callbacks.md) \*callback) | Unregisters the callback used to listen for metadata output events.|
285| [Camera_ErrorCode](#camera_errorcode) [OH_MetadataOutput_Start](#oh_metadataoutput_start) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput) | Starts metadata output.|
286| [Camera_ErrorCode](#camera_errorcode) [OH_MetadataOutput_Stop](#oh_metadataoutput_stop) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput) | Stops metadata output.|
287| [Camera_ErrorCode](#camera_errorcode) [OH_MetadataOutput_Release](#oh_metadataoutput_release) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput) | Releases a **MetadataOutput** instance.|
288| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoNative_GetMainImage](#oh_photonative_getmainimage) ([OH_PhotoNative](#oh_photonative) \*photo, OH_ImageNative \*\*mainImage) | Obtains a full quality photo.|
289| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoNative_Release](#oh_photonative_release) ([OH_PhotoNative](#oh_photonative) \*photo) | Releases a full quality photo.|
290| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_RegisterCallback](#oh_photooutput_registercallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [PhotoOutput_Callbacks](_photo_output___callbacks.md) \*callback) | Registers a callback to listen for photo output events.|
291| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_UnregisterCallback](#oh_photooutput_unregistercallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [PhotoOutput_Callbacks](_photo_output___callbacks.md) \*callback) | Unregisters the callback used to listen for photo output events.|
292| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_RegisterCaptureStartWithInfoCallback](#oh_photooutput_registercapturestartwithinfocallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureStartWithInfo](#oh_photooutput_capturestartwithinfo) callback) | Registers a callback to listen for capture start events.|
293| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_UnregisterCaptureStartWithInfoCallback](#oh_photooutput_unregistercapturestartwithinfocallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureStartWithInfo](#oh_photooutput_capturestartwithinfo) callback) | Unregisters the callback used to listen for capture start events.|
294| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_RegisterCaptureEndCallback](#oh_photooutput_registercaptureendcallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureEnd](#oh_photooutput_captureend) callback) | Registers a callback to listen for capture end events.|
295| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_UnregisterCaptureEndCallback](#oh_photooutput_unregistercaptureendcallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureEnd](#oh_photooutput_captureend) callback) | Unregisters the callback used to listen for capture end events.|
296| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_RegisterFrameShutterEndCallback](#oh_photooutput_registerframeshutterendcallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_OnFrameShutterEnd](#oh_photooutput_onframeshutterend) callback) | Registers a callback to listen for frame shutter end events.|
297| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_UnregisterFrameShutterEndCallback](#oh_photooutput_unregisterframeshutterendcallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_OnFrameShutterEnd](#oh_photooutput_onframeshutterend) callback) | Unregisters the callback used to listen for frame shutter end events.|
298| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_RegisterCaptureReadyCallback](#oh_photooutput_registercapturereadycallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureReady](#oh_photooutput_captureready) callback) | Registers a callback to listen for camera ready events. When the callback is received, the next capture can be performed.|
299| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_UnregisterCaptureReadyCallback](#oh_photooutput_unregistercapturereadycallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureReady](#oh_photooutput_captureready) callback) | Unregisters the callback used to listen for camera ready events.|
300| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_RegisterEstimatedCaptureDurationCallback](#oh_photooutput_registerestimatedcapturedurationcallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_EstimatedCaptureDuration](#oh_photooutput_estimatedcaptureduration) callback) | Registers a callback to listen for estimated capture duration events.|
301| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_UnregisterEstimatedCaptureDurationCallback](#oh_photooutput_unregisterestimatedcapturedurationcallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_EstimatedCaptureDuration](#oh_photooutput_estimatedcaptureduration) callback) | Unregisters the callback used to listen for estimated capture duration events.|
302| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_RegisterPhotoAvailableCallback](#oh_photooutput_registerphotoavailablecallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_PhotoAvailable](#oh_photooutput_photoavailable) callback) | Registers a callback to listen for photo availability events.|
303| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_UnregisterPhotoAvailableCallback](#oh_photooutput_unregisterphotoavailablecallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_PhotoAvailable](#oh_photooutput_photoavailable) callback) | Unregisters the callback used to listen for photo availability events.|
304| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_RegisterPhotoAssetAvailableCallback](#oh_photooutput_registerphotoassetavailablecallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_PhotoAssetAvailable](#oh_photooutput_photoassetavailable) callback) | Registers a callback to listen for photo asset availability events.|
305| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_UnregisterPhotoAssetAvailableCallback](#oh_photooutput_unregisterphotoassetavailablecallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_PhotoAssetAvailable](#oh_photooutput_photoassetavailable) callback) | Unregisters the callback used to listen for photo asset availability events.|
306| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_Capture](#oh_photooutput_capture) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput) | Captures a photo.|
307| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_Capture_WithCaptureSetting](#oh_photooutput_capture_withcapturesetting) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [Camera_PhotoCaptureSetting](_camera___photo_capture_setting.md) setting) | Captures a photo with photographing parameters.|
308| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_Release](#oh_photooutput_release) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput) | Releases a **PhotoOutput** instance.|
309| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_IsMirrorSupported](#oh_photooutput_ismirrorsupported) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, bool \*isSupported) | Checks whether mirroring is supported.|
310| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_EnableMirror](#oh_photooutput_enablemirror) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, bool enabled) | Enables mirror photography.|
311| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_GetActiveProfile](#oh_photooutput_getactiveprofile) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [Camera_Profile](_camera___profile.md) \*\*profile) | Obtains the profile of a **PhotoOutput** instance.|
312| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_DeleteProfile](#oh_photooutput_deleteprofile) ([Camera_Profile](_camera___profile.md) \*profile) | Deletes the profile of this **PhotoOutput** instance.|
313| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_IsMovingPhotoSupported](#oh_photooutput_ismovingphotosupported) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, bool \*isSupported) | Checks whether moving photos are supported.|
314| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_EnableMovingPhoto](#oh_photooutput_enablemovingphoto) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, bool enabled) | Enables moving photos.|
315| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_RegisterCallback](#oh_previewoutput_registercallback) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, [PreviewOutput_Callbacks](_preview_output___callbacks.md) \*callback) | Registers a callback to listen for preview output events.|
316| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_UnregisterCallback](#oh_previewoutput_unregistercallback) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, [PreviewOutput_Callbacks](_preview_output___callbacks.md) \*callback) | Unregisters the callback used to listen for preview output events.|
317| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_Start](#oh_previewoutput_start) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Starts preview output.|
318| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_Stop](#oh_previewoutput_stop) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Stops preview output.|
319| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_Release](#oh_previewoutput_release) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Releases a **PreviewOutput** instance.|
320| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_GetActiveProfile](#oh_previewoutput_getactiveprofile) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, [Camera_Profile](_camera___profile.md) \*\*profile) | Obtains the profile of a **PreviewOutput** instance.|
321| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_DeleteProfile](#oh_previewoutput_deleteprofile) ([Camera_Profile](_camera___profile.md) \*profile) | Deletes the profile of this **PreviewOutput** instance.|
322| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_GetSupportedFrameRates](#oh_previewoutput_getsupportedframerates) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, [Camera_FrameRateRange](_camera___frame_rate_range.md) \*\*frameRateRange, uint32_t \*size) | Obtains the list of frame rates supported by a **PreviewOutput** instance.|
323| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_DeleteFrameRates](#oh_previewoutput_deleteframerates) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, [Camera_FrameRateRange](_camera___frame_rate_range.md) \*frameRateRange) | Deletes the frame rate list.|
324| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_SetFrameRate](#oh_previewoutput_setframerate) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, int32_t minFps, int32_t maxFps) | Sets the frame rates for a **PreviewOutput** instance.|
325| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_GetActiveFrameRate](#oh_previewoutput_getactiveframerate) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, [Camera_FrameRateRange](_camera___frame_rate_range.md) \*frameRateRange) | Obtains the active frame rates of a **PreviewOutput** instance.|
326| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_RegisterCallback](#oh_videooutput_registercallback) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, [VideoOutput_Callbacks](_video_output___callbacks.md) \*callback) | Registers a callback to listen for video output events.|
327| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_UnregisterCallback](#oh_videooutput_unregistercallback) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, [VideoOutput_Callbacks](_video_output___callbacks.md) \*callback) | Unregisters the callback used to listen for video output events.|
328| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_Start](#oh_videooutput_start) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Starts video output.|
329| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_Stop](#oh_videooutput_stop) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Stops video output.|
330| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_Release](#oh_videooutput_release) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Releases a **VideoOutput** instance.|
331| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_GetActiveProfile](#oh_videooutput_getactiveprofile) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, [Camera_VideoProfile](_camera___video_profile.md) \*\*profile) | Obtains the profile of a **VideoOutput** instance.|
332| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_DeleteProfile](#oh_videooutput_deleteprofile) ([Camera_VideoProfile](_camera___video_profile.md) \*profile) | Deletes the profile of this **VideoOutput** instance.|
333| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_GetSupportedFrameRates](#oh_videooutput_getsupportedframerates) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, [Camera_FrameRateRange](_camera___frame_rate_range.md) \*\*frameRateRange, uint32_t \*size) | Obtains the list of frame rates supported by a **VideoOutput** instance.|
334| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_DeleteFrameRates](#oh_videooutput_deleteframerates) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, [Camera_FrameRateRange](_camera___frame_rate_range.md) \*frameRateRange) | Deletes the frame rate list.|
335| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_SetFrameRate](#oh_videooutput_setframerate) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, int32_t minFps, int32_t maxFps) | Sets the frame rates for a **VideoOutput** instance.|
336| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_GetActiveFrameRate](#oh_videooutput_getactiveframerate) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, [Camera_FrameRateRange](_camera___frame_rate_range.md) \*frameRateRange) | Obtains the active frame rates of a **VideoOutput** instance.|
337
338
339## Type Description
340
341
342### Camera_CaptureEndInfo
343
344```
345typedef struct Camera_CaptureEndInfo Camera_CaptureEndInfo
346```
347
348**Description**
349
350Defines a struct for the capture end information.
351
352**Since**: 11
353
354
355### Camera_CaptureSession
356
357```
358typedef struct Camera_CaptureSession Camera_CaptureSession
359```
360
361**Description**
362
363Defines a struct for the capture session object.
364
365You can call [OH_CameraManager_CreateCaptureSession](#oh_cameramanager_createcapturesession) to create such an object.
366
367**Since**: 11
368
369
370### Camera_CaptureStartInfo
371
372```
373typedef struct Camera_CaptureStartInfo Camera_CaptureStartInfo
374```
375
376**Description**
377
378Defines a struct for the capture start information.
379
380**Since**: 12
381
382
383### Camera_Connection
384
385```
386typedef enum Camera_Connection Camera_Connection
387```
388
389**Description**
390
391Defines an enum for the camera connection types.
392
393**Since**: 11
394
395
396### Camera_Device
397
398```
399typedef struct Camera_Device Camera_Device
400```
401
402**Description**
403
404Defines a struct for the camera device.
405
406**Since**: 11
407
408
409### Camera_ErrorCode
410
411```
412typedef enum Camera_ErrorCode Camera_ErrorCode
413```
414
415**Description**
416
417Defines an enum for the camera error codes.
418
419**Since**: 11
420
421
422### Camera_ExposureMode
423
424```
425typedef enum Camera_ExposureMode Camera_ExposureMode
426```
427
428**Description**
429
430Defines an enum for the exposure modes.
431
432**Since**: 11
433
434
435### Camera_FlashMode
436
437```
438typedef enum Camera_FlashMode Camera_FlashMode
439```
440
441**Description**
442
443Defines an enum for the flash modes.
444
445**Since**: 11
446
447
448### Camera_FocusMode
449
450```
451typedef enum Camera_FocusMode Camera_FocusMode
452```
453
454**Description**
455
456Defines an enum for the focus modes.
457
458**Since**: 11
459
460
461### Camera_FocusState
462
463```
464typedef enum Camera_FocusState Camera_FocusState
465```
466
467**Description**
468
469Defines an enum for the focus states.
470
471**Since**: 11
472
473
474### Camera_Format
475
476```
477typedef enum Camera_Format Camera_Format
478```
479
480**Description**
481
482Defines an enum for the camera output formats.
483
484**Since**: 11
485
486
487### Camera_FrameRateRange
488
489```
490typedef struct Camera_FrameRateRange Camera_FrameRateRange
491```
492
493**Description**
494
495Defines a struct for the frame rate range.
496
497**Since**: 11
498
499
500### Camera_FrameShutterEndInfo
501
502```
503typedef struct Camera_FrameShutterEndInfo Camera_FrameShutterEndInfo
504```
505
506**Description**
507
508Defines a struct for the frame shutter end information during capture.
509
510**Since**: 12
511
512
513### Camera_FrameShutterInfo
514
515```
516typedef struct Camera_FrameShutterInfo Camera_FrameShutterInfo
517```
518
519**Description**
520
521Defines a struct for the frame shutter information.
522
523**Since**: 11
524
525
526### Camera_ImageRotation
527
528```
529typedef enum Camera_ImageRotation Camera_ImageRotation
530```
531
532**Description**
533
534Defines an enum for the image rotation angles.
535
536**Since**: 11
537
538
539### Camera_Input
540
541```
542typedef struct Camera_Input Camera_Input
543```
544
545**Description**
546
547Defines a struct for the camera input object.
548
549You can call [OH_CameraManager_CreateCameraInput](#oh_cameramanager_createcamerainput) to create such an object.
550
551**Since**: 11
552
553
554### Camera_Location
555
556```
557typedef struct Camera_Location Camera_Location
558```
559
560**Description**
561
562Defines a struct for the location where the photo is taken.
563
564**Since**: 11
565
566
567### Camera_Manager
568
569```
570typedef struct Camera_Manager Camera_Manager
571```
572
573**Description**
574
575Defines a struct for the camera manager.
576
577You can call [OH_Camera_GetCameraManager](#oh_camera_getcameramanager) to create such an object.
578
579**Since**: 11
580
581
582### Camera_MetadataObject
583
584```
585typedef struct Camera_MetadataObject Camera_MetadataObject
586```
587
588**Description**
589
590Defines a struct for the camera metadata.
591
592**Since**: 11
593
594
595### Camera_MetadataObjectType
596
597```
598typedef enum Camera_MetadataObjectType Camera_MetadataObjectType
599```
600
601**Description**
602
603Defines an enum for the metadata object types.
604
605**Since**: 11
606
607
608### Camera_MetadataOutput
609
610```
611typedef struct Camera_MetadataOutput Camera_MetadataOutput
612```
613
614**Description**
615
616Defines a struct for the metadata output object.
617
618You can call [OH_CameraManager_CreateMetadataOutput](#oh_cameramanager_createmetadataoutput) to create such an object.
619
620**Since**: 11
621
622
623### Camera_OutputCapability
624
625```
626typedef struct Camera_OutputCapability Camera_OutputCapability
627```
628
629**Description**
630
631Defines a struct for the camera output capability.
632
633**Since**: 11
634
635
636### Camera_PhotoCaptureSetting
637
638```
639typedef struct Camera_PhotoCaptureSetting Camera_PhotoCaptureSetting
640```
641
642**Description**
643
644Defines a struct for the parameters related to photo capture.
645
646**Since**: 11
647
648
649### Camera_PhotoOutput
650
651```
652typedef struct Camera_PhotoOutput Camera_PhotoOutput
653```
654
655**Description**
656
657Defines a struct for the photo output object.
658
659You can call [OH_CameraManager_CreatePhotoOutput](#oh_cameramanager_createphotooutput) to create such an object.
660
661**Since**: 11
662
663
664### Camera_Point
665
666```
667typedef struct Camera_Point Camera_Point
668```
669
670**Description**
671
672Defines a struct for the parameters related to a point.
673
674**Since**: 11
675
676
677### Camera_Position
678
679```
680typedef enum Camera_Position Camera_Position
681```
682
683**Description**
684
685Defines an enum for the camera positions.
686
687**Since**: 11
688
689
690### Camera_PreconfigRatio
691
692```
693typedef enum Camera_PreconfigRatio Camera_PreconfigRatio
694```
695
696**Description**
697
698Defines an enum for the preconfigured aspect ratios.
699
700**Since**: 12
701
702
703### Camera_PreconfigType
704
705```
706typedef enum Camera_PreconfigType Camera_PreconfigType
707```
708
709**Description**
710
711Defines an enum for the preconfigured resolution types.
712
713**Since**: 12
714
715
716### Camera_PreviewOutput
717
718```
719typedef struct Camera_PreviewOutput Camera_PreviewOutput
720```
721
722**Description**
723
724Defines a struct for the preview output object.
725
726You can call [OH_CameraManager_CreatePreviewOutput](#oh_cameramanager_createpreviewoutput) to create such an object.
727
728**Since**: 11
729
730
731### Camera_Profile
732
733```
734typedef struct Camera_Profile Camera_Profile
735```
736
737**Description**
738
739Defines a struct for the profile of a camera stream.
740
741**Since**: 11
742
743
744### Camera_QualityLevel
745
746```
747typedef enum Camera_QualityLevel Camera_QualityLevel
748```
749
750**Description**
751
752Defines an enum for the image quality levels.
753
754**Since**: 11
755
756
757### Camera_Rect
758
759```
760typedef struct Camera_Rect Camera_Rect
761```
762
763**Description**
764
765Defines a struct for the rectangle.
766
767**Since**: 11
768
769
770### Camera_SceneMode
771
772```
773typedef enum Camera_SceneMode Camera_SceneMode
774```
775
776**Description**
777
778Defines an enum for the camera scene modes.
779
780**Since**: 12
781
782
783### Camera_Size
784
785```
786typedef struct Camera_Size Camera_Size
787```
788
789**Description**
790
791Defines a struct for the parameters related to the size.
792
793**Since**: 11
794
795
796### Camera_SmoothZoomInfo
797
798```
799typedef struct Camera_SmoothZoomInfo Camera_SmoothZoomInfo
800```
801
802**Description**
803
804Defines a struct for the smooth zoom information.
805
806**Since**: 12
807
808
809### Camera_SmoothZoomMode
810
811```
812typedef enum Camera_SmoothZoomMode Camera_SmoothZoomMode
813```
814
815**Description**
816
817Defines an enum for the smooth zoom modes.
818
819**Since**: 12
820
821
822### Camera_Status
823
824```
825typedef enum Camera_Status Camera_Status
826```
827
828**Description**
829
830Defines an enum for the camera statuses.
831
832**Since**: 11
833
834
835### Camera_StatusInfo
836
837```
838typedef struct Camera_StatusInfo Camera_StatusInfo
839```
840
841**Description**
842
843Defines a struct for the camera status information.
844
845**Since**: 11
846
847
848### Camera_TorchMode
849
850```
851typedef enum Camera_TorchMode Camera_TorchMode
852```
853
854**Description**
855
856Defines an enum for the flashlight modes.
857
858**Since**: 12
859
860
861### Camera_TorchStatusInfo
862
863```
864typedef struct Camera_TorchStatusInfo Camera_TorchStatusInfo
865```
866
867**Description**
868
869Defines a struct for the flashlight status information.
870
871**Since**: 12
872
873
874### Camera_Type
875
876```
877typedef enum Camera_Type Camera_Type
878```
879
880**Description**
881
882Defines an enum for the camera types.
883
884**Since**: 11
885
886
887### Camera_VideoOutput
888
889```
890typedef struct Camera_VideoOutput Camera_VideoOutput
891```
892
893**Description**
894
895Defines a struct for the video output object.
896
897You can call [OH_CameraManager_CreateVideoOutput](#oh_cameramanager_createvideooutput) to create such an object.
898
899**Since**: 11
900
901
902### Camera_VideoProfile
903
904```
905typedef struct Camera_VideoProfile Camera_VideoProfile
906```
907
908**Description**
909
910Defines a struct for the video profile.
911
912**Since**: 11
913
914
915### Camera_VideoStabilizationMode
916
917```
918typedef enum Camera_VideoStabilizationMode Camera_VideoStabilizationMode
919```
920
921**Description**
922
923Defines an enum for the video stabilization modes.
924
925**Since**: 11
926
927
928### CameraInput_Callbacks
929
930```
931typedef struct CameraInput_Callbacks CameraInput_Callbacks
932```
933
934**Description**
935
936Defines a struct for the callbacks used to listen for camera input errors.
937
938**Since**: 11
939
940**See**
941
942[OH_CameraInput_RegisterCallback](#oh_camerainput_registercallback)
943
944
945### CameraManager_Callbacks
946
947```
948typedef struct CameraManager_Callbacks CameraManager_Callbacks
949```
950
951**Description**
952
953Defines a struct for the callbacks used to listen for camera status changes.
954
955**Since**: 11
956
957**See**
958
959[OH_CameraManager_RegisterCallback](#oh_cameramanager_registercallback)
960
961
962### CaptureSession_Callbacks
963
964```
965typedef struct CaptureSession_Callbacks CaptureSession_Callbacks
966```
967
968**Description**
969
970Defines a struct for the callbacks used for a capture session.
971
972**Since**: 11
973
974**See**
975
976[OH_CaptureSession_RegisterCallback](#oh_capturesession_registercallback)
977
978
979### MetadataOutput_Callbacks
980
981```
982typedef struct MetadataOutput_Callbacks MetadataOutput_Callbacks
983```
984
985**Description**
986
987Defines a struct for the callbacks related to metadata output.
988
989**Since**: 11
990
991**See**
992
993[OH_MetadataOutput_RegisterCallback](#oh_metadataoutput_registercallback)
994
995
996### OH_CameraInput_OnError
997
998```
999typedef void (*OH_CameraInput_OnError)(const Camera_Input* cameraInput, Camera_ErrorCode errorCode)
1000```
1001
1002**Description**
1003
1004Defines the callback defined in the [CameraInput_Callbacks](_camera_input___callbacks.md) struct and used to report camera input errors.
1005
1006**Since**: 11
1007
1008**Parameters**
1009
1010| Name| Description|
1011| -------- | -------- |
1012| cameraInput | Pointer to the [Camera_Input](#camera_input) instance that transfers the callback.|
1013| errorCode | Error code reported during camera input and defined in [Camera_ErrorCode](#camera_errorcode-1).|
1014
1015**See**
1016
1017In [Camera_ErrorCode](#camera_errorcode-1):
1018
1019- CAMERA_CONFLICT_CAMERA
1020
1021- CAMERA_DEVICE_DISABLED
1022
1023- CAMERA_DEVICE_PREEMPTED
1024
1025- CAMERA_SERVICE_FATAL_ERROR
1026
1027
1028### OH_CameraManager_StatusCallback
1029
1030```
1031typedef void (*OH_CameraManager_StatusCallback)(Camera_Manager* cameraManager, Camera_StatusInfo* status)
1032```
1033
1034**Description**
1035
1036Defines the callback defined in the [CameraManager_Callbacks](_camera_manager___callbacks.md) struct and used to report the camera manager status.
1037
1038**Since**: 11
1039
1040**Parameters**
1041
1042| Name| Description|
1043| -------- | -------- |
1044| cameraManager | Pointer to the [Camera_Manager](#camera_manager) instance that transfers the callback.|
1045| status | Pointer to the camera manager status, which is defined in the [Camera_StatusInfo](_camera___status_info.md) struct.|
1046
1047
1048### OH_CameraManager_TorchStatusCallback
1049
1050```
1051typedef void (*OH_CameraManager_TorchStatusCallback)(Camera_Manager* cameraManager, Camera_TorchStatusInfo* status)
1052```
1053
1054**Description**
1055
1056Defines the callback invoked when the flashlight status changes.
1057
1058**Since**: 12
1059
1060**Parameters**
1061
1062| Name| Description|
1063| -------- | -------- |
1064| cameraManager | Pointer to the [Camera_Manager](#camera_manager) instance that transfers the callback.|
1065| status | Pointer to the flashlight status, which is defined in the [Camera_TorchStatusInfo](_camera___torch_status_info.md) struct.|
1066
1067
1068### OH_CaptureSession_OnError
1069
1070```
1071typedef void (*OH_CaptureSession_OnError)(Camera_CaptureSession* session, Camera_ErrorCode errorCode)
1072```
1073
1074**Description**
1075
1076Defines the callback defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct and used to report capture session errors.
1077
1078**Since**: 11
1079
1080**Parameters**
1081
1082| Name| Description|
1083| -------- | -------- |
1084| session | Pointer to the [Camera_CaptureSession](#camera_capturesession) instance that transfers the callback.|
1085| errorCode | Error code reported in a capture session and defined in [Camera_ErrorCode](#camera_errorcode-1).|
1086
1087**See**
1088
1089**CAMERA_SERVICE_FATAL_ERROR** in [Camera_ErrorCode](#camera_errorcode-1).
1090
1091
1092### OH_CaptureSession_OnFocusStateChange
1093
1094```
1095typedef void (*OH_CaptureSession_OnFocusStateChange)(Camera_CaptureSession* session, Camera_FocusState focusState)
1096```
1097
1098**Description**
1099
1100Defines the callback defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct and used to report focus status changes of a capture session.
1101
1102**Since**: 11
1103
1104**Parameters**
1105
1106| Name| Description|
1107| -------- | -------- |
1108| session | Pointer to the [Camera_CaptureSession](#camera_capturesession) instance that transfers the callback.|
1109| focusState | Focus state, which is defined in [Camera_FocusState](#camera_focusstate).|
1110
1111
1112### OH_CaptureSession_OnSmoothZoomInfo
1113
1114```
1115typedef void (*OH_CaptureSession_OnSmoothZoomInfo)(Camera_CaptureSession* session, Camera_SmoothZoomInfo* smoothZoomInfo)
1116```
1117
1118**Description**
1119
1120Defines the callback invoked when smooth zoom is triggered for a capture session.
1121
1122**Since**: 12
1123
1124**Parameters**
1125
1126| Name| Description|
1127| -------- | -------- |
1128| session | Pointer to the [Camera_CaptureSession](#camera_capturesession) instance that transfers the callback.|
1129| smoothZoomInfo | Pointer to [Camera_SmoothZoomInfo](_camera___smooth_zoom_info.md) passed by the callback.|
1130
1131
1132### OH_MetadataOutput_OnError
1133
1134```
1135typedef void (*OH_MetadataOutput_OnError)(Camera_MetadataOutput* metadataOutput, Camera_ErrorCode errorCode)
1136```
1137
1138**Description**
1139
1140Defines the callback defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct and used to report metadata output errors.
1141
1142**Since**: 11
1143
1144**Parameters**
1145
1146| Name| Description|
1147| -------- | -------- |
1148| metadataOutput | Pointer to the [Camera_MetadataOutput](#camera_metadataoutput) instance that transfers the callback.|
1149| errorCode | Error code reported during metadata output and defined in [Camera_ErrorCode](#camera_errorcode-1).|
1150
1151**See**
1152
1153**CAMERA_SERVICE_FATAL_ERROR** in [Camera_ErrorCode](#camera_errorcode-1).
1154
1155
1156### OH_MetadataOutput_OnMetadataObjectAvailable
1157
1158```
1159typedef void (*OH_MetadataOutput_OnMetadataObjectAvailable)(Camera_MetadataOutput* metadataOutput, Camera_MetadataObject* metadataObject, uint32_t size)
1160```
1161
1162**Description**
1163
1164Defines the callback defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct and used to report metadata output data.
1165
1166**Since**: 11
1167
1168**Parameters**
1169
1170| Name| Description|
1171| -------- | -------- |
1172| metadataOutput | Pointer to the [Camera_MetadataOutput](#camera_metadataoutput) instance that transfers the callback.|
1173| metadataObject | Pointer to the metadata output data, which is defined in the [Camera_MetadataObject](_camera___metadata_object.md) struct.|
1174| size | Size of the metadata object.|
1175
1176
1177### OH_PhotoNative
1178
1179```
1180typedef struct OH_PhotoNative OH_PhotoNative
1181```
1182
1183**Description**
1184
1185Defines a struct for a camera photo object.
1186
1187Defines a high-resolution image object.
1188
1189**Since**: 12
1190
1191
1192### OH_PhotoOutput_CaptureEnd
1193
1194```
1195typedef void (*OH_PhotoOutput_CaptureEnd) (Camera_PhotoOutput* photoOutput, int32_t frameCount)
1196```
1197
1198**Description**
1199
1200Defines the callback invoked when the capture ends.
1201
1202**Since**: 12
1203
1204**Parameters**
1205
1206| Name| Description|
1207| -------- | -------- |
1208| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.|
1209| frameCount | Number of frames to be included in the callback.|
1210
1211
1212### OH_PhotoOutput_CaptureReady
1213
1214```
1215typedef void (*OH_PhotoOutput_CaptureReady) (Camera_PhotoOutput* photoOutput)
1216```
1217
1218**Description**
1219
1220Defines the callback invoked when the camera is ready to take photos. When the callback is received, the next capture can be performed.
1221
1222**Since**: 12
1223
1224**Parameters**
1225
1226| Name| Description|
1227| -------- | -------- |
1228| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.|
1229
1230
1231### OH_PhotoOutput_CaptureStartWithInfo
1232
1233```
1234typedef void (*OH_PhotoOutput_CaptureStartWithInfo) (Camera_PhotoOutput* photoOutput, Camera_CaptureStartInfo* Info)
1235```
1236
1237**Description**
1238
1239Defines the callback invoked when the capture starts.
1240
1241**Since**: 12
1242
1243**Parameters**
1244
1245| Name| Description|
1246| -------- | -------- |
1247| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.|
1248| Info | Pointer to [Camera_CaptureStartInfo](_camera___capture_start_info.md) passed by the callback.|
1249
1250
1251### OH_PhotoOutput_EstimatedCaptureDuration
1252
1253```
1254typedef void (*OH_PhotoOutput_EstimatedCaptureDuration) (Camera_PhotoOutput* photoOutput, int64_t duration)
1255```
1256
1257**Description**
1258
1259Defines the callback for the estimated capture duration.
1260
1261**Since**: 12
1262
1263**Parameters**
1264
1265| Name| Description|
1266| -------- | -------- |
1267| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.|
1268| duration | Estimated capture duration passed by the callback.|
1269
1270
1271### OH_PhotoOutput_OnError
1272
1273```
1274typedef void (*OH_PhotoOutput_OnError)(Camera_PhotoOutput* photoOutput, Camera_ErrorCode errorCode)
1275```
1276
1277**Description**
1278
1279Defines the callback defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct and used to report photo output errors.
1280
1281**Since**: 11
1282
1283**Parameters**
1284
1285| Name| Description|
1286| -------- | -------- |
1287| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.|
1288| errorCode | Error code reported during photo output and defined in [Camera_ErrorCode](#camera_errorcode-1).|
1289
1290**See**
1291
1292**CAMERA_SERVICE_FATAL_ERROR** in [Camera_ErrorCode](#camera_errorcode-1).
1293
1294
1295### OH_PhotoOutput_OnFrameEnd
1296
1297```
1298typedef void (*OH_PhotoOutput_OnFrameEnd)(Camera_PhotoOutput* photoOutput, int32_t frameCount)
1299```
1300
1301**Description**
1302
1303Defines the callback defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct and used to report photo output frame end events.
1304
1305**Since**: 11
1306
1307**Parameters**
1308
1309| Name| Description|
1310| -------- | -------- |
1311| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.|
1312| frameCount | Number of frames to be included in the callback.|
1313
1314
1315### OH_PhotoOutput_OnFrameShutter
1316
1317```
1318typedef void (*OH_PhotoOutput_OnFrameShutter)(Camera_PhotoOutput* photoOutput, Camera_FrameShutterInfo* info)
1319```
1320
1321**Description**
1322
1323Defines the callback defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct and used to report frame shutter events.
1324
1325**Since**: 11
1326
1327**Parameters**
1328
1329| Name| Description|
1330| -------- | -------- |
1331| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.|
1332| info | Pointer to the frame shutter information, which is defined in the [Camera_FrameShutterInfo](_camera___frame_shutter_info.md) struct.|
1333
1334
1335### OH_PhotoOutput_OnFrameShutterEnd
1336
1337```
1338typedef void (*OH_PhotoOutput_OnFrameShutterEnd) (Camera_PhotoOutput* photoOutput, Camera_FrameShutterInfo* Info)
1339```
1340
1341**Description**
1342
1343Defines the callback invoked when frame shutter ends.
1344
1345**Since**: 12
1346
1347**Parameters**
1348
1349| Name| Description|
1350| -------- | -------- |
1351| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.|
1352| Info | Pointer to the frame shutter information, which is defined in the [Camera_FrameShutterInfo](_camera___frame_shutter_info.md) struct.|
1353
1354
1355### OH_PhotoOutput_OnFrameStart
1356
1357```
1358typedef void(* OH_PhotoOutput_OnFrameStart) (Camera_PhotoOutput *photoOutput)
1359```
1360
1361**Description**
1362
1363Defines the callback defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct and used to report photo output frame start events.
1364
1365**Since**: 11
1366
1367**Parameters**
1368
1369| Name| Description|
1370| -------- | -------- |
1371| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.|
1372
1373
1374### OH_PhotoOutput_PhotoAssetAvailable
1375
1376```
1377typedef void (*OH_PhotoOutput_PhotoAssetAvailable)(Camera_PhotoOutput* photoOutput, OH_MediaAsset* photoAsset)
1378```
1379
1380**Description**
1381
1382Defines the callback invoked when a photo asset is available.
1383
1384**Since**: 12
1385
1386**Parameters**
1387
1388| Name| Description|
1389| -------- | -------- |
1390| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.|
1391| photoAsset | Pointer to [OH_MediaAsset](../apis-media-library-kit/_media_asset_manager.md#oh_mediaasset) passed by the callback.|
1392
1393
1394### OH_PhotoOutput_PhotoAvailable
1395
1396```
1397typedef void (*OH_PhotoOutput_PhotoAvailable)(Camera_PhotoOutput* photoOutput, OH_PhotoNative* photo)
1398```
1399
1400**Description**
1401
1402Defines the callback invoked when a high-resolution photo is available.
1403
1404**Since**: 12
1405
1406**Parameters**
1407
1408| Name| Description|
1409| -------- | -------- |
1410| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.|
1411| photo | Pointer to [OH_PhotoNative](#oh_photonative) passed by the callback.|
1412
1413
1414### OH_PreviewOutput_OnError
1415
1416```
1417typedef void (*OH_PreviewOutput_OnError)(Camera_PreviewOutput* previewOutput, Camera_ErrorCode errorCode)
1418```
1419
1420**Description**
1421
1422Defines the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used to report preview output errors.
1423
1424**Since**: 11
1425
1426**Parameters**
1427
1428| Name| Description|
1429| -------- | -------- |
1430| previewOutput | Pointer to the [Camera_PreviewOutput](#camera_previewoutput) instance that transfers the callback.|
1431| errorCode | Error code reported during preview output and defined in [Camera_ErrorCode](#camera_errorcode-1).|
1432
1433**See**
1434
1435**CAMERA_SERVICE_FATAL_ERROR** in [Camera_ErrorCode](#camera_errorcode-1).
1436
1437
1438### OH_PreviewOutput_OnFrameEnd
1439
1440```
1441typedef void (*OH_PreviewOutput_OnFrameEnd)(Camera_PreviewOutput* previewOutput, int32_t frameCount)
1442```
1443
1444**Description**
1445
1446Defines the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used report preview output frame end events.
1447
1448**Since**: 11
1449
1450**Parameters**
1451
1452| Name| Description|
1453| -------- | -------- |
1454| previewOutput | Pointer to the [Camera_PreviewOutput](#camera_previewoutput) instance that transfers the callback.|
1455| frameCount | Number of frames to be included in the callback.|
1456
1457
1458### OH_PreviewOutput_OnFrameStart
1459
1460```
1461typedef void (*OH_PreviewOutput_OnFrameStart)(Camera_PreviewOutput* previewOutput)
1462```
1463
1464**Description**
1465
1466Defines the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used to report preview output frame start events.
1467
1468**Since**: 11
1469
1470**Parameters**
1471
1472| Name| Description|
1473| -------- | -------- |
1474| previewOutput | Pointer to the [Camera_PreviewOutput](#camera_previewoutput) instance that transfers the callback.|
1475
1476
1477### OH_VideoOutput_OnError
1478
1479```
1480typedef void (*OH_VideoOutput_OnError)(Camera_VideoOutput* videoOutput, Camera_ErrorCode errorCode)
1481```
1482
1483**Description**
1484
1485Defines the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output errors.
1486
1487**Since**: 11
1488
1489**Parameters**
1490
1491| Name| Description|
1492| -------- | -------- |
1493| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance that transfers the callback.|
1494| errorCode | Error code reported during video output and defined in [Camera_ErrorCode](#camera_errorcode-1).|
1495
1496**See**
1497
1498**CAMERA_SERVICE_FATAL_ERROR** in [Camera_ErrorCode](#camera_errorcode-1).
1499
1500
1501### OH_VideoOutput_OnFrameEnd
1502
1503```
1504typedef void (*OH_VideoOutput_OnFrameEnd)(Camera_VideoOutput* videoOutput, int32_t frameCount)
1505```
1506
1507**Description**
1508
1509Defines the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output frame end events.
1510
1511**Since**: 11
1512
1513**Parameters**
1514
1515| Name| Description|
1516| -------- | -------- |
1517| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance that transfers the callback.|
1518| frameCount | Number of frames to be included in the callback.|
1519
1520
1521### OH_VideoOutput_OnFrameStart
1522
1523```
1524typedef void (*OH_VideoOutput_OnFrameStart)(Camera_VideoOutput* videoOutput)
1525```
1526
1527**Description**
1528
1529Defines the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output frame start events.
1530
1531**Since**: 11
1532
1533**Parameters**
1534
1535| Name| Description|
1536| -------- | -------- |
1537| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance that transfers the callback.|
1538
1539
1540### PhotoOutput_Callbacks
1541
1542```
1543typedef struct PhotoOutput_Callbacks PhotoOutput_Callbacks
1544```
1545
1546**Description**
1547
1548Defines a struct for the callbacks related to photo output.
1549
1550**Since**: 11
1551
1552**See**
1553
1554[OH_PhotoOutput_RegisterCallback](#oh_photooutput_registercallback)
1555
1556
1557### PreviewOutput_Callbacks
1558
1559```
1560typedef struct PreviewOutput_Callbacks PreviewOutput_Callbacks
1561```
1562
1563**Description**
1564
1565Defines a struct for the callbacks related to preview output.
1566
1567**Since**: 11
1568
1569**See**
1570
1571[OH_PreviewOutput_RegisterCallback](#oh_previewoutput_registercallback)
1572
1573
1574### VideoOutput_Callbacks
1575
1576```
1577typedef struct VideoOutput_Callbacks VideoOutput_Callbacks
1578```
1579
1580**Description**
1581
1582Defines a struct for the callbacks related to video output.
1583
1584**Since**: 11
1585
1586**See**
1587
1588[OH_VideoOutput_RegisterCallback](#oh_videooutput_registercallback)
1589
1590
1591## Enum Description
1592
1593
1594### Camera_Connection
1595
1596```
1597enum Camera_Connection
1598```
1599
1600**Description**
1601
1602Enumerates the camera connection types.
1603
1604**Since**: 11
1605
1606| Value| Description|
1607| -------- | -------- |
1608| CAMERA_CONNECTION_BUILT_IN | Built-in camera.|
1609| CAMERA_CONNECTION_USB_PLUGIN | Camera connected using USB.|
1610| CAMERA_CONNECTION_REMOTE | Remote camera.|
1611
1612
1613### Camera_ErrorCode
1614
1615```
1616enum Camera_ErrorCode
1617```
1618
1619**Description**
1620
1621Enumerates the camera error codes.
1622
1623**Since**: 11
1624
1625| Value| Description|
1626| -------- | -------- |
1627| CAMERA_OK | The camera is normal.|
1628| CAMERA_INVALID_ARGUMENT | A parameter is missing or the parameter type is incorrect.|
1629| CAMERA_OPERATION_NOT_ALLOWED | The operation is not allowed.|
1630| CAMERA_SESSION_NOT_CONFIG | The session is not configured.|
1631| CAMERA_SESSION_NOT_RUNNING | The session is not running.|
1632| CAMERA_SESSION_CONFIG_LOCKED | The session configuration is locked.|
1633| CAMERA_DEVICE_SETTING_LOCKED | The device setting is locked.|
1634| CAMERA_CONFLICT_CAMERA | The device is already started.|
1635| CAMERA_DEVICE_DISABLED | The camera is disabled for security reasons.|
1636| CAMERA_DEVICE_PREEMPTED | The camera is preempted.|
1637| CAMERA_UNRESOLVED_CONFLICTS_WITH_CURRENT_CONFIGURATIONS | The configuration conflicts with the current configuration.<br>**Since**: 12|
1638| CAMERA_SERVICE_FATAL_ERROR | A fatal error occurs in the camera service.|
1639
1640
1641### Camera_ExposureMode
1642
1643```
1644enum Camera_ExposureMode
1645```
1646
1647**Description**
1648
1649Enumerates the exposure modes.
1650
1651**Since**: 11
1652
1653| Value| Description|
1654| -------- | -------- |
1655| EXPOSURE_MODE_LOCKED | Exposure locked.|
1656| EXPOSURE_MODE_AUTO | Auto exposure.|
1657| EXPOSURE_MODE_CONTINUOUS_AUTO | Continuous auto exposure.|
1658
1659
1660### Camera_FlashMode
1661
1662```
1663enum Camera_FlashMode
1664```
1665
1666**Description**
1667
1668Enumerates the flash modes.
1669
1670**Since**: 11
1671
1672| Value| Description|
1673| -------- | -------- |
1674| FLASH_MODE_CLOSE | The flash is off.|
1675| FLASH_MODE_OPEN | The flash is on.|
1676| FLASH_MODE_AUTO | The flash mode is auto.|
1677| FLASH_MODE_ALWAYS_OPEN | The flash is steady on.|
1678
1679
1680### Camera_FocusMode
1681
1682```
1683enum Camera_FocusMode
1684```
1685
1686**Description**
1687
1688Enumerates the focus modes.
1689
1690**Since**: 11
1691
1692| Value| Description|
1693| -------- | -------- |
1694| FOCUS_MODE_MANUAL | Manual focus.|
1695| FOCUS_MODE_CONTINUOUS_AUTO | Continuous auto focus.|
1696| FOCUS_MODE_AUTO | Auto focus.|
1697| FOCUS_MODE_LOCKED | Focus locked.|
1698
1699
1700### Camera_FocusState
1701
1702```
1703enum Camera_FocusState
1704```
1705
1706**Description**
1707
1708Enumerates the focus states.
1709
1710**Since**: 11
1711
1712| Value| Description|
1713| -------- | -------- |
1714| FOCUS_STATE_SCAN | Focusing.|
1715| FOCUS_STATE_FOCUSED | Focused.|
1716| FOCUS_STATE_UNFOCUSED | Unfocused.|
1717
1718
1719### Camera_Format
1720
1721```
1722enum Camera_Format
1723```
1724
1725**Description**
1726
1727Enumerates the camera output formats.
1728
1729**Since**: 11
1730
1731| Value| Description|
1732| -------- | -------- |
1733| CAMERA_FORMAT_RGBA_8888 | RGBA 8888.|
1734| CAMERA_FORMAT_YUV_420_SP | YUV 420 SP.|
1735| CAMERA_FORMAT_JPEG | JPEG.|
1736| CAMERA_FORMAT_YCBCR_P010 | YCBCR P010.<br>**Since**: 12|
1737| CAMERA_FORMAT_YCRCB_P010 | YCRCB P010.<br>**Since**: 12|
1738
1739
1740### Camera_ImageRotation
1741
1742```
1743enum Camera_ImageRotation
1744```
1745
1746**Description**
1747
1748Enumerates the image rotation angles.
1749
1750**Since**: 11
1751
1752| Value| Description|
1753| -------- | -------- |
1754| IAMGE_ROTATION_0 | The image rotates 0 degrees.|
1755| IAMGE_ROTATION_90 | The image rotates 90 degrees.|
1756| IAMGE_ROTATION_180 | The image rotates 180 degrees.|
1757| IAMGE_ROTATION_270 | The image rotates 270 degrees.|
1758
1759
1760### Camera_MetadataObjectType
1761
1762```
1763enum Camera_MetadataObjectType
1764```
1765
1766**Description**
1767
1768Enumerates the metadata object types.
1769
1770**Since**: 11
1771
1772| Value| Description|
1773| -------- | -------- |
1774| FACE_DETECTION | Face detection.|
1775
1776
1777### Camera_Position
1778
1779```
1780enum Camera_Position
1781```
1782
1783**Description**
1784
1785Enumerates the camera positions.
1786
1787**Since**: 11
1788
1789| Value| Description|
1790| -------- | -------- |
1791| CAMERA_POSITION_UNSPECIFIED | Unspecified position.|
1792| CAMERA_POSITION_BACK | Rear camera.|
1793| CAMERA_POSITION_FRONT | Front camera.|
1794
1795
1796### Camera_PreconfigRatio
1797
1798```
1799enum Camera_PreconfigRatio
1800```
1801
1802**Description**
1803
1804Enumerates the preconfigured aspect ratios.
1805
1806**Since**: 12
1807
1808| Value| Description|
1809| -------- | -------- |
1810| PRECONFIG_RATIO_1_1 | 1:1 aspect ratio.|
1811| PRECONFIG_RATIO_4_3 | 4:3 aspect ratio.|
1812| PRECONFIG_RATIO_16_9 | 16:9 aspect ratio.|
1813
1814
1815### Camera_PreconfigType
1816
1817```
1818enum Camera_PreconfigType
1819```
1820
1821**Description**
1822
1823Enumerates the preconfigured resolution types.
1824
1825**Since**: 12
1826
1827| Value| Description|
1828| -------- | -------- |
1829| PRECONFIG_720P | 720p resolution.|
1830| PRECONFIG_1080P | 1080p resolution.|
1831| PRECONFIG_4K | 4K resolution.|
1832| PRECONFIG_HIGH_QUALITY | High-quality photos.|
1833
1834
1835### Camera_QualityLevel
1836
1837```
1838enum Camera_QualityLevel
1839```
1840
1841**Description**
1842
1843Enumerates the image quality levels.
1844
1845**Since**: 11
1846
1847| Value| Description|
1848| -------- | -------- |
1849| QUALITY_LEVEL_HIGH | High image quality.|
1850| QUALITY_LEVEL_MEDIUM | Medium image quality.|
1851| QUALITY_LEVEL_LOW | Low image quality.|
1852
1853
1854### Camera_SceneMode
1855
1856```
1857enum Camera_SceneMode
1858```
1859
1860**Description**
1861
1862Enumerates the camera scene modes.
1863
1864**Since**: 12
1865
1866| Value| Description|
1867| -------- | -------- |
1868| NORMAL_PHOTO | Normal photo mode.|
1869| NORMAL_VIDEO | Normal video mode.|
1870| SECURE_PHOTO | Secure mode.|
1871
1872
1873### Camera_SmoothZoomMode
1874
1875```
1876enum Camera_SmoothZoomMode
1877```
1878
1879**Description**
1880
1881Enumerates the smooth zoom modes.
1882
1883**Since**: 12
1884
1885| Value| Description|
1886| -------- | -------- |
1887| NORMAL | Bessel curve mode.|
1888
1889
1890### Camera_Status
1891
1892```
1893enum Camera_Status
1894```
1895
1896**Description**
1897
1898Enumerates the camera statuses.
1899
1900**Since**: 11
1901
1902| Value| Description|
1903| -------- | -------- |
1904| CAMERA_STATUS_APPEAR | A camera appears.|
1905| CAMERA_STATUS_DISAPPEAR | The camera disappears.|
1906| CAMERA_STATUS_AVAILABLE | The camera is available.|
1907| CAMERA_STATUS_UNAVAILABLE | The camera is unavailable.|
1908
1909
1910### Camera_TorchMode
1911
1912```
1913enum Camera_TorchMode
1914```
1915
1916**Description**
1917
1918Enumerates the flashlight modes.
1919
1920**Since**: 12
1921
1922| Value| Description|
1923| -------- | -------- |
1924| OFF | The flashlight is always off.|
1925| ON | The flashlight is always on.|
1926| AUTO | The flashlight will be turned on automatically based on the ambient lighting level.|
1927
1928
1929### Camera_Type
1930
1931```
1932enum Camera_Type
1933```
1934
1935**Description**
1936
1937Enumerates the camera types.
1938
1939**Since**: 11
1940
1941| Value| Description|
1942| -------- | -------- |
1943| CAMERA_TYPE_DEFAULT | Default camera type.|
1944| CAMERA_TYPE_WIDE_ANGLE | Wide camera.|
1945| CAMERA_TYPE_ULTRA_WIDE | Ultra wide camera.|
1946| CAMERA_TYPE_TELEPHOTO | Telephone camera.|
1947| CAMERA_TYPE_TRUE_DEPTH | Camera with depth of field information.|
1948
1949
1950### Camera_VideoStabilizationMode
1951
1952```
1953enum Camera_VideoStabilizationMode
1954```
1955
1956**Description**
1957
1958Enumerates the video stabilization modes.
1959
1960**Since**: 11
1961
1962| Value| Description|
1963| -------- | -------- |
1964| STABILIZATION_MODE_OFF | Video stabilization is disabled.|
1965| STABILIZATION_MODE_LOW | The basic video stabilization algorithm is used.|
1966| STABILIZATION_MODE_MIDDLE | A video stabilization algorithm with a stabilization effect better than that of the **LOW** type is used.|
1967| STABILIZATION_MODE_HIGH | A video stabilization algorithm with a stabilization effect better than that of the **MIDDLE** type is used.|
1968| STABILIZATION_MODE_AUTO | Automatic video stabilization is used. This value is available for HDF cameras.|
1969
1970
1971## Function Description
1972
1973
1974### OH_Camera_DeleteCameraManager()
1975
1976```
1977Camera_ErrorCode OH_Camera_DeleteCameraManager(Camera_Manager* cameraManager)
1978```
1979
1980**Description**
1981
1982Deletes a **CameraManager** instance.
1983
1984**Since**: 11
1985
1986**Parameters**
1987
1988| Name| Description|
1989| -------- | -------- |
1990| cameraManager | Pointer to the target [Camera_Manager](#camera_manager) instance.|
1991
1992**Returns**
1993
1994In [Camera_ErrorCode](#camera_errorcode-1):
1995
1996- **CAMERA_OK**: The operation is successful.
1997
1998- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
1999
2000- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2001
2002
2003### OH_Camera_GetCameraManager()
2004
2005```
2006Camera_ErrorCode OH_Camera_GetCameraManager(Camera_Manager** cameraManager)
2007```
2008
2009**Description**
2010
2011Obtains a **CameraManager** instance.
2012
2013**Since**: 11
2014
2015**Parameters**
2016
2017| Name| Description|
2018| -------- | -------- |
2019| cameraManager | Double pointer to the [Camera_Manager](#camera_manager) instance if the function is successfully called.|
2020
2021**Returns**
2022
2023In [Camera_ErrorCode](#camera_errorcode-1):
2024
2025- **CAMERA_OK**: The operation is successful.
2026
2027- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2028
2029- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2030
2031
2032### OH_CameraDevice_GetCameraOrientation()
2033
2034```
2035Camera_ErrorCode OH_CameraDevice_GetCameraOrientation(Camera_Device* camera, uint32_t* orientation)
2036```
2037
2038**Description**
2039
2040Obtains the sensor direction of a camera device.
2041
2042**Since**: 12
2043
2044**Parameters**
2045
2046| Name| Description|
2047| -------- | -------- |
2048| camera | Pointer to the target [Camera_Device](_camera___device.md) instance.|
2049| orientation | Pointer to the sensor direction obtained.|
2050
2051**Returns**
2052
2053In [Camera_ErrorCode](#camera_errorcode-1):
2054
2055- **CAMERA_OK**: The operation is successful.
2056
2057- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2058
2059- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2060
2061
2062### OH_CameraInput_Close()
2063
2064```
2065Camera_ErrorCode OH_CameraInput_Close(Camera_Input* cameraInput)
2066```
2067
2068**Description**
2069
2070Closes a camera.
2071
2072**Since**: 11
2073
2074**Parameters**
2075
2076| Name| Description|
2077| -------- | -------- |
2078| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.|
2079
2080**Returns**
2081
2082In [Camera_ErrorCode](#camera_errorcode-1):
2083
2084- **CAMERA_OK**: The operation is successful.
2085
2086- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2087
2088- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2089
2090
2091### OH_CameraInput_Open()
2092
2093```
2094Camera_ErrorCode OH_CameraInput_Open(Camera_Input* cameraInput)
2095```
2096
2097**Description**
2098
2099Opens a camera.
2100
2101**Since**: 11
2102
2103**Parameters**
2104
2105| Name| Description|
2106| -------- | -------- |
2107| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.|
2108
2109**Returns**
2110
2111In [Camera_ErrorCode](#camera_errorcode-1):
2112
2113- **CAMERA_OK**: The operation is successful.
2114
2115- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2116
2117- **CAMERA_CONFLICT_CAMERA**: The camera cannot be used due to a conflict.
2118
2119- **CAMERA_DEVICE_DISABLED**: The camera is disabled due to security reasons.
2120
2121- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2122
2123
2124### OH_CameraInput_OpenSecureCamera()
2125
2126```
2127Camera_ErrorCode OH_CameraInput_OpenSecureCamera(Camera_Input* cameraInput, uint64_t* secureSeqId)
2128```
2129
2130**Description**
2131
2132Opens a camera in secure mode.
2133
2134**Since**: 12
2135
2136**Parameters**
2137
2138| Name| Description|
2139| -------- | -------- |
2140| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.|
2141| secureSeqId | Pointer to the sequence ID of the camera.|
2142
2143**Returns**
2144
2145In [Camera_ErrorCode](#camera_errorcode-1):
2146
2147- **CAMERA_OK**: The operation is successful.
2148
2149- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2150
2151- **CAMERA_CONFLICT_CAMERA**: The camera cannot be used due to a conflict.
2152
2153- **CAMERA_DEVICE_DISABLED**: The camera is disabled due to security reasons.
2154
2155- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2156
2157
2158### OH_CameraInput_RegisterCallback()
2159
2160```
2161Camera_ErrorCode OH_CameraInput_RegisterCallback(Camera_Input* cameraInput, CameraInput_Callbacks* callback)
2162```
2163
2164**Description**
2165
2166Registers a callback to listen for camera input events.
2167
2168**Since**: 11
2169
2170**Parameters**
2171
2172| Name| Description|
2173| -------- | -------- |
2174| cameraInput | Pointer to a [Camera_Input](#camera_input) instance.|
2175| callback | Pointer to the target callback, which is defined in the [CameraInput_Callbacks](_camera_input___callbacks.md) struct.|
2176
2177**Returns**
2178
2179In [Camera_ErrorCode](#camera_errorcode-1):
2180
2181- **CAMERA_OK**: The operation is successful.
2182
2183- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2184
2185
2186### OH_CameraInput_Release()
2187
2188```
2189Camera_ErrorCode OH_CameraInput_Release(Camera_Input* cameraInput)
2190```
2191
2192**Description**
2193
2194Releases a **CameraInput** instance.
2195
2196Either this function or [OH_CameraInput_Close](#oh_camerainput_close) needs to be called.
2197
2198**Since**: 11
2199
2200**Parameters**
2201
2202| Name| Description|
2203| -------- | -------- |
2204| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.|
2205
2206**Returns**
2207
2208In [Camera_ErrorCode](#camera_errorcode-1):
2209
2210- **CAMERA_OK**: The operation is successful.
2211
2212- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2213
2214- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2215
2216
2217### OH_CameraInput_UnregisterCallback()
2218
2219```
2220Camera_ErrorCode OH_CameraInput_UnregisterCallback(Camera_Input* cameraInput, CameraInput_Callbacks* callback)
2221```
2222
2223**Description**
2224
2225Unregisters the callback used to listen for camera input events.
2226
2227**Since**: 11
2228
2229**Parameters**
2230
2231| Name| Description|
2232| -------- | -------- |
2233| cameraInput | Pointer to a [Camera_Input](#camera_input) instance.|
2234| callback | Pointer to the target callback, which is defined in the [CameraInput_Callbacks](_camera_input___callbacks.md) struct.|
2235
2236**Returns**
2237
2238In [Camera_ErrorCode](#camera_errorcode-1):
2239
2240- **CAMERA_OK**: The operation is successful.
2241
2242- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2243
2244
2245### OH_CameraManager_CreateCameraInput()
2246
2247```
2248Camera_ErrorCode OH_CameraManager_CreateCameraInput(Camera_Manager* cameraManager, const Camera_Device* camera, Camera_Input** cameraInput)
2249```
2250
2251**Description**
2252
2253Creates a **CameraInput** instance.
2254
2255**Since**: 11
2256
2257**Required permissions**: ohos.permission.CAMERA
2258
2259**Parameters**
2260
2261| Name| Description|
2262| -------- | -------- |
2263| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2264| camera | Pointer to the target camera, which is defined in [Camera_Device](_camera___device.md).|
2265| cameraInput | Double pointer to the [Camera_Input](#camera_input) instance if the function is successfully called.|
2266
2267**Returns**
2268
2269In [Camera_ErrorCode](#camera_errorcode-1):
2270
2271- **CAMERA_OK**: The operation is successful.
2272
2273- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2274
2275- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2276
2277
2278### OH_CameraManager_CreateCameraInput_WithPositionAndType()
2279
2280```
2281Camera_ErrorCode OH_CameraManager_CreateCameraInput_WithPositionAndType(Camera_Manager* cameraManager, Camera_Position position, Camera_Type type, Camera_Input** cameraInput)
2282```
2283
2284**Description**
2285
2286Creates a **CameraInput** instance with the specified location and type.
2287
2288**Since**: 11
2289
2290**Required permissions**: ohos.permission.CAMERA
2291
2292**Parameters**
2293
2294| Name| Description|
2295| -------- | -------- |
2296| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2297| position | Camera position, which is defined in [Camera_Position](#camera_position).|
2298| type | Camera type, which is defined in [Camera_Type](#camera_type).|
2299| cameraInput | Double pointer to the [Camera_Input](#camera_input) instance if the function is successfully called.|
2300
2301**Returns**
2302
2303In [Camera_ErrorCode](#camera_errorcode-1):
2304
2305- **CAMERA_OK**: The operation is successful.
2306
2307- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2308
2309- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2310
2311
2312### OH_CameraManager_CreateCaptureSession()
2313
2314```
2315Camera_ErrorCode OH_CameraManager_CreateCaptureSession(Camera_Manager* cameraManager,
2316 Camera_CaptureSession** captureSession)
2317```
2318
2319**Description**
2320
2321Creates a **CaptureSession** instance.
2322
2323**Since**: 11
2324
2325**Parameters**
2326
2327| Name| Description|
2328| -------- | -------- |
2329| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2330| captureSession | Double pointer to the [Camera_CaptureSession](#camera_capturesession) instance if the function is successfully called.|
2331
2332**Returns**
2333
2334In [Camera_ErrorCode](#camera_errorcode-1):
2335
2336- **CAMERA_OK**: The operation is successful.
2337
2338- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2339
2340- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2341
2342
2343### OH_CameraManager_CreateMetadataOutput()
2344
2345```
2346Camera_ErrorCode OH_CameraManager_CreateMetadataOutput(Camera_Manager* cameraManager, const Camera_MetadataObjectType* profile, Camera_MetadataOutput** metadataOutput)
2347```
2348
2349**Description**
2350
2351Creates a **MetadataOutput** instance.
2352
2353**Since**: 11
2354
2355**Parameters**
2356
2357| Name| Description|
2358| -------- | -------- |
2359| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2360| profile | Pointer to the profile, which is defined in [Camera_MetadataObjectType](#camera_metadataobjecttype).|
2361| metadataOutput | Double pointer to the [Camera_MetadataOutput](#camera_metadataoutput) instance if the function is successfully called.|
2362
2363**Returns**
2364
2365In [Camera_ErrorCode](#camera_errorcode-1):
2366
2367- **CAMERA_OK**: The operation is successful.
2368
2369- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2370
2371- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2372
2373
2374### OH_CameraManager_CreatePhotoOutput()
2375
2376```
2377Camera_ErrorCode OH_CameraManager_CreatePhotoOutput(Camera_Manager* cameraManager, const Camera_Profile* profile, const char* surfaceId, Camera_PhotoOutput** photoOutput)
2378```
2379
2380**Description**
2381
2382Creates a **PhotoOutput** instance.
2383
2384**Since**: 11
2385
2386**Parameters**
2387
2388| Name| Description|
2389| -------- | -------- |
2390| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2391| profile | Pointer to the profile, which is defined in [Camera_Profile](_camera___profile.md).|
2392| surfaceId | Pointer to the surface ID.|
2393| photoOutput | Double pointer to the [Camera_PhotoOutput](#camera_photooutput) instance if the function is successfully called.|
2394
2395**Returns**
2396
2397In [Camera_ErrorCode](#camera_errorcode-1):
2398
2399- **CAMERA_OK**: The operation is successful.
2400
2401- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2402
2403- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2404
2405
2406### OH_CameraManager_CreatePhotoOutputUsedInPreconfig()
2407
2408```
2409Camera_ErrorCode OH_CameraManager_CreatePhotoOutputUsedInPreconfig(Camera_Manager* cameraManager, const char* surfaceId, Camera_PhotoOutput** photoOutput)
2410```
2411
2412**Description**
2413
2414Creates a **PhotoOutput** instance to be used in a preconfiguration stream.
2415
2416**Since**: 12
2417
2418**Parameters**
2419
2420| Name| Description|
2421| -------- | -------- |
2422| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2423| surfaceId | Pointer to the surface ID.|
2424| photoOutput | Double pointer to the [Camera_PhotoOutput](#camera_photooutput) instance if the function is successfully called.|
2425
2426**Returns**
2427
2428In [Camera_ErrorCode](#camera_errorcode-1):
2429
2430- **CAMERA_OK**: The operation is successful.
2431
2432- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2433
2434- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2435
2436
2437### OH_CameraManager_CreatePhotoOutputWithoutSurface()
2438
2439```
2440Camera_ErrorCode OH_CameraManager_CreatePhotoOutputWithoutSurface(Camera_Manager *cameraManager, const Camera_Profile *profile, Camera_PhotoOutput **photoOutput)
2441```
2442
2443**Description**
2444
2445Creates a **PhotoOutput** instance. **surfaceId** is not required in this function.
2446
2447**Since**: 12
2448
2449**Parameters**
2450
2451| Name| Description|
2452| -------- | -------- |
2453| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2454| profile | Pointer to the profile, which is defined in [Camera_Profile](_camera___profile.md).|
2455| photoOutput | Double pointer to the [Camera_PhotoOutput](#camera_photooutput) instance if the function is successfully called.|
2456
2457**Returns**
2458
2459In [Camera_ErrorCode](#camera_errorcode-1):
2460
2461- **CAMERA_OK**: The operation is successful.
2462
2463- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2464
2465- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2466
2467
2468### OH_CameraManager_CreatePreviewOutput()
2469
2470```
2471Camera_ErrorCode OH_CameraManager_CreatePreviewOutput(Camera_Manager* cameraManager, const Camera_Profile* profile, const char* surfaceId, Camera_PreviewOutput** previewOutput)
2472```
2473
2474**Description**
2475
2476Creates a **PreviewOutput** instance.
2477
2478**Since**: 11
2479
2480**Parameters**
2481
2482| Name| Description|
2483| -------- | -------- |
2484| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2485| profile | Pointer to the profile, which is defined in [Camera_Profile](_camera___profile.md).|
2486| surfaceId | Pointer to the surface ID.|
2487| previewOutput | Double pointer to the [Camera_PreviewOutput](#camera_previewoutput) instance if the function is successfully called.|
2488
2489**Returns**
2490
2491In [Camera_ErrorCode](#camera_errorcode-1):
2492
2493- **CAMERA_OK**: The operation is successful.
2494
2495- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2496
2497- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2498
2499
2500### OH_CameraManager_CreatePreviewOutputUsedInPreconfig()
2501
2502```
2503Camera_ErrorCode OH_CameraManager_CreatePreviewOutputUsedInPreconfig(Camera_Manager* cameraManager, const char* surfaceId, Camera_PreviewOutput** previewOutput)
2504```
2505
2506**Description**
2507
2508Creates a **PreviewOutput** instance to be used in a preconfiguration stream.
2509
2510**Since**: 12
2511
2512**Parameters**
2513
2514| Name| Description|
2515| -------- | -------- |
2516| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2517| surfaceId | Pointer to the surface ID.|
2518| previewOutput | Double pointer to the [Camera_PreviewOutput](#camera_previewoutput) instance if the function is successfully called.|
2519
2520**Returns**
2521
2522In [Camera_ErrorCode](#camera_errorcode-1):
2523
2524- **CAMERA_OK**: The operation is successful.
2525
2526- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2527
2528- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2529
2530
2531### OH_CameraManager_CreateVideoOutput()
2532
2533```
2534Camera_ErrorCode OH_CameraManager_CreateVideoOutput(Camera_Manager* cameraManager, const Camera_VideoProfile* profile, const char* surfaceId, Camera_VideoOutput** videoOutput)
2535```
2536
2537**Description**
2538
2539Creates a **VideoOutput** instance.
2540
2541**Since**: 11
2542
2543**Parameters**
2544
2545| Name| Description|
2546| -------- | -------- |
2547| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2548| profile | Pointer to the profile, which is defined in the [Camera_VideoProfile](_camera___video_profile.md) struct.|
2549| surfaceId | Pointer to the surface ID.|
2550| videoOutput | Double pointer to the [Camera_VideoOutput](#camera_videooutput) instance if the function is successfully called.|
2551
2552**Returns**
2553
2554In [Camera_ErrorCode](#camera_errorcode-1):
2555
2556- **CAMERA_OK**: The operation is successful.
2557
2558- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2559
2560- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2561
2562
2563### OH_CameraManager_CreateVideoOutputUsedInPreconfig()
2564
2565```
2566Camera_ErrorCode OH_CameraManager_CreateVideoOutputUsedInPreconfig(Camera_Manager* cameraManager, const char* surfaceId, Camera_VideoOutput** videoOutput)
2567```
2568
2569**Description**
2570
2571Creates a **VideoOutput** instance to be used in a preconfiguration stream.
2572
2573**Since**: 12
2574
2575**Parameters**
2576
2577| Name| Description|
2578| -------- | -------- |
2579| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2580| surfaceId | Pointer to the surface ID.|
2581| videoOutput | Double pointer to the [Camera_VideoOutput](#camera_videooutput) instance if the function is successfully called.|
2582
2583**Returns**
2584
2585In [Camera_ErrorCode](#camera_errorcode-1):
2586
2587- **CAMERA_OK**: The operation is successful.
2588
2589- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2590
2591- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2592
2593
2594### OH_CameraManager_DeleteSceneModes()
2595
2596```
2597Camera_ErrorCode OH_CameraManager_DeleteSceneModes(Camera_Manager* cameraManager, Camera_SceneMode* sceneModes)
2598```
2599
2600**Description**
2601
2602Deletes scene modes.
2603
2604**Since**: 12
2605
2606**Parameters**
2607
2608| Name| Description|
2609| -------- | -------- |
2610| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2611| sceneModes | Target scene modes, which are defined in [Camera_SceneMode](#camera_scenemode).|
2612
2613**Returns**
2614
2615In [Camera_ErrorCode](#camera_errorcode-1):
2616
2617- **CAMERA_OK**: The operation is successful.
2618
2619- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2620
2621
2622### OH_CameraManager_DeleteSupportedCameraOutputCapability()
2623
2624```
2625Camera_ErrorCode OH_CameraManager_DeleteSupportedCameraOutputCapability(Camera_Manager* cameraManager, Camera_OutputCapability* cameraOutputCapability)
2626```
2627
2628**Description**
2629
2630Deletes the output capability supported by a camera.
2631
2632**Since**: 11
2633
2634**Parameters**
2635
2636| Name| Description|
2637| -------- | -------- |
2638| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2639| cameraOutputCapability | Pointer to the output capability, which is defined in the [Camera_OutputCapability](_camera___output_capability.md) struct.|
2640
2641**Returns**
2642
2643In [Camera_ErrorCode](#camera_errorcode-1):
2644
2645- **CAMERA_OK**: The operation is successful.
2646
2647- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2648
2649
2650### OH_CameraManager_DeleteSupportedCameras()
2651
2652```
2653Camera_ErrorCode OH_CameraManager_DeleteSupportedCameras(Camera_Manager* cameraManager, Camera_Device* cameras, uint32_t size)
2654```
2655
2656**Description**
2657
2658Deletes supported cameras.
2659
2660**Since**: 11
2661
2662**Parameters**
2663
2664| Name| Description|
2665| -------- | -------- |
2666| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2667| cameras | Pointer to a list of cameras, which are defined in [Camera_Device](_camera___device.md).|
2668
2669**Returns**
2670
2671In [Camera_ErrorCode](#camera_errorcode-1):
2672
2673- **CAMERA_OK**: The operation is successful.
2674
2675- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2676
2677
2678### OH_CameraManager_GetSupportedCameraOutputCapability()
2679
2680```
2681Camera_ErrorCode OH_CameraManager_GetSupportedCameraOutputCapability(Camera_Manager* cameraManager, const Camera_Device* camera, Camera_OutputCapability** cameraOutputCapability)
2682```
2683
2684**Description**
2685
2686Obtains the output capability supported by a camera.
2687
2688**Since**: 11
2689
2690**Parameters**
2691
2692| Name| Description|
2693| -------- | -------- |
2694| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2695| cameras | Pointer to a list of cameras, which are defined in [Camera_Device](_camera___device.md).|
2696| cameraOutputCapability | Double pointer to the output capability, which is defined in [Camera_OutputCapability](_camera___output_capability.md), if the function is successfully called.|
2697
2698**Returns**
2699
2700In [Camera_ErrorCode](#camera_errorcode-1):
2701
2702- **CAMERA_OK**: The operation is successful.
2703
2704- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2705
2706
2707### OH_CameraManager_GetSupportedCameraOutputCapabilityWithSceneMode()
2708
2709```
2710Camera_ErrorCode OH_CameraManager_GetSupportedCameraOutputCapabilityWithSceneMode(Camera_Manager* cameraManager, const Camera_Device* camera, Camera_SceneMode sceneMode, Camera_OutputCapability** cameraOutputCapability)
2711```
2712
2713**Description**
2714
2715Obtains the output capability supported by a camera in the specified mode.
2716
2717**Since**: 12
2718
2719**Parameters**
2720
2721| Name| Description|
2722| -------- | -------- |
2723| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2724| camera | Pointer to a camera, which is defined in [Camera_Device](_camera___device.md).|
2725| sceneMode | Scene mode, which is defined in [Camera_SceneMode](#camera_scenemode).|
2726| cameraOutputCapability | Double pointer to output capability, which is defined in [Camera_OutputCapability](_camera___output_capability.md), if the function is successfully called.|
2727
2728**Returns**
2729
2730In [Camera_ErrorCode](#camera_errorcode-1):
2731
2732- **CAMERA_OK**: The operation is successful.
2733
2734- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2735
2736- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2737
2738
2739### OH_CameraManager_GetSupportedCameras()
2740
2741```
2742Camera_ErrorCode OH_CameraManager_GetSupportedCameras(Camera_Manager* cameraManager, Camera_Device** cameras, uint32_t* size)
2743```
2744
2745**Description**
2746
2747Obtains supported cameras.
2748
2749**Since**: 11
2750
2751**Parameters**
2752
2753| Name| Description|
2754| -------- | -------- |
2755| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2756| cameras | Double pointer to the list of cameras, which is defined in [Camera_Device](_camera___device.md), if the function is successfully called.|
2757| size | Pointer to the size of the list of cameras.|
2758
2759**Returns**
2760
2761In [Camera_ErrorCode](#camera_errorcode-1):
2762
2763- **CAMERA_OK**: The operation is successful.
2764
2765- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2766
2767
2768### OH_CameraManager_GetSupportedSceneModes()
2769
2770```
2771Camera_ErrorCode OH_CameraManager_GetSupportedSceneModes(Camera_Device* camera, Camera_SceneMode** sceneModes, uint32_t* size)
2772```
2773
2774**Description**
2775
2776Obtains the scene modes supported by a camera.
2777
2778**Since**: 12
2779
2780**Parameters**
2781
2782| Name| Description|
2783| -------- | -------- |
2784| camera | Pointer to a camera, which is defined in [Camera_Device](_camera___device.md).|
2785| sceneModes | Double pointer to the list of scene modes, which are defined in [Camera_SceneMode](#camera_scenemode), if the function is successfully called.|
2786| size | Pointer to the size of the list of scene modes.|
2787
2788**Returns**
2789
2790In [Camera_ErrorCode](#camera_errorcode-1):
2791
2792- **CAMERA_OK**: The operation is successful.
2793
2794- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2795
2796- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2797
2798
2799### OH_CameraManager_IsCameraMuted()
2800
2801```
2802Camera_ErrorCode OH_CameraManager_IsCameraMuted(Camera_Manager* cameraManager, bool* isCameraMuted)
2803```
2804
2805**Description**
2806
2807Checks whether a camera is muted.
2808
2809**Since**: 11
2810
2811**Parameters**
2812
2813| Name| Description|
2814| -------- | -------- |
2815| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2816| isCameraMuted | Pointer to the result that specifies whether the camera is muted if the function is successfully called.|
2817
2818**Returns**
2819
2820In [Camera_ErrorCode](#camera_errorcode-1):
2821
2822- **CAMERA_OK**: The operation is successful.
2823
2824- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2825
2826
2827### OH_CameraManager_IsTorchSupported()
2828
2829```
2830Camera_ErrorCode OH_CameraManager_IsTorchSupported(Camera_Manager* cameraManager, bool* isTorchSupported)
2831```
2832
2833**Description**
2834
2835Checks whether the device supports the flashlight.
2836
2837**Since**: 12
2838
2839**Parameters**
2840
2841| Name| Description|
2842| -------- | -------- |
2843| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2844| isTorchSupported | Pointer to the result indicating whether the device supports the flashlight.|
2845
2846**Returns**
2847
2848In [Camera_ErrorCode](#camera_errorcode-1):
2849
2850- **CAMERA_OK**: The operation is successful.
2851
2852- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2853
2854
2855### OH_CameraManager_IsTorchSupportedByTorchMode()
2856
2857```
2858Camera_ErrorCode OH_CameraManager_IsTorchSupportedByTorchMode(Camera_Manager* cameraManager, Camera_TorchMode torchMode, bool* isTorchSupported)
2859```
2860
2861**Description**
2862
2863Checks whether the device supports the specified flashlight mode.
2864
2865**Since**: 12
2866
2867**Parameters**
2868
2869| Name| Description|
2870| -------- | -------- |
2871| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2872| torchMode | Target flashlight mode, which is defined in [Camera_TorchMode](#camera_torchmode-1).|
2873| isTorchSupported | Pointer to the result indicating whether the device supports the flashlight mode.|
2874
2875**Returns**
2876
2877In [Camera_ErrorCode](#camera_errorcode-1):
2878
2879- **CAMERA_OK**: The operation is successful.
2880
2881- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2882
2883- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2884
2885
2886### OH_CameraManager_RegisterCallback()
2887
2888```
2889Camera_ErrorCode OH_CameraManager_RegisterCallback(Camera_Manager* cameraManager, CameraManager_Callbacks* callback)
2890```
2891
2892**Description**
2893
2894Registers a callback to listen for camera status changes.
2895
2896**Since**: 11
2897
2898**Parameters**
2899
2900| Name| Description|
2901| -------- | -------- |
2902| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2903| callback | Pointer to the target callback, which is defined in the [CameraManager_Callbacks](_camera_manager___callbacks.md) struct.|
2904
2905**Returns**
2906
2907In [Camera_ErrorCode](#camera_errorcode-1):
2908
2909- **CAMERA_OK**: The operation is successful.
2910
2911- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2912
2913
2914### OH_CameraManager_RegisterTorchStatusCallback()
2915
2916```
2917Camera_ErrorCode OH_CameraManager_RegisterTorchStatusCallback(Camera_Manager* cameraManager, OH_CameraManager_TorchStatusCallback torchStatusCallback)
2918```
2919
2920**Description**
2921
2922Registers a callback to listen for flashlight status changes.
2923
2924**Since**: 12
2925
2926**Parameters**
2927
2928| Name| Description|
2929| -------- | -------- |
2930| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2931| torchStatusCallback | Target callback, which is defined in [OH_CameraManager_TorchStatusCallback](#oh_cameramanager_torchstatuscallback).|
2932
2933**Returns**
2934
2935In [Camera_ErrorCode](#camera_errorcode-1):
2936
2937- **CAMERA_OK**: The operation is successful.
2938
2939- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2940
2941
2942### OH_CameraManager_SetTorchMode()
2943
2944```
2945Camera_ErrorCode OH_CameraManager_SetTorchMode(Camera_Manager* cameraManager, Camera_TorchMode torchMode)
2946```
2947
2948**Description**
2949
2950Sets a flashlight mode.
2951
2952**Since**: 12
2953
2954**Parameters**
2955
2956| Name| Description|
2957| -------- | -------- |
2958| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2959| torchMode | Target flashlight mode, which is defined in [Camera_TorchMode](#camera_torchmode).|
2960
2961**Returns**
2962
2963In [Camera_ErrorCode](#camera_errorcode-1):
2964
2965- **CAMERA_OK**: The operation is successful.
2966
2967- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2968
2969- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
2970
2971
2972### OH_CameraManager_UnregisterCallback()
2973
2974```
2975Camera_ErrorCode OH_CameraManager_UnregisterCallback(Camera_Manager* cameraManager, CameraManager_Callbacks* callback)
2976```
2977
2978**Description**
2979
2980Unregisters the callback used to listen for camera status changes.
2981
2982**Since**: 11
2983
2984**Parameters**
2985
2986| Name| Description|
2987| -------- | -------- |
2988| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
2989| callback | Pointer to the target callback, which is defined in the [CameraManager_Callbacks](_camera_manager___callbacks.md) struct.|
2990
2991**Returns**
2992
2993In [Camera_ErrorCode](#camera_errorcode-1):
2994
2995- **CAMERA_OK**: The operation is successful.
2996
2997- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
2998
2999
3000### OH_CameraManager_UnregisterTorchStatusCallback()
3001
3002```
3003Camera_ErrorCode OH_CameraManager_UnregisterTorchStatusCallback(Camera_Manager* cameraManager, OH_CameraManager_TorchStatusCallback torchStatusCallback)
3004```
3005
3006**Description**
3007
3008Unregisters the callback used to listen for flashlight status changes.
3009
3010**Since**: 12
3011
3012**Parameters**
3013
3014| Name| Description|
3015| -------- | -------- |
3016| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.|
3017| torchStatusCallback | Target callback, which is defined in [OH_CameraManager_TorchStatusCallback](#oh_cameramanager_torchstatuscallback).|
3018
3019**Returns**
3020
3021In [Camera_ErrorCode](#camera_errorcode-1):
3022
3023- **CAMERA_OK**: The operation is successful.
3024
3025- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3026
3027
3028
3029### OH_CaptureSession_AddInput()
3030
3031```
3032Camera_ErrorCode OH_CaptureSession_AddInput(Camera_CaptureSession* session, Camera_Input* cameraInput)
3033```
3034
3035**Description**
3036
3037Adds a **CameraInput** instance to a session.
3038
3039**Since**: 11
3040
3041**Parameters**
3042
3043| Name| Description|
3044| -------- | -------- |
3045| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3046| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.|
3047
3048**Returns**
3049
3050In [Camera_ErrorCode](#camera_errorcode-1):
3051
3052- **CAMERA_OK**: The operation is successful.
3053
3054- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3055
3056- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed.
3057
3058
3059### OH_CaptureSession_AddMetadataOutput()
3060
3061```
3062Camera_ErrorCode OH_CaptureSession_AddMetadataOutput(Camera_CaptureSession* session, Camera_MetadataOutput* metadataOutput)
3063```
3064
3065**Description**
3066
3067Adds a **MetadataOutput** instance to a session.
3068
3069**Since**: 11
3070
3071**Parameters**
3072
3073| Name| Description|
3074| -------- | -------- |
3075| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3076| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.|
3077
3078**Returns**
3079
3080In [Camera_ErrorCode](#camera_errorcode-1):
3081
3082- **CAMERA_OK**: The operation is successful.
3083
3084- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3085
3086- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed.
3087
3088
3089### OH_CaptureSession_AddPhotoOutput()
3090
3091```
3092Camera_ErrorCode OH_CaptureSession_AddPhotoOutput(Camera_CaptureSession* session, Camera_PhotoOutput* photoOutput)
3093```
3094
3095**Description**
3096
3097Adds a **PhotoOutput** instance to a session.
3098
3099**Since**: 11
3100
3101**Parameters**
3102
3103| Name| Description|
3104| -------- | -------- |
3105| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3106| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
3107
3108**Returns**
3109
3110In [Camera_ErrorCode](#camera_errorcode-1):
3111
3112- **CAMERA_OK**: The operation is successful.
3113
3114- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3115
3116- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed.
3117
3118
3119### OH_CaptureSession_AddPreviewOutput()
3120
3121```
3122Camera_ErrorCode OH_CaptureSession_AddPreviewOutput(Camera_CaptureSession* session, Camera_PreviewOutput* previewOutput)
3123```
3124
3125**Description**
3126
3127Adds a **PreviewOutput** instance to a session.
3128
3129**Since**: 11
3130
3131**Parameters**
3132
3133| Name| Description|
3134| -------- | -------- |
3135| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3136| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.|
3137
3138**Returns**
3139
3140In [Camera_ErrorCode](#camera_errorcode-1):
3141
3142- **CAMERA_OK**: The operation is successful.
3143
3144- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3145
3146- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed.
3147
3148
3149### OH_CaptureSession_AddSecureOutput()
3150
3151```
3152Camera_ErrorCode OH_CaptureSession_AddSecureOutput(Camera_CaptureSession* session, Camera_PreviewOutput* previewOutput)
3153```
3154
3155**Description**
3156
3157Marks a preview output stream as secure output.
3158
3159**Since**: 12
3160
3161**Parameters**
3162
3163| Name| Description|
3164| -------- | -------- |
3165| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3166| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.|
3167
3168**Returns**
3169
3170In [Camera_ErrorCode](#camera_errorcode-1):
3171
3172- **CAMERA_OK**: The operation is successful.
3173
3174- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3175
3176- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed.
3177
3178- **CAMERA_SESSION_CONFIG_LOCKED**: The session configuration is locked.
3179
3180
3181### OH_CaptureSession_AddVideoOutput()
3182
3183```
3184Camera_ErrorCode OH_CaptureSession_AddVideoOutput(Camera_CaptureSession* session, Camera_VideoOutput* videoOutput)
3185```
3186
3187**Description**
3188
3189Adds a **VideoOutput** instance to a session.
3190
3191**Since**: 11
3192
3193**Parameters**
3194
3195| Name| Description|
3196| -------- | -------- |
3197| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3198| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.|
3199
3200**Returns**
3201
3202In [Camera_ErrorCode](#camera_errorcode-1):
3203
3204- **CAMERA_OK**: The operation is successful.
3205
3206- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3207
3208- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed.
3209
3210
3211### OH_CaptureSession_BeginConfig()
3212
3213```
3214Camera_ErrorCode OH_CaptureSession_BeginConfig(Camera_CaptureSession* session)
3215```
3216
3217**Description**
3218
3219Starts the configuration for a capture session.
3220
3221**Since**: 11
3222
3223**Parameters**
3224
3225| Name| Description|
3226| -------- | -------- |
3227| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3228
3229**Returns**
3230
3231In [Camera_ErrorCode](#camera_errorcode-1):
3232
3233- **CAMERA_OK**: The operation is successful.
3234
3235- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3236
3237- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed.
3238
3239
3240### OH_CaptureSession_CanAddInput()
3241
3242```
3243Camera_ErrorCode OH_CaptureSession_CanAddInput(Camera_CaptureSession* session, Camera_Input* cameraInput, bool* isSuccessful)
3244```
3245
3246**Description**
3247
3248Checks whether a **CameraInput** instance can be added to a session.
3249
3250**Since**: 12
3251
3252**Parameters**
3253
3254| Name| Description|
3255| -------- | -------- |
3256| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3257| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.|
3258| isSuccessful | Pointer to the result indicating whether the **CameraInput** instance can be added to the session.|
3259
3260**Returns**
3261
3262In [Camera_ErrorCode](#camera_errorcode-1):
3263
3264- **CAMERA_OK**: The operation is successful.
3265
3266- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3267
3268
3269### OH_CaptureSession_CanAddPhotoOutput()
3270
3271```
3272Camera_ErrorCode OH_CaptureSession_CanAddPhotoOutput(Camera_CaptureSession* session, Camera_PhotoOutput* cameraOutput, bool* isSuccessful)
3273```
3274
3275**Description**
3276
3277Checks whether a **PhotoOutput** instance can be added to a session.
3278
3279**Since**: 12
3280
3281**Parameters**
3282
3283| Name| Description|
3284| -------- | -------- |
3285| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3286| cameraOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
3287| isSuccessful | Pointer to the result indicating whether the **PhotoOutput** instance can be added to the session.|
3288
3289**Returns**
3290
3291In [Camera_ErrorCode](#camera_errorcode-1):
3292
3293- **CAMERA_OK**: The operation is successful.
3294
3295- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3296
3297
3298### OH_CaptureSession_CanAddPreviewOutput()
3299
3300```
3301Camera_ErrorCode OH_CaptureSession_CanAddPreviewOutput(Camera_CaptureSession* session, Camera_PreviewOutput* cameraOutput, bool* isSuccessful)
3302```
3303
3304**Description**
3305
3306Checks whether a **PreviewOutput** instance can be added to a session.
3307
3308**Since**: 12
3309
3310**Parameters**
3311
3312| Name| Description|
3313| -------- | -------- |
3314| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3315| cameraOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.|
3316| isSuccessful | Pointer to the result indicating whether the **PreviewOutput** instance can be added to the session.|
3317
3318**Returns**
3319
3320In [Camera_ErrorCode](#camera_errorcode-1):
3321
3322- **CAMERA_OK**: The operation is successful.
3323
3324- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3325
3326
3327### OH_CaptureSession_CanAddVideoOutput()
3328
3329```
3330Camera_ErrorCode OH_CaptureSession_CanAddVideoOutput(Camera_CaptureSession* session, Camera_VideoOutput* cameraOutput, bool* isSuccessful)
3331```
3332
3333**Description**
3334
3335Checks whether a **VideoOutput** instance can be added to a session.
3336
3337**Since**: 12
3338
3339**Parameters**
3340
3341| Name| Description|
3342| -------- | -------- |
3343| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3344| cameraOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.|
3345| isSuccessful | Pointer to the result indicating whether the **VideoOutput** instance can be added to the session.|
3346
3347**Returns**
3348
3349In [Camera_ErrorCode](#camera_errorcode-1):
3350
3351- **CAMERA_OK**: The operation is successful.
3352
3353- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3354
3355
3356### OH_CaptureSession_CanPreconfig()
3357
3358```
3359Camera_ErrorCode OH_CaptureSession_CanPreconfig(Camera_CaptureSession* session, Camera_PreconfigType preconfigType, bool* canPreconfig)
3360```
3361
3362**Description**
3363
3364Checks whether a preconfigured resolution type is supported.
3365
3366**Since**: 12
3367
3368**Parameters**
3369
3370| Name| Description|
3371| -------- | -------- |
3372| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3373| preconfigType | Target resolution type, which is defined in [Camera_PreconfigType](#camera_preconfigtype).|
3374| canPreconfig | Pointer to the result indicating whether the preconfigured resolution type is supported.|
3375
3376**Returns**
3377
3378In [Camera_ErrorCode](#camera_errorcode-1):
3379
3380- **CAMERA_OK**: The operation is successful.
3381
3382- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3383
3384
3385### OH_CaptureSession_CanPreconfigWithRatio()
3386
3387```
3388Camera_ErrorCode OH_CaptureSession_CanPreconfigWithRatio(Camera_CaptureSession* session, Camera_PreconfigType preconfigType, Camera_PreconfigRatio preconfigRatio, bool* canPreconfig)
3389```
3390
3391**Description**
3392
3393Checks whether a preconfigured resolution type with an aspect ratio is supported.
3394
3395**Since**: 12
3396
3397**Parameters**
3398
3399| Name| Description|
3400| -------- | -------- |
3401| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3402| preconfigType | Target resolution type, which is defined in [Camera_PreconfigType](#camera_preconfigtype).|
3403| preconfigRatio | Target aspect ratio, which is defined in [Camera_PreconfigRatio](#camera_preconfigratio).|
3404| canPreconfig | Pointer to the result indicating whether the preconfigured resolution type is supported.|
3405
3406**Returns**
3407
3408In [Camera_ErrorCode](#camera_errorcode-1):
3409
3410- **CAMERA_OK**: The operation is successful.
3411
3412- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3413
3414
3415### OH_CaptureSession_CommitConfig()
3416
3417```
3418Camera_ErrorCode OH_CaptureSession_CommitConfig(Camera_CaptureSession* session)
3419```
3420
3421**Description**
3422
3423Commits the configuration for a capture session.
3424
3425**Since**: 11
3426
3427**Parameters**
3428
3429| Name| Description|
3430| -------- | -------- |
3431| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3432
3433**Returns**
3434
3435In [Camera_ErrorCode](#camera_errorcode-1):
3436
3437- **CAMERA_OK**: The operation is successful.
3438
3439- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3440
3441- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed.
3442
3443- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
3444
3445
3446### OH_CaptureSession_DeleteColorSpaces()
3447
3448```
3449Camera_ErrorCode OH_CaptureSession_DeleteColorSpaces(Camera_CaptureSession* session, OH_NativeBuffer_ColorSpace* colorSpace)
3450```
3451
3452**Description**
3453
3454Deletes color spaces.
3455
3456**Since**: 12
3457
3458**Parameters**
3459
3460| Name| Description|
3461| -------- | -------- |
3462| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3463| colorSpace | Pointer to the list of color spaces, which are defined in [OH_NativeBuffer_ColorSpace](../apis-arkgraphics2d/_o_h___native_buffer.md#oh_nativebuffer_colorspace-1).|
3464
3465**Returns**
3466
3467In [Camera_ErrorCode](#camera_errorcode-1):
3468
3469- **CAMERA_OK**: The operation is successful.
3470
3471- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3472
3473
3474### OH_CaptureSession_GetActiveColorSpace()
3475
3476```
3477Camera_ErrorCode OH_CaptureSession_GetActiveColorSpace(Camera_CaptureSession* session, OH_NativeBuffer_ColorSpace* colorSpace)
3478```
3479
3480**Description**
3481
3482Obtains the active color space.
3483
3484**Since**: 12
3485
3486**Parameters**
3487
3488| Name| Description|
3489| -------- | -------- |
3490| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3491| colorSpace | Pointer to the active color space, which is defined in [OH_NativeBuffer_ColorSpace](../apis-arkgraphics2d/_o_h___native_buffer.md#oh_nativebuffer_colorspace-1).|
3492
3493**Returns**
3494
3495In [Camera_ErrorCode](#camera_errorcode-1):
3496
3497- **CAMERA_OK**: The operation is successful.
3498
3499- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3500
3501- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
3502
3503
3504### OH_CaptureSession_GetExposureBias()
3505
3506```
3507Camera_ErrorCode OH_CaptureSession_GetExposureBias(Camera_CaptureSession* session, float* exposureBias)
3508```
3509
3510**Description**
3511
3512Obtains the exposure compensation value in use.
3513
3514**Since**: 11
3515
3516**Parameters**
3517
3518| Name| Description|
3519| -------- | -------- |
3520| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3521| exposureBias | Pointer to the exposure compensation value.|
3522
3523**Returns**
3524
3525In [Camera_ErrorCode](#camera_errorcode-1):
3526
3527- **CAMERA_OK**: The operation is successful.
3528
3529- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3530
3531- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
3532
3533
3534### OH_CaptureSession_GetExposureBiasRange()
3535
3536```
3537Camera_ErrorCode OH_CaptureSession_GetExposureBiasRange(Camera_CaptureSession* session, float* minExposureBias, float* maxExposureBias, float* step)
3538```
3539
3540**Description**
3541
3542Obtains the exposure compensation values of the device.
3543
3544**Since**: 11
3545
3546**Parameters**
3547
3548| Name| Description|
3549| -------- | -------- |
3550| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3551| minExposureBias | Pointer to the minimum exposure compensation value.|
3552| maxExposureBias | Pointer to the maximum exposure compensation value.|
3553| step | Pointer to the exposure compensation step.|
3554
3555**Returns**
3556
3557In [Camera_ErrorCode](#camera_errorcode-1):
3558
3559- **CAMERA_OK**: The operation is successful.
3560
3561- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3562
3563- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
3564
3565
3566### OH_CaptureSession_GetExposureMode()
3567
3568```
3569Camera_ErrorCode OH_CaptureSession_GetExposureMode(Camera_CaptureSession* session, Camera_ExposureMode* exposureMode)
3570```
3571
3572**Description**
3573
3574Obtains the exposure mode in use.
3575
3576**Since**: 11
3577
3578**Parameters**
3579
3580| Name| Description|
3581| -------- | -------- |
3582| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3583| exposureMode | Pointer to the exposure mode, which is defined in the [Camera_ExposureMode](#camera_exposuremode) struct.|
3584
3585**Returns**
3586
3587In [Camera_ErrorCode](#camera_errorcode-1):
3588
3589- **CAMERA_OK**: The operation is successful.
3590
3591- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3592
3593- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
3594
3595
3596### OH_CaptureSession_GetExposureValue()
3597
3598```
3599Camera_ErrorCode OH_CaptureSession_GetExposureValue(Camera_CaptureSession* session, float* exposureValue)
3600```
3601
3602**Description**
3603
3604Obtains the exposure value.
3605
3606**Since**: 12
3607
3608**Parameters**
3609
3610| Name| Description|
3611| -------- | -------- |
3612| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3613| exposureValue | Pointer to the exposure value.|
3614
3615**Returns**
3616
3617In [Camera_ErrorCode](#camera_errorcode-1):
3618
3619- **CAMERA_OK**: The operation is successful.
3620
3621- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3622
3623- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
3624
3625
3626### OH_CaptureSession_GetFlashMode()
3627
3628```
3629Camera_ErrorCode OH_CaptureSession_GetFlashMode(Camera_CaptureSession* session, Camera_FlashMode* flashMode)
3630```
3631
3632**Description**
3633
3634Obtains the flash mode in use.
3635
3636**Since**: 11
3637
3638**Parameters**
3639
3640| Name| Description|
3641| -------- | -------- |
3642| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3643| flashMode | Pointer to the flash mode, which is defined in the [Camera_FlashMode](#camera_flashmode) struct.|
3644
3645**Returns**
3646
3647In [Camera_ErrorCode](#camera_errorcode-1):
3648
3649- **CAMERA_OK**: The operation is successful.
3650
3651- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3652
3653- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
3654
3655
3656### OH_CaptureSession_GetFocalLength()
3657
3658```
3659Camera_ErrorCode OH_CaptureSession_GetFocalLength(Camera_CaptureSession* session, float* focalLength)
3660```
3661
3662**Description**
3663
3664Obtains the current focal length.
3665
3666**Since**: 12
3667
3668**Parameters**
3669
3670| Name| Description|
3671| -------- | -------- |
3672| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3673| focalLength | Pointer to the focal length.|
3674
3675**Returns**
3676
3677In [Camera_ErrorCode](#camera_errorcode-1):
3678
3679- **CAMERA_OK**: The operation is successful.
3680
3681- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3682
3683- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
3684
3685
3686### OH_CaptureSession_GetFocusMode()
3687
3688```
3689Camera_ErrorCode OH_CaptureSession_GetFocusMode(Camera_CaptureSession* session, Camera_FocusMode* focusMode)
3690```
3691
3692**Description**
3693
3694Obtains the focus mode in use.
3695
3696**Since**: 11
3697
3698**Parameters**
3699
3700| Name| Description|
3701| -------- | -------- |
3702| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3703| exposureBias | Pointer to the focus mode, which is defined in the [Camera_FocusMode](#camera_focusmode) struct.|
3704
3705**Returns**
3706
3707In [Camera_ErrorCode](#camera_errorcode-1):
3708
3709- **CAMERA_OK**: The operation is successful.
3710
3711- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3712
3713- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
3714
3715
3716### OH_CaptureSession_GetFocusPoint()
3717
3718```
3719Camera_ErrorCode OH_CaptureSession_GetFocusPoint(Camera_CaptureSession* session, Camera_Point* focusPoint)
3720```
3721
3722**Description**
3723
3724Obtains the focal point in use.
3725
3726**Since**: 11
3727
3728**Parameters**
3729
3730| Name| Description|
3731| -------- | -------- |
3732| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3733| focusPoint | Pointer to the focal point, which is defined in the [Camera_Point](_camera___point.md) struct.|
3734
3735**Returns**
3736
3737In [Camera_ErrorCode](#camera_errorcode-1):
3738
3739- **CAMERA_OK**: The operation is successful.
3740
3741- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3742
3743- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
3744
3745
3746### OH_CaptureSession_GetMeteringPoint()
3747
3748```
3749Camera_ErrorCode OH_CaptureSession_GetMeteringPoint(Camera_CaptureSession* session, Camera_Point* point)
3750```
3751
3752**Description**
3753
3754Obtains the metering point in use.
3755
3756**Since**: 11
3757
3758**Parameters**
3759
3760| Name| Description|
3761| -------- | -------- |
3762| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3763| point | Pointer to the metering point, which is defined in the [Camera_Point](_camera___point.md) struct.|
3764
3765**Returns**
3766
3767In [Camera_ErrorCode](#camera_errorcode-1):
3768
3769- **CAMERA_OK**: The operation is successful.
3770
3771- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3772
3773- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
3774
3775
3776### OH_CaptureSession_GetSupportedColorSpaces()
3777
3778```
3779Camera_ErrorCode OH_CaptureSession_GetSupportedColorSpaces(Camera_CaptureSession* session, OH_NativeBuffer_ColorSpace** colorSpace, uint32_t* size)
3780```
3781
3782**Description**
3783
3784Obtains the supported color spaces.
3785
3786**Since**: 12
3787
3788**Parameters**
3789
3790| Name| Description|
3791| -------- | -------- |
3792| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3793| colorSpace | Double pointer to the list of color spaces, which are defined in [OH_NativeBuffer_ColorSpace](../apis-arkgraphics2d/_o_h___native_buffer.md#oh_nativebuffer_colorspace-1), if the function is successfully called.|
3794| size | Pointer to the size of the list of color spaces.|
3795
3796**Returns**
3797
3798In [Camera_ErrorCode](#camera_errorcode-1):
3799
3800- **CAMERA_OK**: The operation is successful.
3801
3802- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3803
3804- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
3805
3806
3807### OH_CaptureSession_GetVideoStabilizationMode()
3808
3809```
3810Camera_ErrorCode OH_CaptureSession_GetVideoStabilizationMode(Camera_CaptureSession* session, Camera_VideoStabilizationMode* mode)
3811```
3812
3813**Description**
3814
3815Obtains the video stabilization mode in use.
3816
3817**Since**: 11
3818
3819**Parameters**
3820
3821| Name| Description|
3822| -------- | -------- |
3823| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3824| mode | Pointer to the video stabilization mode, which is defined in the [Camera_VideoStabilizationMode](#camera_videostabilizationmode) struct.|
3825
3826**Returns**
3827
3828In [Camera_ErrorCode](#camera_errorcode-1):
3829
3830- **CAMERA_OK**: The operation is successful.
3831
3832- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3833
3834- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
3835
3836
3837### OH_CaptureSession_GetZoomRatio()
3838
3839```
3840Camera_ErrorCode OH_CaptureSession_GetZoomRatio(Camera_CaptureSession* session, float* zoom)
3841```
3842
3843**Description**
3844
3845Obtains the zoom ratio in use.
3846
3847**Since**: 11
3848
3849**Parameters**
3850
3851| Name| Description|
3852| -------- | -------- |
3853| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3854| zoom | Pointer to the zoom ratio.|
3855
3856**Returns**
3857
3858In [Camera_ErrorCode](#camera_errorcode-1):
3859
3860- **CAMERA_OK**: The operation is successful.
3861
3862- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3863
3864- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
3865
3866
3867### OH_CaptureSession_GetZoomRatioRange()
3868
3869```
3870Camera_ErrorCode OH_CaptureSession_GetZoomRatioRange(Camera_CaptureSession* session, float* minZoom, float* maxZoom)
3871```
3872
3873**Description**
3874
3875Obtains the supported zoom ratio range.
3876
3877**Since**: 11
3878
3879**Parameters**
3880
3881| Name| Description|
3882| -------- | -------- |
3883| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3884| minZoom | Pointer to the minimum zoom ratio.|
3885| maxZoom | Pointer to the maximum zoom ratio.|
3886
3887**Returns**
3888
3889In [Camera_ErrorCode](#camera_errorcode-1):
3890
3891- **CAMERA_OK**: The operation is successful.
3892
3893- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3894
3895- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
3896
3897
3898### OH_CaptureSession_HasFlash()
3899
3900```
3901Camera_ErrorCode OH_CaptureSession_HasFlash(Camera_CaptureSession* session, bool* hasFlash)
3902```
3903
3904**Description**
3905
3906Checks whether the device has flash.
3907
3908**Since**: 11
3909
3910**Parameters**
3911
3912| Name| Description|
3913| -------- | -------- |
3914| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3915| hasFlash | Pointer to the result that specifies whether the device has flash.|
3916
3917**Returns**
3918
3919In [Camera_ErrorCode](#camera_errorcode-1):
3920
3921- **CAMERA_OK**: The operation is successful.
3922
3923- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3924
3925- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
3926
3927
3928### OH_CaptureSession_IsExposureModeSupported()
3929
3930```
3931Camera_ErrorCode OH_CaptureSession_IsExposureModeSupported(Camera_CaptureSession* session, Camera_ExposureMode exposureMode, bool* isSupported)
3932```
3933
3934**Description**
3935
3936Checks whether an exposure mode is supported.
3937
3938**Since**: 11
3939
3940**Parameters**
3941
3942| Name| Description|
3943| -------- | -------- |
3944| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3945| exposureMode | Target exposure mode, which is defined in the [Camera_ExposureMode](#camera_exposuremode) struct.|
3946| isSupported | Pointer to the result that specifies whether the exposure mode is supported.|
3947
3948**Returns**
3949
3950In [Camera_ErrorCode](#camera_errorcode-1):
3951
3952- **CAMERA_OK**: The operation is successful.
3953
3954- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3955
3956- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
3957
3958
3959### OH_CaptureSession_IsFlashModeSupported()
3960
3961```
3962Camera_ErrorCode OH_CaptureSession_IsFlashModeSupported(Camera_CaptureSession* session, Camera_FlashMode flashMode, bool* isSupported)
3963```
3964
3965**Description**
3966
3967Checks whether a flash mode is supported.
3968
3969**Since**: 11
3970
3971**Parameters**
3972
3973| Name| Description|
3974| -------- | -------- |
3975| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
3976| flashMode | Target flash mode, which is defined in the [Camera_FlashMode](#camera_flashmode) struct.|
3977| isSupported | Pointer to the result that specifies whether the flash mode is supported.|
3978
3979**Returns**
3980
3981In [Camera_ErrorCode](#camera_errorcode-1):
3982
3983- **CAMERA_OK**: The operation is successful.
3984
3985- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
3986
3987- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
3988
3989
3990### OH_CaptureSession_IsFocusModeSupported()
3991
3992```
3993Camera_ErrorCode OH_CaptureSession_IsFocusModeSupported(Camera_CaptureSession* session, Camera_FocusMode focusMode, bool* isSupported)
3994```
3995
3996**Description**
3997
3998Checks whether a focus mode is supported.
3999
4000**Since**: 11
4001
4002**Parameters**
4003
4004| Name| Description|
4005| -------- | -------- |
4006| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4007| focusMode | Target focus mode, which is defined in the [Camera_FocusMode](#camera_focusmode-1) struct.|
4008| isSupported | Pointer to the result that specifies whether the focus mode is supported.|
4009
4010**Returns**
4011
4012In [Camera_ErrorCode](#camera_errorcode-1):
4013
4014- **CAMERA_OK**: The operation is successful.
4015
4016- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4017
4018- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
4019
4020
4021### OH_CaptureSession_IsVideoStabilizationModeSupported()
4022
4023```
4024Camera_ErrorCode OH_CaptureSession_IsVideoStabilizationModeSupported(Camera_CaptureSession* session, Camera_VideoStabilizationMode mode, bool* isSupported)
4025```
4026
4027**Description**
4028
4029Checks whether a video stabilization mode is supported.
4030
4031**Since**: 11
4032
4033**Parameters**
4034
4035| Name| Description|
4036| -------- | -------- |
4037| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4038| mode | Target video stabilization mode, which is defined in the [Camera_VideoStabilizationMode](#camera_videostabilizationmode-1) struct.|
4039| isSupported | Pointer to the result that specifies whether the video stabilization mode is supported.|
4040
4041**Returns**
4042
4043In [Camera_ErrorCode](#camera_errorcode-1):
4044
4045- **CAMERA_OK**: The operation is successful.
4046
4047- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4048
4049- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
4050
4051
4052### OH_CaptureSession_Preconfig()
4053
4054```
4055Camera_ErrorCode OH_CaptureSession_Preconfig(Camera_CaptureSession* session, Camera_PreconfigType preconfigType)
4056```
4057
4058**Description**
4059
4060Sets a preconfigured resolution type.
4061
4062**Since**: 12
4063
4064**Parameters**
4065
4066| Name| Description|
4067| -------- | -------- |
4068| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4069| preconfigType | Target resolution type, which is defined in [Camera_PreconfigType](#camera_preconfigtype-1).|
4070
4071**Returns**
4072
4073In [Camera_ErrorCode](#camera_errorcode-1):
4074
4075- **CAMERA_OK**: The operation is successful.
4076
4077- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4078
4079- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
4080
4081- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
4082
4083
4084### OH_CaptureSession_PreconfigWithRatio()
4085
4086```
4087Camera_ErrorCode OH_CaptureSession_PreconfigWithRatio(Camera_CaptureSession* session, Camera_PreconfigType preconfigType, Camera_PreconfigRatio preconfigRatio)
4088```
4089
4090**Description**
4091
4092Sets a preconfigured resolution type with an aspect ratio.
4093
4094**Since**: 12
4095
4096**Parameters**
4097
4098| Name| Description|
4099| -------- | -------- |
4100| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4101| preconfigType | Target resolution type, which is defined in [Camera_PreconfigType](#camera_preconfigtype-1).|
4102| preconfigRatio | Target aspect ratio, which is defined in [Camera_PreconfigRatio](#camera_preconfigratio-1).|
4103
4104**Returns**
4105
4106In [Camera_ErrorCode](#camera_errorcode-1):
4107
4108- **CAMERA_OK**: The operation is successful.
4109
4110- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4111
4112- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
4113
4114
4115### OH_CaptureSession_RegisterCallback()
4116
4117```
4118Camera_ErrorCode OH_CaptureSession_RegisterCallback(Camera_CaptureSession* session, CaptureSession_Callbacks* callback)
4119```
4120
4121**Description**
4122
4123Registers a callback to listen for capture session events.
4124
4125**Since**: 11
4126
4127**Parameters**
4128
4129| Name| Description|
4130| -------- | -------- |
4131| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4132| callback | Pointer to the target callback, which is defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct.|
4133
4134**Returns**
4135
4136In [Camera_ErrorCode](#camera_errorcode-1):
4137
4138- **CAMERA_OK**: The operation is successful.
4139
4140- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4141
4142
4143### OH_CaptureSession_RegisterSmoothZoomInfoCallback()
4144
4145```
4146Camera_ErrorCode OH_CaptureSession_RegisterSmoothZoomInfoCallback(Camera_CaptureSession* session, OH_CaptureSession_OnSmoothZoomInfo smoothZoomInfoCallback)
4147```
4148
4149**Description**
4150
4151Registers a callback to listen for smooth zoom events.
4152
4153**Since**: 12
4154
4155**Parameters**
4156
4157| Name| Description|
4158| -------- | -------- |
4159| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4160| smoothZoomInfoCallback | Target callback, which is defined in [OH_CaptureSession_OnSmoothZoomInfo](#oh_capturesession_onsmoothzoominfo).|
4161
4162**Returns**
4163
4164In [Camera_ErrorCode](#camera_errorcode-1):
4165
4166- **CAMERA_OK**: The operation is successful.
4167
4168- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4169
4170
4171### OH_CaptureSession_Release()
4172
4173```
4174Camera_ErrorCode OH_CaptureSession_Release(Camera_CaptureSession* session)
4175```
4176
4177**Description**
4178
4179Releases a **CaptureSession** instance.
4180
4181**Since**: 11
4182
4183**Parameters**
4184
4185| Name| Description|
4186| -------- | -------- |
4187| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4188
4189**Returns**
4190
4191In [Camera_ErrorCode](#camera_errorcode-1):
4192
4193- **CAMERA_OK**: The operation is successful.
4194
4195- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4196
4197- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
4198
4199
4200### OH_CaptureSession_RemoveInput()
4201
4202```
4203Camera_ErrorCode OH_CaptureSession_RemoveInput(Camera_CaptureSession* session, Camera_Input* cameraInput)
4204```
4205
4206**Description**
4207
4208Removes a **CameraInput** instance from a session.
4209
4210**Since**: 11
4211
4212**Parameters**
4213
4214| Name| Description|
4215| -------- | -------- |
4216| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4217| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.|
4218
4219**Returns**
4220
4221In [Camera_ErrorCode](#camera_errorcode-1):
4222
4223- **CAMERA_OK**: The operation is successful.
4224
4225- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4226
4227- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed.
4228
4229
4230### OH_CaptureSession_RemoveMetadataOutput()
4231
4232```
4233Camera_ErrorCode OH_CaptureSession_RemoveMetadataOutput(Camera_CaptureSession* session, Camera_MetadataOutput* metadataOutput)
4234```
4235
4236**Description**
4237
4238Removes a **MetadataOutput** instance from a session.
4239
4240**Since**: 11
4241
4242**Parameters**
4243
4244| Name| Description|
4245| -------- | -------- |
4246| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4247| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.|
4248
4249**Returns**
4250
4251In [Camera_ErrorCode](#camera_errorcode-1):
4252
4253- **CAMERA_OK**: The operation is successful.
4254
4255- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4256
4257- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed.
4258
4259
4260### OH_CaptureSession_RemovePhotoOutput()
4261
4262```
4263Camera_ErrorCode OH_CaptureSession_RemovePhotoOutput(Camera_CaptureSession* session, Camera_PhotoOutput* photoOutput)
4264```
4265
4266**Description**
4267
4268Removes a **PhotoOutput** instance from a session.
4269
4270**Since**: 11
4271
4272**Parameters**
4273
4274| Name| Description|
4275| -------- | -------- |
4276| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4277| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
4278
4279**Returns**
4280
4281In [Camera_ErrorCode](#camera_errorcode-1):
4282
4283- **CAMERA_OK**: The operation is successful.
4284
4285- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4286
4287- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed.
4288
4289
4290### OH_CaptureSession_RemovePreviewOutput()
4291
4292```
4293Camera_ErrorCode OH_CaptureSession_RemovePreviewOutput(Camera_CaptureSession* session, Camera_PreviewOutput* previewOutput)
4294```
4295
4296**Description**
4297
4298Removes a **PreviewOutput** instance from a session.
4299
4300**Since**: 11
4301
4302**Parameters**
4303
4304| Name| Description|
4305| -------- | -------- |
4306| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4307| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.|
4308
4309**Returns**
4310
4311In [Camera_ErrorCode](#camera_errorcode-1):
4312
4313- **CAMERA_OK**: The operation is successful.
4314
4315- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4316
4317- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed.
4318
4319
4320### OH_CaptureSession_RemoveVideoOutput()
4321
4322```
4323Camera_ErrorCode OH_CaptureSession_RemoveVideoOutput(Camera_CaptureSession* session, Camera_VideoOutput* videoOutput)
4324```
4325
4326**Description**
4327
4328Removes a **VideoOutput** instance from a session.
4329
4330**Since**: 11
4331
4332**Parameters**
4333
4334| Name| Description|
4335| -------- | -------- |
4336| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4337| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.|
4338
4339**Returns**
4340
4341In [Camera_ErrorCode](#camera_errorcode-1):
4342
4343- **CAMERA_OK**: The operation is successful.
4344
4345- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4346
4347- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed.
4348
4349
4350### OH_CaptureSession_SetActiveColorSpace()
4351
4352```
4353Camera_ErrorCode OH_CaptureSession_SetActiveColorSpace(Camera_CaptureSession* session, OH_NativeBuffer_ColorSpace colorSpace)
4354```
4355
4356**Description**
4357
4358Sets the active color space.
4359
4360**Since**: 12
4361
4362**Parameters**
4363
4364| Name| Description|
4365| -------- | -------- |
4366| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4367| colorSpace | Target color space, which is defined in [OH_NativeBuffer_ColorSpace](../apis-arkgraphics2d/_o_h___native_buffer.md#oh_nativebuffer_colorspace-1).|
4368
4369**Returns**
4370
4371In [Camera_ErrorCode](#camera_errorcode-1):
4372
4373- **CAMERA_OK**: The operation is successful.
4374
4375- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4376
4377- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
4378
4379
4380### OH_CaptureSession_SetExposureBias()
4381
4382```
4383Camera_ErrorCode OH_CaptureSession_SetExposureBias(Camera_CaptureSession* session, float exposureBias)
4384```
4385
4386**Description**
4387
4388Sets an exposure compensation value for the device.
4389
4390**Since**: 11
4391
4392**Parameters**
4393
4394| Name| Description|
4395| -------- | -------- |
4396| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4397| exposureBias | Target exposure compensation value.|
4398
4399**Returns**
4400
4401In [Camera_ErrorCode](#camera_errorcode-1):
4402
4403- **CAMERA_OK**: The operation is successful.
4404
4405- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4406
4407- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
4408
4409
4410### OH_CaptureSession_SetExposureMode()
4411
4412```
4413Camera_ErrorCode OH_CaptureSession_SetExposureMode(Camera_CaptureSession* session, Camera_ExposureMode exposureMode)
4414```
4415
4416**Description**
4417
4418Sets an exposure mode for the device.
4419
4420**Since**: 11
4421
4422**Parameters**
4423
4424| Name| Description|
4425| -------- | -------- |
4426| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4427| exposureMode | Target exposure mode, which is defined in [Camera_ExposureMode](#camera_exposuremode-1).|
4428
4429**Returns**
4430
4431In [Camera_ErrorCode](#camera_errorcode-1):
4432
4433- **CAMERA_OK**: The operation is successful.
4434
4435- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4436
4437- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
4438
4439
4440### OH_CaptureSession_SetFlashMode()
4441
4442```
4443Camera_ErrorCode OH_CaptureSession_SetFlashMode(Camera_CaptureSession* session, Camera_FlashMode flashMode)
4444```
4445
4446**Description**
4447
4448Sets a flash mode for the device.
4449
4450**Since**: 11
4451
4452**Parameters**
4453
4454| Name| Description|
4455| -------- | -------- |
4456| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4457| flashMode | Target flash mode, which is defined in [Camera_FlashMode](#camera_flashmode-1).|
4458
4459**Returns**
4460
4461In [Camera_ErrorCode](#camera_errorcode-1):
4462
4463- **CAMERA_OK**: The operation is successful.
4464
4465- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4466
4467- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
4468
4469
4470### OH_CaptureSession_SetFocusMode()
4471
4472```
4473Camera_ErrorCode OH_CaptureSession_SetFocusMode(Camera_CaptureSession* session, Camera_FocusMode focusMode)
4474```
4475
4476**Description**
4477
4478Sets a focus mode for the device.
4479
4480**Since**: 11
4481
4482**Parameters**
4483
4484| Name| Description|
4485| -------- | -------- |
4486| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4487| focusMode | Target focus mode, which is defined in [Camera_FocusMode](#camera_focusmode-1).|
4488
4489**Returns**
4490
4491In [Camera_ErrorCode](#camera_errorcode-1):
4492
4493- **CAMERA_OK**: The operation is successful.
4494
4495- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4496
4497- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
4498
4499
4500### OH_CaptureSession_SetFocusPoint()
4501
4502```
4503Camera_ErrorCode OH_CaptureSession_SetFocusPoint(Camera_CaptureSession* session, Camera_Point focusPoint)
4504```
4505
4506**Description**
4507
4508Sets a focal point for the device.
4509
4510**Since**: 11
4511
4512**Parameters**
4513
4514| Name| Description|
4515| -------- | -------- |
4516| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4517| focusPoint | Target focal point, which is defined in the [Camera_Point](_camera___point.md) struct.|
4518
4519**Returns**
4520
4521In [Camera_ErrorCode](#camera_errorcode-1):
4522
4523- **CAMERA_OK**: The operation is successful.
4524
4525- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4526
4527- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
4528
4529
4530### OH_CaptureSession_SetMeteringPoint()
4531
4532```
4533Camera_ErrorCode OH_CaptureSession_SetMeteringPoint(Camera_CaptureSession* session, Camera_Point point)
4534```
4535
4536**Description**
4537
4538Sets the metering point, which is the center point of the metering rectangle.
4539
4540**Since**: 11
4541
4542**Parameters**
4543
4544| Name| Description|
4545| -------- | -------- |
4546| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4547| point | Target metering point, which is defined in the [Camera_Point](_camera___point.md) struct.|
4548
4549**Returns**
4550
4551In [Camera_ErrorCode](#camera_errorcode-1):
4552
4553- **CAMERA_OK**: The operation is successful.
4554
4555- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4556
4557- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
4558
4559
4560### OH_CaptureSession_SetSessionMode()
4561
4562```
4563Camera_ErrorCode OH_CaptureSession_SetSessionMode(Camera_CaptureSession* session, Camera_SceneMode sceneMode)
4564```
4565
4566**Description**
4567
4568Sets a session mode.
4569
4570**Since**: 12
4571
4572**Parameters**
4573
4574| Name| Description|
4575| -------- | -------- |
4576| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4577| sceneMode | Target scene mode, which is an enumerated value of [Camera_SceneMode](#camera_scenemode-1).|
4578
4579**Returns**
4580
4581In [Camera_ErrorCode](#camera_errorcode-1):
4582
4583- **CAMERA_OK**: The operation is successful.
4584
4585- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4586
4587- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
4588
4589- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed.
4590
4591- **CAMERA_SESSION_CONFIG_LOCKED**: The session configuration is locked.
4592
4593
4594### OH_CaptureSession_SetSmoothZoom()
4595
4596```
4597Camera_ErrorCode OH_CaptureSession_SetSmoothZoom(Camera_CaptureSession* session, float targetZoom, Camera_SmoothZoomMode smoothZoomMode)
4598```
4599
4600**Description**
4601
4602Sets smooth zoom.
4603
4604**Since**: 12
4605
4606**Parameters**
4607
4608| Name| Description|
4609| -------- | -------- |
4610| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4611| targetZoom | Target zoom ratio.|
4612| smoothZoomMode | [Camera_SmoothZoomMode](#camera_smoothzoommode) instance.|
4613
4614**Returns**
4615
4616In [Camera_ErrorCode](#camera_errorcode-1):
4617
4618- **CAMERA_OK**: The operation is successful.
4619
4620- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4621
4622- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
4623
4624
4625### OH_CaptureSession_SetVideoStabilizationMode()
4626
4627```
4628Camera_ErrorCode OH_CaptureSession_SetVideoStabilizationMode(Camera_CaptureSession* session, Camera_VideoStabilizationMode mode)
4629```
4630
4631**Description**
4632
4633Sets a video stabilization mode for the device.
4634
4635**Since**: 11
4636
4637**Parameters**
4638
4639| Name| Description|
4640| -------- | -------- |
4641| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4642| mode | Target video stabilization mode, which is defined in the [Camera_VideoStabilizationMode](#camera_videostabilizationmode) struct.|
4643
4644**Returns**
4645
4646In [Camera_ErrorCode](#camera_errorcode-1):
4647
4648- **CAMERA_OK**: The operation is successful.
4649
4650- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4651
4652- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
4653
4654
4655### OH_CaptureSession_SetZoomRatio()
4656
4657```
4658Camera_ErrorCode OH_CaptureSession_SetZoomRatio(Camera_CaptureSession* session, float zoom)
4659```
4660
4661**Description**
4662
4663Sets a zoom ratio for the device.
4664
4665**Since**: 11
4666
4667**Parameters**
4668
4669| Name| Description                                                       |
4670| -------- |-----------------------------------------------------------|
4671| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.       |
4672| zoom | Target zoom ratio.<br>It takes some time for the zoom ratio to take effect at the bottom layer. To obtain the correct zoom ratio, you need to wait for one to two frames.|
4673
4674**Returns**
4675
4676In [Camera_ErrorCode](#camera_errorcode-1):
4677
4678- **CAMERA_OK**: The operation is successful.
4679
4680- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4681
4682- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
4683
4684
4685### OH_CaptureSession_Start()
4686
4687```
4688Camera_ErrorCode OH_CaptureSession_Start(Camera_CaptureSession* session)
4689```
4690
4691**Description**
4692
4693Starts a capture session.
4694
4695**Since**: 11
4696
4697**Parameters**
4698
4699| Name| Description|
4700| -------- | -------- |
4701| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4702
4703**Returns**
4704
4705In [Camera_ErrorCode](#camera_errorcode-1):
4706
4707- **CAMERA_OK**: The operation is successful.
4708
4709- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4710
4711- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
4712
4713- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
4714
4715
4716### OH_CaptureSession_Stop()
4717
4718```
4719Camera_ErrorCode OH_CaptureSession_Stop(Camera_CaptureSession* session)
4720```
4721
4722**Description**
4723
4724Stops a capture session.
4725
4726**Since**: 11
4727
4728**Parameters**
4729
4730| Name| Description|
4731| -------- | -------- |
4732| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4733
4734**Returns**
4735
4736In [Camera_ErrorCode](#camera_errorcode-1):
4737
4738- **CAMERA_OK**: The operation is successful.
4739
4740- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4741
4742- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
4743
4744
4745### OH_CaptureSession_UnregisterCallback()
4746
4747```
4748Camera_ErrorCode OH_CaptureSession_UnregisterCallback(Camera_CaptureSession* session, CaptureSession_Callbacks* callback)
4749```
4750
4751**Description**
4752
4753Unregisters the callback used to listen for capture session events.
4754
4755**Since**: 11
4756
4757**Parameters**
4758
4759| Name| Description|
4760| -------- | -------- |
4761| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4762| callback | Pointer to the target callback, which is defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct.|
4763
4764**Returns**
4765
4766In [Camera_ErrorCode](#camera_errorcode-1):
4767
4768- **CAMERA_OK**: The operation is successful.
4769
4770- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4771
4772
4773### OH_CaptureSession_UnregisterSmoothZoomInfoCallback()
4774
4775```
4776Camera_ErrorCode OH_CaptureSession_UnregisterSmoothZoomInfoCallback(Camera_CaptureSession* session, OH_CaptureSession_OnSmoothZoomInfo smoothZoomInfoCallback)
4777```
4778
4779**Description**
4780
4781Unregisters the callback used to listen for smooth zoom events.
4782
4783**Since**: 12
4784
4785**Parameters**
4786
4787| Name| Description|
4788| -------- | -------- |
4789| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.|
4790| smoothZoomInfoCallback | Target callback, which is defined in [OH_CaptureSession_OnSmoothZoomInfo](#oh_capturesession_onsmoothzoominfo).|
4791
4792**Returns**
4793
4794In [Camera_ErrorCode](#camera_errorcode-1):
4795
4796- **CAMERA_OK**: The operation is successful.
4797
4798- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4799
4800
4801### OH_MetadataOutput_RegisterCallback()
4802
4803```
4804Camera_ErrorCode OH_MetadataOutput_RegisterCallback(Camera_MetadataOutput* metadataOutput, MetadataOutput_Callbacks* callback)
4805```
4806
4807**Description**
4808
4809Registers a callback to listen for metadata output events.
4810
4811**Since**: 11
4812
4813**Parameters**
4814
4815| Name| Description|
4816| -------- | -------- |
4817| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.|
4818| callback | Pointer to the target callback, which is defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct.|
4819
4820**Returns**
4821
4822In [Camera_ErrorCode](#camera_errorcode-1):
4823
4824- **CAMERA_OK**: The operation is successful.
4825
4826- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4827
4828
4829### OH_MetadataOutput_Release()
4830
4831```
4832Camera_ErrorCode OH_MetadataOutput_Release(Camera_MetadataOutput* metadataOutput)
4833```
4834
4835**Description**
4836
4837Releases a **MetadataOutput** instance.
4838
4839**Since**: 11
4840
4841**Parameters**
4842
4843| Name| Description|
4844| -------- | -------- |
4845| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.|
4846
4847**Returns**
4848
4849In [Camera_ErrorCode](#camera_errorcode-1):
4850
4851- **CAMERA_OK**: The operation is successful.
4852
4853- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4854
4855- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
4856
4857
4858### OH_MetadataOutput_Start()
4859
4860```
4861Camera_ErrorCode OH_MetadataOutput_Start(Camera_MetadataOutput* metadataOutput)
4862```
4863
4864**Description**
4865
4866Starts metadata output.
4867
4868**Since**: 11
4869
4870**Parameters**
4871
4872| Name| Description|
4873| -------- | -------- |
4874| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.|
4875
4876**Returns**
4877
4878In [Camera_ErrorCode](#camera_errorcode-1):
4879
4880- **CAMERA_OK**: The operation is successful.
4881
4882- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4883
4884- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
4885
4886- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
4887
4888
4889### OH_MetadataOutput_Stop()
4890
4891```
4892Camera_ErrorCode OH_MetadataOutput_Stop(Camera_MetadataOutput* metadataOutput)
4893```
4894
4895**Description**
4896
4897Stops metadata output.
4898
4899**Since**: 11
4900
4901**Parameters**
4902
4903| Name| Description|
4904| -------- | -------- |
4905| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.|
4906
4907**Returns**
4908
4909In [Camera_ErrorCode](#camera_errorcode-1):
4910
4911- **CAMERA_OK**: The operation is successful.
4912
4913- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4914
4915- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
4916
4917
4918### OH_MetadataOutput_UnregisterCallback()
4919
4920```
4921Camera_ErrorCode OH_MetadataOutput_UnregisterCallback(Camera_MetadataOutput* metadataOutput, MetadataOutput_Callbacks* callback)
4922```
4923
4924**Description**
4925
4926Unregisters the callback used to listen for metadata output events.
4927
4928**Since**: 11
4929
4930**Parameters**
4931
4932| Name| Description|
4933| -------- | -------- |
4934| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.|
4935| callback | Pointer to the target callback, which is defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct.|
4936
4937**Returns**
4938
4939In [Camera_ErrorCode](#camera_errorcode-1):
4940
4941- **CAMERA_OK**: The operation is successful.
4942
4943- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4944
4945
4946### OH_PhotoNative_GetMainImage()
4947
4948```
4949Camera_ErrorCode OH_PhotoNative_GetMainImage(OH_PhotoNative* photo, OH_ImageNative** mainImage)
4950```
4951
4952**Description**
4953
4954Obtains a full quality photo.
4955
4956**Since**: 12
4957
4958**Parameters**
4959
4960| Name| Description|
4961| -------- | -------- |
4962| photo | Pointer to an [OH_PhotoNative](#oh_photonative) instance.|
4963| mainImage | Double pointer to the full quality photo, which is an [OH_ImageNative](../apis-image-kit/_image___native_module.md#oh_imagenative) object.|
4964
4965**Returns**
4966
4967In [Camera_ErrorCode](#camera_errorcode-1):
4968
4969- **CAMERA_OK**: The operation is successful.
4970
4971- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4972
4973
4974### OH_PhotoNative_Release()
4975
4976```
4977Camera_ErrorCode OH_PhotoNative_Release(OH_PhotoNative* photo)
4978```
4979
4980**Description**
4981
4982Releases a full quality photo.
4983
4984**Since**: 12
4985
4986**Parameters**
4987
4988| Name| Description|
4989| -------- | -------- |
4990| photo | Pointer to an [OH_PhotoNative](#oh_photonative) instance.|
4991
4992**Returns**
4993
4994In [Camera_ErrorCode](#camera_errorcode-1):
4995
4996- **CAMERA_OK**: The operation is successful.
4997
4998- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
4999
5000
5001### OH_PhotoOutput_Capture()
5002
5003```
5004Camera_ErrorCode OH_PhotoOutput_Capture(Camera_PhotoOutput* photoOutput)
5005```
5006
5007**Description**
5008
5009Captures a photo.
5010
5011**OH_PhotoOutput_Capture()** must be called in prior to **OH_PreviewOutput_Release()**. Otherwise, photo capture fails.
5012
5013**Since**: 11
5014
5015**Parameters**
5016
5017| Name| Description|
5018| -------- | -------- |
5019| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5020
5021**Returns**
5022
5023In [Camera_ErrorCode](#camera_errorcode-1):
5024
5025- **CAMERA_OK**: The operation is successful.
5026
5027- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5028
5029- **CAMERA_SESSION_NOT_RUNNING**: The capture session is not running.
5030
5031- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
5032
5033
5034### OH_PhotoOutput_Capture_WithCaptureSetting()
5035
5036```
5037Camera_ErrorCode OH_PhotoOutput_Capture_WithCaptureSetting(Camera_PhotoOutput* photoOutput, Camera_PhotoCaptureSetting setting)
5038```
5039
5040**Description**
5041
5042Captures a photo with photographing parameters.
5043
5044**Since**: 11
5045
5046**Parameters**
5047
5048| Name| Description|
5049| -------- | -------- |
5050| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5051| setting | Photographing parameters, which are defined in the [Camera_PhotoCaptureSetting](_camera___photo_capture_setting.md) struct.|
5052
5053**Returns**
5054
5055In [Camera_ErrorCode](#camera_errorcode-1):
5056
5057- **CAMERA_OK**: The operation is successful.
5058
5059- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5060
5061- **CAMERA_SESSION_NOT_RUNNING**: The capture session is not running.
5062
5063- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
5064
5065
5066### OH_PhotoOutput_DeleteProfile()
5067
5068```
5069Camera_ErrorCode OH_PhotoOutput_DeleteProfile(Camera_Profile* profile)
5070```
5071
5072**Description**
5073
5074Deletes the profile of this **PhotoOutput** instance.
5075
5076**Since**: 12
5077
5078**Parameters**
5079
5080| Name| Description|
5081| -------- | -------- |
5082| profile | Pointer to a [Camera_Profile](_camera___profile.md) instance.|
5083
5084**Returns**
5085
5086In [Camera_ErrorCode](#camera_errorcode-1):
5087
5088- **CAMERA_OK**: The operation is successful.
5089
5090- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5091
5092
5093### OH_PhotoOutput_EnableMovingPhoto()
5094
5095```
5096Camera_ErrorCode OH_PhotoOutput_EnableMovingPhoto(Camera_PhotoOutput* photoOutput, bool enabled)
5097```
5098
5099**Description**
5100
5101Enables moving photos.
5102
5103**Since**: 12
5104
5105**Required permissions**: ohos.permission.MICROPHONE
5106
5107**Parameters**
5108
5109| Name| Description|
5110| -------- | -------- |
5111| photoOutput | Pointer to a [Camera_PhotoOutput](#camera_photooutput) instance.|
5112| enabled | Whether to enable moving photos.|
5113
5114**Returns**
5115
5116In [Camera_ErrorCode](#camera_errorcode-1):
5117
5118- **CAMERA_OK**: The operation is successful.
5119
5120- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5121
5122- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
5123
5124
5125### OH_PhotoOutput_GetActiveProfile()
5126
5127```
5128Camera_ErrorCode OH_PhotoOutput_GetActiveProfile(Camera_PhotoOutput* photoOutput, Camera_Profile** profile)
5129```
5130
5131**Description**
5132
5133Obtains the profile of a **PhotoOutput** instance.
5134
5135**Since**: 12
5136
5137**Parameters**
5138
5139| Name| Description|
5140| -------- | -------- |
5141| photoOutput | Pointer to a [Camera_PhotoOutput](#camera_photooutput) instance.|
5142| profile | Double pointer to the profile, which is defined in [Camera_Profile](_camera___profile.md), if the function is successfully called.|
5143
5144**Returns**
5145
5146In [Camera_ErrorCode](#camera_errorcode-1):
5147
5148- **CAMERA_OK**: The operation is successful.
5149
5150- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5151
5152- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
5153
5154
5155### OH_PhotoOutput_IsMirrorSupported()
5156
5157```
5158Camera_ErrorCode OH_PhotoOutput_IsMirrorSupported(Camera_PhotoOutput* photoOutput, bool* isSupported)
5159```
5160
5161**Description**
5162
5163Checks whether mirroring is supported.
5164
5165**Since**: 11
5166
5167**Parameters**
5168
5169| Name| Description|
5170| -------- | -------- |
5171| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance, which is used to check whether mirroring is supported.|
5172| isSupported | Pointer to the result that specifies whether mirroring is supported.|
5173
5174**Returns**
5175
5176In [Camera_ErrorCode](#camera_errorcode-1):
5177
5178- **CAMERA_OK**: The operation is successful.
5179
5180- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5181
5182- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
5183
5184
5185### OH_PhotoOutput_EnableMirror()
5186
5187```
5188Camera_ErrorCode OH_PhotoOutput_EnableMirror(Camera_PhotoOutput* photoOutput, bool enabled)
5189```
5190
5191**Description**
5192
5193Enables mirror photography.
5194
5195**Since**: 13
5196
5197**Parameters**
5198
5199| Name         | Description                                                     |
5200|-------------|---------------------------------------------------------|
5201| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance, for which mirror photography will be enabled or disabled.|
5202| enabled     | Whether to enable mirror photography. The value **true** means to enable mirror photography, and **false** means the opposite.       |
5203
5204**Returns**
5205
5206In [Camera_ErrorCode](#camera_errorcode-1):
5207
5208- **CAMERA_OK**: The operation is successful.
5209
5210- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5211
5212- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
5213
5214
5215### OH_PhotoOutput_IsMovingPhotoSupported()
5216
5217```
5218Camera_ErrorCode OH_PhotoOutput_IsMovingPhotoSupported(Camera_PhotoOutput* photoOutput, bool* isSupported)
5219```
5220
5221**Description**
5222
5223Checks whether moving photos are supported.
5224
5225**Since**: 12
5226
5227**Parameters**
5228
5229| Name| Description|
5230| -------- | -------- |
5231| photoOutput | Pointer to a [Camera_PhotoOutput](#camera_photooutput) instance.|
5232| isSupported | Pointer to the result indicating whether moving photos are supported.|
5233
5234**Returns**
5235
5236In [Camera_ErrorCode](#camera_errorcode-1):
5237
5238- **CAMERA_OK**: The operation is successful.
5239
5240- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5241
5242- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
5243
5244
5245### OH_PhotoOutput_RegisterCallback()
5246
5247```
5248Camera_ErrorCode OH_PhotoOutput_RegisterCallback(Camera_PhotoOutput* photoOutput, PhotoOutput_Callbacks* callback)
5249```
5250
5251**Description**
5252
5253Registers a callback to listen for photo output events.
5254
5255**Since**: 11
5256
5257**Parameters**
5258
5259| Name| Description|
5260| -------- | -------- |
5261| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5262| callback | Pointer to the target callback, which is defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct.|
5263
5264**Returns**
5265
5266In [Camera_ErrorCode](#camera_errorcode-1):
5267
5268- **CAMERA_OK**: The operation is successful.
5269
5270- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5271
5272
5273### OH_PhotoOutput_RegisterCaptureEndCallback()
5274
5275```
5276Camera_ErrorCode OH_PhotoOutput_RegisterCaptureEndCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureEnd callback)
5277```
5278
5279**Description**
5280
5281Registers a callback to listen for capture end events.
5282
5283**Since**: 12
5284
5285**Parameters**
5286
5287| Name| Description|
5288| -------- | -------- |
5289| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5290| callback | Target callback, which is defined in [OH_PhotoOutput_CaptureEnd](#oh_photooutput_captureend).|
5291
5292**Returns**
5293
5294In [Camera_ErrorCode](#camera_errorcode-1):
5295
5296- **CAMERA_OK**: The operation is successful.
5297
5298- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5299
5300
5301### OH_PhotoOutput_RegisterCaptureReadyCallback()
5302
5303```
5304Camera_ErrorCode OH_PhotoOutput_RegisterCaptureReadyCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureReady callback)
5305```
5306
5307**Description**
5308
5309Registers a callback to listen for camera ready events. When the callback is received, the next capture can be performed.
5310
5311**Since**: 12
5312
5313**Parameters**
5314
5315| Name| Description|
5316| -------- | -------- |
5317| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5318| callback | Target callback, which is defined in [OH_PhotoOutput_CaptureReady](#oh_photooutput_captureready).|
5319
5320**Returns**
5321
5322In [Camera_ErrorCode](#camera_errorcode-1):
5323
5324- **CAMERA_OK**: The operation is successful.
5325
5326- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5327
5328
5329### OH_PhotoOutput_RegisterCaptureStartWithInfoCallback()
5330
5331```
5332Camera_ErrorCode OH_PhotoOutput_RegisterCaptureStartWithInfoCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureStartWithInfo callback)
5333```
5334
5335**Description**
5336
5337Registers a callback to listen for capture start events.
5338
5339**Since**: 12
5340
5341**Parameters**
5342
5343| Name| Description|
5344| -------- | -------- |
5345| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5346| callback | Target callback, which is defined in [OH_PhotoOutput_CaptureStartWithInfo](#oh_photooutput_capturestartwithinfo).|
5347
5348**Returns**
5349
5350In [Camera_ErrorCode](#camera_errorcode-1):
5351
5352- **CAMERA_OK**: The operation is successful.
5353
5354- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5355
5356
5357### OH_PhotoOutput_RegisterEstimatedCaptureDurationCallback()
5358
5359```
5360Camera_ErrorCode OH_PhotoOutput_RegisterEstimatedCaptureDurationCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_EstimatedCaptureDuration callback)
5361```
5362
5363**Description**
5364
5365Registers a callback to listen for estimated capture duration events.
5366
5367**Since**: 12
5368
5369**Parameters**
5370
5371| Name| Description|
5372| -------- | -------- |
5373| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5374| callback | Target callback, which is defined in [OH_PhotoOutput_EstimatedCaptureDuration](#oh_photooutput_estimatedcaptureduration).|
5375
5376**Returns**
5377
5378In [Camera_ErrorCode](#camera_errorcode-1):
5379
5380- **CAMERA_OK**: The operation is successful.
5381
5382- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5383
5384
5385### OH_PhotoOutput_RegisterFrameShutterEndCallback()
5386
5387```
5388Camera_ErrorCode OH_PhotoOutput_RegisterFrameShutterEndCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_OnFrameShutterEnd callback)
5389```
5390
5391**Description**
5392
5393Registers a callback to listen for frame shutter end events.
5394
5395**Since**: 12
5396
5397**Parameters**
5398
5399| Name| Description|
5400| -------- | -------- |
5401| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5402| callback | Target callback, which is defined in [OH_PhotoOutput_OnFrameShutterEnd](#oh_photooutput_onframeshutterend).|
5403
5404**Returns**
5405
5406In [Camera_ErrorCode](#camera_errorcode-1):
5407
5408- **CAMERA_OK**: The operation is successful.
5409
5410- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5411
5412
5413### OH_PhotoOutput_RegisterPhotoAssetAvailableCallback()
5414
5415```
5416Camera_ErrorCode OH_PhotoOutput_RegisterPhotoAssetAvailableCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_PhotoAssetAvailable callback)
5417```
5418
5419**Description**
5420
5421Registers a callback to listen for photo asset availability events.
5422
5423**Since**: 12
5424
5425**Parameters**
5426
5427| Name| Description|
5428| -------- | -------- |
5429| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5430| callback | Target callback, which is defined in [OH_PhotoOutput_PhotoAssetAvailable](#oh_photooutput_photoassetavailable).|
5431
5432**Returns**
5433
5434In [Camera_ErrorCode](#camera_errorcode-1):
5435
5436- **CAMERA_OK**: The operation is successful.
5437
5438- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5439
5440
5441### OH_PhotoOutput_RegisterPhotoAvailableCallback()
5442
5443```
5444Camera_ErrorCode OH_PhotoOutput_RegisterPhotoAvailableCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_PhotoAvailable callback)
5445```
5446
5447**Description**
5448
5449Registers a callback to listen for photo availability events.
5450
5451**Since**: 12
5452
5453**Parameters**
5454
5455| Name| Description|
5456| -------- | -------- |
5457| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5458| callback | Target callback, which is defined in [OH_PhotoOutput_PhotoAvailable](#oh_photooutput_photoavailable).|
5459
5460**Returns**
5461
5462In [Camera_ErrorCode](#camera_errorcode-1):
5463
5464- **CAMERA_OK**: The operation is successful.
5465
5466- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5467
5468- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
5469
5470
5471### OH_PhotoOutput_Release()
5472
5473```
5474Camera_ErrorCode OH_PhotoOutput_Release(Camera_PhotoOutput* photoOutput)
5475```
5476
5477**Description**
5478
5479Releases a **PhotoOutput** instance.
5480
5481**Since**: 11
5482
5483**Parameters**
5484
5485| Name| Description|
5486| -------- | -------- |
5487| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5488
5489**Returns**
5490
5491In [Camera_ErrorCode](#camera_errorcode-1):
5492
5493- **CAMERA_OK**: The operation is successful.
5494
5495- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5496
5497- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
5498
5499
5500### OH_PhotoOutput_UnregisterCallback()
5501
5502```
5503Camera_ErrorCode OH_PhotoOutput_UnregisterCallback(Camera_PhotoOutput* photoOutput, PhotoOutput_Callbacks* callback)
5504```
5505
5506**Description**
5507
5508Unregisters the callback used to listen for photo output events.
5509
5510**Since**: 11
5511
5512**Parameters**
5513
5514| Name| Description|
5515| -------- | -------- |
5516| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5517| callback | Pointer to the target callback, which is defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct.|
5518
5519**Returns**
5520
5521In [Camera_ErrorCode](#camera_errorcode-1):
5522
5523- **CAMERA_OK**: The operation is successful.
5524
5525- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5526
5527
5528### OH_PhotoOutput_UnregisterCaptureEndCallback()
5529
5530```
5531Camera_ErrorCode OH_PhotoOutput_UnregisterCaptureEndCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureEnd callback)
5532```
5533
5534**Description**
5535
5536Unregisters the callback used to listen for capture end events.
5537
5538**Since**: 12
5539
5540**Parameters**
5541
5542| Name| Description|
5543| -------- | -------- |
5544| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5545| callback | Target callback, which is defined in [OH_PhotoOutput_CaptureEnd](#oh_photooutput_captureend).|
5546
5547**Returns**
5548
5549In [Camera_ErrorCode](#camera_errorcode-1):
5550
5551- **CAMERA_OK**: The operation is successful.
5552
5553- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5554
5555
5556### OH_PhotoOutput_UnregisterCaptureReadyCallback()
5557
5558```
5559Camera_ErrorCode OH_PhotoOutput_UnregisterCaptureReadyCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureReady callback)
5560```
5561
5562**Description**
5563
5564Unregisters the callback used to listen for camera ready events.
5565
5566**Since**: 12
5567
5568**Parameters**
5569
5570| Name| Description|
5571| -------- | -------- |
5572| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5573| callback | Target callback, which is defined in [OH_PhotoOutput_CaptureReady](#oh_photooutput_captureready).|
5574
5575**Returns**
5576
5577In [Camera_ErrorCode](#camera_errorcode-1):
5578
5579- **CAMERA_OK**: The operation is successful.
5580
5581- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5582
5583
5584
5585### OH_PhotoOutput_UnregisterCaptureStartWithInfoCallback()
5586
5587```
5588Camera_ErrorCode OH_PhotoOutput_UnregisterCaptureStartWithInfoCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureStartWithInfo callback)
5589```
5590
5591**Description**
5592
5593Unregisters the callback used to listen for capture start events.
5594
5595**Since**: 12
5596
5597**Parameters**
5598
5599| Name| Description|
5600| -------- | -------- |
5601| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5602| callback | Target callback, which is defined in [OH_PhotoOutput_CaptureStartWithInfo](#oh_photooutput_capturestartwithinfo).|
5603
5604**Returns**
5605
5606In [Camera_ErrorCode](#camera_errorcode-1):
5607
5608- **CAMERA_OK**: The operation is successful.
5609
5610- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5611
5612
5613### OH_PhotoOutput_UnregisterEstimatedCaptureDurationCallback()
5614
5615```
5616Camera_ErrorCode OH_PhotoOutput_UnregisterEstimatedCaptureDurationCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_EstimatedCaptureDuration callback)
5617```
5618
5619**Description**
5620
5621Unregisters the callback used to listen for estimated capture duration events.
5622
5623**Since**: 12
5624
5625**Parameters**
5626
5627| Name| Description|
5628| -------- | -------- |
5629| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5630| callback | Target callback, which is defined in [OH_PhotoOutput_EstimatedCaptureDuration](#oh_photooutput_estimatedcaptureduration).|
5631
5632**Returns**
5633
5634In [Camera_ErrorCode](#camera_errorcode-1):
5635
5636- **CAMERA_OK**: The operation is successful.
5637
5638- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5639
5640
5641### OH_PhotoOutput_UnregisterFrameShutterEndCallback()
5642
5643```
5644Camera_ErrorCode OH_PhotoOutput_UnregisterFrameShutterEndCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_OnFrameShutterEnd callback)
5645```
5646
5647**Description**
5648
5649Unregisters the callback used to listen for frame shutter end events.
5650
5651**Since**: 12
5652
5653**Parameters**
5654
5655| Name| Description|
5656| -------- | -------- |
5657| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5658| callback | Target callback, which is defined in [OH_PhotoOutput_OnFrameShutterEnd](#oh_photooutput_onframeshutterend).|
5659
5660**Returns**
5661
5662In [Camera_ErrorCode](#camera_errorcode-1):
5663
5664- **CAMERA_OK**: The operation is successful.
5665
5666- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5667
5668
5669### OH_PhotoOutput_UnregisterPhotoAssetAvailableCallback()
5670
5671```
5672Camera_ErrorCode OH_PhotoOutput_UnregisterPhotoAssetAvailableCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_PhotoAssetAvailable callback)
5673```
5674
5675**Description**
5676
5677Unregisters the callback used to listen for photo asset availability events.
5678
5679**Since**: 12
5680
5681**Parameters**
5682
5683| Name| Description|
5684| -------- | -------- |
5685| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5686| callback | Target callback, which is defined in [OH_PhotoOutput_PhotoAssetAvailable](#oh_photooutput_photoassetavailable).|
5687
5688**Returns**
5689
5690In [Camera_ErrorCode](#camera_errorcode-1):
5691
5692- **CAMERA_OK**: The operation is successful.
5693
5694- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5695
5696
5697### OH_PhotoOutput_UnregisterPhotoAvailableCallback()
5698
5699```
5700Camera_ErrorCode OH_PhotoOutput_UnregisterPhotoAvailableCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_PhotoAvailable callback)
5701```
5702
5703**Description**
5704
5705Unregisters the callback used to listen for photo availability events.
5706
5707**Since**: 12
5708
5709**Parameters**
5710
5711| Name| Description|
5712| -------- | -------- |
5713| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.|
5714| callback | Target callback, which is defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct.|
5715
5716**Returns**
5717
5718In [Camera_ErrorCode](#camera_errorcode-1):
5719
5720- **CAMERA_OK**: The operation is successful.
5721
5722- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5723
5724- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
5725
5726
5727### OH_PreviewOutput_DeleteFrameRates()
5728
5729```
5730Camera_ErrorCode OH_PreviewOutput_DeleteFrameRates(Camera_PreviewOutput* previewOutput, Camera_FrameRateRange* frameRateRange)
5731```
5732
5733**Description**
5734
5735Deletes the frame rate list.
5736
5737**Since**: 12
5738
5739**Parameters**
5740
5741| Name| Description|
5742| -------- | -------- |
5743| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.|
5744| frameRateRange | Pointer to the list of frame rates, which are defined in [Camera_FrameRateRange](_camera___frame_rate_range.md).|
5745
5746**Returns**
5747
5748In [Camera_ErrorCode](#camera_errorcode-1):
5749
5750- **CAMERA_OK**: The operation is successful.
5751
5752- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5753
5754
5755### OH_PreviewOutput_DeleteProfile()
5756
5757```
5758Camera_ErrorCode OH_PreviewOutput_DeleteProfile(Camera_Profile* profile)
5759```
5760
5761**Description**
5762
5763Deletes the profile of this **PreviewOutput** instance.
5764
5765**Since**: 12
5766
5767**Parameters**
5768
5769| Name| Description|
5770| -------- | -------- |
5771| profile | Pointer to a [Camera_Profile](_camera___profile.md) instance.|
5772
5773**Returns**
5774
5775In [Camera_ErrorCode](#camera_errorcode-1):
5776
5777- **CAMERA_OK**: The operation is successful.
5778
5779- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5780
5781
5782### OH_PreviewOutput_GetActiveFrameRate()
5783
5784```
5785Camera_ErrorCode OH_PreviewOutput_GetActiveFrameRate(Camera_PreviewOutput* previewOutput, Camera_FrameRateRange* frameRateRange)
5786```
5787
5788**Description**
5789
5790Obtains the active frame rates of a **PreviewOutput** instance.
5791
5792**Since**: 12
5793
5794**Parameters**
5795
5796| Name| Description|
5797| -------- | -------- |
5798| previewOutput | Pointer to a [Camera_PreviewOutput](#camera_previewoutput) instance.|
5799| frameRateRange | Pointer to the frame rates, which are defined in [Camera_FrameRateRange](_camera___frame_rate_range.md), if the function is successfully called.|
5800
5801**Returns**
5802
5803In [Camera_ErrorCode](#camera_errorcode-1):
5804
5805- **CAMERA_OK**: The operation is successful.
5806
5807- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5808
5809- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
5810
5811
5812### OH_PreviewOutput_GetActiveProfile()
5813
5814```
5815Camera_ErrorCode OH_PreviewOutput_GetActiveProfile(Camera_PreviewOutput* previewOutput, Camera_Profile** profile)
5816```
5817
5818**Description**
5819
5820Obtains the profile of a **PreviewOutput** instance.
5821
5822**Since**: 12
5823
5824**Parameters**
5825
5826| Name| Description|
5827| -------- | -------- |
5828| previewOutput | Pointer to a [Camera_PreviewOutput](#camera_previewoutput) instance.|
5829| profile | Double pointer to the profile, which is defined in [Camera_Profile](_camera___profile.md), if the function is successfully called.|
5830
5831**Returns**
5832
5833In [Camera_ErrorCode](#camera_errorcode-1):
5834
5835- **CAMERA_OK**: The operation is successful.
5836
5837- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5838
5839- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
5840
5841
5842### OH_PreviewOutput_GetSupportedFrameRates()
5843
5844```
5845Camera_ErrorCode OH_PreviewOutput_GetSupportedFrameRates(Camera_PreviewOutput* previewOutput, Camera_FrameRateRange** frameRateRange, uint32_t* size)
5846```
5847
5848**Description**
5849
5850Obtains the list of frame rates supported by a **PreviewOutput** instance.
5851
5852**Since**: 12
5853
5854**Parameters**
5855
5856| Name| Description|
5857| -------- | -------- |
5858| previewOutput | Pointer to the [Camera_PreviewOutput](#camera_previewoutput) instance.|
5859| frameRateRange | Double pointer to the list of frame rates, which are defined in [Camera_FrameRateRange](_camera___frame_rate_range.md), if the function is successfully called.|
5860| size | Pointer to the size of the list of frame rates.|
5861
5862**Returns**
5863
5864In [Camera_ErrorCode](#camera_errorcode-1):
5865
5866- **CAMERA_OK**: The operation is successful.
5867
5868- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5869
5870- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
5871
5872
5873### OH_PreviewOutput_RegisterCallback()
5874
5875```
5876Camera_ErrorCode OH_PreviewOutput_RegisterCallback(Camera_PreviewOutput* previewOutput, PreviewOutput_Callbacks* callback)
5877```
5878
5879**Description**
5880
5881Registers a callback to listen for preview output events.
5882
5883**Since**: 11
5884
5885**Parameters**
5886
5887| Name| Description|
5888| -------- | -------- |
5889| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.|
5890| callback | Pointer to the target callback, which is defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct.|
5891
5892**Returns**
5893
5894In [Camera_ErrorCode](#camera_errorcode-1):
5895
5896- **CAMERA_OK**: The operation is successful.
5897
5898- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5899
5900
5901### OH_PreviewOutput_Release()
5902
5903```
5904Camera_ErrorCode OH_PreviewOutput_Release(Camera_PreviewOutput* previewOutput)
5905```
5906
5907**Description**
5908
5909Releases a **PreviewOutput** instance.
5910
5911**Since**: 11
5912
5913**Parameters**
5914
5915| Name| Description|
5916| -------- | -------- |
5917| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.|
5918
5919**Returns**
5920
5921In [Camera_ErrorCode](#camera_errorcode-1):
5922
5923- **CAMERA_OK**: The operation is successful.
5924
5925- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5926
5927- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
5928
5929
5930### OH_PreviewOutput_SetFrameRate()
5931
5932```
5933Camera_ErrorCode OH_PreviewOutput_SetFrameRate(Camera_PreviewOutput* previewOutput, int32_t minFps, int32_t maxFps)
5934```
5935
5936**Description**
5937
5938Sets the frame rates for a **PreviewOutput** instance.
5939
5940**Since**: 12
5941
5942**Parameters**
5943
5944| Name| Description|
5945| -------- | -------- |
5946| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.|
5947| minFps | Minimum frame rate.|
5948| maxFps | Maximum frame rate.|
5949
5950**Returns**
5951
5952In [Camera_ErrorCode](#camera_errorcode-1):
5953
5954- **CAMERA_OK**: The operation is successful.
5955
5956- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5957
5958
5959### OH_PreviewOutput_Start()
5960
5961```
5962Camera_ErrorCode OH_PreviewOutput_Start(Camera_PreviewOutput* previewOutput)
5963```
5964
5965**Description**
5966
5967Starts preview output.
5968
5969**Since**: 11
5970
5971**Parameters**
5972
5973| Name| Description|
5974| -------- | -------- |
5975| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.|
5976
5977**Returns**
5978
5979In [Camera_ErrorCode](#camera_errorcode-1):
5980
5981- **CAMERA_OK**: The operation is successful.
5982
5983- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
5984
5985- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
5986
5987- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
5988
5989
5990### OH_PreviewOutput_Stop()
5991
5992```
5993Camera_ErrorCode OH_PreviewOutput_Stop(Camera_PreviewOutput* previewOutput)
5994```
5995
5996**Description**
5997
5998Stops preview output.
5999
6000**Since**: 11
6001
6002**Parameters**
6003
6004| Name| Description|
6005| -------- | -------- |
6006| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.|
6007
6008**Returns**
6009
6010In [Camera_ErrorCode](#camera_errorcode-1):
6011
6012- **CAMERA_OK**: The operation is successful.
6013
6014- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
6015
6016- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
6017
6018
6019### OH_PreviewOutput_UnregisterCallback()
6020
6021```
6022Camera_ErrorCode OH_PreviewOutput_UnregisterCallback(Camera_PreviewOutput* previewOutput, PreviewOutput_Callbacks* callback)
6023```
6024
6025**Description**
6026
6027Unregisters the callback used to listen for preview output events.
6028
6029**Since**: 11
6030
6031**Parameters**
6032
6033| Name| Description|
6034| -------- | -------- |
6035| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.|
6036| callback | Pointer to the target callback, which is defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct.|
6037
6038**Returns**
6039
6040In [Camera_ErrorCode](#camera_errorcode-1):
6041
6042- **CAMERA_OK**: The operation is successful.
6043
6044- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
6045
6046
6047### OH_VideoOutput_DeleteFrameRates()
6048
6049```
6050Camera_ErrorCode OH_VideoOutput_DeleteFrameRates(Camera_VideoOutput* videoOutput, Camera_FrameRateRange* frameRateRange)
6051```
6052
6053**Description**
6054
6055Deletes the frame rate list.
6056
6057**Since**: 12
6058
6059**Parameters**
6060
6061| Name| Description|
6062| -------- | -------- |
6063| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.|
6064| frameRateRange | Pointer to the list of frame rates, which are defined in [Camera_FrameRateRange](_camera___frame_rate_range.md).|
6065
6066**Returns**
6067
6068In [Camera_ErrorCode](#camera_errorcode-1):
6069
6070- **CAMERA_OK**: The operation is successful.
6071
6072- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
6073
6074
6075### OH_VideoOutput_DeleteProfile()
6076
6077```
6078Camera_ErrorCode OH_VideoOutput_DeleteProfile(Camera_VideoProfile* profile)
6079```
6080
6081**Description**
6082
6083Deletes the profile of this **VideoOutput** instance.
6084
6085**Since**: 12
6086
6087**Parameters**
6088
6089| Name| Description|
6090| -------- | -------- |
6091| profile | Pointer to the [Camera_VideoProfile](_camera___video_profile.md) instance.|
6092
6093**Returns**
6094
6095In [Camera_ErrorCode](#camera_errorcode-1):
6096
6097- **CAMERA_OK**: The operation is successful.
6098
6099- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
6100
6101
6102### OH_VideoOutput_GetActiveFrameRate()
6103
6104```
6105Camera_ErrorCode OH_VideoOutput_GetActiveFrameRate(Camera_VideoOutput* videoOutput, Camera_FrameRateRange* frameRateRange)
6106```
6107
6108**Description**
6109
6110Obtains the active frame rates of a **VideoOutput** instance.
6111
6112**Since**: 12
6113
6114**Parameters**
6115
6116| Name| Description|
6117| -------- | -------- |
6118| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance.|
6119| frameRateRange | Pointer to the frame rates, which are defined in [Camera_FrameRateRange](_camera___frame_rate_range.md), if the function is successfully called.|
6120
6121**Returns**
6122
6123In [Camera_ErrorCode](#camera_errorcode-1):
6124
6125- **CAMERA_OK**: The operation is successful.
6126
6127- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
6128
6129- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
6130
6131
6132### OH_VideoOutput_GetActiveProfile()
6133
6134```
6135Camera_ErrorCode OH_VideoOutput_GetActiveProfile(Camera_VideoOutput* videoOutput, Camera_VideoProfile** profile)
6136```
6137
6138**Description**
6139
6140Obtains the profile of a **VideoOutput** instance.
6141
6142**Since**: 12
6143
6144**Parameters**
6145
6146| Name| Description|
6147| -------- | -------- |
6148| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance.|
6149| profile | Double pointer to the profile, which is defined in [Camera_VideoProfile](_camera___video_profile.md), if the function is successfully called.|
6150
6151**Returns**
6152
6153In [Camera_ErrorCode](#camera_errorcode-1):
6154
6155- **CAMERA_OK**: The operation is successful.
6156
6157- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
6158
6159- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
6160
6161
6162### OH_VideoOutput_GetSupportedFrameRates()
6163
6164```
6165Camera_ErrorCode OH_VideoOutput_GetSupportedFrameRates(Camera_VideoOutput* videoOutput, Camera_FrameRateRange** frameRateRange, uint32_t* size)
6166```
6167
6168**Description**
6169
6170Obtains the list of frame rates supported by a **VideoOutput** instance.
6171
6172**Since**: 12
6173
6174**Parameters**
6175
6176| Name| Description|
6177| -------- | -------- |
6178| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance.|
6179| frameRateRange | Double pointer to the list of frame rates, which are defined in [Camera_FrameRateRange](_camera___frame_rate_range.md), if the function is successfully called.|
6180| size | Pointer to the size of the list of frame rates.|
6181
6182**Returns**
6183
6184In [Camera_ErrorCode](#camera_errorcode-1):
6185
6186- **CAMERA_OK**: The operation is successful.
6187
6188- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
6189
6190- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
6191
6192
6193### OH_VideoOutput_RegisterCallback()
6194
6195```
6196Camera_ErrorCode OH_VideoOutput_RegisterCallback(Camera_VideoOutput* videoOutput, VideoOutput_Callbacks* callback)
6197```
6198
6199**Description**
6200
6201Registers a callback to listen for video output events.
6202
6203**Since**: 11
6204
6205**Parameters**
6206
6207| Name| Description|
6208| -------- | -------- |
6209| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.|
6210| callback | Pointer to the target callback, which is defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct.|
6211
6212**Returns**
6213
6214In [Camera_ErrorCode](#camera_errorcode-1):
6215
6216- **CAMERA_OK**: The operation is successful.
6217
6218- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
6219
6220
6221### OH_VideoOutput_Release()
6222
6223```
6224Camera_ErrorCode OH_VideoOutput_Release(Camera_VideoOutput* videoOutput)
6225```
6226
6227**Description**
6228
6229Releases a **VideoOutput** instance.
6230
6231**Since**: 11
6232
6233**Parameters**
6234
6235| Name| Description|
6236| -------- | -------- |
6237| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.|
6238
6239**Returns**
6240
6241In [Camera_ErrorCode](#camera_errorcode-1):
6242
6243- **CAMERA_OK**: The operation is successful.
6244
6245- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
6246
6247- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
6248
6249
6250### OH_VideoOutput_SetFrameRate()
6251
6252```
6253Camera_ErrorCode OH_VideoOutput_SetFrameRate(Camera_VideoOutput* videoOutput, int32_t minFps, int32_t maxFps)
6254```
6255
6256**Description**
6257
6258Sets the frame rates for a **VideoOutput** instance.
6259
6260**Since**: 12
6261
6262**Parameters**
6263
6264| Name| Description|
6265| -------- | -------- |
6266| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.|
6267| minFps      | Minimum frame rate.                               |
6268| maxFps      | Maximum frame rate.                               |
6269
6270**Returns**
6271
6272In [Camera_ErrorCode](#camera_errorcode-1):
6273
6274- **CAMERA_OK**: The operation is successful.
6275
6276- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
6277
6278
6279### OH_VideoOutput_Start()
6280
6281```
6282Camera_ErrorCode OH_VideoOutput_Start(Camera_VideoOutput* videoOutput)
6283```
6284
6285**Description**
6286
6287Starts video output.
6288
6289**Since**: 11
6290
6291**Parameters**
6292
6293| Name| Description|
6294| -------- | -------- |
6295| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.|
6296
6297**Returns**
6298
6299In [Camera_ErrorCode](#camera_errorcode-1):
6300
6301- **CAMERA_OK**: The operation is successful.
6302
6303- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
6304
6305- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured.
6306
6307- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
6308
6309
6310### OH_VideoOutput_Stop()
6311
6312```
6313Camera_ErrorCode OH_VideoOutput_Stop(Camera_VideoOutput* videoOutput)
6314```
6315
6316**Description**
6317
6318Stops video output.
6319
6320**Since**: 11
6321
6322**Parameters**
6323
6324| Name| Description|
6325| -------- | -------- |
6326| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.|
6327
6328**Returns**
6329
6330In [Camera_ErrorCode](#camera_errorcode-1):
6331
6332- **CAMERA_OK**: The operation is successful.
6333
6334- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
6335
6336- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service.
6337
6338
6339### OH_VideoOutput_UnregisterCallback()
6340
6341```
6342Camera_ErrorCode OH_VideoOutput_UnregisterCallback(Camera_VideoOutput* videoOutput, VideoOutput_Callbacks* callback)
6343```
6344
6345**Description**
6346
6347Unregisters the callback used to listen for video output events.
6348
6349**Since**: 11
6350
6351**Parameters**
6352
6353| Name| Description|
6354| -------- | -------- |
6355| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.|
6356| callback | Pointer to the target callback, which is defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct.|
6357
6358**Returns**
6359
6360In [Camera_ErrorCode](#camera_errorcode-1):
6361
6362- **CAMERA_OK**: The operation is successful.
6363
6364- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect.
6365