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