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.<br>**Library**: libohcamera.so<br>**File to include**: <multimedia/camera_framework/camera.h> | 21| [camera_input.h](camera__input_8h.md) | Declares the camera input concepts.<br>**Library**: libohcamera.so<br>**File to include**: <multimedia/camera_framework/camera_input.h>| 22| [camera_manager.h](camera__manager_8h.md) | Declares the camera manager concepts.<br>**Library**: libohcamera.so<br>**File to include**: <multimedia/camera_framework/camera_manager.h>| 23| [capture_session.h](capture__session_8h.md) | Declares the session capture concepts.<br>**Library**: libohcamera.so<br>**File to include**: <multimedia/camera_framework/capture_session.h>| 24| [metadata_output.h](metadata__output_8h.md) | Declares the metadata output concepts.<br>**Library**: libohcamera.so<br>**File to include**: <multimedia/camera_framework/metadata_output.h>| 25| [photo_output.h](photo__output_8h.md) | Declares the photo output concepts.<br>**Library**: libohcamera.so<br>**File to include**: <multimedia/camera_framework/photo_output.h>| 26| [preview_output.h](preview__output_8h.md) | Declares the preview output concepts.<br>**Library**: libohcamera.so<br>**File to include**: <multimedia/camera_framework/preview_output.h>| 27| [video_output.h](video__output_8h.md) | Declares the video output concepts.<br>**Library**: libohcamera.so<br>**File to include**: <multimedia/camera_framework/video_output.h>| 28 29 30### Structs 31 32| Name| Description| 33| -------- | -------- | 34| [Camera_Size](_camera___size.md) | Defines the parameters that describe the size.| 35| [Camera_Profile](_camera___profile.md) | Defines the profile of the camera stream.| 36| [Camera_FrameRateRange](_camera___frame_rate_range.md) | Defines the frame rate range.| 37| [Camera_VideoProfile](_camera___video_profile.md) | Defines the video profile.| 38| [Camera_OutputCapability](_camera___output_capability.md) | Defines the camera output capability.| 39| [Camera_Device](_camera___device.md) | Defines the camera device.| 40| [Camera_StatusInfo](_camera___status_info.md) | Defines the camera status information.| 41| [Camera_Point](_camera___point.md) | Defines the parameters that describe a point.| 42| [Camera_Location](_camera___location.md) | Defines the location where the photo is taken.| 43| [Camera_PhotoCaptureSetting](_camera___photo_capture_setting.md) | Defines the photographing parameters.| 44| [Camera_FrameShutterInfo](_camera___frame_shutter_info.md) | Defines the frame shutter callback.| 45| [Camera_CaptureEndInfo](_camera___capture_end_info.md) | Defines the capture end information.| 46| [Camera_Rect](_camera___rect.md) | Defines the rectangle.| 47| [Camera_MetadataObject](_camera___metadata_object.md) | Defines the camera metadata.| 48| [CameraInput_Callbacks](_camera_input___callbacks.md) | Defines the callbacks used to listen for camera input errors.| 49| [CameraManager_Callbacks](_camera_manager___callbacks.md) | Defines the callbacks used to listen for camera status changes.| 50| [CaptureSession_Callbacks](_capture_session___callbacks.md) | Defines the callbacks used for session capture.| 51| [MetadataOutput_Callbacks](_metadata_output___callbacks.md) | Defines the callback functions of metadata output.| 52| [PhotoOutput_Callbacks](_photo_output___callbacks.md) | Defines the callbacks used for photo output.| 53| [PreviewOutput_Callbacks](_preview_output___callbacks.md) | Defines the callbacks used for preview output.| 54| [VideoOutput_Callbacks](_video_output___callbacks.md) | Defines the callbacks used for video output.| 55 56 57### Types 58 59| Name| Description| 60| -------- | -------- | 61| [Camera_Manager](#camera_manager) | Defines the camera manager.| 62| [Camera_ErrorCode](#camera_errorcode) | Defines an enum that enumerates the camera error codes.| 63| [Camera_Status](#camera_status) | Defines an enum that enumerates the camera statuses.| 64| [Camera_Position](#camera_position) | Defines an enum that enumerates the camera positions.| 65| [Camera_Type](#camera_type) | Defines an enum that enumerates the camera types.| 66| [Camera_Connection](#camera_connection) | Defines an enum that enumerates the camera connection types.| 67| [Camera_Format](#camera_format) | Defines an enum that enumerates the camera output formats.| 68| [Camera_FlashMode](#camera_flashmode) | Defines an enum that enumerates the flash modes.| 69| [Camera_ExposureMode](#camera_exposuremode) | Defines an enum that enumerates the exposure modes.| 70| [Camera_FocusMode](#camera_focusmode) | Defines an enum that enumerates the focus modes.| 71| [Camera_FocusState](#camera_focusstate) | Defines an enum that enumerates the focus states.| 72| [Camera_VideoStabilizationMode](#camera_videostabilizationmode) | Defines an enum that enumerates the video stabilization modes.| 73| [Camera_ImageRotation](#camera_imagerotation) | Defines an enum that enumerates the image rotation angles.| 74| [Camera_QualityLevel](#camera_qualitylevel) | Defines an enum that enumerates the image quality levels.| 75| [Camera_MetadataObjectType](#camera_metadataobjecttype) | Defines an enum that enumerates the metadata object types.| 76| [Camera_Size](#camera_size) | Defines the parameters that describe the size.| 77| [Camera_Profile](#camera_profile) | Defines the profile of the camera stream.| 78| [Camera_FrameRateRange](#camera_frameraterange) | Defines the frame rate range.| 79| [Camera_VideoProfile](#camera_videoprofile) | Defines the video profile.| 80| [Camera_OutputCapability](#camera_outputcapability) | Defines the camera output capability.| 81| [Camera_Device](#camera_device) | Defines the camera device.| 82| [Camera_StatusInfo](#camera_statusinfo) | Defines the camera status information.| 83| [Camera_Point](#camera_point) | Defines the parameters that describe a point.| 84| [Camera_Location](#camera_location) | Defines the location where the photo is taken.| 85| [Camera_PhotoCaptureSetting](#camera_photocapturesetting) | Defines the photographing parameters.| 86| [Camera_FrameShutterInfo](#camera_frameshutterinfo) | Defines the frame shutter callback.| 87| [Camera_CaptureEndInfo](#camera_captureendinfo) | Defines the capture end information.| 88| [Camera_Rect](#camera_rect) | Defines the rectangle.| 89| [Camera_MetadataObject](#camera_metadataobject) | Defines the camera metadata.| 90| [Camera_Input](#camera_input) | Defines the camera input object.| 91| (\*[OH_CameraInput_OnError](#oh_camerainput_onerror)) (const [Camera_Input](#camera_input) \*cameraInput, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the pointer to the callback defined in the [CameraInput_Callbacks](_camera_input___callbacks.md) struct and used to report camera input errors.| 92| [CameraInput_Callbacks](#camerainput_callbacks) | Defines the callbacks used to listen for camera input errors.| 93| (\*[OH_CameraManager_StatusCallback](#oh_cameramanager_statuscallback)) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_StatusInfo](_camera___status_info.md) \*status) | Defines the pointer to the callback defined in the [CameraManager_Callbacks](_camera_manager___callbacks.md) struct and used to report the camera manager status.| 94| [CameraManager_Callbacks](#cameramanager_callbacks) | Defines the callbacks used to listen for camera status changes.| 95| [Camera_CaptureSession](#camera_capturesession) | Defines the session capture object.| 96| (\*[OH_CaptureSession_OnFocusStateChange](#oh_capturesession_onfocusstatechange)) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FocusState](#camera_focusstate) focusState) | Defines the pointer to the callback defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct and used to report session capture focus status changes.| 97| (\*[OH_CaptureSession_OnError](#oh_capturesession_onerror)) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the pointer to the callback defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct and used to report capture session errors.| 98| [CaptureSession_Callbacks](#capturesession_callbacks) | Defines the callbacks used for session capture.| 99| [Camera_MetadataOutput](#camera_metadataoutput) | Defines the metadata output object.| 100| (\*[OH_MetadataOutput_OnMetadataObjectAvailable](#oh_metadataoutput_onmetadataobjectavailable)) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput, [Camera_MetadataObject](_camera___metadata_object.md) \*metadataObject, uint32_t size) | Defines the pointer to the callback defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct and used to report metadata output data.| 101| (\*[OH_MetadataOutput_OnError](#oh_metadataoutput_onerror)) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the pointer to the callback defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct and used to report metadata output errors.| 102| [MetadataOutput_Callbacks](#metadataoutput_callbacks) | Defines the callback functions of metadata output.| 103| [Camera_PhotoOutput](#camera_photooutput) | Defines the photo output object.| 104| (\*[OH_PhotoOutput_OnFrameStart](#oh_photooutput_onframestart)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput) | Defines the pointer to the callback defined in the **PhotoOutput_Callbacks** struct and used to report photo output frame start events.| 105| (\*[OH_PhotoOutput_OnFrameShutter](#oh_photooutput_onframeshutter)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [Camera_FrameShutterInfo](_camera___frame_shutter_info.md) \*info) | Defines the pointer to the callback defined in the **PhotoOutput_Callbacks** struct and used to report frame shutter events.| 106| (\*[OH_PhotoOutput_OnFrameEnd](#oh_photooutput_onframeend)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, int32_t frameCount) | Defines the pointer to the callback defined in the **PhotoOutput_Callbacks** struct and used to report photo output frame end events.| 107| (\*[OH_PhotoOutput_OnError](#oh_photooutput_onerror)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the pointer to the callback defined in the **PhotoOutput_Callbacks** struct and used to report photo output errors.| 108| [PhotoOutput_Callbacks](#photooutput_callbacks) | Defines the callbacks used for photo output.| 109| [Camera_PreviewOutput](#camera_previewoutput) | Defines the preview output object.| 110| (\*[OH_PreviewOutput_OnFrameStart](#oh_previewoutput_onframestart)) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Defines the pointer to the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used to report preview output frame start events.| 111| (\*[OH_PreviewOutput_OnFrameEnd](#oh_previewoutput_onframeend)) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, int32_t frameCount) | Defines the pointer to the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used to report preview output frame end events.| 112| (\*[OH_PreviewOutput_OnError](#oh_previewoutput_onerror)) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the pointer to the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used to report preview output errors.| 113| [PreviewOutput_Callbacks](#previewoutput_callbacks) | Defines the callbacks used for preview output.| 114| [Camera_VideoOutput](#camera_videooutput) | Defines the video output object.| 115| (\*[OH_VideoOutput_OnFrameStart](#oh_videooutput_onframestart)) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Defines the pointer to the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output frame start events.| 116| (\*[OH_VideoOutput_OnFrameEnd](#oh_videooutput_onframeend)) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, int32_t frameCount) | Defines the pointer to the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output frame end events.| 117| (\*[OH_VideoOutput_OnError](#oh_videooutput_onerror)) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the pointer to the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output errors.| 118| [VideoOutput_Callbacks](#videooutput_callbacks) | Defines the callbacks used for video output.| 119 120 121### Enums 122 123| Name| Description| 124| -------- | -------- | 125| [Camera_ErrorCode](#camera_errorcode) {<br>CAMERA_OK = 0, CAMERA_INVALID_ARGUMENT = 7400101, CAMERA_OPERATION_NOT_ALLOWED = 7400102, CAMERA_SESSION_NOT_CONFIG = 7400103,<br>CAMERA_SESSION_NOT_RUNNING = 7400104, CAMERA_SESSION_CONFIG_LOCKED = 7400105, CAMERA_DEVICE_SETTING_LOCKED = 7400106, CAMERA_CONFLICT_CAMERA = 7400107,<br>CAMERA_DEVICE_DISABLED = 7400108, CAMERA_DEVICE_PREEMPTED = 7400109, CAMERA_SERVICE_FATAL_ERROR = 7400201<br>} | Enumerates the camera error codes.| 126| [Camera_Status](#camera_status) { CAMERA_STATUS_APPEAR = 0, CAMERA_STATUS_DISAPPEAR = 1, CAMERA_STATUS_AVAILABLE = 2, CAMERA_STATUS_UNAVAILABLE = 3 } | Enumerates the camera statuses.| 127| [Camera_Position](#camera_position) { CAMERA_POSITION_UNSPECIFIED = 0, CAMERA_POSITION_BACK = 1, CAMERA_POSITION_FRONT = 2 } | Enumerates the camera positions.| 128| [Camera_Type](#camera_type) {<br>CAMERA_TYPE_DEFAULT = 0, CAMERA_TYPE_WIDE_ANGLE = 1, CAMERA_TYPE_ULTRA_WIDE = 2, CAMERA_TYPE_TELEPHOTO = 3,<br>CAMERA_TYPE_TRUE_DEPTH = 4<br>} | Enumerates the camera types.| 129| [Camera_Connection](#camera_connection) { CAMERA_CONNECTION_BUILT_IN = 0, CAMERA_CONNECTION_USB_PLUGIN = 1, CAMERA_CONNECTION_REMOTE = 2 } | Enumerates the camera connection types.| 130| [Camera_Format](#camera_format) { CAMERA_FORMAT_RGBA_8888 = 3, CAMERA_FORMAT_YUV_420_SP = 1003, CAMERA_FORMAT_JPEG = 2000 } | Enumerates the camera output formats.| 131| [Camera_FlashMode](#camera_flashmode) { FLASH_MODE_CLOSE = 0, FLASH_MODE_OPEN = 1, FLASH_MODE_AUTO = 2, FLASH_MODE_ALWAYS_OPEN = 3 } | Enumerates the flash modes.| 132| [Camera_ExposureMode](#camera_exposuremode) { EXPOSURE_MODE_LOCKED = 0, EXPOSURE_MODE_AUTO = 1, EXPOSURE_MODE_CONTINUOUS_AUTO = 2 } | Enumerates the exposure modes.| 133| [Camera_FocusMode](#camera_focusmode) { FOCUS_MODE_MANUAL = 0, FOCUS_MODE_CONTINUOUS_AUTO = 1, FOCUS_MODE_AUTO = 2, FOCUS_MODE_LOCKED = 3 } | Enumerates the focus modes.| 134| [Camera_FocusState](#camera_focusstate) { FOCUS_STATE_SCAN = 0, FOCUS_STATE_FOCUSED = 1, FOCUS_STATE_UNFOCUSED = 2 } | Enumerates the focus states.| 135| [Camera_VideoStabilizationMode](#camera_videostabilizationmode) {<br>STABILIZATION_MODE_OFF = 0, STABILIZATION_MODE_LOW = 1, STABILIZATION_MODE_MIDDLE = 2, STABILIZATION_MODE_HIGH = 3,<br>STABILIZATION_MODE_AUTO = 4<br>} | Enumerates the video stabilization modes.| 136| [Camera_ImageRotation](#camera_imagerotation) { IAMGE_ROTATION_0 = 0, IAMGE_ROTATION_90 = 90, IAMGE_ROTATION_180 = 180, IAMGE_ROTATION_270 = 270 } | Enumerates the image rotation angles.| 137| [Camera_QualityLevel](#camera_qualitylevel) { QUALITY_LEVEL_HIGH = 0, QUALITY_LEVEL_MEDIUM = 1, QUALITY_LEVEL_LOW = 2 } | Enumerates the image quality levels.| 138| [Camera_MetadataObjectType](#camera_metadataobjecttype) { FACE_DETECTION = 0 } | Enumerates the metadata object types.| 139 140 141### Functions 142 143| Name| Description| 144| -------- | -------- | 145| [OH_Camera_GetCameraManager](#oh_camera_getcameramanager) ([Camera_Manager](#camera_manager) \*\*cameraManager) | Obtains a **CameraManager** instance.| 146| [OH_Camera_DeleteCameraManager](#oh_camera_deletecameramanager) ([Camera_Manager](#camera_manager) \*cameraManager) | Deletes a **CameraManager** instance.| 147| [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 changes.| 148| [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.| 149| [OH_CameraInput_Open](#oh_camerainput_open) ([Camera_Input](#camera_input) \*cameraInput) | Opens a camera.| 150| [OH_CameraInput_Close](#oh_camerainput_close) ([Camera_Input](#camera_input) \*cameraInput) | Closes a camera.| 151| [OH_CameraInput_Release](#oh_camerainput_release) ([Camera_Input](#camera_input) \*cameraInput) | Releases a **CameraInput** instance.| 152| [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.| 153| [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.| 154| [OH_CameraManager_GetSupportedCameras](#oh_cameramanager_getsupportedcameras) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_Device](_camera___device.md) \*\*cameras, uint32_t \*size) | Obtains supported cameras.| 155| [OH_CameraManager_DeleteSupportedCameras](#oh_cameramanager_deletesupportedcameras) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_Device](_camera___device.md) \*cameras, uint32_t size) | Deletes supported cameras.| 156| [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 in the specified mode.| 157| [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.| 158| [OH_CameraManager_IsCameraMuted](#oh_cameramanager_iscameramuted) ([Camera_Manager](#camera_manager) \*cameraManager, bool \*isCameraMuted) | Checks whether a camera is muted.| 159| [OH_CameraManager_CreateCaptureSession](#oh_cameramanager_createcapturesession) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_CaptureSession](#camera_capturesession) \*\*captureSession) | Creates a **CaptureSession** instance.| 160| [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.| 161| [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.| 162| [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.| 163| [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.| 164| [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.| 165| [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.| 166| [OH_CaptureSession_RegisterCallback](#oh_capturesession_registercallback) ([Camera_CaptureSession](#camera_capturesession) \*session, [CaptureSession_Callbacks](_capture_session___callbacks.md) \*callback) | Registers a callback to listen for session capture events.| 167| [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 session capture events.| 168| [OH_CaptureSession_BeginConfig](#oh_capturesession_beginconfig) ([Camera_CaptureSession](#camera_capturesession) \*session) | Starts the configuration for session capture.| 169| [OH_CaptureSession_CommitConfig](#oh_capturesession_commitconfig) ([Camera_CaptureSession](#camera_capturesession) \*session) | Commits the configuration for session capture.| 170| [OH_CaptureSession_AddInput](#oh_capturesession_addinput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Input](#camera_input) \*cameraInput) | Adds a **CameraInput** instance to a session.| 171| [OH_CaptureSession_RemoveInput](#oh_capturesession_removeinput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Input](#camera_input) \*cameraInput) | Removes a **CameraInput** instance from a session.| 172| [OH_CaptureSession_AddPreviewOutput](#oh_capturesession_addpreviewoutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Adds a **PreviewOutput** instance to a session.| 173| [OH_CaptureSession_RemovePreviewOutput](#oh_capturesession_removepreviewoutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Removes a **PreviewOutput** instance from a session.| 174| [OH_CaptureSession_AddPhotoOutput](#oh_capturesession_addphotooutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PhotoOutput](#camera_photooutput) \*photoOutput) | Adds a **PhotoOutput** instance to a session.| 175| [OH_CaptureSession_RemovePhotoOutput](#oh_capturesession_removephotooutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PhotoOutput](#camera_photooutput) \*photoOutput) | Removes a **PhotoOutput** instance from a session.| 176| [OH_CaptureSession_AddVideoOutput](#oh_capturesession_addvideooutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Adds a **VideoOutput** instance to a session.| 177| [OH_CaptureSession_RemoveVideoOutput](#oh_capturesession_removevideooutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Removes a **VideoOutput** instance from a session.| 178| [OH_CaptureSession_AddMetadataOutput](#oh_capturesession_addmetadataoutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput) | Adds a **MetadataOutput** instance to a session.| 179| [OH_CaptureSession_RemoveMetadataOutput](#oh_capturesession_removemetadataoutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput) | Removes a **MetadataOutput** instance from a session.| 180| [OH_CaptureSession_Start](#oh_capturesession_start) ([Camera_CaptureSession](#camera_capturesession) \*session) | Starts session capture.| 181| [OH_CaptureSession_Stop](#oh_capturesession_stop) ([Camera_CaptureSession](#camera_capturesession) \*session) | Stops session capture.| 182| [OH_CaptureSession_Release](#oh_capturesession_release) ([Camera_CaptureSession](#camera_capturesession) \*session) | Releases a **CaptureSession** instance.| 183| [OH_CaptureSession_HasFlash](#oh_capturesession_hasflash) ([Camera_CaptureSession](#camera_capturesession) \*session, bool \*hasFlash) | Checks whether the device has flash.| 184| [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.| 185| [OH_CaptureSession_GetFlashMode](#oh_capturesession_getflashmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FlashMode](#camera_flashmode) \*flashMode) | Obtains the flash mode in use.| 186| [OH_CaptureSession_SetFlashMode](#oh_capturesession_setflashmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FlashMode](#camera_flashmode) flashMode) | Sets a flash mode for the device.| 187| [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.| 188| [OH_CaptureSession_GetExposureMode](#oh_capturesession_getexposuremode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_ExposureMode](#camera_exposuremode) \*exposureMode) | Obtains the exposure mode in use.| 189| [OH_CaptureSession_SetExposureMode](#oh_capturesession_setexposuremode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_ExposureMode](#camera_exposuremode) exposureMode) | Sets an exposure mode for the device.| 190| [OH_CaptureSession_GetMeteringPoint](#oh_capturesession_getmeteringpoint) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Point](_camera___point.md) \*point) | Obtains the metering point in use.| 191| [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.| 192| [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.| 193| [OH_CaptureSession_SetExposureBias](#oh_capturesession_setexposurebias) ([Camera_CaptureSession](#camera_capturesession) \*session, float exposureBias) | Sets an exposure compensation value for the device.| 194| [OH_CaptureSession_GetExposureBias](#oh_capturesession_getexposurebias) ([Camera_CaptureSession](#camera_capturesession) \*session, float \*exposureBias) | Obtains the exposure compensation value in use.| 195| [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.| 196| [OH_CaptureSession_GetFocusMode](#oh_capturesession_getfocusmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FocusMode](#camera_focusmode) \*focusMode) | Obtains the focus mode in use.| 197| [OH_CaptureSession_SetFocusMode](#oh_capturesession_setfocusmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FocusMode](#camera_focusmode) focusMode) | Sets a focus mode for the device.| 198| [OH_CaptureSession_GetFocusPoint](#oh_capturesession_getfocuspoint) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Point](_camera___point.md) \*focusPoint) | Obtains the focal point in use.| 199| [OH_CaptureSession_SetFocusPoint](#oh_capturesession_setfocuspoint) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Point](_camera___point.md) focusPoint) | Sets a focal point for the device.| 200| [OH_CaptureSession_GetZoomRatioRange](#oh_capturesession_getzoomratiorange) ([Camera_CaptureSession](#camera_capturesession) \*session, float \*minZoom, float \*maxZoom) | Obtains the supported zoom ratio range.| 201| [OH_CaptureSession_GetZoomRatio](#oh_capturesession_getzoomratio) ([Camera_CaptureSession](#camera_capturesession) \*session, float \*zoom) | Obtains the zoom ratio in use.| 202| [OH_CaptureSession_SetZoomRatio](#oh_capturesession_setzoomratio) ([Camera_CaptureSession](#camera_capturesession) \*session, float zoom) | Sets a zoom ratio for the device. | 203| [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. | 204| [OH_CaptureSession_GetVideoStabilizationMode](#oh_capturesession_getvideostabilizationmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_VideoStabilizationMode](#camera_videostabilizationmode) \*mode) | Obtains the video stabilization mode in use.| 205| [OH_CaptureSession_SetVideoStabilizationMode](#oh_capturesession_setvideostabilizationmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_VideoStabilizationMode](#camera_videostabilizationmode) mode) | Sets a video stabilization mode for the device.| 206| [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.| 207| [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.| 208| [OH_MetadataOutput_Start](#oh_metadataoutput_start) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput) | Starts metadata output.| 209| [OH_MetadataOutput_Stop](#oh_metadataoutput_stop) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput) | Stops metadata output.| 210| [OH_MetadataOutput_Release](#oh_metadataoutput_release) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput) | Releases a **MetadataOutput** instance.| 211| [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.| 212| [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.| 213| [OH_PhotoOutput_Capture](#oh_photooutput_capture) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput) | Captures a photo.| 214| [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 the photographing parameters.| 215| [OH_PhotoOutput_Release](#oh_photooutput_release) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput) | Releases a **PhotoOutput** instance.| 216| [OH_PhotoOutput_IsMirrorSupported](#oh_photooutput_ismirrorsupported) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, bool \*isSupported) | Checks whether mirroring is supported.| 217| [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.| 218| [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.| 219| [OH_PreviewOutput_Start](#oh_previewoutput_start) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Starts preview output.| 220| [OH_PreviewOutput_Stop](#oh_previewoutput_stop) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Stops preview output.| 221| [OH_PreviewOutput_Release](#oh_previewoutput_release) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Releases a **PreviewOutput** instance.| 222| [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.| 223| [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.| 224| [OH_VideoOutput_Start](#oh_videooutput_start) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Starts video output.| 225| [OH_VideoOutput_Stop](#oh_videooutput_stop) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Stops video output.| 226| [OH_VideoOutput_Release](#oh_videooutput_release) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Releases a **VideoOutput** instance.| 227 228 229## Type Description 230 231 232### Camera_CaptureEndInfo 233 234``` 235typedef struct Camera_CaptureEndInfoCamera_CaptureEndInfo 236``` 237 238**Description** 239 240Defines the capture end information. 241 242**Since**: 11 243 244 245### Camera_CaptureSession 246 247``` 248typedef struct Camera_CaptureSessionCamera_CaptureSession 249``` 250 251**Description** 252 253Defines the session capture object. 254 255You can call [Camera_CaptureSession](#camera_capturesession) to create such an object. 256 257**Since**: 11 258 259 260### Camera_Connection 261 262``` 263typedef enum Camera_ConnectionCamera_Connection 264``` 265 266**Description** 267 268Defines an enum that enumerates the camera connection types. 269 270**Since**: 11 271 272 273### Camera_Device 274 275``` 276typedef struct Camera_DeviceCamera_Device 277``` 278 279**Description** 280 281Defines the camera device. 282 283**Since**: 11 284 285 286### Camera_ErrorCode 287 288``` 289typedef enum Camera_ErrorCodeCamera_ErrorCode 290``` 291 292**Description** 293 294Defines an enum that enumerates the camera error codes. 295 296**Since**: 11 297 298 299### Camera_ExposureMode 300 301``` 302typedef enum Camera_ExposureModeCamera_ExposureMode 303``` 304 305**Description** 306 307Defines an enum that enumerates the exposure modes. 308 309**Since**: 11 310 311 312### Camera_FlashMode 313 314``` 315typedef enum Camera_FlashModeCamera_FlashMode 316``` 317 318**Description** 319 320Defines an enum that enumerates the flash modes. 321 322**Since**: 11 323 324 325### Camera_FocusMode 326 327``` 328typedef enum Camera_FocusModeCamera_FocusMode 329``` 330 331**Description** 332 333Defines an enum that enumerates the focus modes. 334 335**Since**: 11 336 337 338### Camera_FocusState 339 340``` 341typedef enum Camera_FocusStateCamera_FocusState 342``` 343 344**Description** 345 346Defines an enum that enumerates the focus states. 347 348**Since**: 11 349 350 351### Camera_Format 352 353``` 354typedef enum Camera_FormatCamera_Format 355``` 356 357**Description** 358 359Defines an enum that enumerates the camera output formats. 360 361**Since**: 11 362 363 364### Camera_FrameRateRange 365 366``` 367typedef struct Camera_FrameRateRangeCamera_FrameRateRange 368``` 369 370**Description** 371 372Defines the frame rate range. 373 374**Since**: 11 375 376 377### Camera_FrameShutterInfo 378 379``` 380typedef struct Camera_FrameShutterInfoCamera_FrameShutterInfo 381``` 382 383**Description** 384 385Defines the frame shutter callback. 386 387**Since**: 11 388 389 390### Camera_ImageRotation 391 392``` 393typedef enum Camera_ImageRotationCamera_ImageRotation 394``` 395 396**Description** 397 398Defines an enum that enumerates the image rotation angles. 399 400**Since**: 11 401 402 403### Camera_Input 404 405``` 406typedef struct Camera_InputCamera_Input 407``` 408 409**Description** 410 411Defines the camera input object. 412 413You can call [OH_CameraManager_CreateCameraInput](#oh_cameramanager_createcamerainput) to create such an object. 414 415**Since**: 11 416 417 418### Camera_Location 419 420``` 421typedef struct Camera_LocationCamera_Location 422``` 423 424**Description** 425 426Defines the location where the photo is taken. 427 428**Since**: 11 429 430 431### Camera_Manager 432 433``` 434typedef struct Camera_ManagerCamera_Manager 435``` 436 437**Description** 438 439Defines the camera manager. 440 441You can call [OH_Camera_GetCameraManager](#oh_camera_getcameramanager) to create such an object. 442 443**Since**: 11 444 445 446### Camera_MetadataObject 447 448``` 449typedef struct Camera_MetadataObjectCamera_MetadataObject 450``` 451 452**Description** 453 454Defines the camera metadata. 455 456**Since**: 11 457 458 459### Camera_MetadataObjectType 460 461``` 462typedef enum Camera_MetadataObjectTypeCamera_MetadataObjectType 463``` 464 465**Description** 466 467Defines an enum that enumerates the metadata object types. 468 469**Since**: 11 470 471 472### Camera_MetadataOutput 473 474``` 475typedef struct Camera_MetadataOutputCamera_MetadataOutput 476``` 477 478**Description** 479 480Defines the metadata output object. 481 482You can call [Camera_MetadataOutput](#camera_metadataoutput) to create such an object. 483 484**Since**: 11 485 486 487### Camera_OutputCapability 488 489``` 490typedef struct Camera_OutputCapabilityCamera_OutputCapability 491``` 492 493**Description** 494 495Defines the camera output capability. 496 497**Since**: 11 498 499 500### Camera_PhotoCaptureSetting 501 502``` 503typedef struct Camera_PhotoCaptureSettingCamera_PhotoCaptureSetting 504``` 505 506**Description** 507 508Defines the photographing parameters. 509 510**Since**: 11 511 512 513### Camera_PhotoOutput 514 515``` 516typedef struct Camera_PhotoOutputCamera_PhotoOutput 517``` 518 519**Description** 520 521Defines the photo output object. 522 523You can call **Camera_PhotoOutput** to create such an object. 524 525**Since**: 11 526 527 528### Camera_Point 529 530``` 531typedef struct Camera_PointCamera_Point 532``` 533 534**Description** 535 536Defines the parameters that describe a point. 537 538**Since**: 11 539 540 541### Camera_Position 542 543``` 544typedef enum Camera_PositionCamera_Position 545``` 546 547**Description** 548 549Defines an enum that enumerates the camera positions. 550 551**Since**: 11 552 553 554### Camera_PreviewOutput 555 556``` 557typedef struct Camera_PreviewOutputCamera_PreviewOutput 558``` 559 560**Description** 561 562Defines the preview output object. 563 564You can call [Camera_PreviewOutput](#camera_previewoutput) to create such an object. 565 566**Since**: 11 567 568 569### Camera_Profile 570 571``` 572typedef struct Camera_ProfileCamera_Profile 573``` 574 575**Description** 576 577Defines the profile of the camera stream. 578 579**Since**: 11 580 581 582### Camera_QualityLevel 583 584``` 585typedef enum Camera_QualityLevelCamera_QualityLevel 586``` 587 588**Description** 589 590Defines an enum that enumerates the image quality levels. 591 592**Since**: 11 593 594 595### Camera_Rect 596 597``` 598typedef struct Camera_RectCamera_Rect 599``` 600 601**Description** 602 603Defines the rectangle. 604 605**Since**: 11 606 607 608### Camera_Size 609 610``` 611typedef struct Camera_SizeCamera_Size 612``` 613 614**Description** 615 616Defines the parameters that describe the size. 617 618**Since**: 11 619 620 621### Camera_Status 622 623``` 624typedef enum Camera_StatusCamera_Status 625``` 626 627**Description** 628 629Defines an enum that enumerates the camera statuses. 630 631**Since**: 11 632 633 634### Camera_StatusInfo 635 636``` 637typedef struct Camera_StatusInfoCamera_StatusInfo 638``` 639 640**Description** 641 642Defines the camera status information. 643 644**Since**: 11 645 646 647### Camera_Type 648 649``` 650typedef enum Camera_TypeCamera_Type 651``` 652 653**Description** 654 655Defines an enum that enumerates the camera types. 656 657**Since**: 11 658 659 660### Camera_VideoOutput 661 662``` 663typedef struct Camera_VideoOutputCamera_VideoOutput 664``` 665 666**Description** 667 668Defines the video output object. 669 670You can call [Camera_VideoOutput](#camera_videooutput) to create such an object. 671 672**Since**: 11 673 674 675### Camera_VideoProfile 676 677``` 678typedef struct Camera_VideoProfileCamera_VideoProfile 679``` 680 681**Description** 682 683Defines the video profile. 684 685**Since**: 11 686 687 688### Camera_VideoStabilizationMode 689 690``` 691typedef enum Camera_VideoStabilizationModeCamera_VideoStabilizationMode 692``` 693 694**Description** 695 696Defines an enum that enumerates the video stabilization modes. 697 698**Since**: 11 699 700 701### CameraInput_Callbacks 702 703``` 704typedef struct CameraInput_CallbacksCameraInput_Callbacks 705``` 706 707**Description** 708 709Defines the callbacks used to listen for camera input errors. 710 711**Since**: 11 712 713**See** 714 715[OH_CameraInput_RegisterCallback](#oh_camerainput_registercallback) 716 717 718### CameraManager_Callbacks 719 720``` 721typedef struct CameraManager_CallbacksCameraManager_Callbacks 722``` 723 724**Description** 725 726Defines the callbacks used to listen for camera status changes. 727 728**Since**: 11 729 730**See** 731 732[OH_CameraManager_RegisterCallback](#oh_cameramanager_registercallback) 733 734 735### CaptureSession_Callbacks 736 737``` 738typedef struct CaptureSession_CallbacksCaptureSession_Callbacks 739``` 740 741**Description** 742 743Defines the callbacks used for session capture. 744 745**Since**: 11 746 747**See** 748 749[OH_CaptureSession_RegisterCallback](#oh_capturesession_registercallback) 750 751 752### MetadataOutput_Callbacks 753 754``` 755typedef struct MetadataOutput_CallbacksMetadataOutput_Callbacks 756``` 757 758**Description** 759 760Defines the callback functions of metadata output. 761 762**Since**: 11 763 764**See** 765 766[OH_MetadataOutput_RegisterCallback](#oh_metadataoutput_registercallback) 767 768 769### OH_CameraInput_OnError 770 771``` 772typedef void(* OH_CameraInput_OnError) (const Camera_Input *cameraInput, Camera_ErrorCode errorCode) 773``` 774 775**Description** 776 777Defines the pointer to the callback defined in the [CameraInput_Callbacks](_camera_input___callbacks.md) struct and used to report camera input errors. 778 779**Since**: 11 780 781**Parameters** 782 783| Name| Description| 784| -------- | -------- | 785| cameraInput | Pointer to the [Camera_Input](#camera_input) instance that transfers the callback.| 786| errorCode | Error code reported during camera input and defined in [Camera_ErrorCode](#camera_errorcode).| 787 788**See** 789 790CAMERA_CONFLICT_CAMERA 791 792CAMERA_DEVICE_DISABLED 793 794CAMERA_DEVICE_PREEMPTED 795 796CAMERA_SERVICE_FATAL_ERROR 797 798 799### OH_CameraManager_StatusCallback 800 801``` 802typedef void(* OH_CameraManager_StatusCallback) (Camera_Manager *cameraManager, Camera_StatusInfo *status) 803``` 804 805**Description** 806 807Defines the pointer to the callback defined in the [CameraManager_Callbacks](_camera_manager___callbacks.md) struct and used to report the camera manager status. 808 809**Since**: 11 810 811**Parameters** 812 813| Name| Description| 814| -------- | -------- | 815| cameraManager | Pointer to the [Camera_Manager](#camera_manager) instance that transfers the callback.| 816| status | Pointer to the camera manager status, which is defined in the [Camera_StatusInfo](_camera___status_info.md) struct.| 817 818 819### OH_CaptureSession_OnError 820 821``` 822typedef void(* OH_CaptureSession_OnError) (Camera_CaptureSession *session, Camera_ErrorCode errorCode) 823``` 824 825**Description** 826 827Defines the pointer to the callback defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct and used to report capture session errors. 828 829**Since**: 11 830 831**Parameters** 832 833| Name| Description| 834| -------- | -------- | 835| session | Pointer to the [Camera_CaptureSession](#camera_capturesession) instance that transfers the callback.| 836| errorCode | Error code reported during session capture and defined in [Camera_ErrorCode](#camera_errorcode).| 837 838**See** 839 840CAMERA_SERVICE_FATAL_ERROR 841 842 843### OH_CaptureSession_OnFocusStateChange 844 845``` 846typedef void(* OH_CaptureSession_OnFocusStateChange) (Camera_CaptureSession *session, Camera_FocusState focusState) 847``` 848 849**Description** 850 851Defines the pointer to the callback defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct and used to report session capture focus status changes. 852 853**Since**: 11 854 855**Parameters** 856 857| Name| Description| 858| -------- | -------- | 859| session | Pointer to the [Camera_CaptureSession](#camera_capturesession) instance that transfers the callback.| 860| focusState | Focus state, which is defined in [Camera_FocusState](#camera_focusstate).| 861 862 863### OH_MetadataOutput_OnError 864 865``` 866typedef void(* OH_MetadataOutput_OnError) (Camera_MetadataOutput *metadataOutput, Camera_ErrorCode errorCode) 867``` 868 869**Description** 870 871Defines the pointer to the callback defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct and used to report metadata output errors. 872 873**Since**: 11 874 875**Parameters** 876 877| Name| Description| 878| -------- | -------- | 879| metadataOutput | Pointer to the [Camera_MetadataOutput](#camera_metadataoutput) instance that transfers the callback.| 880| errorCode | Error code reported during metadata output and defined in [Camera_ErrorCode](#camera_errorcode).| 881 882**See** 883 884CAMERA_SERVICE_FATAL_ERROR 885 886 887### OH_MetadataOutput_OnMetadataObjectAvailable 888 889``` 890typedef void(* OH_MetadataOutput_OnMetadataObjectAvailable) (Camera_MetadataOutput *metadataOutput, Camera_MetadataObject *metadataObject, uint32_t size) 891``` 892 893**Description** 894 895Defines the pointer to the callback defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct and used to report metadata output data. 896 897**Since**: 11 898 899**Parameters** 900 901| Name| Description| 902| -------- | -------- | 903| metadataOutput | Pointer to the [Camera_MetadataOutput](#camera_metadataoutput) instance that transfers the callback.| 904| metadataObject | Pointer to the metadata output data, which is defined in the [Camera_MetadataObject](_camera___metadata_object.md) struct.| 905| size | Size of the metadata object.| 906 907 908### OH_PhotoOutput_OnError 909 910``` 911typedef void(* OH_PhotoOutput_OnError) (Camera_PhotoOutput *photoOutput, Camera_ErrorCode errorCode) 912``` 913 914**Description** 915 916Defines the pointer to the callback defined in the **PhotoOutput_Callbacks** struct and used to report photo output errors. 917 918**Since**: 11 919 920**Parameters** 921 922| Name| Description| 923| -------- | -------- | 924| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.| 925| errorCode | Error code reported during photo output and defined in [Camera_ErrorCode](#camera_errorcode).| 926 927**See** 928 929CAMERA_SERVICE_FATAL_ERROR 930 931 932### OH_PhotoOutput_OnFrameEnd 933 934``` 935typedef void(* OH_PhotoOutput_OnFrameEnd) (Camera_PhotoOutput *photoOutput, int32_t frameCount) 936``` 937 938**Description** 939 940Defines the pointer to the callback defined in the **PhotoOutput_Callbacks** struct and used to report photo output frame end events. 941 942**Since**: 11 943 944**Parameters** 945 946| Name| Description| 947| -------- | -------- | 948| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.| 949| frameCount | Number of frames to be included in the callback.| 950 951 952### OH_PhotoOutput_OnFrameShutter 953 954``` 955typedef void(* OH_PhotoOutput_OnFrameShutter) (Camera_PhotoOutput *photoOutput, Camera_FrameShutterInfo *info) 956``` 957 958**Description** 959 960Defines the pointer to the callback defined in the **PhotoOutput_Callbacks** struct and used to report frame shutter events. 961 962**Since**: 11 963 964**Parameters** 965 966| Name| Description| 967| -------- | -------- | 968| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.| 969| info | Pointer to the frame shutter information, which is defined in the [Camera_FrameShutterInfo](_camera___frame_shutter_info.md) struct.| 970 971 972### OH_PhotoOutput_OnFrameStart 973 974``` 975typedef void(* OH_PhotoOutput_OnFrameStart) (Camera_PhotoOutput *photoOutput) 976``` 977 978**Description** 979 980Defines the pointer to the callback defined in the **PhotoOutput_Callbacks** struct and used to report photo output frame start events. 981 982**Since**: 11 983 984**Parameters** 985 986| Name| Description| 987| -------- | -------- | 988| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.| 989 990 991### OH_PreviewOutput_OnError 992 993``` 994typedef void(* OH_PreviewOutput_OnError) (Camera_PreviewOutput *previewOutput, Camera_ErrorCode errorCode) 995``` 996 997**Description** 998 999Defines the pointer to the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used to report preview output errors. 1000 1001**Since**: 11 1002 1003**Parameters** 1004 1005| Name| Description| 1006| -------- | -------- | 1007| previewOutput | Pointer to the [Camera_PreviewOutput](#camera_previewoutput) instance that transfers the callback.| 1008| errorCode | Error code reported during preview output and defined in [Camera_ErrorCode](#camera_errorcode).| 1009 1010**See** 1011 1012CAMERA_SERVICE_FATAL_ERROR 1013 1014 1015### OH_PreviewOutput_OnFrameEnd 1016 1017``` 1018typedef void(* OH_PreviewOutput_OnFrameEnd) (Camera_PreviewOutput *previewOutput, int32_t frameCount) 1019``` 1020 1021**Description** 1022 1023Defines the pointer to the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used report preview output frame end events. 1024 1025**Since**: 11 1026 1027**Parameters** 1028 1029| Name| Description| 1030| -------- | -------- | 1031| previewOutput | Pointer to the [Camera_PreviewOutput](#camera_previewoutput) instance that transfers the callback.| 1032| frameCount | Number of frames to be included in the callback.| 1033 1034 1035### OH_PreviewOutput_OnFrameStart 1036 1037``` 1038typedef void(* OH_PreviewOutput_OnFrameStart) (Camera_PreviewOutput *previewOutput) 1039``` 1040 1041**Description** 1042 1043Defines the pointer to the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used to report preview output frame start events. 1044 1045**Since**: 11 1046 1047**Parameters** 1048 1049| Name| Description| 1050| -------- | -------- | 1051| previewOutput | Pointer to the [Camera_PreviewOutput](#camera_previewoutput) instance that transfers the callback.| 1052 1053 1054### OH_VideoOutput_OnError 1055 1056``` 1057typedef void(* OH_VideoOutput_OnError) (Camera_VideoOutput *videoOutput, Camera_ErrorCode errorCode) 1058``` 1059 1060**Description** 1061 1062Defines the pointer to the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output errors. 1063 1064**Since**: 11 1065 1066**Parameters** 1067 1068| Name| Description| 1069| -------- | -------- | 1070| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance that transfers the callback.| 1071| errorCode | Error code reported during video output and defined in [Camera_ErrorCode](#camera_errorcode).| 1072 1073**See** 1074 1075CAMERA_SERVICE_FATAL_ERROR 1076 1077 1078### OH_VideoOutput_OnFrameEnd 1079 1080``` 1081typedef void(* OH_VideoOutput_OnFrameEnd) (Camera_VideoOutput *videoOutput, int32_t frameCount) 1082``` 1083 1084**Description** 1085 1086Defines the pointer to the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output frame end events. 1087 1088**Since**: 11 1089 1090**Parameters** 1091 1092| Name| Description| 1093| -------- | -------- | 1094| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance that transfers the callback.| 1095| frameCount | Number of frames to be included in the callback.| 1096 1097 1098### OH_VideoOutput_OnFrameStart 1099 1100``` 1101typedef void(* OH_VideoOutput_OnFrameStart) (Camera_VideoOutput *videoOutput) 1102``` 1103 1104**Description** 1105 1106Defines the pointer to the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output frame start events. 1107 1108**Since**: 11 1109 1110**Parameters** 1111 1112| Name| Description| 1113| -------- | -------- | 1114| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance that transfers the callback.| 1115 1116 1117### PhotoOutput_Callbacks 1118 1119``` 1120typedef struct PhotoOutput_CallbacksPhotoOutput_Callbacks 1121``` 1122 1123**Description** 1124 1125Defines the callbacks used for photo output. 1126 1127**Since**: 11 1128 1129**See** 1130 1131[OH_PhotoOutput_RegisterCallback](#oh_photooutput_registercallback) 1132 1133 1134### PreviewOutput_Callbacks 1135 1136``` 1137typedef struct PreviewOutput_CallbacksPreviewOutput_Callbacks 1138``` 1139 1140**Description** 1141 1142Defines the callbacks used for preview output. 1143 1144**Since**: 11 1145 1146**See** 1147 1148[OH_PreviewOutput_RegisterCallback](#oh_previewoutput_registercallback) 1149 1150 1151### VideoOutput_Callbacks 1152 1153``` 1154typedef struct VideoOutput_CallbacksVideoOutput_Callbacks 1155``` 1156 1157**Description** 1158 1159Defines the callbacks used for video output. 1160 1161**Since**: 11 1162 1163**See** 1164 1165[OH_VideoOutput_RegisterCallback](#oh_videooutput_registercallback) 1166 1167 1168## Enum Description 1169 1170 1171### Camera_Connection 1172 1173``` 1174enum Camera_Connection 1175``` 1176 1177**Description** 1178 1179Enumerates the camera connection types. 1180 1181**Since**: 11 1182 1183| Value| Description| 1184| -------- | -------- | 1185| CAMERA_CONNECTION_BUILT_IN | Built-in camera.| 1186| CAMERA_CONNECTION_USB_PLUGIN | Camera connected using USB.| 1187| CAMERA_CONNECTION_REMOTE | Remote camera.| 1188 1189 1190### Camera_ErrorCode 1191 1192``` 1193enum Camera_ErrorCode 1194``` 1195 1196**Description** 1197 1198Enumerates the camera error codes. 1199 1200**Since**: 11 1201 1202| Value| Description| 1203| -------- | -------- | 1204| CAMERA_OK | The camera is normal.| 1205| CAMERA_INVALID_ARGUMENT | A parameter is missing or the parameter type is incorrect.| 1206| CAMERA_OPERATION_NOT_ALLOWED | The operation is not allowed.| 1207| CAMERA_SESSION_NOT_CONFIG | The session is not configured.| 1208| CAMERA_SESSION_NOT_RUNNING | The session is not running.| 1209| CAMERA_SESSION_CONFIG_LOCKED | The session configuration is locked.| 1210| CAMERA_DEVICE_SETTING_LOCKED | The device setting is locked.| 1211| CAMERA_CONFLICT_CAMERA | The device is already started.| 1212| CAMERA_DEVICE_DISABLED | The camera is disabled for security reasons.| 1213| CAMERA_DEVICE_PREEMPTED | The camera is preempted.| 1214| CAMERA_SERVICE_FATAL_ERROR | A fatal error occurs in the camera service.| 1215 1216 1217### Camera_ExposureMode 1218 1219``` 1220enum Camera_ExposureMode 1221``` 1222 1223**Description** 1224 1225Enumerates the exposure modes. 1226 1227**Since**: 11 1228 1229| Value| Description| 1230| -------- | -------- | 1231| EXPOSURE_MODE_LOCKED | Exposure locked.| 1232| EXPOSURE_MODE_AUTO | Auto exposure.| 1233| EXPOSURE_MODE_CONTINUOUS_AUTO | Continuous auto exposure.| 1234 1235 1236### Camera_FlashMode 1237 1238``` 1239enum Camera_FlashMode 1240``` 1241 1242**Description** 1243 1244Enumerates the flash modes. 1245 1246**Since**: 11 1247 1248| Value| Description| 1249| -------- | -------- | 1250| FLASH_MODE_CLOSE | The flash is off.| 1251| FLASH_MODE_OPEN | The flash is on.| 1252| FLASH_MODE_AUTO | The flash mode is auto.| 1253| FLASH_MODE_ALWAYS_OPEN | The flash is steady on.| 1254 1255 1256### Camera_FocusMode 1257 1258``` 1259enum Camera_FocusMode 1260``` 1261 1262**Description** 1263 1264Enumerates the focus modes. 1265 1266**Since**: 11 1267 1268| Value| Description| 1269| -------- | -------- | 1270| FOCUS_MODE_MANUAL | Manual focus.| 1271| FOCUS_MODE_CONTINUOUS_AUTO | Continuous auto focus.| 1272| FOCUS_MODE_AUTO | Auto focus.| 1273| FOCUS_MODE_LOCKED | Focus locked.| 1274 1275 1276### Camera_FocusState 1277 1278``` 1279enum Camera_FocusState 1280``` 1281 1282**Description** 1283 1284Enumerates the focus states. 1285 1286**Since**: 11 1287 1288| Value| Description| 1289| -------- | -------- | 1290| FOCUS_STATE_SCAN | Focusing.| 1291| FOCUS_STATE_FOCUSED | Focused.| 1292| FOCUS_STATE_UNFOCUSED | Unfocused.| 1293 1294 1295### Camera_Format 1296 1297``` 1298enum Camera_Format 1299``` 1300 1301**Description** 1302 1303Enumerates the camera output formats. 1304 1305**Since**: 11 1306 1307| Value| Description| 1308| -------- | -------- | 1309| CAMERA_FORMAT_RGBA_8888 | RGBA 8888.| 1310| CAMERA_FORMAT_YUV_420_SP | YUV 420 SP.| 1311| CAMERA_FORMAT_JPEG | JPEG.| 1312 1313 1314### Camera_ImageRotation 1315 1316``` 1317enum Camera_ImageRotation 1318``` 1319 1320**Description** 1321 1322Enumerates the image rotation angles. 1323 1324**Since**: 11 1325 1326| Value| Description| 1327| -------- | -------- | 1328| IAMGE_ROTATION_0 | The image rotates 0 degrees.| 1329| IAMGE_ROTATION_90 | The image rotates 90 degrees.| 1330| IAMGE_ROTATION_180 | The image rotates 180 degrees.| 1331| IAMGE_ROTATION_270 | The image rotates 270 degrees.| 1332 1333 1334### Camera_MetadataObjectType 1335 1336``` 1337enum Camera_MetadataObjectType 1338``` 1339 1340**Description** 1341 1342Enumerates the metadata object types. 1343 1344**Since**: 11 1345 1346| Value| Description| 1347| -------- | -------- | 1348| FACE_DETECTION | Face detection.| 1349 1350 1351### Camera_Position 1352 1353``` 1354enum Camera_Position 1355``` 1356 1357**Description** 1358 1359Enumerates the camera positions. 1360 1361**Since**: 11 1362 1363| Value| Description| 1364| -------- | -------- | 1365| CAMERA_POSITION_UNSPECIFIED | Unspecified position.| 1366| CAMERA_POSITION_BACK | Rear camera.| 1367| CAMERA_POSITION_FRONT | Front camera.| 1368 1369 1370### Camera_QualityLevel 1371 1372``` 1373enum Camera_QualityLevel 1374``` 1375 1376**Description** 1377 1378Enumerates the image quality levels. 1379 1380**Since**: 11 1381 1382| Value| Description| 1383| -------- | -------- | 1384| QUALITY_LEVEL_HIGH | High image quality.| 1385| QUALITY_LEVEL_MEDIUM | Medium image quality.| 1386| QUALITY_LEVEL_LOW | Low image quality.| 1387 1388 1389### Camera_Status 1390 1391``` 1392enum Camera_Status 1393``` 1394 1395**Description** 1396 1397Enumerates the camera statuses. 1398 1399**Since**: 11 1400 1401| Value| Description| 1402| -------- | -------- | 1403| CAMERA_STATUS_APPEAR | A camera appears.| 1404| CAMERA_STATUS_DISAPPEAR | The camera disappears.| 1405| CAMERA_STATUS_AVAILABLE | The camera is available.| 1406| CAMERA_STATUS_UNAVAILABLE | The camera is unavailable.| 1407 1408 1409### Camera_Type 1410 1411``` 1412enum Camera_Type 1413``` 1414 1415**Description** 1416 1417Enumerates the camera types. 1418 1419**Since**: 11 1420 1421| Value| Description| 1422| -------- | -------- | 1423| CAMERA_TYPE_DEFAULT | Default camera type.| 1424| CAMERA_TYPE_WIDE_ANGLE | Wide camera.| 1425| CAMERA_TYPE_ULTRA_WIDE | Ultra wide camera.| 1426| CAMERA_TYPE_TELEPHOTO | Telephone camera.| 1427| CAMERA_TYPE_TRUE_DEPTH | Camera with depth of field information.| 1428 1429 1430### Camera_VideoStabilizationMode 1431 1432``` 1433enum Camera_VideoStabilizationMode 1434``` 1435 1436**Description** 1437 1438Enumerates the video stabilization modes. 1439 1440**Since**: 11 1441 1442| Value| Description| 1443| -------- | -------- | 1444| STABILIZATION_MODE_OFF | Video stabilization is disabled.| 1445| STABILIZATION_MODE_LOW | The basic video stabilization algorithm is used.| 1446| STABILIZATION_MODE_MIDDLE | A video stabilization algorithm with a stabilization effect better than that of the **LOW** type is used.| 1447| STABILIZATION_MODE_HIGH | A video stabilization algorithm with a stabilization effect better than that of the **MIDDLE** type is used.| 1448| STABILIZATION_MODE_AUTO | Automatic video stabilization is used. This value is available for HDF cameras.| 1449 1450 1451## Function Description 1452 1453 1454### OH_Camera_DeleteCameraManager() 1455 1456``` 1457Camera_ErrorCode OH_Camera_DeleteCameraManager (Camera_Manager * cameraManager) 1458``` 1459 1460**Description** 1461 1462Deletes a **CameraManager** instance. 1463 1464**Since**: 11 1465 1466**Parameters** 1467 1468| Name| Description| 1469| -------- | -------- | 1470| cameraManager | Pointer to the target [Camera_Manager](#camera_manager) instance.| 1471 1472**Returns** 1473 1474Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 1475 1476 1477### OH_Camera_GetCameraManager() 1478 1479``` 1480Camera_ErrorCode OH_Camera_GetCameraManager (Camera_Manager ** cameraManager) 1481``` 1482 1483**Description** 1484 1485Obtains a **CameraManager** instance. 1486 1487**Since**: 11 1488 1489**Parameters** 1490 1491| Name| Description| 1492| -------- | -------- | 1493| cameraManager | Double pointer to the [Camera_Manager](#camera_manager) instance if the function is successfully called.| 1494 1495**Returns** 1496 1497Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 1498 1499 1500### OH_CameraInput_Close() 1501 1502``` 1503Camera_ErrorCode OH_CameraInput_Close (Camera_Input * cameraInput) 1504``` 1505 1506**Description** 1507 1508Closes a camera. 1509 1510**Since**: 11 1511 1512**Parameters** 1513 1514| Name| Description| 1515| -------- | -------- | 1516| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.| 1517 1518**Returns** 1519 1520Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 1521 1522 1523### OH_CameraInput_Open() 1524 1525``` 1526Camera_ErrorCode OH_CameraInput_Open (Camera_Input * cameraInput) 1527``` 1528 1529**Description** 1530 1531Opens a camera. 1532 1533**Since**: 11 1534 1535**Parameters** 1536 1537| Name| Description| 1538| -------- | -------- | 1539| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.| 1540 1541**Returns** 1542 1543Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_CONFLICT_CAMERA** if the camera device is already started; returns **CAMERA_DEVICE_DISABLED** if the camera is disabled for security reasons; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 1544 1545 1546### OH_CameraInput_RegisterCallback() 1547 1548``` 1549Camera_ErrorCode OH_CameraInput_RegisterCallback (Camera_Input * cameraInput, CameraInput_Callbacks * callback ) 1550``` 1551 1552**Description** 1553 1554Registers a callback to listen for camera input events. 1555 1556**Since**: 11 1557 1558**Parameters** 1559 1560| Name| Description| 1561| -------- | -------- | 1562| cameraInput | Pointer to a [Camera_Input](#camera_input) instance.| 1563| callback | Pointer to the target callback, which is defined in the [CameraInput_Callbacks](_camera_input___callbacks.md) struct.| 1564 1565**Returns** 1566 1567Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 1568 1569 1570### OH_CameraInput_Release() 1571 1572``` 1573Camera_ErrorCode OH_CameraInput_Release (Camera_Input * cameraInput) 1574``` 1575 1576**Description** 1577 1578Releases a **CameraInput** instance. 1579 1580**Since**: 11 1581 1582**Parameters** 1583 1584| Name| Description| 1585| -------- | -------- | 1586| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.| 1587 1588**Returns** 1589 1590Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 1591 1592 1593### OH_CameraInput_UnregisterCallback() 1594 1595``` 1596Camera_ErrorCode OH_CameraInput_UnregisterCallback (Camera_Input * cameraInput, CameraInput_Callbacks * callback ) 1597``` 1598 1599**Description** 1600 1601Unregisters the callback used to listen for camera input events. 1602 1603**Since**: 11 1604 1605**Parameters** 1606 1607| Name| Description| 1608| -------- | -------- | 1609| cameraInput | Pointer to a [Camera_Input](#camera_input) instance.| 1610| callback | Pointer to the target callback, which is defined in the [CameraInput_Callbacks](_camera_input___callbacks.md) struct.| 1611 1612**Returns** 1613 1614Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 1615 1616 1617### OH_CameraManager_CreateCameraInput() 1618 1619``` 1620Camera_ErrorCode OH_CameraManager_CreateCameraInput (Camera_Manager * cameraManager, const Camera_Device * camera, Camera_Input ** cameraInput ) 1621``` 1622 1623**Description** 1624 1625Creates a **CameraInput** instance. 1626 1627**Since**: 11 1628 1629**Parameters** 1630 1631| Name| Description| 1632| -------- | -------- | 1633| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| 1634| camera | Pointer to the target camera, which is defined in the [Camera_Device](_camera___device.md) struct.| 1635| cameraInput | Double pointer to the [Camera_Input](#camera_input) instance if the function is successfully called.| 1636 1637**Returns** 1638 1639Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 1640 1641**Required Permissions** 1642 1643ohos.permission.CAMERA 1644 1645 1646### OH_CameraManager_CreateCameraInput_WithPositionAndType() 1647 1648``` 1649Camera_ErrorCode OH_CameraManager_CreateCameraInput_WithPositionAndType (Camera_Manager * cameraManager, Camera_Position position, Camera_Type type, Camera_Input ** cameraInput ) 1650``` 1651 1652**Description** 1653 1654Creates a **CameraInput** instance with the specified location and type. 1655 1656**Since**: 11 1657 1658**Parameters** 1659 1660| Name| Description| 1661| -------- | -------- | 1662| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| 1663| position | Camera position, which is defined in the [Camera_Position](#camera_position) struct.| 1664| type | Camera type, which is defined in the [Camera_Type](#camera_type) struct.| 1665| cameraInput | Double pointer to the [Camera_Input](#camera_input) instance if the function is successfully called.| 1666 1667**Returns** 1668 1669Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 1670 1671**Required Permissions** 1672 1673ohos.permission.CAMERA 1674 1675 1676### OH_CameraManager_CreateCaptureSession() 1677 1678``` 1679Camera_ErrorCode OH_CameraManager_CreateCaptureSession (Camera_Manager * cameraManager, Camera_CaptureSession ** captureSession ) 1680``` 1681 1682**Description** 1683 1684Creates a **CaptureSession** instance. 1685 1686**Since**: 11 1687 1688**Parameters** 1689 1690| Name| Description| 1691| -------- | -------- | 1692| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| 1693| captureSession | Double pointer to the [Camera_CaptureSession](#camera_capturesession) instance if the function is successfully called.| 1694 1695**Returns** 1696 1697Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 1698 1699 1700### OH_CameraManager_CreateMetadataOutput() 1701 1702``` 1703Camera_ErrorCode OH_CameraManager_CreateMetadataOutput (Camera_Manager * cameraManager, const Camera_MetadataObjectType * profile, Camera_MetadataOutput ** metadataOutput ) 1704``` 1705 1706**Description** 1707 1708Creates a **MetadataOutput** instance. 1709 1710**Since**: 11 1711 1712**Parameters** 1713 1714| Name| Description| 1715| -------- | -------- | 1716| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| 1717| profile | Pointer to the profile, which is defined in [Camera_MetadataObjectType](#camera_metadataobjecttype).| 1718| metadataOutput | Double pointer to the [Camera_MetadataOutput](#camera_metadataoutput) instance if the function is successfully called.| 1719 1720**Returns** 1721 1722Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 1723 1724 1725### OH_CameraManager_CreatePhotoOutput() 1726 1727``` 1728Camera_ErrorCode OH_CameraManager_CreatePhotoOutput (Camera_Manager * cameraManager, const Camera_Profile * profile, const char * surfaceId, Camera_PhotoOutput ** photoOutput ) 1729``` 1730 1731**Description** 1732 1733Creates a **PhotoOutput** instance. 1734 1735**Since**: 11 1736 1737**Parameters** 1738 1739| Name| Description| 1740| -------- | -------- | 1741| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| 1742| profile | Pointer to the profile, which is defined in the [Camera_Profile](_camera___profile.md) struct.| 1743| surfaceId | Pointer to the surface ID.| 1744| photoOutput | Double pointer to the [Camera_PhotoOutput](#camera_photooutput) instance if the function is successfully called.| 1745 1746**Returns** 1747 1748Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 1749 1750 1751### OH_CameraManager_CreatePreviewOutput() 1752 1753``` 1754Camera_ErrorCode OH_CameraManager_CreatePreviewOutput (Camera_Manager * cameraManager, const Camera_Profile * profile, const char * surfaceId, Camera_PreviewOutput ** previewOutput ) 1755``` 1756 1757**Description** 1758 1759Creates a **PreviewOutput** instance. 1760 1761**Since**: 11 1762 1763**Parameters** 1764 1765| Name| Description| 1766| -------- | -------- | 1767| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| 1768| profile | Pointer to the profile, which is defined in the [Camera_Profile](_camera___profile.md) struct.| 1769| surfaceId | Pointer to the surface ID.| 1770| previewOutput | Double pointer to the [Camera_PreviewOutput](#camera_previewoutput) instance if the function is successfully called.| 1771 1772**Returns** 1773 1774Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 1775 1776 1777### OH_CameraManager_CreateVideoOutput() 1778 1779``` 1780Camera_ErrorCode OH_CameraManager_CreateVideoOutput (Camera_Manager * cameraManager, const Camera_VideoProfile * profile, const char * surfaceId, Camera_VideoOutput ** videoOutput ) 1781``` 1782 1783**Description** 1784 1785Creates a **VideoOutput** instance. 1786 1787**Since**: 11 1788 1789**Parameters** 1790 1791| Name| Description| 1792| -------- | -------- | 1793| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| 1794| profile | Pointer to the profile, which is defined in the [Camera_VideoProfile](_camera___video_profile.md) struct.| 1795| surfaceId | Pointer to the surface ID.| 1796| videoOutput | Double pointer to the [Camera_VideoOutput](#camera_videooutput) instance if the function is successfully called.| 1797 1798**Returns** 1799 1800Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 1801 1802 1803### OH_CameraManager_DeleteSupportedCameraOutputCapability() 1804 1805``` 1806Camera_ErrorCode OH_CameraManager_DeleteSupportedCameraOutputCapability (Camera_Manager * cameraManager, Camera_OutputCapability * cameraOutputCapability ) 1807``` 1808 1809**Description** 1810 1811Deletes the output capability supported by a camera. 1812 1813**Since**: 11 1814 1815**Parameters** 1816 1817| Name| Description| 1818| -------- | -------- | 1819| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| 1820| cameraOutputCapability | Pointer to the output capability, which is defined in the [Camera_OutputCapability](_camera___output_capability.md) struct.| 1821 1822**Returns** 1823 1824Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 1825 1826 1827### OH_CameraManager_DeleteSupportedCameras() 1828 1829``` 1830Camera_ErrorCode OH_CameraManager_DeleteSupportedCameras (Camera_Manager * cameraManager, Camera_Device * cameras, uint32_t size ) 1831``` 1832 1833**Description** 1834 1835Deletes supported cameras. 1836 1837**Since**: 11 1838 1839**Parameters** 1840 1841| Name| Description| 1842| -------- | -------- | 1843| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| 1844| cameras | Pointer to the list of cameras, which is defined in the [Camera_Device](_camera___device.md) struct.| 1845 1846**Returns** 1847 1848Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 1849 1850 1851### OH_CameraManager_GetSupportedCameraOutputCapability() 1852 1853``` 1854Camera_ErrorCode OH_CameraManager_GetSupportedCameraOutputCapability (Camera_Manager * cameraManager, const Camera_Device * camera, Camera_OutputCapability ** cameraOutputCapability ) 1855``` 1856 1857**Description** 1858 1859Obtains the output capability supported by a camera in the specified mode. 1860 1861**Since**: 11 1862 1863**Parameters** 1864 1865| Name| Description| 1866| -------- | -------- | 1867| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| 1868| cameras | Pointer to the list of cameras, which is defined in the [Camera_Device](_camera___device.md) struct.| 1869| cameraOutputCapability | Double pointer to the [Camera_OutputCapability](_camera___output_capability.md) struct if the function is successfully called.| 1870 1871**Returns** 1872 1873Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 1874 1875 1876### OH_CameraManager_GetSupportedCameras() 1877 1878``` 1879Camera_ErrorCode OH_CameraManager_GetSupportedCameras (Camera_Manager * cameraManager, Camera_Device ** cameras, uint32_t * size ) 1880``` 1881 1882**Description** 1883 1884Obtains supported cameras. 1885 1886**Since**: 11 1887 1888**Parameters** 1889 1890| Name| Description| 1891| -------- | -------- | 1892| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| 1893| cameras | Double pointer to the list of cameras, which is defined in the [Camera_Device](_camera___device.md) struct, if the function is successfully called.| 1894| size | Pointer to the size of the list of cameras.| 1895 1896**Returns** 1897 1898Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 1899 1900 1901### OH_CameraManager_IsCameraMuted() 1902 1903``` 1904Camera_ErrorCode OH_CameraManager_IsCameraMuted (Camera_Manager * cameraManager, bool * isCameraMuted ) 1905``` 1906 1907**Description** 1908 1909Checks whether a camera is muted. 1910 1911**Since**: 11 1912 1913**Parameters** 1914 1915| Name| Description| 1916| -------- | -------- | 1917| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| 1918| isCameraMuted | Pointer to the result that specifies whether the camera is muted if the function is successfully called.| 1919 1920**Returns** 1921 1922Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 1923 1924 1925### OH_CameraManager_RegisterCallback() 1926 1927``` 1928Camera_ErrorCode OH_CameraManager_RegisterCallback (Camera_Manager * cameraManager, CameraManager_Callbacks * callback ) 1929``` 1930 1931**Description** 1932 1933Registers a callback to listen for camera status changes. 1934 1935**Since**: 11 1936 1937**Parameters** 1938 1939| Name| Description| 1940| -------- | -------- | 1941| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| 1942| callback | Pointer to the target callback, which is defined in the [CameraManager_Callbacks](_camera_manager___callbacks.md) struct.| 1943 1944**Returns** 1945 1946Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 1947 1948 1949### OH_CameraManager_UnregisterCallback() 1950 1951``` 1952Camera_ErrorCode OH_CameraManager_UnregisterCallback (Camera_Manager * cameraManager, CameraManager_Callbacks * callback ) 1953``` 1954 1955**Description** 1956 1957Unregisters the callback used to listen for camera status changes. 1958 1959**Since**: 11 1960 1961**Parameters** 1962 1963| Name| Description| 1964| -------- | -------- | 1965| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| 1966| callback | Pointer to the target callback, which is defined in the [CameraManager_Callbacks](_camera_manager___callbacks.md) struct.| 1967 1968**Returns** 1969 1970Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 1971 1972 1973### OH_CaptureSession_AddInput() 1974 1975``` 1976Camera_ErrorCode OH_CaptureSession_AddInput (Camera_CaptureSession * session, Camera_Input * cameraInput ) 1977``` 1978 1979**Description** 1980 1981Adds a **CameraInput** instance to a session. 1982 1983**Since**: 11 1984 1985**Parameters** 1986 1987| Name| Description| 1988| -------- | -------- | 1989| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 1990| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.| 1991 1992**Returns** 1993 1994Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_OPERATION_NOT_ALLOWED** if the operation is not allowed. 1995 1996 1997### OH_CaptureSession_AddMetadataOutput() 1998 1999``` 2000Camera_ErrorCode OH_CaptureSession_AddMetadataOutput (Camera_CaptureSession * session, Camera_MetadataOutput * metadataOutput ) 2001``` 2002 2003**Description** 2004 2005Adds a **MetadataOutput** instance to a session. 2006 2007**Since**: 11 2008 2009**Parameters** 2010 2011| Name| Description| 2012| -------- | -------- | 2013| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2014| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.| 2015 2016**Returns** 2017 2018Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_OPERATION_NOT_ALLOWED** if the operation is not allowed. 2019 2020 2021### OH_CaptureSession_AddPhotoOutput() 2022 2023``` 2024Camera_ErrorCode OH_CaptureSession_AddPhotoOutput (Camera_CaptureSession * session, Camera_PhotoOutput * photoOutput ) 2025``` 2026 2027**Description** 2028 2029Adds a **PhotoOutput** instance to a session. 2030 2031**Since**: 11 2032 2033**Parameters** 2034 2035| Name| Description| 2036| -------- | -------- | 2037| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2038| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| 2039 2040**Returns** 2041 2042Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_OPERATION_NOT_ALLOWED** if the operation is not allowed. 2043 2044 2045### OH_CaptureSession_AddPreviewOutput() 2046 2047``` 2048Camera_ErrorCode OH_CaptureSession_AddPreviewOutput (Camera_CaptureSession * session, Camera_PreviewOutput * previewOutput ) 2049``` 2050 2051**Description** 2052 2053Adds a **PreviewOutput** instance to a session. 2054 2055**Since**: 11 2056 2057**Parameters** 2058 2059| Name| Description| 2060| -------- | -------- | 2061| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2062| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| 2063 2064**Returns** 2065 2066Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_OPERATION_NOT_ALLOWED** if the operation is not allowed. 2067 2068 2069### OH_CaptureSession_AddVideoOutput() 2070 2071``` 2072Camera_ErrorCode OH_CaptureSession_AddVideoOutput (Camera_CaptureSession * session, Camera_VideoOutput * videoOutput ) 2073``` 2074 2075**Description** 2076 2077Adds a **VideoOutput** instance to a session. 2078 2079**Since**: 11 2080 2081**Parameters** 2082 2083| Name| Description| 2084| -------- | -------- | 2085| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2086| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.| 2087 2088**Returns** 2089 2090Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_OPERATION_NOT_ALLOWED** if the operation is not allowed. 2091 2092 2093### OH_CaptureSession_BeginConfig() 2094 2095``` 2096Camera_ErrorCode OH_CaptureSession_BeginConfig (Camera_CaptureSession * session) 2097``` 2098 2099**Description** 2100 2101Starts the configuration for session capture. 2102 2103**Since**: 11 2104 2105**Parameters** 2106 2107| Name| Description| 2108| -------- | -------- | 2109| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2110 2111**Returns** 2112 2113Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_CONFIG_LOCKED** if the session configuration is locked. 2114 2115 2116### OH_CaptureSession_CommitConfig() 2117 2118``` 2119Camera_ErrorCode OH_CaptureSession_CommitConfig (Camera_CaptureSession * session) 2120``` 2121 2122**Description** 2123 2124Commits the configuration for session capture. 2125 2126**Since**: 11 2127 2128**Parameters** 2129 2130| Name| Description| 2131| -------- | -------- | 2132| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2133 2134**Returns** 2135 2136Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_OPERATION_NOT_ALLOWED** if the operation is not allowed; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 2137 2138 2139### OH_CaptureSession_GetExposureBias() 2140 2141``` 2142Camera_ErrorCode OH_CaptureSession_GetExposureBias (Camera_CaptureSession * session, float * exposureBias ) 2143``` 2144 2145**Description** 2146 2147Obtains the exposure compensation value in use. 2148 2149**Since**: 11 2150 2151**Parameters** 2152 2153| Name| Description| 2154| -------- | -------- | 2155| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2156| exposureBias | Pointer to the exposure compensation value.| 2157 2158**Returns** 2159 2160Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2161 2162 2163### OH_CaptureSession_GetExposureBiasRange() 2164 2165``` 2166Camera_ErrorCode OH_CaptureSession_GetExposureBiasRange (Camera_CaptureSession * session, float * minExposureBias, float * maxExposureBias, float * step ) 2167``` 2168 2169**Description** 2170 2171Obtains the exposure compensation values of the device. 2172 2173**Since**: 11 2174 2175**Parameters** 2176 2177| Name| Description| 2178| -------- | -------- | 2179| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2180| minExposureBias | Pointer to the minimum exposure compensation value.| 2181| maxExposureBias | Pointer to the maximum exposure compensation value.| 2182| step | Pointer to the exposure compensation step.| 2183 2184**Returns** 2185 2186Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2187 2188 2189### OH_CaptureSession_GetExposureMode() 2190 2191``` 2192Camera_ErrorCode OH_CaptureSession_GetExposureMode (Camera_CaptureSession * session, Camera_ExposureMode * exposureMode ) 2193``` 2194 2195**Description** 2196 2197Obtains the exposure mode in use. 2198 2199**Since**: 11 2200 2201**Parameters** 2202 2203| Name| Description| 2204| -------- | -------- | 2205| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2206| exposureMode | Pointer to the exposure mode, which is defined in the [Camera_ExposureMode](#camera_exposuremode) struct.| 2207 2208**Returns** 2209 2210Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2211 2212 2213### OH_CaptureSession_GetFlashMode() 2214 2215``` 2216Camera_ErrorCode OH_CaptureSession_GetFlashMode (Camera_CaptureSession * session, Camera_FlashMode * flashMode ) 2217``` 2218 2219**Description** 2220 2221Obtains the flash mode in use. 2222 2223**Since**: 11 2224 2225**Parameters** 2226 2227| Name| Description| 2228| -------- | -------- | 2229| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2230| flashMode | Pointer to the flash mode, which is defined in the [Camera_FlashMode](#camera_flashmode) struct.| 2231 2232**Returns** 2233 2234Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2235 2236 2237### OH_CaptureSession_GetFocusMode() 2238 2239``` 2240Camera_ErrorCode OH_CaptureSession_GetFocusMode (Camera_CaptureSession * session, Camera_FocusMode * focusMode ) 2241``` 2242 2243**Description** 2244 2245Obtains the focus mode in use. 2246 2247**Since**: 11 2248 2249**Parameters** 2250 2251| Name| Description| 2252| -------- | -------- | 2253| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2254| exposureBias | Pointer to the focus mode, which is defined in the [Camera_FocusMode](#camera_focusmode) struct.| 2255 2256**Returns** 2257 2258Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2259 2260 2261### OH_CaptureSession_GetFocusPoint() 2262 2263``` 2264Camera_ErrorCode OH_CaptureSession_GetFocusPoint (Camera_CaptureSession * session, Camera_Point * focusPoint ) 2265``` 2266 2267**Description** 2268 2269Obtains the focal point in use. 2270 2271**Since**: 11 2272 2273**Parameters** 2274 2275| Name| Description| 2276| -------- | -------- | 2277| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2278| focusPoint | Pointer to the focal point, which is defined in the [Camera_Point](_camera___point.md) struct.| 2279 2280**Returns** 2281 2282Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2283 2284 2285### OH_CaptureSession_GetMeteringPoint() 2286 2287``` 2288Camera_ErrorCode OH_CaptureSession_GetMeteringPoint (Camera_CaptureSession * session, Camera_Point * point ) 2289``` 2290 2291**Description** 2292 2293Obtains the metering point in use. 2294 2295**Since**: 11 2296 2297**Parameters** 2298 2299| Name| Description| 2300| -------- | -------- | 2301| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2302| point | Pointer to the metering point, which is defined in the [Camera_Point](_camera___point.md) struct.| 2303 2304**Returns** 2305 2306Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2307 2308 2309### OH_CaptureSession_GetVideoStabilizationMode() 2310 2311``` 2312Camera_ErrorCode OH_CaptureSession_GetVideoStabilizationMode (Camera_CaptureSession * session, Camera_VideoStabilizationMode * mode ) 2313``` 2314 2315**Description** 2316 2317Obtains the video stabilization mode in use. 2318 2319**Since**: 11 2320 2321**Parameters** 2322 2323| Name| Description| 2324| -------- | -------- | 2325| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2326| mode | Pointer to the video stabilization mode, which is defined in the [Camera_VideoStabilizationMode](#camera_videostabilizationmode) struct.| 2327 2328**Returns** 2329 2330Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2331 2332 2333### OH_CaptureSession_GetZoomRatio() 2334 2335``` 2336Camera_ErrorCode OH_CaptureSession_GetZoomRatio (Camera_CaptureSession * session, float * zoom ) 2337``` 2338 2339**Description** 2340 2341Obtains the zoom ratio in use. 2342 2343**Since**: 11 2344 2345**Parameters** 2346 2347| Name| Description| 2348| -------- | -------- | 2349| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2350| zoom | Pointer to the zoom ratio.| 2351 2352**Returns** 2353 2354Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2355 2356 2357### OH_CaptureSession_GetZoomRatioRange() 2358 2359``` 2360Camera_ErrorCode OH_CaptureSession_GetZoomRatioRange (Camera_CaptureSession * session, float * minZoom, float * maxZoom ) 2361``` 2362 2363**Description** 2364 2365Obtains the supported zoom ratio range. 2366 2367**Since**: 11 2368 2369**Parameters** 2370 2371| Name| Description| 2372| -------- | -------- | 2373| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2374| minZoom | Pointer to the minimum zoom ratio.| 2375| maxZoom | Pointer to the maximum zoom ratio.| 2376 2377**Returns** 2378 2379Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2380 2381 2382### OH_CaptureSession_HasFlash() 2383 2384``` 2385Camera_ErrorCode OH_CaptureSession_HasFlash (Camera_CaptureSession * session, bool * hasFlash ) 2386``` 2387 2388**Description** 2389 2390Checks whether the device has flash. 2391 2392**Since**: 11 2393 2394**Parameters** 2395 2396| Name| Description| 2397| -------- | -------- | 2398| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2399| hasFlash | Pointer to the result that specifies whether the device has flash.| 2400 2401**Returns** 2402 2403Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2404 2405 2406### OH_CaptureSession_IsExposureModeSupported() 2407 2408``` 2409Camera_ErrorCode OH_CaptureSession_IsExposureModeSupported (Camera_CaptureSession * session, Camera_ExposureMode exposureMode, bool * isSupported ) 2410``` 2411 2412**Description** 2413 2414Checks whether an exposure mode is supported. 2415 2416**Since**: 11 2417 2418**Parameters** 2419 2420| Name| Description| 2421| -------- | -------- | 2422| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2423| exposureMode | Target exposure mode, which is defined in the [Camera_ExposureMode](#camera_exposuremode) struct.| 2424| isSupported | Pointer to the result that specifies whether the exposure mode is supported.| 2425 2426**Returns** 2427 2428Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2429 2430 2431### OH_CaptureSession_IsFlashModeSupported() 2432 2433``` 2434Camera_ErrorCode OH_CaptureSession_IsFlashModeSupported (Camera_CaptureSession * session, Camera_FlashMode flashMode, bool * isSupported ) 2435``` 2436 2437**Description** 2438 2439Checks whether a flash mode is supported. 2440 2441**Since**: 11 2442 2443**Parameters** 2444 2445| Name| Description| 2446| -------- | -------- | 2447| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2448| flashMode | Target flash mode, which is defined in the [Camera_FlashMode](#camera_flashmode) struct.| 2449| isSupported | Pointer to the result that specifies whether the flash mode is supported.| 2450 2451**Returns** 2452 2453Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2454 2455 2456### OH_CaptureSession_IsFocusModeSupported() 2457 2458``` 2459Camera_ErrorCode OH_CaptureSession_IsFocusModeSupported (Camera_CaptureSession * session, Camera_FocusMode focusMode, bool * isSupported ) 2460``` 2461 2462**Description** 2463 2464Checks whether a focus mode is supported. 2465 2466**Since**: 11 2467 2468**Parameters** 2469 2470| Name| Description| 2471| -------- | -------- | 2472| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2473| focusMode | Target focus mode, which is defined in the [Camera_FocusMode](#camera_focusmode) struct.| 2474| isSupported | Pointer to the result that specifies whether the focus mode is supported.| 2475 2476**Returns** 2477 2478Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2479 2480 2481### OH_CaptureSession_IsVideoStabilizationModeSupported() 2482 2483``` 2484Camera_ErrorCode OH_CaptureSession_IsVideoStabilizationModeSupported (Camera_CaptureSession * session, Camera_VideoStabilizationMode mode, bool * isSupported ) 2485``` 2486 2487**Description** 2488 2489Checks whether a video stabilization mode is supported. 2490 2491**Since**: 11 2492 2493**Parameters** 2494 2495| Name| Description| 2496| -------- | -------- | 2497| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2498| mode | Target video stabilization mode, which is defined in the [Camera_VideoStabilizationMode](#camera_videostabilizationmode) struct.| 2499| isSupported | Pointer to the result that specifies whether the video stabilization mode is supported.| 2500 2501**Returns** 2502 2503Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2504 2505 2506### OH_CaptureSession_RegisterCallback() 2507 2508``` 2509Camera_ErrorCode OH_CaptureSession_RegisterCallback (Camera_CaptureSession * session, CaptureSession_Callbacks * callback ) 2510``` 2511 2512**Description** 2513 2514Registers a callback to listen for session capture events. 2515 2516**Since**: 11 2517 2518**Parameters** 2519 2520| Name| Description| 2521| -------- | -------- | 2522| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2523| callback | Pointer to the target callback, which is defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct.| 2524 2525**Returns** 2526 2527Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 2528 2529 2530### OH_CaptureSession_Release() 2531 2532``` 2533Camera_ErrorCode OH_CaptureSession_Release (Camera_CaptureSession * session) 2534``` 2535 2536**Description** 2537 2538Releases a **CaptureSession** instance. 2539 2540**Since**: 11 2541 2542**Parameters** 2543 2544| Name| Description| 2545| -------- | -------- | 2546| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2547 2548**Returns** 2549 2550Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 2551 2552 2553### OH_CaptureSession_RemoveInput() 2554 2555``` 2556Camera_ErrorCode OH_CaptureSession_RemoveInput (Camera_CaptureSession * session, Camera_Input * cameraInput ) 2557``` 2558 2559**Description** 2560 2561Removes a **CameraInput** instance from a session. 2562 2563**Since**: 11 2564 2565**Parameters** 2566 2567| Name| Description| 2568| -------- | -------- | 2569| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2570| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.| 2571 2572**Returns** 2573 2574Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_OPERATION_NOT_ALLOWED** if the operation is not allowed. 2575 2576 2577### OH_CaptureSession_RemoveMetadataOutput() 2578 2579``` 2580Camera_ErrorCode OH_CaptureSession_RemoveMetadataOutput (Camera_CaptureSession * session, Camera_MetadataOutput * metadataOutput ) 2581``` 2582 2583**Description** 2584 2585Removes a **MetadataOutput** instance from a session. 2586 2587**Since**: 11 2588 2589**Parameters** 2590 2591| Name| Description| 2592| -------- | -------- | 2593| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2594| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.| 2595 2596**Returns** 2597 2598Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_OPERATION_NOT_ALLOWED** if the operation is not allowed. 2599 2600 2601### OH_CaptureSession_RemovePhotoOutput() 2602 2603``` 2604Camera_ErrorCode OH_CaptureSession_RemovePhotoOutput (Camera_CaptureSession * session, Camera_PhotoOutput * photoOutput ) 2605``` 2606 2607**Description** 2608 2609Removes a **PhotoOutput** instance from a session. 2610 2611**Since**: 11 2612 2613**Parameters** 2614 2615| Name| Description| 2616| -------- | -------- | 2617| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2618| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| 2619 2620**Returns** 2621 2622Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_OPERATION_NOT_ALLOWED** if the operation is not allowed. 2623 2624 2625### OH_CaptureSession_RemovePreviewOutput() 2626 2627``` 2628Camera_ErrorCode OH_CaptureSession_RemovePreviewOutput (Camera_CaptureSession * session, Camera_PreviewOutput * previewOutput ) 2629``` 2630 2631**Description** 2632 2633Removes a **PreviewOutput** instance from a session. 2634 2635**Since**: 11 2636 2637**Parameters** 2638 2639| Name| Description| 2640| -------- | -------- | 2641| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2642| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| 2643 2644**Returns** 2645 2646Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_OPERATION_NOT_ALLOWED** if the operation is not allowed. 2647 2648 2649### OH_CaptureSession_RemoveVideoOutput() 2650 2651``` 2652Camera_ErrorCode OH_CaptureSession_RemoveVideoOutput (Camera_CaptureSession * session, Camera_VideoOutput * videoOutput ) 2653``` 2654 2655**Description** 2656 2657Removes a **VideoOutput** instance from a session. 2658 2659**Since**: 11 2660 2661**Parameters** 2662 2663| Name| Description| 2664| -------- | -------- | 2665| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2666| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.| 2667 2668**Returns** 2669 2670Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_OPERATION_NOT_ALLOWED** if the operation is not allowed. 2671 2672 2673### OH_CaptureSession_SetExposureBias() 2674 2675``` 2676Camera_ErrorCode OH_CaptureSession_SetExposureBias (Camera_CaptureSession * session, float exposureBias ) 2677``` 2678 2679**Description** 2680 2681Sets an exposure compensation value for the device. 2682 2683**Since**: 11 2684 2685**Parameters** 2686 2687| Name| Description| 2688| -------- | -------- | 2689| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2690| exposureBias | Target exposure compensation value.| 2691 2692**Returns** 2693 2694Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2695 2696 2697### OH_CaptureSession_SetExposureMode() 2698 2699``` 2700Camera_ErrorCode OH_CaptureSession_SetExposureMode (Camera_CaptureSession * session, Camera_ExposureMode exposureMode ) 2701``` 2702 2703**Description** 2704 2705Sets an [Camera_VideoOutput](#camera_videooutput) for the device. 2706 2707**Since**: 11 2708 2709**Parameters** 2710 2711| Name| Description| 2712| -------- | -------- | 2713| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2714| exposureMode | Target exposure mode, which is defined in the [Camera_ExposureMode](#camera_exposuremode) struct.| 2715 2716**Returns** 2717 2718Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2719 2720 2721### OH_CaptureSession_SetFlashMode() 2722 2723``` 2724Camera_ErrorCode OH_CaptureSession_SetFlashMode (Camera_CaptureSession * session, Camera_FlashMode flashMode ) 2725``` 2726 2727**Description** 2728 2729Sets a flash mode for the device. 2730 2731**Since**: 11 2732 2733**Parameters** 2734 2735| Name| Description| 2736| -------- | -------- | 2737| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2738| flashMode | Target flash mode, which is defined in the [Camera_FlashMode](#camera_flashmode) struct.| 2739 2740**Returns** 2741 2742Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2743 2744 2745### OH_CaptureSession_SetFocusMode() 2746 2747``` 2748Camera_ErrorCode OH_CaptureSession_SetFocusMode (Camera_CaptureSession * session, Camera_FocusMode focusMode ) 2749``` 2750 2751**Description** 2752 2753Sets a focus mode for the device. 2754 2755**Since**: 11 2756 2757**Parameters** 2758 2759| Name| Description| 2760| -------- | -------- | 2761| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2762| focusMode | Target focus mode, which is defined in the [Camera_FocusMode](#camera_focusmode) struct.| 2763 2764**Returns** 2765 2766Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2767 2768 2769### OH_CaptureSession_SetFocusPoint() 2770 2771``` 2772Camera_ErrorCode OH_CaptureSession_SetFocusPoint (Camera_CaptureSession * session, Camera_Point focusPoint ) 2773``` 2774 2775**Description** 2776 2777Sets a focal point for the device. 2778 2779**Since**: 11 2780 2781**Parameters** 2782 2783| Name| Description| 2784| -------- | -------- | 2785| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2786| focusPoint | Target focal point, which is defined in the [Camera_Point](_camera___point.md) struct.| 2787 2788**Returns** 2789 2790Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2791 2792 2793### OH_CaptureSession_SetMeteringPoint() 2794 2795``` 2796Camera_ErrorCode OH_CaptureSession_SetMeteringPoint (Camera_CaptureSession * session, Camera_Point point ) 2797``` 2798 2799**Description** 2800 2801Sets the metering point, which is the center point of the metering rectangle. 2802 2803**Since**: 11 2804 2805**Parameters** 2806 2807| Name| Description| 2808| -------- | -------- | 2809| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2810| point | Target metering point, which is defined in the [Camera_Point](_camera___point.md) struct.| 2811 2812**Returns** 2813 2814Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2815 2816 2817### OH_CaptureSession_SetVideoStabilizationMode() 2818 2819``` 2820Camera_ErrorCode OH_CaptureSession_SetVideoStabilizationMode (Camera_CaptureSession * session, Camera_VideoStabilizationMode mode ) 2821``` 2822 2823**Description** 2824 2825Sets a video stabilization mode for the device. 2826 2827**Since**: 11 2828 2829**Parameters** 2830 2831| Name| Description| 2832| -------- | -------- | 2833| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2834| mode | Target video stabilization mode, which is defined in the **Camera_VideoStatizationMode** struct.| 2835 2836**Returns** 2837 2838Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2839 2840 2841### OH_CaptureSession_SetZoomRatio() 2842 2843``` 2844Camera_ErrorCode OH_CaptureSession_SetZoomRatio (Camera_CaptureSession * session, float zoom ) 2845``` 2846 2847**Description** 2848 2849Sets a zoom ratio for the device. 2850 2851**Since**: 11 2852 2853**Parameters** 2854 2855| Name| Description| 2856| -------- | -------- | 2857| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2858| zoom | Target zoom ratio.| 2859 2860**Returns** 2861 2862Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured. 2863 2864 2865### OH_CaptureSession_Start() 2866 2867``` 2868Camera_ErrorCode OH_CaptureSession_Start (Camera_CaptureSession * session) 2869``` 2870 2871**Description** 2872 2873Starts session capture. 2874 2875**Since**: 11 2876 2877**Parameters** 2878 2879| Name| Description| 2880| -------- | -------- | 2881| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2882 2883**Returns** 2884 2885Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 2886 2887 2888### OH_CaptureSession_Stop() 2889 2890``` 2891Camera_ErrorCode OH_CaptureSession_Stop (Camera_CaptureSession * session) 2892``` 2893 2894**Description** 2895 2896Stops session capture. 2897 2898**Since**: 11 2899 2900**Parameters** 2901 2902| Name| Description| 2903| -------- | -------- | 2904| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2905 2906**Returns** 2907 2908Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 2909 2910 2911### OH_CaptureSession_UnregisterCallback() 2912 2913``` 2914Camera_ErrorCode OH_CaptureSession_UnregisterCallback (Camera_CaptureSession * session, CaptureSession_Callbacks * callback ) 2915``` 2916 2917**Description** 2918 2919Unregisters the callback used to listen for session capture events. 2920 2921**Since**: 11 2922 2923**Parameters** 2924 2925| Name| Description| 2926| -------- | -------- | 2927| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| 2928| callback | Pointer to the target callback, which is defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct.| 2929 2930**Returns** 2931 2932Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 2933 2934 2935### OH_MetadataOutput_RegisterCallback() 2936 2937``` 2938Camera_ErrorCode OH_MetadataOutput_RegisterCallback (Camera_MetadataOutput * metadataOutput, MetadataOutput_Callbacks * callback ) 2939``` 2940 2941**Description** 2942 2943Registers a callback to listen for metadata output events. 2944 2945**Since**: 11 2946 2947**Parameters** 2948 2949| Name| Description| 2950| -------- | -------- | 2951| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.| 2952| callback | Pointer to the target callback, which is defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct.| 2953 2954**Returns** 2955 2956Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 2957 2958 2959### OH_MetadataOutput_Release() 2960 2961``` 2962Camera_ErrorCode OH_MetadataOutput_Release (Camera_MetadataOutput * metadataOutput) 2963``` 2964 2965**Description** 2966 2967Releases a **MetadataOutput** instance. 2968 2969**Since**: 11 2970 2971**Parameters** 2972 2973| Name| Description| 2974| -------- | -------- | 2975| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.| 2976 2977**Returns** 2978 2979Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 2980 2981 2982### OH_MetadataOutput_Start() 2983 2984``` 2985Camera_ErrorCode OH_MetadataOutput_Start (Camera_MetadataOutput * metadataOutput) 2986``` 2987 2988**Description** 2989 2990Starts metadata output. 2991 2992**Since**: 11 2993 2994**Parameters** 2995 2996| Name| Description| 2997| -------- | -------- | 2998| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.| 2999 3000**Returns** 3001 3002Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 3003 3004 3005### OH_MetadataOutput_Stop() 3006 3007``` 3008Camera_ErrorCode OH_MetadataOutput_Stop (Camera_MetadataOutput * metadataOutput) 3009``` 3010 3011**Description** 3012 3013Stops metadata output. 3014 3015**Since**: 11 3016 3017**Parameters** 3018 3019| Name| Description| 3020| -------- | -------- | 3021| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.| 3022 3023**Returns** 3024 3025Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 3026 3027 3028### OH_MetadataOutput_UnregisterCallback() 3029 3030``` 3031Camera_ErrorCode OH_MetadataOutput_UnregisterCallback (Camera_MetadataOutput * metadataOutput, MetadataOutput_Callbacks * callback ) 3032``` 3033 3034**Description** 3035 3036Unregisters the callback used to listen for metadata output events. 3037 3038**Since**: 11 3039 3040**Parameters** 3041 3042| Name| Description| 3043| -------- | -------- | 3044| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.| 3045| callback | Pointer to the target callback, which is defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct.| 3046 3047**Returns** 3048 3049Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 3050 3051 3052### OH_PhotoOutput_Capture() 3053 3054``` 3055Camera_ErrorCode OH_PhotoOutput_Capture (Camera_PhotoOutput * photoOutput) 3056``` 3057 3058**Description** 3059 3060Captures a photo. 3061 3062**Since**: 11 3063 3064**Parameters** 3065 3066| Name| Description| 3067| -------- | -------- | 3068| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| 3069 3070**Returns** 3071 3072Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 3073 3074 3075### OH_PhotoOutput_Capture_WithCaptureSetting() 3076 3077``` 3078Camera_ErrorCode OH_PhotoOutput_Capture_WithCaptureSetting (Camera_PhotoOutput * photoOutput, Camera_PhotoCaptureSetting setting ) 3079``` 3080 3081**Description** 3082 3083Captures a photo with the photographing parameters. 3084 3085**Parameters** 3086 3087| Name| Description| 3088| -------- | -------- | 3089| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| 3090| setting | Photographing parameters, which are defined in the [Camera_PhotoCaptureSetting](_camera___photo_capture_setting.md) struct.| 3091 3092**Returns** 3093 3094Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 3095 3096 3097### OH_PhotoOutput_IsMirrorSupported() 3098 3099``` 3100Camera_ErrorCode OH_PhotoOutput_IsMirrorSupported (Camera_PhotoOutput * photoOutput, bool * isSupported ) 3101``` 3102 3103**Description** 3104 3105Checks whether mirroring is supported. 3106 3107**Since**: 11 3108 3109**Parameters** 3110 3111| Name| Description| 3112| -------- | -------- | 3113| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance, which is used to check whether mirroring is supported.| 3114| isSupported | Pointer to the result that specifies whether mirroring is supported.| 3115 3116**Returns** 3117 3118Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 3119 3120 3121### OH_PhotoOutput_RegisterCallback() 3122 3123``` 3124Camera_ErrorCode OH_PhotoOutput_RegisterCallback (Camera_PhotoOutput * photoOutput, PhotoOutput_Callbacks * callback ) 3125``` 3126 3127**Description** 3128 3129Registers a callback to listen for photo output events. 3130 3131**Since**: 11 3132 3133**Parameters** 3134 3135| Name| Description| 3136| -------- | -------- | 3137| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| 3138| callback | Pointer to the target callback, which is defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct.| 3139 3140**Returns** 3141 3142Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 3143 3144 3145### OH_PhotoOutput_Release() 3146 3147``` 3148Camera_ErrorCode OH_PhotoOutput_Release (Camera_PhotoOutput * photoOutput) 3149``` 3150 3151**Description** 3152 3153Releases a **PhotoOutput** instance. 3154 3155**Since**: 11 3156 3157**Parameters** 3158 3159| Name| Description| 3160| -------- | -------- | 3161| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| 3162 3163**Returns** 3164 3165Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 3166 3167 3168### OH_PhotoOutput_UnregisterCallback() 3169 3170``` 3171Camera_ErrorCode OH_PhotoOutput_UnregisterCallback (Camera_PhotoOutput * photoOutput, PhotoOutput_Callbacks * callback ) 3172``` 3173 3174**Description** 3175 3176Unregisters the callback used to listen for photo output events. 3177 3178**Parameters** 3179 3180| Name| Description| 3181| -------- | -------- | 3182| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| 3183| callback | Pointer to the target callback, which is defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct.| 3184 3185**Returns** 3186 3187Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 3188 3189 3190### OH_PreviewOutput_RegisterCallback() 3191 3192``` 3193Camera_ErrorCode OH_PreviewOutput_RegisterCallback (Camera_PreviewOutput * previewOutput, PreviewOutput_Callbacks * callback ) 3194``` 3195 3196**Description** 3197 3198Registers a callback to listen for preview output events. 3199 3200**Since**: 11 3201 3202**Parameters** 3203 3204| Name| Description| 3205| -------- | -------- | 3206| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| 3207| callback | Pointer to the target callback, which is defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct.| 3208 3209**Returns** 3210 3211Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 3212 3213 3214### OH_PreviewOutput_Release() 3215 3216``` 3217Camera_ErrorCode OH_PreviewOutput_Release (Camera_PreviewOutput * previewOutput) 3218``` 3219 3220**Description** 3221 3222Releases a **PreviewOutput** instance. 3223 3224**Since**: 11 3225 3226**Parameters** 3227 3228| Name| Description| 3229| -------- | -------- | 3230| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| 3231 3232**Returns** 3233 3234Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 3235 3236 3237### OH_PreviewOutput_Start() 3238 3239``` 3240Camera_ErrorCode OH_PreviewOutput_Start (Camera_PreviewOutput * previewOutput) 3241``` 3242 3243**Description** 3244 3245Starts preview output. 3246 3247**Since**: 11 3248 3249**Parameters** 3250 3251| Name| Description| 3252| -------- | -------- | 3253| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| 3254 3255**Returns** 3256 3257Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 3258 3259 3260### OH_PreviewOutput_Stop() 3261 3262``` 3263Camera_ErrorCode OH_PreviewOutput_Stop (Camera_PreviewOutput * previewOutput) 3264``` 3265 3266**Description** 3267 3268Stops preview output. 3269 3270**Since**: 11 3271 3272**Parameters** 3273 3274| Name| Description| 3275| -------- | -------- | 3276| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| 3277 3278**Returns** 3279 3280Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 3281 3282 3283### OH_PreviewOutput_UnregisterCallback() 3284 3285``` 3286Camera_ErrorCode OH_PreviewOutput_UnregisterCallback (Camera_PreviewOutput * previewOutput, PreviewOutput_Callbacks * callback ) 3287``` 3288 3289**Description** 3290 3291Unregisters the callback used to listen for preview output events. 3292 3293**Since**: 11 3294 3295**Parameters** 3296 3297| Name| Description| 3298| -------- | -------- | 3299| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| 3300| callback | Pointer to the target callback, which is defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct.| 3301 3302**Returns** 3303 3304Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 3305 3306 3307### OH_VideoOutput_RegisterCallback() 3308 3309``` 3310Camera_ErrorCode OH_VideoOutput_RegisterCallback (Camera_VideoOutput * videoOutput, VideoOutput_Callbacks * callback ) 3311``` 3312 3313**Description** 3314 3315Registers a callback to listen for video output events. 3316 3317**Since**: 11 3318 3319**Parameters** 3320 3321| Name| Description| 3322| -------- | -------- | 3323| videoOutput | Pointer to a [Camera_VideoOutput](#camera_videooutput) instance.| 3324| callback | Pointer to the target callback, which is defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct.| 3325 3326**Returns** 3327 3328Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 3329 3330 3331### OH_VideoOutput_Release() 3332 3333``` 3334Camera_ErrorCode OH_VideoOutput_Release (Camera_VideoOutput * videoOutput) 3335``` 3336 3337**Description** 3338 3339Releases a **VideoOutput** instance. 3340 3341**Since**: 11 3342 3343**Parameters** 3344 3345| Name| Description| 3346| -------- | -------- | 3347| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.| 3348 3349**Returns** 3350 3351Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 3352 3353 3354### OH_VideoOutput_Start() 3355 3356``` 3357Camera_ErrorCode OH_VideoOutput_Start (Camera_VideoOutput * videoOutput) 3358``` 3359 3360**Description** 3361 3362Starts video output. 3363 3364**Since**: 11 3365 3366**Parameters** 3367 3368| Name| Description| 3369| -------- | -------- | 3370| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.| 3371 3372**Returns** 3373 3374Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SESSION_NOT_CONFIG** if the session is not configured; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 3375 3376 3377### OH_VideoOutput_Stop() 3378 3379``` 3380Camera_ErrorCode OH_VideoOutput_Stop (Camera_VideoOutput * videoOutput) 3381``` 3382 3383**Description** 3384 3385Stops video output. 3386 3387**Since**: 11 3388 3389**Parameters** 3390 3391| Name| Description| 3392| -------- | -------- | 3393| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.| 3394 3395**Returns** 3396 3397Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect; returns **CAMERA_SERVICE_FATAL_ERROR** if a fatal error occurs in the camera service. 3398 3399 3400### OH_VideoOutput_UnregisterCallback() 3401 3402``` 3403Camera_ErrorCode OH_VideoOutput_UnregisterCallback (Camera_VideoOutput * videoOutput, VideoOutput_Callbacks * callback ) 3404``` 3405 3406**Description** 3407 3408Unregisters the callback used to listen for video output events. 3409 3410**Since**: 11 3411 3412**Parameters** 3413 3414| Name| Description| 3415| -------- | -------- | 3416| videoOutput | Pointer to a [Camera_VideoOutput](#camera_videooutput) instance.| 3417| callback | Pointer to the target callback, which is defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct.| 3418 3419**Returns** 3420 3421Returns **CAMERA_OK** if the function is successfully called; returns **INVALID_ARGUMENT** if a parameter is missing or the parameter type is incorrect. 3422