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