From 22d694a31ce8b6787bba1cdd9099410828b39df3 Mon Sep 17 00:00:00 2001 From: Gloria Date: Mon, 30 Jun 2025 18:04:49 +0800 Subject: [PATCH] Update docs Signed-off-by: wusongqing --- .../reference/apis-arkdata/_data.md | 2 +- .../apis-arkgraphics2d/effect_kit.md | 2 +- .../apis-arkui/_ark_u_i___event_module.md | 2 +- .../apis-avcodec-kit/_a_v_demuxer.md | 2 +- .../reference/apis-avcodec-kit/_a_v_source.md | 2 +- .../apis-basic-services-kit/_device_info.md | 2 +- .../apis-basic-services-kit/_init_sync.md | 2 +- .../oh__batteryinfo.md | 2 +- .../apis-camera-kit/_o_h___camera.md | 6860 ----------------- .../apis-driverdevelopment-kit/_base_ddk.md | 2 +- .../apis-driverdevelopment-kit/_s_c_s_i.md | 2 +- .../apis-driverdevelopment-kit/_serial_ddk.md | 2 +- .../apis-driverdevelopment-kit/_usb_ddk.md | 2 +- .../_media_key_session___callback.md | 2 +- .../reference/apis-input-kit/input.md | 2 +- .../apis-localization-kit/resourcemanager.md | 2 +- .../reference/apis-location-kit/_location.md | 2 +- .../apis-network-kit/_net_connection.md | 2 +- .../reference/apis-network-kit/netstack.md | 2 +- .../_neural_network_runtime.md | 2 +- .../_hi_app_event.md | 2 +- .../apis-performance-analysis-kit/_hi_log.md | 2 +- .../ndk-apis-telephony-data.md | 2 +- .../ndk-apis-telephony-radio.md | 2 +- .../_huks_key_api.md | 2 +- .../_huks_param_set_api.md | 2 +- .../_huks_type_api.md | 2 +- 27 files changed, 26 insertions(+), 6886 deletions(-) delete mode 100644 en/application-dev/reference/apis-camera-kit/_o_h___camera.md diff --git a/en/application-dev/reference/apis-arkdata/_data.md b/en/application-dev/reference/apis-arkdata/_data.md index e27da8c36fa..ecc14428f5a 100644 --- a/en/application-dev/reference/apis-arkdata/_data.md +++ b/en/application-dev/reference/apis-arkdata/_data.md @@ -13,7 +13,7 @@ Data (distributed data manager) supports persistence of various structured data ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-arkgraphics2d/effect_kit.md b/en/application-dev/reference/apis-arkgraphics2d/effect_kit.md index 6f997c2d664..b11f1e468ed 100644 --- a/en/application-dev/reference/apis-arkgraphics2d/effect_kit.md +++ b/en/application-dev/reference/apis-arkgraphics2d/effect_kit.md @@ -13,7 +13,7 @@ The EffectKit module provides the basic image processing capabilities, including ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-arkui/_ark_u_i___event_module.md b/en/application-dev/reference/apis-arkui/_ark_u_i___event_module.md index 7455db05db4..422ffa6e9bd 100644 --- a/en/application-dev/reference/apis-arkui/_ark_u_i___event_module.md +++ b/en/application-dev/reference/apis-arkui/_ark_u_i___event_module.md @@ -11,7 +11,7 @@ Declares the UI input event capabilities provided by ArkUI on the native side. ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-avcodec-kit/_a_v_demuxer.md b/en/application-dev/reference/apis-avcodec-kit/_a_v_demuxer.md index 81ff7b3a0cb..58ba7a6b198 100644 --- a/en/application-dev/reference/apis-avcodec-kit/_a_v_demuxer.md +++ b/en/application-dev/reference/apis-avcodec-kit/_a_v_demuxer.md @@ -15,7 +15,7 @@ For details about the development guide and sample, see [Media Data Demultiplexi ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-avcodec-kit/_a_v_source.md b/en/application-dev/reference/apis-avcodec-kit/_a_v_source.md index bd4ee2eaf6d..a4cdc973e9b 100644 --- a/en/application-dev/reference/apis-avcodec-kit/_a_v_source.md +++ b/en/application-dev/reference/apis-avcodec-kit/_a_v_source.md @@ -13,7 +13,7 @@ The AVSource module provides the functions for constructing media resource objec ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-basic-services-kit/_device_info.md b/en/application-dev/reference/apis-basic-services-kit/_device_info.md index fa700a6ea51..080bf165282 100644 --- a/en/application-dev/reference/apis-basic-services-kit/_device_info.md +++ b/en/application-dev/reference/apis-basic-services-kit/_device_info.md @@ -11,7 +11,7 @@ Provides APIs for querying device information. ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-basic-services-kit/_init_sync.md b/en/application-dev/reference/apis-basic-services-kit/_init_sync.md index a45cfa3b57f..4b1ae4ffb9b 100644 --- a/en/application-dev/reference/apis-basic-services-kit/_init_sync.md +++ b/en/application-dev/reference/apis-basic-services-kit/_init_sync.md @@ -11,7 +11,7 @@ Provides APIs for notifying the Init process of events. ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-basic-services-kit/oh__batteryinfo.md b/en/application-dev/reference/apis-basic-services-kit/oh__batteryinfo.md index 0ea00447449..2fe315ca983 100644 --- a/en/application-dev/reference/apis-basic-services-kit/oh__batteryinfo.md +++ b/en/application-dev/reference/apis-basic-services-kit/oh__batteryinfo.md @@ -12,7 +12,7 @@ Provides APIs for the BatteryInfo module to obtain battery information. ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-camera-kit/_o_h___camera.md b/en/application-dev/reference/apis-camera-kit/_o_h___camera.md deleted file mode 100644 index 3840d6f4b4b..00000000000 --- a/en/application-dev/reference/apis-camera-kit/_o_h___camera.md +++ /dev/null @@ -1,6860 +0,0 @@ -# OH_Camera - - -## Overview - -The OH_Camera module provides C APIs for the camera service. - -You can refer to the corresponding development guide and samples based on your development requirements. - -- [Camera Device Management](../../media/camera/native-camera-device-management.md) -- [Device Input Management](../../media/camera/native-camera-device-input.md) -- [Camera Session Management](../../media/camera/native-camera-session-management.md) -- [Preview](../../media/camera/native-camera-preview.md) -- [Secondary Processing of Preview Streams](../../media/camera/native-camera-preview-imageReceiver.md) -- [Photo Capture](../../media/camera/native-camera-shooting.md) -- [Deferred Photo Delivery](../../media/camera/native-camera-deferred-capture.md) -- [Video Recording](../../media/camera/native-camera-recording.md) -- [Camera Metadata](../../media/camera/native-camera-metadata.md) -- [Using the Flashlight](../../media/camera/native-camera-torch-use.md) - - -**System capability**: SystemCapability.Multimedia.Camera.Core - -**Since**: 11 - - -## Summary - - -### File - -| Name| Description| -| -------- | -------- | -| [camera.h](camera_8h.md) | Declares the basic concepts of the camera.| -| [camera_device.h](camera__device_8h.md) | Declares the basic concepts of the camera device.| -| [camera_input.h](camera__input_8h.md) | Declares the camera input concepts.| -| [camera_manager.h](camera__manager_8h.md) | Declares the camera manager concepts.| -| [capture_session.h](capture__session_8h.md) | Declares the capture session concepts.| -| [metadata_output.h](metadata__output_8h.md) | Declares the metadata output concepts.| -| [photo_native.h](photo__native_8h.md) | Declares the camera photo concepts.| -| [photo_output.h](photo__output_8h.md) | Declares the photo output concepts.| -| [preview_output.h](preview__output_8h.md) | Declares the preview output concepts.| -| [video_output.h](video__output_8h.md) | Declares the video output concepts.| - - -### Structs - -| Name| Description| -| -------- | -------- | -| struct [Camera_Size](_camera___size.md) | Describes the parameters related to the size.| -| struct [Camera_Profile](_camera___profile.md) | Describes the profile of a camera stream.| -| struct [Camera_FrameRateRange](_camera___frame_rate_range.md) | Describes the frame rate range.| -| struct [Camera_VideoProfile](_camera___video_profile.md) | Describes the video profile.| -| struct [Camera_OutputCapability](_camera___output_capability.md) | Describes the camera output capability.| -| struct [Camera_Device](_camera___device.md) | Describes the camera device.| -| struct [Camera_StatusInfo](_camera___status_info.md) | Describes the camera status information.| -| struct [Camera_Point](_camera___point.md) | Describes the parameters related to a point.| -| struct [Camera_Location](_camera___location.md) | Describes the location where the photo is taken.| -| struct [Camera_PhotoCaptureSetting](_camera___photo_capture_setting.md) | Describes the parameters related to photo capture.| -| struct [Camera_FrameShutterInfo](_camera___frame_shutter_info.md) | Describes the frame shutter information.| -| struct [Camera_CaptureEndInfo](_camera___capture_end_info.md) | Describes the capture end information.| -| struct [Camera_Rect](_camera___rect.md) | Describes the rectangle.| -| struct [Camera_MetadataObject](_camera___metadata_object.md) | Describes the camera metadata.| -| struct [Camera_TorchStatusInfo](_camera___torch_status_info.md) | Describes the flashlight status information.| -| struct [Camera_SmoothZoomInfo](_camera___smooth_zoom_info.md) | Describes the smooth zoom information.| -| struct [Camera_CaptureStartInfo](_camera___capture_start_info.md) | Describes the capture start information.| -| struct [Camera_FrameShutterEndInfo](_camera___frame_shutter_end_info.md) | Describes the frame shutter end information during capture.| -| struct [Camera_ConcurrentInfo](_camera___concurrent_info.md) | Describes the camera's concurrency information.| -| struct [CameraInput_Callbacks](_camera_input___callbacks.md) | Describes the callbacks used to listen for camera input errors.| -| struct [CameraManager_Callbacks](_camera_manager___callbacks.md) | Describes the callbacks used to listen for camera status changes.| -| struct [CaptureSession_Callbacks](_capture_session___callbacks.md) | Describes the callbacks used for a capture session.| -| struct [MetadataOutput_Callbacks](_metadata_output___callbacks.md) | Describes the callbacks related to metadata output.| -| struct [PhotoOutput_Callbacks](_photo_output___callbacks.md) | Describes the callbacks related to photo output.| -| struct [PreviewOutput_Callbacks](_preview_output___callbacks.md) | Describes the callbacks related to preview output.| -| struct [VideoOutput_Callbacks](_video_output___callbacks.md) | Describes the callbacks related to video output.| - - -### Types - -| Name| Description| -| -------- | -------- | -| typedef struct [Camera_Manager](#camera_manager) [Camera_Manager](#camera_manager) | Defines a struct for the camera manager.| -| typedef enum [Camera_ErrorCode](#camera_errorcode) [Camera_ErrorCode](#camera_errorcode) | Defines an enum for the camera error codes.| -| typedef enum [Camera_Status](#camera_status) [Camera_Status](#camera_status) | Defines an enum for the camera statuses.| -| typedef enum [Camera_SceneMode](#camera_scenemode) [Camera_SceneMode](#camera_scenemode) | Defines an enum for the camera scene modes.| -| typedef enum [Camera_Position](#camera_position) [Camera_Position](#camera_position) | Defines an enum for the camera positions.| -| typedef enum [Camera_Type](#camera_type) [Camera_Type](#camera_type) | Defines an enum for the camera types.| -| typedef enum [Camera_Connection](#camera_connection) [Camera_Connection](#camera_connection) | Defines an enum for the camera connection types.| -| typedef enum [Camera_Format](#camera_format) [Camera_Format](#camera_format) | Defines an enum for the camera output formats.| -| typedef enum [Camera_FlashMode](#camera_flashmode) [Camera_FlashMode](#camera_flashmode) | Defines an enum for the flash modes.| -| typedef enum [Camera_ExposureMode](#camera_exposuremode) [Camera_ExposureMode](#camera_exposuremode) | Defines an enum for the exposure modes.| -| typedef enum [Camera_FocusMode](#camera_focusmode) [Camera_FocusMode](#camera_focusmode) | Defines an enum for the focus modes.| -| typedef enum [Camera_FocusState](#camera_focusstate) [Camera_FocusState](#camera_focusstate) | Defines an enum for the focus states.| -| typedef enum [Camera_VideoStabilizationMode](#camera_videostabilizationmode) [Camera_VideoStabilizationMode](#camera_videostabilizationmode) | Defines an enum for the video stabilization modes.| -| typedef enum [Camera_ImageRotation](#camera_imagerotation) [Camera_ImageRotation](#camera_imagerotation) | Defines an enum for the image rotation angles.| -| typedef enum [Camera_QualityLevel](#camera_qualitylevel) [Camera_QualityLevel](#camera_qualitylevel) | Defines an enum for the image quality levels.| -| typedef enum [Camera_QualityPrioritization](#camera_qualityprioritization) [Camera_QualityPrioritization](#camera_qualitylevel) | Defines an enum for the priority levels for video recording quality.| -| typedef enum [Camera_MetadataObjectType](#camera_metadataobjecttype) [Camera_MetadataObjectType](#camera_metadataobjecttype) | Defines an enum for the metadata object types.| -| typedef enum [Camera_TorchMode](#camera_torchmode) [Camera_TorchMode](#camera_torchmode) | Defines an enum for the flashlight modes.| -| typedef enum [Camera_SmoothZoomMode](#camera_smoothzoommode) [Camera_SmoothZoomMode](#camera_smoothzoommode) | Defines an enum for the smooth zoom modes.| -| typedef enum [Camera_PreconfigType](#camera_preconfigtype) [Camera_PreconfigType](#camera_preconfigtype) | Defines an enum for the preconfigured resolution types.| -| typedef enum [Camera_PreconfigRatio](#camera_preconfigratio) [Camera_PreconfigRatio](#camera_preconfigratio) | Defines an enum for the preconfigured aspect ratios.| -| typedef enum [Camera_HostDeviceType](#camera_hostdevicetype) [Camera_HostDeviceType](#camera_hostdevicetype) | Defines an enum for the remote device types.| -| typedef struct [Camera_Size](_camera___size.md) [Camera_Size](#camera_size) | Defines a struct for the parameters related to the size.| -| typedef struct [Camera_Profile](_camera___profile.md) [Camera_Profile](#camera_profile) | Defines a struct for the profile of a camera stream.| -| typedef struct [Camera_FrameRateRange](_camera___frame_rate_range.md) [Camera_FrameRateRange](#camera_frameraterange) | Defines a struct for the frame rate range.| -| typedef struct [Camera_VideoProfile](_camera___video_profile.md) [Camera_VideoProfile](#camera_videoprofile) | Defines a struct for the video profile.| -| typedef struct [Camera_OutputCapability](_camera___output_capability.md) [Camera_OutputCapability](#camera_outputcapability) | Defines a struct for the camera output capability.| -| typedef struct [Camera_Device](_camera___device.md) [Camera_Device](#camera_device) | Defines a struct for the camera device.| -| typedef struct [Camera_StatusInfo](_camera___status_info.md) [Camera_StatusInfo](#camera_statusinfo) | Defines a struct for the camera status information.| -| typedef struct [Camera_Point](_camera___point.md) [Camera_Point](#camera_point) | Defines a struct for the parameters related to a point.| -| typedef struct [Camera_Location](_camera___location.md) [Camera_Location](#camera_location) | Defines a struct for the location where the photo is taken.| -| typedef struct [Camera_PhotoCaptureSetting](_camera___photo_capture_setting.md) [Camera_PhotoCaptureSetting](#camera_photocapturesetting) | Defines a struct for the parameters related to photo capture.| -| typedef struct [Camera_FrameShutterInfo](_camera___frame_shutter_info.md) [Camera_FrameShutterInfo](#camera_frameshutterinfo) | Defines a struct for the frame shutter information.| -| typedef struct [Camera_CaptureEndInfo](_camera___capture_end_info.md) [Camera_CaptureEndInfo](#camera_captureendinfo) | Defines a struct for the capture end information.| -| typedef struct [Camera_Rect](_camera___rect.md) [Camera_Rect](#camera_rect) | Defines a struct for the rectangle.| -| typedef struct [Camera_MetadataObject](_camera___metadata_object.md) [Camera_MetadataObject](#camera_metadataobject) | Defines a struct for the camera metadata.| -| typedef struct [Camera_TorchStatusInfo](_camera___torch_status_info.md) [Camera_TorchStatusInfo](#camera_torchstatusinfo) | Defines a struct for the flashlight status information.| -| typedef struct [Camera_SmoothZoomInfo](_camera___smooth_zoom_info.md) [Camera_SmoothZoomInfo](#camera_smoothzoominfo) | Defines a struct for the smooth zoom information.| -| typedef struct [Camera_CaptureStartInfo](_camera___capture_start_info.md) [Camera_CaptureStartInfo](#camera_capturestartinfo) | Defines a struct for the capture start information.| -| typedef struct [Camera_FrameShutterEndInfo](_camera___frame_shutter_end_info.md) [Camera_FrameShutterEndInfo](#camera_frameshutterendinfo) | Defines a struct for the frame shutter end information during capture.| -| typedef enum [Camera_ConcurrentType](#camera_concurrenttype-1) [Camera_ConcurrentType](#camera_concurrenttype) | Defines an enum for the camera's concurrency types.| -| typedef struct [Camera_ConcurrentInfo](_camera___concurrent_info.md) [Camera_ConcurrentInfo](#camera_concurrentinfo) | Defines a struct for the camera's concurrency information.| -| typedef struct [Camera_Input](#camera_input) [Camera_Input](#camera_input) | Defines a struct for the camera input object.| -| typedef void(\* [OH_CameraInput_OnError](#oh_camerainput_onerror)) (const [Camera_Input](#camera_input) \*cameraInput, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the callback defined in the [CameraInput_Callbacks](_camera_input___callbacks.md) struct and used to report camera input errors.| -| typedef struct [CameraInput_Callbacks](_camera_input___callbacks.md) [CameraInput_Callbacks](#camerainput_callbacks) | Defines a struct for the callbacks used to listen for camera input errors.| -| typedef void(\* [OH_CameraManager_StatusCallback](#oh_cameramanager_statuscallback)) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_StatusInfo](_camera___status_info.md) \*status) | Defines the callback defined in the [CameraManager_Callbacks](_camera_manager___callbacks.md) struct and used to report the camera manager status.| -| typedef void(\* [OH_CameraManager_TorchStatusCallback](#oh_cameramanager_torchstatuscallback)) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_TorchStatusInfo](_camera___torch_status_info.md) \*status) | Defines the callback invoked when the flashlight status changes.| -| typedef struct [CameraManager_Callbacks](_camera_manager___callbacks.md) [CameraManager_Callbacks](#cameramanager_callbacks) | Defines a struct for the callbacks used to listen for camera status changes.| -| typedef struct [Camera_CaptureSession](#camera_capturesession) [Camera_CaptureSession](#camera_capturesession) | Defines a struct for the capture session object.| -| typedef void(\* [OH_CaptureSession_OnFocusStateChange](#oh_capturesession_onfocusstatechange)) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FocusState](#camera_focusstate) focusState) | Defines the callback defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct and used to report focus status changes of a capture session.| -| typedef void(\* [OH_CaptureSession_OnError](#oh_capturesession_onerror)) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the callback defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct and used to report capture session errors.| -| typedef void(\* [OH_CaptureSession_OnSmoothZoomInfo](#oh_capturesession_onsmoothzoominfo)) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_SmoothZoomInfo](_camera___smooth_zoom_info.md) \*smoothZoomInfo) | Defines the callback invoked when smooth zoom is triggered for a capture session.| -| typedef struct [CaptureSession_Callbacks](_capture_session___callbacks.md) [CaptureSession_Callbacks](#capturesession_callbacks) | Defines a struct for the callbacks used for a capture session.| -| typedef struct [Camera_MetadataOutput](#camera_metadataoutput) [Camera_MetadataOutput](#camera_metadataoutput) | Defines a struct for the metadata output object.| -| typedef void(\* [OH_MetadataOutput_OnMetadataObjectAvailable](#oh_metadataoutput_onmetadataobjectavailable)) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput, [Camera_MetadataObject](_camera___metadata_object.md) \*metadataObject, uint32_t size) | Defines the callback defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct and used to report metadata output data.| -| typedef void(\* [OH_MetadataOutput_OnError](#oh_metadataoutput_onerror)) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the callback defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct and used to report metadata output errors.| -| typedef struct [MetadataOutput_Callbacks](_metadata_output___callbacks.md) [MetadataOutput_Callbacks](#metadataoutput_callbacks) | Defines a struct for the callbacks related to metadata output.| -| typedef struct [OH_PhotoNative](#oh_photonative) [OH_PhotoNative](#oh_photonative) | Defines a struct for a camera photo object.| -| typedef struct [Camera_PhotoOutput](#camera_photooutput) [Camera_PhotoOutput](#camera_photooutput) | Defines a struct for the photo output object.| -| typedef void(\* [OH_PhotoOutput_OnFrameStart](#oh_photooutput_onframestart)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput) | Defines the callback defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct and used to report photo output frame start events.| -| typedef void(\* [OH_PhotoOutput_OnFrameShutter](#oh_photooutput_onframeshutter)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [Camera_FrameShutterInfo](_camera___frame_shutter_info.md) \*info) | Defines the callback defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct and used to report frame shutter events.| -| typedef void(\* [OH_PhotoOutput_OnFrameEnd](#oh_photooutput_onframeend)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, int32_t frameCount) | Defines the callback defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct and used to report photo output frame end events.| -| typedef void(\* [OH_PhotoOutput_OnError](#oh_photooutput_onerror)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the callback defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct and used to report photo output errors.| -| typedef void(\* [OH_PhotoOutput_CaptureEnd](#oh_photooutput_captureend)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, int32_t frameCount) | Defines the callback invoked when the capture ends.| -| typedef void(\* [OH_PhotoOutput_CaptureStartWithInfo](#oh_photooutput_capturestartwithinfo)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [Camera_CaptureStartInfo](_camera___capture_start_info.md) \*Info) | Defines the callback invoked when the capture starts.| -| typedef void(\* [OH_PhotoOutput_OnFrameShutterEnd](#oh_photooutput_onframeshutterend)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [Camera_FrameShutterInfo](_camera___frame_shutter_info.md) \*Info) | Defines the callback invoked when frame shutter ends.| -| typedef void(\* [OH_PhotoOutput_CaptureReady](#oh_photooutput_captureready)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput) | Defines the callback invoked when the camera is ready to take photos. When the callback is received, the next capture can be performed.| -| typedef void(\* [OH_PhotoOutput_EstimatedCaptureDuration](#oh_photooutput_estimatedcaptureduration)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, int64_t duration) | Defines the callback for the estimated capture duration.| -| typedef void(\* [OH_PhotoOutput_PhotoAvailable](#oh_photooutput_photoavailable)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoNative](#oh_photonative) \*photo) | Defines the callback invoked when a high-resolution photo is available.| -| typedef void(\* [OH_PhotoOutput_PhotoAssetAvailable](#oh_photooutput_photoassetavailable)) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, OH_MediaAsset \*photoAsset) | Defines the callback invoked when a photo asset is available.| -| typedef struct [PhotoOutput_Callbacks](_photo_output___callbacks.md) [PhotoOutput_Callbacks](#photooutput_callbacks) | Defines a struct for the callbacks related to photo output.| -| typedef struct [Camera_PreviewOutput](#camera_previewoutput) [Camera_PreviewOutput](#camera_previewoutput) | Defines a struct for the preview output object.| -| typedef void(\* [OH_PreviewOutput_OnFrameStart](#oh_previewoutput_onframestart)) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Defines the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used to report preview output frame start events.| -| typedef void(\* [OH_PreviewOutput_OnFrameEnd](#oh_previewoutput_onframeend)) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, int32_t frameCount) | Defines the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used to report preview output frame end events.| -| typedef void(\* [OH_PreviewOutput_OnError](#oh_previewoutput_onerror)) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used to report preview output errors.| -| typedef struct [PreviewOutput_Callbacks](_preview_output___callbacks.md) [PreviewOutput_Callbacks](#previewoutput_callbacks) | Defines a struct for the callbacks related to preview output.| -| typedef struct [Camera_VideoOutput](#camera_videooutput) [Camera_VideoOutput](#camera_videooutput) | Defines a struct for the video output object.| -| typedef void(\* [OH_VideoOutput_OnFrameStart](#oh_videooutput_onframestart)) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Defines the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output frame start events.| -| typedef void(\* [OH_VideoOutput_OnFrameEnd](#oh_videooutput_onframeend)) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, int32_t frameCount) | Defines the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output frame end events.| -| typedef void(\* [OH_VideoOutput_OnError](#oh_videooutput_onerror)) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, [Camera_ErrorCode](#camera_errorcode) errorCode) | Defines the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output errors.| -| typedef struct [VideoOutput_Callbacks](_video_output___callbacks.md) [VideoOutput_Callbacks](#videooutput_callbacks) | Defines a struct for the callbacks related to video output.| -| typedef struct [Camera_QualityPrioritization ](#camera_qualityprioritization) [Camera_QualityPrioritization](#camera_qualityprioritization) | Defines a struct for the priority level for video recording quality.| - - -### Enums - -| Name| Description| -| -------- | -------- | -| [Camera_ErrorCode](#camera_errorcode) {
CAMERA_OK = 0,
CAMERA_INVALID_ARGUMENT = 7400101,
CAMERA_OPERATION_NOT_ALLOWED = 7400102,
CAMERA_SESSION_NOT_CONFIG = 7400103,
CAMERA_SESSION_NOT_RUNNING = 7400104,
CAMERA_SESSION_CONFIG_LOCKED = 7400105,
CAMERA_DEVICE_SETTING_LOCKED = 7400106,
CAMERA_CONFLICT_CAMERA = 7400107,
CAMERA_DEVICE_DISABLED = 7400108,
CAMERA_DEVICE_PREEMPTED = 7400109,
CAMERA_UNRESOLVED_CONFLICTS_WITH_CURRENT_CONFIGURATIONS = 7400110,
CAMERA_SERVICE_FATAL_ERROR = 7400201} | Enumerates the camera error codes.| -| [Camera_Status](#camera_status) {
CAMERA_STATUS_APPEAR = 0,
CAMERA_STATUS_DISAPPEAR = 1,
CAMERA_STATUS_AVAILABLE = 2,
CAMERA_STATUS_UNAVAILABLE = 3 } | Enumerates the camera statuses.| -| [Camera_SceneMode](#camera_scenemode) {
NORMAL_PHOTO = 1,
NORMAL_VIDEO = 2,
SECURE_PHOTO = 12 } | Enumerates the camera scene modes.| -| [Camera_Position](#camera_position) {
CAMERA_POSITION_UNSPECIFIED = 0,
CAMERA_POSITION_BACK = 1,
CAMERA_POSITION_FRONT = 2 } | Enumerates the camera positions.| -| [Camera_Type](#camera_type) {
CAMERA_TYPE_DEFAULT = 0,
CAMERA_TYPE_WIDE_ANGLE = 1,
CAMERA_TYPE_ULTRA_WIDE = 2,
CAMERA_TYPE_TELEPHOTO = 3,
CAMERA_TYPE_TRUE_DEPTH = 4
} | Enumerates the camera types.| -| [Camera_Connection](#camera_connection) {
CAMERA_CONNECTION_BUILT_IN = 0,
CAMERA_CONNECTION_USB_PLUGIN = 1,
CAMERA_CONNECTION_REMOTE = 2 } | Enumerates the camera connection types.| -| [Camera_Format](#camera_format) {
CAMERA_FORMAT_RGBA_8888 = 3,
CAMERA_FORMAT_YUV_420_SP = 1003,
CAMERA_FORMAT_JPEG = 2000,
CAMERA_FORMAT_YCBCR_P010 = 2001,
CAMERA_FORMAT_YCRCB_P010 = 2002
} | Enumerates the camera output formats.| -| [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.| -| [Camera_ExposureMode](#camera_exposuremode) {
EXPOSURE_MODE_LOCKED = 0,
EXPOSURE_MODE_AUTO = 1,
EXPOSURE_MODE_CONTINUOUS_AUTO = 2 } | Enumerates the exposure modes.| -| [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.| -| [Camera_FocusState](#camera_focusstate) {
FOCUS_STATE_SCAN = 0,
FOCUS_STATE_FOCUSED = 1,
FOCUS_STATE_UNFOCUSED = 2 } | Enumerates the focus states.| -| [Camera_VideoStabilizationMode](#camera_videostabilizationmode) {
STABILIZATION_MODE_OFF = 0,
STABILIZATION_MODE_LOW = 1,
STABILIZATION_MODE_MIDDLE = 2,
STABILIZATION_MODE_HIGH = 3,
STABILIZATION_MODE_AUTO = 4
} | Enumerates the video stabilization modes.| -| [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.| -| [Camera_QualityLevel](#camera_qualitylevel) {
QUALITY_LEVEL_HIGH = 0,
QUALITY_LEVEL_MEDIUM = 1,
QUALITY_LEVEL_LOW = 2 } | Enumerates the image quality levels.| -| [Camera_HostDeviceType](#camera_hostdevicetype) {
HOST_DEVICE_TYPE_UNKNOWN_TYPE = 0,
HOST_DEVICE_TYPE_PHONE = 0x0E,
HOST_DEVICE_TYPE_TABLET = 0x11 } | Enumerates the remote device types.| -| [Camera_QualityPrioritization](#camera_qualityprioritization) {
HIGH_QUALITY = 0,
POWER_BALANCE = 1} | Enumerates the priority levels for video recording quality.| -| [Camera_ConcurrentType](#camera_concurrenttype-1) {
CAMERA_CONCURRENT_TYPE_LIMITED_CAPABILITY = 0,
CAMERA_CONCURRENT_TYPE_FULL_CAPABILITY = 1 } | Enumerates the camera's concurrency types.| -| [Camera_MetadataObjectType](#camera_metadataobjecttype) { FACE_DETECTION = 0 } | Enumerates the metadata object types.| -| [Camera_TorchMode](#camera_torchmode) { OFF = 0, ON = 1, AUTO = 2 } | Enumerates the flashlight modes.| -| [Camera_SmoothZoomMode](#camera_smoothzoommode) { NORMAL = 0 } | Enumerates the smooth zoom modes.| -| [Camera_PreconfigType](#camera_preconfigtype) {
PRECONFIG_720P = 0,
PRECONFIG_1080P = 1,
PRECONFIG_4K = 2,
PRECONFIG_HIGH_QUALITY = 3 } | Enumerates the preconfigured resolution types.| -| [Camera_PreconfigRatio](#camera_preconfigratio) {
PRECONFIG_RATIO_1_1 = 0,
PRECONFIG_RATIO_4_3 = 1,
PRECONFIG_RATIO_16_9 = 2 } | Enumerates the preconfigured aspect ratios.| - - -### Functions - -| Name| Description| -| -------- | -------- | -| [Camera_ErrorCode](#camera_errorcode) [OH_Camera_GetCameraManager](#oh_camera_getcameramanager) ([Camera_Manager](#camera_manager) \*\*cameraManager) | Obtains a **CameraManager** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_Camera_DeleteCameraManager](#oh_camera_deletecameramanager) ([Camera_Manager](#camera_manager) \*cameraManager) | Deletes a **CameraManager** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraDevice_GetCameraOrientation](#oh_cameradevice_getcameraorientation) ([Camera_Device](_camera___device.md) \*camera, uint32_t \*orientation) | Obtains the sensor direction of a camera.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraInput_RegisterCallback](#oh_camerainput_registercallback) ([Camera_Input](#camera_input) \*cameraInput, [CameraInput_Callbacks](_camera_input___callbacks.md) \*callback) | Registers a callback to listen for camera input events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraInput_UnregisterCallback](#oh_camerainput_unregistercallback) ([Camera_Input](#camera_input) \*cameraInput, [CameraInput_Callbacks](_camera_input___callbacks.md) \*callback) | Unregisters the callback used to listen for camera input events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraInput_Open](#oh_camerainput_open) ([Camera_Input](#camera_input) \*cameraInput) | Opens a camera.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraInput_OpenSecureCamera](#oh_camerainput_opensecurecamera) ([Camera_Input](#camera_input) \*cameraInput, uint64_t \*secureSeqId) | Opens a camera in secure mode.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraInput_OpenConcurrentCameras](#oh_camerainput_openconcurrentcameras) ([Camera_Input](#camera_input) \*cameraInput, [Camera_ConcurrentType](#camera_concurrenttype) type) | Opens the camera based on the specified concurrency type.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraInput_Close](#oh_camerainput_close) ([Camera_Input](#camera_input) \*cameraInput) | Closes a camera.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraInput_Release](#oh_camerainput_release) ([Camera_Input](#camera_input) \*cameraInput) | Releases a **CameraInput** instance. Either this function or [OH_CameraInput_Close](#oh_camerainput_close) needs to be called.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_RegisterCallback](#oh_cameramanager_registercallback) ([Camera_Manager](#camera_manager) \*cameraManager, [CameraManager_Callbacks](_camera_manager___callbacks.md) \*callback) | Registers a callback to listen for camera status changes.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_UnregisterCallback](#oh_cameramanager_unregistercallback) ([Camera_Manager](#camera_manager) \*cameraManager, [CameraManager_Callbacks](_camera_manager___callbacks.md) \*callback) | Unregisters the callback used to listen for camera status changes.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_RegisterTorchStatusCallback](#oh_cameramanager_registertorchstatuscallback) ([Camera_Manager](#camera_manager) \*cameraManager, [OH_CameraManager_TorchStatusCallback](#oh_cameramanager_torchstatuscallback) torchStatusCallback) | Registers a callback to listen for flashlight status changes.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_UnregisterTorchStatusCallback](#oh_cameramanager_unregistertorchstatuscallback) ([Camera_Manager](#camera_manager) \*cameraManager, [OH_CameraManager_TorchStatusCallback](#oh_cameramanager_torchstatuscallback) torchStatusCallback) | Unregisters the callback used to listen for flashlight status changes.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_GetSupportedCameras](#oh_cameramanager_getsupportedcameras) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_Device](_camera___device.md) \*\*cameras, uint32_t \*size) | Obtains the supported cameras.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_DeleteSupportedCameras](#oh_cameramanager_deletesupportedcameras) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_Device](_camera___device.md) \*cameras, uint32_t size) | Deletes supported cameras.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_GetSupportedCameraOutputCapability](#oh_cameramanager_getsupportedcameraoutputcapability) ([Camera_Manager](#camera_manager) \*cameraManager, const [Camera_Device](_camera___device.md) \*camera, [Camera_OutputCapability](_camera___output_capability.md) \*\*cameraOutputCapability) | Obtains the output capability supported by a camera.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_GetSupportedCameraOutputCapabilityWithSceneMode](#oh_cameramanager_getsupportedcameraoutputcapabilitywithscenemode) ([Camera_Manager](#camera_manager) \*cameraManager, const [Camera_Device](_camera___device.md) \*camera, [Camera_SceneMode](#camera_scenemode) sceneMode, [Camera_OutputCapability](_camera___output_capability.md) \*\*cameraOutputCapability) | Obtains the output capability supported by a camera in the specified mode.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_DeleteSupportedCameraOutputCapability](#oh_cameramanager_deletesupportedcameraoutputcapability) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_OutputCapability](_camera___output_capability.md) \*cameraOutputCapability) | Deletes the output capability supported by a camera.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_IsCameraMuted](#oh_cameramanager_iscameramuted) ([Camera_Manager](#camera_manager) \*cameraManager, bool \*isCameraMuted) | Checks whether a camera is muted.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreateCaptureSession](#oh_cameramanager_createcapturesession) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_CaptureSession](#camera_capturesession) \*\*captureSession) | Creates a **CaptureSession** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreateCameraInput](#oh_cameramanager_createcamerainput) ([Camera_Manager](#camera_manager) \*cameraManager, const [Camera_Device](_camera___device.md) \*camera, [Camera_Input](#camera_input) \*\*cameraInput) | Creates a **CameraInput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreateCameraInput_WithPositionAndType](#oh_cameramanager_createcamerainput_withpositionandtype) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_Position](#camera_position) position, [Camera_Type](#camera_type) type, [Camera_Input](#camera_input) \*\*cameraInput) | Creates a **CameraInput** instance with the specified location and type.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreatePreviewOutput](#oh_cameramanager_createpreviewoutput) ([Camera_Manager](#camera_manager) \*cameraManager, const [Camera_Profile](_camera___profile.md) \*profile, const char \*surfaceId, [Camera_PreviewOutput](#camera_previewoutput) \*\*previewOutput) | Creates a **PreviewOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreatePreviewOutputUsedInPreconfig](#oh_cameramanager_createpreviewoutputusedinpreconfig) ([Camera_Manager](#camera_manager) \*cameraManager, const char \*surfaceId, [Camera_PreviewOutput](#camera_previewoutput) \*\*previewOutput) | Creates a **PreviewOutput** instance to be used in a preconfiguration stream.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreatePhotoOutput](#oh_cameramanager_createphotooutput) ([Camera_Manager](#camera_manager) \*cameraManager, const [Camera_Profile](_camera___profile.md) \*profile, const char \*surfaceId, [Camera_PhotoOutput](#camera_photooutput) \*\*photoOutput) | Creates a **PhotoOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreatePhotoOutputUsedInPreconfig](#oh_cameramanager_createphotooutputusedinpreconfig) ([Camera_Manager](#camera_manager) \*cameraManager, const char \*surfaceId, [Camera_PhotoOutput](#camera_photooutput) \*\*photoOutput) | Creates a **PhotoOutput** instance to be used in a preconfiguration stream.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreatePhotoOutputWithoutSurface](#oh_cameramanager_createphotooutputwithoutsurface) ([Camera_Manager](#camera_manager) \*cameraManager, const [Camera_Profile](_camera___profile.md) \*profile, [Camera_PhotoOutput](#camera_photooutput) \*\*photoOutput) | Creates a **PhotoOutput** instance. **surfaceId** is not required in this function.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreateVideoOutput](#oh_cameramanager_createvideooutput) ([Camera_Manager](#camera_manager) \*cameraManager, const [Camera_VideoProfile](_camera___video_profile.md) \*profile, const char \*surfaceId, [Camera_VideoOutput](#camera_videooutput) \*\*videoOutput) | Creates a **VideoOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreateVideoOutputUsedInPreconfig](#oh_cameramanager_createvideooutputusedinpreconfig) ([Camera_Manager](#camera_manager) \*cameraManager, const char \*surfaceId, [Camera_VideoOutput](#camera_videooutput) \*\*videoOutput) | Creates a **VideoOutput** instance to be used in a preconfiguration stream.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_CreateMetadataOutput](#oh_cameramanager_createmetadataoutput) ([Camera_Manager](#camera_manager) \*cameraManager, const [Camera_MetadataObjectType](#camera_metadataobjecttype) \*profile, [Camera_MetadataOutput](#camera_metadataoutput) \*\*metadataOutput) | Creates a **MetadataOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_GetSupportedSceneModes](#oh_cameramanager_getsupportedscenemodes) ([Camera_Device](_camera___device.md) \*camera, [Camera_SceneMode](#camera_scenemode) \*\*sceneModes, uint32_t \*size) | Obtains the scene modes supported by a camera.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_DeleteSceneModes](#oh_cameramanager_deletescenemodes) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_SceneMode](#camera_scenemode) \*sceneModes) | Deletes scene modes.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_IsTorchSupported](#oh_cameramanager_istorchsupported) ([Camera_Manager](#camera_manager) \*cameraManager, bool \*isTorchSupported) | Checks whether the device supports the flashlight.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_IsTorchSupportedByTorchMode](#oh_cameramanager_istorchsupportedbytorchmode) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_TorchMode](#camera_torchmode) torchMode, bool \*isTorchSupported) | Checks whether the device supports the specified flashlight mode.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_SetTorchMode](#oh_cameramanager_settorchmode) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_TorchMode](#camera_torchmode) torchMode) | Sets a flashlight mode.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_GetCameraDevice](#oh_cameramanager_getcameradevice) ([Camera_Manager](#camera_manager) \*cameraManager, [Camera_Position](#camera_position) position, [Camera_Type](#camera_type) type, [Camera_Device](_camera___device.md) \*camera) | Obtains the specified camera based on the camera position and type.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraManager_GetCameraConcurrentInfos](#oh_cameramanager_getcameraconcurrentinfos) ([Camera_Manager](#camera_manager) \*cameraManager, const [Camera_Device](_camera___device.md) \*camera, uint32_t deviceSize, [Camera_ConcurrentInfo](_camera___concurrent_info.md) \*\*cameraConcurrentInfo, uint32_t \*infoSize) | Obtains the concurrency information of the specified camera. If the return value is empty, concurrency is not supported.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_RegisterCallback](#oh_capturesession_registercallback) ([Camera_CaptureSession](#camera_capturesession) \*session, [CaptureSession_Callbacks](_capture_session___callbacks.md) \*callback) | Registers a callback to listen for capture session events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_UnregisterCallback](#oh_capturesession_unregistercallback) ([Camera_CaptureSession](#camera_capturesession) \*session, [CaptureSession_Callbacks](_capture_session___callbacks.md) \*callback) | Unregisters the callback used to listen for capture session events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_RegisterSmoothZoomInfoCallback](#oh_capturesession_registersmoothzoominfocallback) ([Camera_CaptureSession](#camera_capturesession) \*session, [OH_CaptureSession_OnSmoothZoomInfo](#oh_capturesession_onsmoothzoominfo) smoothZoomInfoCallback) | Registers a callback to listen for smooth zoom events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_UnregisterSmoothZoomInfoCallback](#oh_capturesession_unregistersmoothzoominfocallback) ([Camera_CaptureSession](#camera_capturesession) \*session, [OH_CaptureSession_OnSmoothZoomInfo](#oh_capturesession_onsmoothzoominfo) smoothZoomInfoCallback) | Unregisters the callback used to listen for smooth zoom events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetSessionMode](#oh_capturesession_setsessionmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_SceneMode](#camera_scenemode) sceneMode) | Sets a session mode.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_AddSecureOutput](#oh_capturesession_addsecureoutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Marks a preview output stream as secure output.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_BeginConfig](#oh_capturesession_beginconfig) ([Camera_CaptureSession](#camera_capturesession) \*session) | Starts the configuration for a capture session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_CommitConfig](#oh_capturesession_commitconfig) ([Camera_CaptureSession](#camera_capturesession) \*session) | Commits the configuration for a capture session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_AddInput](#oh_capturesession_addinput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Input](#camera_input) \*cameraInput) | Adds a **CameraInput** instance to a session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_RemoveInput](#oh_capturesession_removeinput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Input](#camera_input) \*cameraInput) | Removes a **CameraInput** instance from a session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_AddPreviewOutput](#oh_capturesession_addpreviewoutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Adds a **PreviewOutput** instance to a session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_RemovePreviewOutput](#oh_capturesession_removepreviewoutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Removes a **PreviewOutput** instance from a session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_AddPhotoOutput](#oh_capturesession_addphotooutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PhotoOutput](#camera_photooutput) \*photoOutput) | Adds a **PhotoOutput** instance to a session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_RemovePhotoOutput](#oh_capturesession_removephotooutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PhotoOutput](#camera_photooutput) \*photoOutput) | Removes a **PhotoOutput** instance from a session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_AddVideoOutput](#oh_capturesession_addvideooutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Adds a **VideoOutput** instance to a session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_RemoveVideoOutput](#oh_capturesession_removevideooutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Removes a **VideoOutput** instance from a session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_AddMetadataOutput](#oh_capturesession_addmetadataoutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput) | Adds a **MetadataOutput** instance to a session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_RemoveMetadataOutput](#oh_capturesession_removemetadataoutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput) | Removes a **MetadataOutput** instance from a session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_Start](#oh_capturesession_start) ([Camera_CaptureSession](#camera_capturesession) \*session) | Starts a capture session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_Stop](#oh_capturesession_stop) ([Camera_CaptureSession](#camera_capturesession) \*session) | Stops a capture session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_Release](#oh_capturesession_release) ([Camera_CaptureSession](#camera_capturesession) \*session) | Releases a **CaptureSession** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_HasFlash](#oh_capturesession_hasflash) ([Camera_CaptureSession](#camera_capturesession) \*session, bool \*hasFlash) | Checks whether the device has flash.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_IsFlashModeSupported](#oh_capturesession_isflashmodesupported) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FlashMode](#camera_flashmode) flashMode, bool \*isSupported) | Checks whether a flash mode is supported.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetFlashMode](#oh_capturesession_getflashmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FlashMode](#camera_flashmode) \*flashMode) | Obtains the flash mode in use.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetFlashMode](#oh_capturesession_setflashmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FlashMode](#camera_flashmode) flashMode) | Sets a flash mode for the device.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_IsExposureModeSupported](#oh_capturesession_isexposuremodesupported) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_ExposureMode](#camera_exposuremode) exposureMode, bool \*isSupported) | Checks whether an exposure mode is supported.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetExposureMode](#oh_capturesession_getexposuremode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_ExposureMode](#camera_exposuremode) \*exposureMode) | Obtains the exposure mode in use.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetExposureMode](#oh_capturesession_setexposuremode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_ExposureMode](#camera_exposuremode) exposureMode) | Sets an exposure mode for the device.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetMeteringPoint](#oh_capturesession_getmeteringpoint) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Point](_camera___point.md) \*point) | Obtains the metering point in use.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetMeteringPoint](#oh_capturesession_setmeteringpoint) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Point](_camera___point.md) point) | Sets the metering point, which is the center point of the metering rectangle.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetExposureBiasRange](#oh_capturesession_getexposurebiasrange) ([Camera_CaptureSession](#camera_capturesession) \*session, float \*minExposureBias, float \*maxExposureBias, float \*step) | Obtains the exposure compensation values of the device.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetExposureBias](#oh_capturesession_setexposurebias) ([Camera_CaptureSession](#camera_capturesession) \*session, float exposureBias) | Sets an exposure compensation value for the device.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetExposureBias](#oh_capturesession_getexposurebias) ([Camera_CaptureSession](#camera_capturesession) \*session, float \*exposureBias) | Obtains the exposure compensation value in use.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_IsFocusModeSupported](#oh_capturesession_isfocusmodesupported) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FocusMode](#camera_focusmode) focusMode, bool \*isSupported) | Checks whether a focus mode is supported.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetFocusMode](#oh_capturesession_getfocusmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FocusMode](#camera_focusmode) \*focusMode) | Obtains the focus mode in use.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetFocusMode](#oh_capturesession_setfocusmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_FocusMode](#camera_focusmode) focusMode) | Sets a focus mode for the device.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetFocusPoint](#oh_capturesession_getfocuspoint) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Point](_camera___point.md) \*focusPoint) | Obtains the focal point in use.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetFocusPoint](#oh_capturesession_setfocuspoint) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Point](_camera___point.md) focusPoint) | Sets a focal point for the device.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetZoomRatioRange](#oh_capturesession_getzoomratiorange) ([Camera_CaptureSession](#camera_capturesession) \*session, float \*minZoom, float \*maxZoom) | Obtains the supported zoom ratio range.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetZoomRatio](#oh_capturesession_getzoomratio) ([Camera_CaptureSession](#camera_capturesession) \*session, float \*zoom) | Obtains the zoom ratio in use.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetZoomRatio](#oh_capturesession_setzoomratio) ([Camera_CaptureSession](#camera_capturesession) \*session, float zoom) | Sets a zoom ratio for the device.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_IsVideoStabilizationModeSupported](#oh_capturesession_isvideostabilizationmodesupported) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_VideoStabilizationMode](#camera_videostabilizationmode) mode, bool \*isSupported) | Checks whether a video stabilization mode is supported. | -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetVideoStabilizationMode](#oh_capturesession_getvideostabilizationmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_VideoStabilizationMode](#camera_videostabilizationmode) \*mode) | Obtains the video stabilization mode in use.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetVideoStabilizationMode](#oh_capturesession_setvideostabilizationmode) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_VideoStabilizationMode](#camera_videostabilizationmode) mode) | Sets a video stabilization mode for the device.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_CanAddInput](#oh_capturesession_canaddinput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_Input](#camera_input) \*cameraInput, bool \*isSuccessful) | Checks whether a **CameraInput** instance can be added to a session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_CanAddPreviewOutput](#oh_capturesession_canaddpreviewoutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreviewOutput](#camera_previewoutput) \*cameraOutput, bool \*isSuccessful) | Checks whether a **PreviewOutput** instance can be added to a session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_CanAddPhotoOutput](#oh_capturesession_canaddphotooutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PhotoOutput](#camera_photooutput) \*cameraOutput, bool \*isSuccessful) | Checks whether a **PhotoOutput** instance can be added to a session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_CanAddVideoOutput](#oh_capturesession_canaddvideooutput) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_VideoOutput](#camera_videooutput) \*cameraOutput, bool \*isSuccessful) | Checks whether a **VideoOutput** instance can be added to a session.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_CanPreconfig](#oh_capturesession_canpreconfig) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreconfigType](#camera_preconfigtype) preconfigType, bool \*canPreconfig) | Checks whether a preconfigured resolution type is supported.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_CanPreconfigWithRatio](#oh_capturesession_canpreconfigwithratio) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreconfigType](#camera_preconfigtype) preconfigType, [Camera_PreconfigRatio](#camera_preconfigratio) preconfigRatio, bool \*canPreconfig) | Checks whether a preconfigured resolution type with an aspect ratio is supported.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_Preconfig](#oh_capturesession_preconfig) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreconfigType](#camera_preconfigtype) preconfigType) | Sets a preconfigured resolution type.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_PreconfigWithRatio](#oh_capturesession_preconfigwithratio) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_PreconfigType](#camera_preconfigtype) preconfigType, [Camera_PreconfigRatio](#camera_preconfigratio) preconfigRatio) | Sets a preconfigured resolution type with an aspect ratio.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetExposureValue](#oh_capturesession_getexposurevalue) ([Camera_CaptureSession](#camera_capturesession) \*session, float \*exposureValue) | Obtains the exposure value.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetFocalLength](#oh_capturesession_getfocallength) ([Camera_CaptureSession](#camera_capturesession) \*session, float \*focalLength) | Obtains the current focal length.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetSmoothZoom](#oh_capturesession_setsmoothzoom) ([Camera_CaptureSession](#camera_capturesession) \*session, float targetZoom, [Camera_SmoothZoomMode](#camera_smoothzoommode) smoothZoomMode) | Sets smooth zoom.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetSupportedColorSpaces](#oh_capturesession_getsupportedcolorspaces) ([Camera_CaptureSession](#camera_capturesession) \*session, OH_NativeBuffer_ColorSpace \*\*colorSpace, uint32_t \*size) | Obtains the supported color spaces.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_DeleteColorSpaces](#oh_capturesession_deletecolorspaces) ([Camera_CaptureSession](#camera_capturesession) \*session, OH_NativeBuffer_ColorSpace \*colorSpace) | Deletes color spaces.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_GetActiveColorSpace](#oh_capturesession_getactivecolorspace) ([Camera_CaptureSession](#camera_capturesession) \*session, OH_NativeBuffer_ColorSpace \*colorSpace) | Obtains the active color space.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetActiveColorSpace](#oh_capturesession_setactivecolorspace) ([Camera_CaptureSession](#camera_capturesession) \*session, OH_NativeBuffer_ColorSpace colorSpace) | Sets the active color space.| -| [Camera_ErrorCode](#camera_errorcode) [OH_MetadataOutput_RegisterCallback](#oh_metadataoutput_registercallback) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput, [MetadataOutput_Callbacks](_metadata_output___callbacks.md) \*callback) | Registers a callback to listen for metadata output events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_MetadataOutput_UnregisterCallback](#oh_metadataoutput_unregistercallback) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput, [MetadataOutput_Callbacks](_metadata_output___callbacks.md) \*callback) | Unregisters the callback used to listen for metadata output events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_MetadataOutput_Start](#oh_metadataoutput_start) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput) | Starts metadata output.| -| [Camera_ErrorCode](#camera_errorcode) [OH_MetadataOutput_Stop](#oh_metadataoutput_stop) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput) | Stops metadata output.| -| [Camera_ErrorCode](#camera_errorcode) [OH_MetadataOutput_Release](#oh_metadataoutput_release) ([Camera_MetadataOutput](#camera_metadataoutput) \*metadataOutput) | Releases a **MetadataOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoNative_GetMainImage](#oh_photonative_getmainimage) ([OH_PhotoNative](#oh_photonative) \*photo, OH_ImageNative \*\*mainImage) | Obtains a full quality photo.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoNative_Release](#oh_photonative_release) ([OH_PhotoNative](#oh_photonative) \*photo) | Releases a full quality photo.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_RegisterCallback](#oh_photooutput_registercallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [PhotoOutput_Callbacks](_photo_output___callbacks.md) \*callback) | Registers a callback to listen for photo output events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_UnregisterCallback](#oh_photooutput_unregistercallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [PhotoOutput_Callbacks](_photo_output___callbacks.md) \*callback) | Unregisters the callback used to listen for photo output events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_RegisterCaptureStartWithInfoCallback](#oh_photooutput_registercapturestartwithinfocallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureStartWithInfo](#oh_photooutput_capturestartwithinfo) callback) | Registers a callback to listen for capture start events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_UnregisterCaptureStartWithInfoCallback](#oh_photooutput_unregistercapturestartwithinfocallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureStartWithInfo](#oh_photooutput_capturestartwithinfo) callback) | Unregisters the callback used to listen for capture start events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_RegisterCaptureEndCallback](#oh_photooutput_registercaptureendcallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureEnd](#oh_photooutput_captureend) callback) | Registers a callback to listen for capture end events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_UnregisterCaptureEndCallback](#oh_photooutput_unregistercaptureendcallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureEnd](#oh_photooutput_captureend) callback) | Unregisters the callback used to listen for capture end events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_RegisterFrameShutterEndCallback](#oh_photooutput_registerframeshutterendcallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_OnFrameShutterEnd](#oh_photooutput_onframeshutterend) callback) | Registers a callback to listen for frame shutter end events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_UnregisterFrameShutterEndCallback](#oh_photooutput_unregisterframeshutterendcallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_OnFrameShutterEnd](#oh_photooutput_onframeshutterend) callback) | Unregisters the callback used to listen for frame shutter end events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_RegisterCaptureReadyCallback](#oh_photooutput_registercapturereadycallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureReady](#oh_photooutput_captureready) callback) | Registers a callback to listen for camera ready events. When the callback is received, the next capture can be performed.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_UnregisterCaptureReadyCallback](#oh_photooutput_unregistercapturereadycallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureReady](#oh_photooutput_captureready) callback) | Unregisters the callback used to listen for camera ready events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_RegisterEstimatedCaptureDurationCallback](#oh_photooutput_registerestimatedcapturedurationcallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_EstimatedCaptureDuration](#oh_photooutput_estimatedcaptureduration) callback) | Registers a callback to listen for estimated capture duration events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_UnregisterEstimatedCaptureDurationCallback](#oh_photooutput_unregisterestimatedcapturedurationcallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_EstimatedCaptureDuration](#oh_photooutput_estimatedcaptureduration) callback) | Unregisters the callback used to listen for estimated capture duration events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_RegisterPhotoAvailableCallback](#oh_photooutput_registerphotoavailablecallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_PhotoAvailable](#oh_photooutput_photoavailable) callback) | Registers a callback to listen for photo availability events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_UnregisterPhotoAvailableCallback](#oh_photooutput_unregisterphotoavailablecallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_PhotoAvailable](#oh_photooutput_photoavailable) callback) | Unregisters the callback used to listen for photo availability events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_RegisterPhotoAssetAvailableCallback](#oh_photooutput_registerphotoassetavailablecallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_PhotoAssetAvailable](#oh_photooutput_photoassetavailable) callback) | Registers a callback to listen for photo asset availability events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_UnregisterPhotoAssetAvailableCallback](#oh_photooutput_unregisterphotoassetavailablecallback) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [OH_PhotoOutput_PhotoAssetAvailable](#oh_photooutput_photoassetavailable) callback) | Unregisters the callback used to listen for photo asset availability events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_Capture](#oh_photooutput_capture) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput) | Captures a photo.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_Capture_WithCaptureSetting](#oh_photooutput_capture_withcapturesetting) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [Camera_PhotoCaptureSetting](_camera___photo_capture_setting.md) setting) | Captures a photo with photographing parameters.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_Release](#oh_photooutput_release) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput) | Releases a **PhotoOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_IsMirrorSupported](#oh_photooutput_ismirrorsupported) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, bool \*isSupported) | Checks whether mirroring is supported.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_EnableMirror](#oh_photooutput_enablemirror) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, bool enabled) | Enables dynamic photo capture.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_GetActiveProfile](#oh_photooutput_getactiveprofile) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, [Camera_Profile](_camera___profile.md) \*\*profile) | Obtains the profile of a **PhotoOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_DeleteProfile](#oh_photooutput_deleteprofile) ([Camera_Profile](_camera___profile.md) \*profile) | Deletes the profile of this **PhotoOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_IsMovingPhotoSupported](#oh_photooutput_ismovingphotosupported) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, bool \*isSupported) | Checks whether moving photos are supported.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_EnableMovingPhoto](#oh_photooutput_enablemovingphoto) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, bool enabled) | Enables moving photos.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PhotoOutput_GetPhotoRotation](#oh_photooutput_getphotorotation) ([Camera_PhotoOutput](#camera_photooutput) \*photoOutput, int devicedegree, [Camera_ImageRotation](#camera_imagerotation) \*imageRotation) | Obtains the photo rotation angle.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_RegisterCallback](#oh_previewoutput_registercallback) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, [PreviewOutput_Callbacks](_preview_output___callbacks.md) \*callback) | Registers a callback to listen for preview output events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_UnregisterCallback](#oh_previewoutput_unregistercallback) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, [PreviewOutput_Callbacks](_preview_output___callbacks.md) \*callback) | Unregisters the callback used to listen for preview output events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_Start](#oh_previewoutput_start) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Starts preview output.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_Stop](#oh_previewoutput_stop) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Stops preview output.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_Release](#oh_previewoutput_release) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput) | Releases a **PreviewOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_GetActiveProfile](#oh_previewoutput_getactiveprofile) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, [Camera_Profile](_camera___profile.md) \*\*profile) | Obtains the profile of a **PreviewOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_DeleteProfile](#oh_previewoutput_deleteprofile) ([Camera_Profile](_camera___profile.md) \*profile) | Deletes the profile of this **PreviewOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_GetSupportedFrameRates](#oh_previewoutput_getsupportedframerates) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, [Camera_FrameRateRange](_camera___frame_rate_range.md) \*\*frameRateRange, uint32_t \*size) | Obtains the list of frame rates supported by a **PreviewOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_DeleteFrameRates](#oh_previewoutput_deleteframerates) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, [Camera_FrameRateRange](_camera___frame_rate_range.md) \*frameRateRange) | Deletes the frame rate list.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_SetFrameRate](#oh_previewoutput_setframerate) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, int32_t minFps, int32_t maxFps) | Sets the frame rates for a **PreviewOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_GetActiveFrameRate](#oh_previewoutput_getactiveframerate) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, [Camera_FrameRateRange](_camera___frame_rate_range.md) \*frameRateRange) | Obtains the active frame rates of a **PreviewOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_GetPreviewRotation](#oh_previewoutput_getpreviewrotation) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, int displayRotation, [Camera_ImageRotation](#camera_imagerotation) \*imageRotation) | Obtains the preview rotation angle.| -| [Camera_ErrorCode](#camera_errorcode) [OH_PreviewOutput_SetPreviewRotation](#oh_previewoutput_setpreviewrotation) ([Camera_PreviewOutput](#camera_previewoutput) \*previewOutput, [Camera_ImageRotation](#camera_imagerotation) \*previewRotation, bool isDisplayLocked) | Sets the preview rotation angle.| -| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_RegisterCallback](#oh_videooutput_registercallback) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, [VideoOutput_Callbacks](_video_output___callbacks.md) \*callback) | Registers a callback to listen for video output events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_UnregisterCallback](#oh_videooutput_unregistercallback) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, [VideoOutput_Callbacks](_video_output___callbacks.md) \*callback) | Unregisters the callback used to listen for video output events.| -| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_Start](#oh_videooutput_start) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Starts video output.| -| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_Stop](#oh_videooutput_stop) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Stops video output.| -| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_Release](#oh_videooutput_release) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput) | Releases a **VideoOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_GetActiveProfile](#oh_videooutput_getactiveprofile) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, [Camera_VideoProfile](_camera___video_profile.md) \*\*profile) | Obtains the profile of a **VideoOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_DeleteProfile](#oh_videooutput_deleteprofile) ([Camera_VideoProfile](_camera___video_profile.md) \*profile) | Deletes the profile of this **VideoOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_GetSupportedFrameRates](#oh_videooutput_getsupportedframerates) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, [Camera_FrameRateRange](_camera___frame_rate_range.md) \*\*frameRateRange, uint32_t \*size) | Obtains the list of frame rates supported by a **VideoOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_DeleteFrameRates](#oh_videooutput_deleteframerates) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, [Camera_FrameRateRange](_camera___frame_rate_range.md) \*frameRateRange) | Deletes the frame rate list.| -| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_SetFrameRate](#oh_videooutput_setframerate) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, int32_t minFps, int32_t maxFps) | Sets the frame rates for a **VideoOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_GetActiveFrameRate](#oh_videooutput_getactiveframerate) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, [Camera_FrameRateRange](_camera___frame_rate_range.md) \*frameRateRange) | Obtains the active frame rates of a **VideoOutput** instance.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CaptureSession_SetQualityPrioritization](#oh_capturesession_setqualityprioritization) ([Camera_CaptureSession](#camera_capturesession) \*session, [Camera_QualityPrioritization](#camera_qualityprioritization) qualityPrioritization) | Sets the priority level for video recording quality.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraDevice_GetHostDeviceName](#oh_cameradevice_gethostdevicename) ([Camera_Device](_camera___device.md) \*camera, char \*\*hostDeviceName) | Obtains the name of a remote device.| -| [Camera_ErrorCode](#camera_errorcode) [OH_CameraDevice_GetHostDeviceType](#oh_cameradevice_gethostdevicetype) ([Camera_Device](_camera___device.md) \*camera, [Camera_HostDeviceType](#camera_hostdevicetype) \*hostDeviceType) | Obtains the type of a remote device.| -| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_IsMirrorSupported](#oh_videooutput_ismirrorsupported) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, bool \*isSupported) | Checks whether a video output supports mirror mode.| -| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_EnableMirror](#oh_videooutput_enablemirror) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, bool mirrorMode) | Enables or disables mirror mode for a video output.| -| [Camera_ErrorCode](#camera_errorcode) [OH_VideoOutput_GetVideoRotation](#oh_videooutput_getvideorotation) ([Camera_VideoOutput](#camera_videooutput) \*videoOutput, int deviceDegree, [Camera_ImageRotation](#camera_imagerotation) \*imageRotation) | Obtains the rotation angle of a video output.| - -## Type Description - - -### Camera_CaptureEndInfo - -``` -typedef struct Camera_CaptureEndInfo Camera_CaptureEndInfo -``` - -**Description** - -Defines a struct for the capture end information. - -**Since**: 11 - - -### Camera_CaptureSession - -``` -typedef struct Camera_CaptureSession Camera_CaptureSession -``` - -**Description** - -Defines a struct for the capture session object. - -You can call [OH_CameraManager_CreateCaptureSession](#oh_cameramanager_createcapturesession) to create such an object. - -**Since**: 11 - - -### Camera_CaptureStartInfo - -``` -typedef struct Camera_CaptureStartInfo Camera_CaptureStartInfo -``` - -**Description** - -Defines a struct for the capture start information. - -**Since**: 12 - - -### Camera_ConcurrentInfo - -``` -typedef struct Camera_ConcurrentInfo Camera_ConcurrentInfo -``` - -**Description** - -Defines a struct for the camera's concurrency information. - -**Since**: 18 - - -### Camera_ConcurrentType - -``` -typedef enum Camera_ConcurrentType Camera_ConcurrentType -``` - -**Description** - -Defines an enum for the camera's concurrency types. - -**Since**: 18 - - -### Camera_Connection - -``` -typedef enum Camera_Connection Camera_Connection -``` - -**Description** - -Defines an enum for the camera connection types. - -**Since**: 11 - - -### Camera_Device - -``` -typedef struct Camera_Device Camera_Device -``` - -**Description** - -Defines a struct for the camera device. - -**Since**: 11 - - -### Camera_ErrorCode - -``` -typedef enum Camera_ErrorCode Camera_ErrorCode -``` - -**Description** - -Defines an enum for the camera error codes. - -**Since**: 11 - - -### Camera_ExposureMode - -``` -typedef enum Camera_ExposureMode Camera_ExposureMode -``` - -**Description** - -Defines an enum for the exposure modes. - -**Since**: 11 - - -### Camera_FlashMode - -``` -typedef enum Camera_FlashMode Camera_FlashMode -``` - -**Description** - -Defines an enum for the flash modes. - -**Since**: 11 - - -### Camera_FocusMode - -``` -typedef enum Camera_FocusMode Camera_FocusMode -``` - -**Description** - -Defines an enum for the focus modes. - -**Since**: 11 - - -### Camera_FocusState - -``` -typedef enum Camera_FocusState Camera_FocusState -``` - -**Description** - -Defines an enum for the focus states. - -**Since**: 11 - - -### Camera_Format - -``` -typedef enum Camera_Format Camera_Format -``` - -**Description** - -Defines an enum for the camera output formats. - -**Since**: 11 - - -### Camera_FrameRateRange - -``` -typedef struct Camera_FrameRateRange Camera_FrameRateRange -``` - -**Description** - -Defines a struct for the frame rate range. - -**Since**: 11 - - -### Camera_FrameShutterEndInfo - -``` -typedef struct Camera_FrameShutterEndInfo Camera_FrameShutterEndInfo -``` - -**Description** - -Defines a struct for the frame shutter end information during capture. - -**Since**: 12 - - -### Camera_FrameShutterInfo - -``` -typedef struct Camera_FrameShutterInfo Camera_FrameShutterInfo -``` - -**Description** - -Defines a struct for the frame shutter information. - -**Since**: 11 - - -### Camera_HostDeviceType - -``` -typedef enum Camera_HostDeviceTypeCamera_HostDeviceType -``` - -**Description** - -Defines an enum for the remote device types. - -**Since**: 15 - - -### Camera_ImageRotation - -``` -typedef enum Camera_ImageRotation Camera_ImageRotation -``` - -**Description** - -Defines an enum for the image rotation angles. - -**Since**: 11 - - -### Camera_Input - -``` -typedef struct Camera_Input Camera_Input -``` - -**Description** - -Defines a struct for the camera input object. - -You can call [OH_CameraManager_CreateCameraInput](#oh_cameramanager_createcamerainput) to create such an object. - -**Since**: 11 - - -### Camera_Location - -``` -typedef struct Camera_Location Camera_Location -``` - -**Description** - -Defines a struct for the location where the photo is taken. - -**Since**: 11 - - -### Camera_Manager - -``` -typedef struct Camera_Manager Camera_Manager -``` - -**Description** - -Defines a struct for the camera manager. - -You can call [OH_Camera_GetCameraManager](#oh_camera_getcameramanager) to create such an object. - -**Since**: 11 - - -### Camera_MetadataObject - -``` -typedef struct Camera_MetadataObject Camera_MetadataObject -``` - -**Description** - -Defines a struct for the camera metadata. - -**Since**: 11 - - -### Camera_MetadataObjectType - -``` -typedef enum Camera_MetadataObjectType Camera_MetadataObjectType -``` - -**Description** - -Defines an enum for the metadata object types. - -**Since**: 11 - - -### Camera_MetadataOutput - -``` -typedef struct Camera_MetadataOutput Camera_MetadataOutput -``` - -**Description** - -Defines a struct for the metadata output object. - -You can call [OH_CameraManager_CreateMetadataOutput](#oh_cameramanager_createmetadataoutput) to create such an object. - -**Since**: 11 - - -### Camera_OutputCapability - -``` -typedef struct Camera_OutputCapability Camera_OutputCapability -``` - -**Description** - -Defines a struct for the camera output capability. - -**Since**: 11 - - -### Camera_PhotoCaptureSetting - -``` -typedef struct Camera_PhotoCaptureSetting Camera_PhotoCaptureSetting -``` - -**Description** - -Defines a struct for the parameters related to photo capture. - -**Since**: 11 - - -### Camera_PhotoOutput - -``` -typedef struct Camera_PhotoOutput Camera_PhotoOutput -``` - -**Description** - -Defines a struct for the photo output object. - -You can call [OH_CameraManager_CreatePhotoOutput](#oh_cameramanager_createphotooutput) to create such an object. - -**Since**: 11 - - -### Camera_Point - -``` -typedef struct Camera_Point Camera_Point -``` - -**Description** - -Defines a struct for the parameters related to a point. - -**Since**: 11 - - -### Camera_Position - -``` -typedef enum Camera_Position Camera_Position -``` - -**Description** - -Defines an enum for the camera positions. - -**Since**: 11 - - -### Camera_PreconfigRatio - -``` -typedef enum Camera_PreconfigRatio Camera_PreconfigRatio -``` - -**Description** - -Defines an enum for the preconfigured aspect ratios. - -**Since**: 12 - - -### Camera_PreconfigType - -``` -typedef enum Camera_PreconfigType Camera_PreconfigType -``` - -**Description** - -Defines an enum for the preconfigured resolution types. - -**Since**: 12 - - -### Camera_PreviewOutput - -``` -typedef struct Camera_PreviewOutput Camera_PreviewOutput -``` - -**Description** - -Defines a struct for the preview output object. - -You can call [OH_CameraManager_CreatePreviewOutput](#oh_cameramanager_createpreviewoutput) to create such an object. - -**Since**: 11 - - -### Camera_Profile - -``` -typedef struct Camera_Profile Camera_Profile -``` - -**Description** - -Defines a struct for the profile of a camera stream. - -**Since**: 11 - - -### Camera_QualityLevel - -``` -typedef enum Camera_QualityLevel Camera_QualityLevel -``` - -**Description** - -Defines an enum for the image quality levels. - -**Since**: 11 - - -### Camera_QualityPrioritization - -``` -typedef enum Camera_QualityPrioritization Camera_QualityPrioritization -``` - -**Description** - -Defines an enum for the priority levels for video recording quality. - -**Since**: 14 - - -### Camera_Rect - -``` -typedef struct Camera_Rect Camera_Rect -``` - -**Description** - -Defines a struct for the rectangle. - -**Since**: 11 - - -### Camera_SceneMode - -``` -typedef enum Camera_SceneMode Camera_SceneMode -``` - -**Description** - -Defines an enum for the camera scene modes. - -**Since**: 12 - - -### Camera_Size - -``` -typedef struct Camera_Size Camera_Size -``` - -**Description** - -Defines a struct for the parameters related to the size. - -**Since**: 11 - - -### Camera_SmoothZoomInfo - -``` -typedef struct Camera_SmoothZoomInfo Camera_SmoothZoomInfo -``` - -**Description** - -Defines a struct for the smooth zoom information. - -**Since**: 12 - - -### Camera_SmoothZoomMode - -``` -typedef enum Camera_SmoothZoomMode Camera_SmoothZoomMode -``` - -**Description** - -Defines an enum for the smooth zoom modes. - -**Since**: 12 - - -### Camera_Status - -``` -typedef enum Camera_Status Camera_Status -``` - -**Description** - -Defines an enum for the camera statuses. - -**Since**: 11 - - -### Camera_StatusInfo - -``` -typedef struct Camera_StatusInfo Camera_StatusInfo -``` - -**Description** - -Defines a struct for the camera status information. - -**Since**: 11 - - -### Camera_TorchMode - -``` -typedef enum Camera_TorchMode Camera_TorchMode -``` - -**Description** - -Defines an enum for the flashlight modes. - -**Since**: 12 - - -### Camera_TorchStatusInfo - -``` -typedef struct Camera_TorchStatusInfo Camera_TorchStatusInfo -``` - -**Description** - -Defines a struct for the flashlight status information. - -**Since**: 12 - - -### Camera_Type - -``` -typedef enum Camera_Type Camera_Type -``` - -**Description** - -Defines an enum for the camera types. - -**Since**: 11 - - -### Camera_VideoOutput - -``` -typedef struct Camera_VideoOutput Camera_VideoOutput -``` - -**Description** - -Defines a struct for the video output object. - -You can call [OH_CameraManager_CreateVideoOutput](#oh_cameramanager_createvideooutput) to create such an object. - -**Since**: 11 - - -### Camera_VideoProfile - -``` -typedef struct Camera_VideoProfile Camera_VideoProfile -``` - -**Description** - -Defines a struct for the video profile. - -**Since**: 11 - - -### Camera_VideoStabilizationMode - -``` -typedef enum Camera_VideoStabilizationMode Camera_VideoStabilizationMode -``` - -**Description** - -Defines an enum for the video stabilization modes. - -**Since**: 11 - - -### CameraInput_Callbacks - -``` -typedef struct CameraInput_Callbacks CameraInput_Callbacks -``` - -**Description** - -Defines a struct for the callbacks used to listen for camera input errors. - -**Since**: 11 - -**See** - -[OH_CameraInput_RegisterCallback](#oh_camerainput_registercallback) - - -### CameraManager_Callbacks - -``` -typedef struct CameraManager_Callbacks CameraManager_Callbacks -``` - -**Description** - -Defines a struct for the callbacks used to listen for camera status changes. - -**Since**: 11 - -**See** - -[OH_CameraManager_RegisterCallback](#oh_cameramanager_registercallback) - - -### CaptureSession_Callbacks - -``` -typedef struct CaptureSession_Callbacks CaptureSession_Callbacks -``` - -**Description** - -Defines a struct for the callbacks used for a capture session. - -**Since**: 11 - -**See** - -[OH_CaptureSession_RegisterCallback](#oh_capturesession_registercallback) - - -### MetadataOutput_Callbacks - -``` -typedef struct MetadataOutput_Callbacks MetadataOutput_Callbacks -``` - -**Description** - -Defines a struct for the callbacks related to metadata output. - -**Since**: 11 - -**See** - -[OH_MetadataOutput_RegisterCallback](#oh_metadataoutput_registercallback) - - -### OH_CameraInput_OnError - -``` -typedef void (*OH_CameraInput_OnError)(const Camera_Input* cameraInput, Camera_ErrorCode errorCode) -``` - -**Description** - -Defines the callback defined in the [CameraInput_Callbacks](_camera_input___callbacks.md) struct and used to report camera input errors. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraInput | Pointer to the [Camera_Input](#camera_input) instance that transfers the callback.| -| errorCode | Error code reported during camera input and defined in [Camera_ErrorCode](#camera_errorcode-1).| - -**See** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- CAMERA_CONFLICT_CAMERA - -- CAMERA_DEVICE_DISABLED - -- CAMERA_DEVICE_PREEMPTED - -- CAMERA_SERVICE_FATAL_ERROR - - -### OH_CameraManager_StatusCallback - -``` -typedef void (*OH_CameraManager_StatusCallback)(Camera_Manager* cameraManager, Camera_StatusInfo* status) -``` - -**Description** - -Defines the callback defined in the [CameraManager_Callbacks](_camera_manager___callbacks.md) struct and used to report the camera manager status. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to the [Camera_Manager](#camera_manager) instance that transfers the callback.| -| status | Pointer to the camera manager status, which is defined in the [Camera_StatusInfo](_camera___status_info.md) struct.| - - -### OH_CameraManager_TorchStatusCallback - -``` -typedef void (*OH_CameraManager_TorchStatusCallback)(Camera_Manager* cameraManager, Camera_TorchStatusInfo* status) -``` - -**Description** - -Defines the callback invoked when the flashlight status changes. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to the [Camera_Manager](#camera_manager) instance that transfers the callback.| -| status | Pointer to the flashlight status, which is defined in the [Camera_TorchStatusInfo](_camera___torch_status_info.md) struct.| - - -### OH_CaptureSession_OnError - -``` -typedef void (*OH_CaptureSession_OnError)(Camera_CaptureSession* session, Camera_ErrorCode errorCode) -``` - -**Description** - -Defines the callback defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct and used to report capture session errors. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the [Camera_CaptureSession](#camera_capturesession) instance that transfers the callback.| -| errorCode | Error code reported in a capture session and defined in [Camera_ErrorCode](#camera_errorcode-1).| - -**See** - -**CAMERA_SERVICE_FATAL_ERROR** in [Camera_ErrorCode](#camera_errorcode-1). - - -### OH_CaptureSession_OnFocusStateChange - -``` -typedef void (*OH_CaptureSession_OnFocusStateChange)(Camera_CaptureSession* session, Camera_FocusState focusState) -``` - -**Description** - -Defines the callback defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct and used to report focus status changes of a capture session. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the [Camera_CaptureSession](#camera_capturesession) instance that transfers the callback.| -| focusState | Focus state, which is defined in [Camera_FocusState](#camera_focusstate).| - - -### OH_CaptureSession_OnSmoothZoomInfo - -``` -typedef void (*OH_CaptureSession_OnSmoothZoomInfo)(Camera_CaptureSession* session, Camera_SmoothZoomInfo* smoothZoomInfo) -``` - -**Description** - -Defines the callback invoked when smooth zoom is triggered for a capture session. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the [Camera_CaptureSession](#camera_capturesession) instance that transfers the callback.| -| smoothZoomInfo | Pointer to [Camera_SmoothZoomInfo](_camera___smooth_zoom_info.md) passed by the callback.| - - -### OH_MetadataOutput_OnError - -``` -typedef void (*OH_MetadataOutput_OnError)(Camera_MetadataOutput* metadataOutput, Camera_ErrorCode errorCode) -``` - -**Description** - -Defines the callback defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct and used to report metadata output errors. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| metadataOutput | Pointer to the [Camera_MetadataOutput](#camera_metadataoutput) instance that transfers the callback.| -| errorCode | Error code reported during metadata output and defined in [Camera_ErrorCode](#camera_errorcode-1).| - -**See** - -**CAMERA_SERVICE_FATAL_ERROR** in [Camera_ErrorCode](#camera_errorcode-1). - - -### OH_MetadataOutput_OnMetadataObjectAvailable - -``` -typedef void (*OH_MetadataOutput_OnMetadataObjectAvailable)(Camera_MetadataOutput* metadataOutput, Camera_MetadataObject* metadataObject, uint32_t size) -``` - -**Description** - -Defines the callback defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct and used to report metadata output data. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| metadataOutput | Pointer to the [Camera_MetadataOutput](#camera_metadataoutput) instance that transfers the callback.| -| metadataObject | Pointer to the metadata output data, which is defined in the [Camera_MetadataObject](_camera___metadata_object.md) struct.| -| size | Size of the metadata object.| - - -### OH_PhotoNative - -``` -typedef struct OH_PhotoNative OH_PhotoNative -``` - -**Description** - -Defines a struct for a camera photo object. - -Defines a high-resolution image object. - -**Since**: 12 - - -### OH_PhotoOutput_CaptureEnd - -``` -typedef void (*OH_PhotoOutput_CaptureEnd) (Camera_PhotoOutput* photoOutput, int32_t frameCount) -``` - -**Description** - -Defines the callback invoked when the capture ends. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.| -| frameCount | Number of frames to be included in the callback.| - - -### OH_PhotoOutput_CaptureReady - -``` -typedef void (*OH_PhotoOutput_CaptureReady) (Camera_PhotoOutput* photoOutput) -``` - -**Description** - -Defines the callback invoked when the camera is ready to take photos. When the callback is received, the next capture can be performed. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.| - - -### OH_PhotoOutput_CaptureStartWithInfo - -``` -typedef void (*OH_PhotoOutput_CaptureStartWithInfo) (Camera_PhotoOutput* photoOutput, Camera_CaptureStartInfo* Info) -``` - -**Description** - -Defines the callback invoked when the capture starts. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.| -| Info | Pointer to [Camera_CaptureStartInfo](_camera___capture_start_info.md) passed by the callback.| - - -### OH_PhotoOutput_EstimatedCaptureDuration - -``` -typedef void (*OH_PhotoOutput_EstimatedCaptureDuration) (Camera_PhotoOutput* photoOutput, int64_t duration) -``` - -**Description** - -Defines the callback for the estimated capture duration. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.| -| duration | Estimated capture duration passed by the callback.| - - -### OH_PhotoOutput_OnError - -``` -typedef void (*OH_PhotoOutput_OnError)(Camera_PhotoOutput* photoOutput, Camera_ErrorCode errorCode) -``` - -**Description** - -Defines the callback defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct and used to report photo output errors. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.| -| errorCode | Error code reported during photo output and defined in [Camera_ErrorCode](#camera_errorcode-1).| - -**See** - -**CAMERA_SERVICE_FATAL_ERROR** in [Camera_ErrorCode](#camera_errorcode-1). - - -### OH_PhotoOutput_OnFrameEnd - -``` -typedef void (*OH_PhotoOutput_OnFrameEnd)(Camera_PhotoOutput* photoOutput, int32_t frameCount) -``` - -**Description** - -Defines the callback defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct and used to report photo output frame end events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.| -| frameCount | Number of frames to be included in the callback.| - - -### OH_PhotoOutput_OnFrameShutter - -``` -typedef void (*OH_PhotoOutput_OnFrameShutter)(Camera_PhotoOutput* photoOutput, Camera_FrameShutterInfo* info) -``` - -**Description** - -Defines the callback defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct and used to report frame shutter events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.| -| info | Pointer to the frame shutter information, which is defined in the [Camera_FrameShutterInfo](_camera___frame_shutter_info.md) struct.| - - -### OH_PhotoOutput_OnFrameShutterEnd - -``` -typedef void (*OH_PhotoOutput_OnFrameShutterEnd) (Camera_PhotoOutput* photoOutput, Camera_FrameShutterInfo* Info) -``` - -**Description** - -Defines the callback invoked when frame shutter ends. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.| -| Info | Pointer to the frame shutter information, which is defined in the [Camera_FrameShutterInfo](_camera___frame_shutter_info.md) struct.| - - -### OH_PhotoOutput_OnFrameStart - -``` -typedef void(* OH_PhotoOutput_OnFrameStart) (Camera_PhotoOutput *photoOutput) -``` - -**Description** - -Defines the callback defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct and used to report photo output frame start events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.| - - -### OH_PhotoOutput_PhotoAssetAvailable - -``` -typedef void (*OH_PhotoOutput_PhotoAssetAvailable)(Camera_PhotoOutput* photoOutput, OH_MediaAsset* photoAsset) -``` - -**Description** - -Defines the callback invoked when a photo asset is available. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.| -| photoAsset | Pointer to [OH_MediaAsset](../apis-media-library-kit/_media_asset_manager.md#oh_mediaasset) passed by the callback.| - - -### OH_PhotoOutput_PhotoAvailable - -``` -typedef void (*OH_PhotoOutput_PhotoAvailable)(Camera_PhotoOutput* photoOutput, OH_PhotoNative* photo) -``` - -**Description** - -Defines the callback invoked when a high-resolution photo is available. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance that transfers the callback.| -| photo | Pointer to [OH_PhotoNative](#oh_photonative) passed by the callback.| - - -### OH_PreviewOutput_OnError - -``` -typedef void (*OH_PreviewOutput_OnError)(Camera_PreviewOutput* previewOutput, Camera_ErrorCode errorCode) -``` - -**Description** - -Defines the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used to report preview output errors. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| previewOutput | Pointer to the [Camera_PreviewOutput](#camera_previewoutput) instance that transfers the callback.| -| errorCode | Error code reported during preview output and defined in [Camera_ErrorCode](#camera_errorcode-1).| - -**See** - -**CAMERA_SERVICE_FATAL_ERROR** in [Camera_ErrorCode](#camera_errorcode-1). - - -### OH_PreviewOutput_OnFrameEnd - -``` -typedef void (*OH_PreviewOutput_OnFrameEnd)(Camera_PreviewOutput* previewOutput, int32_t frameCount) -``` - -**Description** - -Defines the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used report preview output frame end events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| previewOutput | Pointer to the [Camera_PreviewOutput](#camera_previewoutput) instance that transfers the callback.| -| frameCount | Number of frames to be included in the callback.| - - -### OH_PreviewOutput_OnFrameStart - -``` -typedef void (*OH_PreviewOutput_OnFrameStart)(Camera_PreviewOutput* previewOutput) -``` - -**Description** - -Defines the callback defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct and used to report preview output frame start events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| previewOutput | Pointer to the [Camera_PreviewOutput](#camera_previewoutput) instance that transfers the callback.| - - -### OH_VideoOutput_OnError - -``` -typedef void (*OH_VideoOutput_OnError)(Camera_VideoOutput* videoOutput, Camera_ErrorCode errorCode) -``` - -**Description** - -Defines the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output errors. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance that transfers the callback.| -| errorCode | Error code reported during video output and defined in [Camera_ErrorCode](#camera_errorcode-1).| - -**See** - -**CAMERA_SERVICE_FATAL_ERROR** in [Camera_ErrorCode](#camera_errorcode-1). - - -### OH_VideoOutput_OnFrameEnd - -``` -typedef void (*OH_VideoOutput_OnFrameEnd)(Camera_VideoOutput* videoOutput, int32_t frameCount) -``` - -**Description** - -Defines the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output frame end events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance that transfers the callback.| -| frameCount | Number of frames to be included in the callback.| - - -### OH_VideoOutput_OnFrameStart - -``` -typedef void (*OH_VideoOutput_OnFrameStart)(Camera_VideoOutput* videoOutput) -``` - -**Description** - -Defines the callback defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct and used to report video output frame start events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance that transfers the callback.| - - -### PhotoOutput_Callbacks - -``` -typedef struct PhotoOutput_Callbacks PhotoOutput_Callbacks -``` - -**Description** - -Defines a struct for the callbacks related to photo output. - -**Since**: 11 - -**See** - -[OH_PhotoOutput_RegisterCallback](#oh_photooutput_registercallback) - - -### PreviewOutput_Callbacks - -``` -typedef struct PreviewOutput_Callbacks PreviewOutput_Callbacks -``` - -**Description** - -Defines a struct for the callbacks related to preview output. - -**Since**: 11 - -**See** - -[OH_PreviewOutput_RegisterCallback](#oh_previewoutput_registercallback) - - -### VideoOutput_Callbacks - -``` -typedef struct VideoOutput_Callbacks VideoOutput_Callbacks -``` - -**Description** - -Defines a struct for the callbacks related to video output. - -**Since**: 11 - -**See** - -[OH_VideoOutput_RegisterCallback](#oh_videooutput_registercallback) - - -## Enum Description - - -### Camera_ConcurrentType - -``` -enum Camera_ConcurrentType -``` - -**Description** - -Enumerates the camera's concurrency types. - -**Since**: 18 - -| Value| Description| -| -------- | -------- | -| CAMERA_CONCURRENT_TYPE_LIMITED_CAPABILITY | Limited camera concurrency.| -| CAMERA_CONCURRENT_TYPE_FULL_CAPABILITY | Full camera concurrency.| - - -### Camera_Connection - -``` -enum Camera_Connection -``` - -**Description** - -Enumerates the camera connection types. - -**Since**: 11 - -| Value| Description| -| -------- | -------- | -| CAMERA_CONNECTION_BUILT_IN | Built-in camera.| -| CAMERA_CONNECTION_USB_PLUGIN | Camera connected using USB.| -| CAMERA_CONNECTION_REMOTE | Remote camera.| - - -### Camera_ErrorCode - -``` -enum Camera_ErrorCode -``` - -**Description** - -Enumerates the camera error codes. - -**Since**: 11 - -| Value| Description| -| -------- | -------- | -| CAMERA_OK | The camera is normal.| -| CAMERA_INVALID_ARGUMENT | A parameter is missing or the parameter type is incorrect.| -| CAMERA_OPERATION_NOT_ALLOWED | The operation is not allowed.| -| CAMERA_SESSION_NOT_CONFIG | The session is not configured.| -| CAMERA_SESSION_NOT_RUNNING | The session is not running.| -| CAMERA_SESSION_CONFIG_LOCKED | The session configuration is locked.| -| CAMERA_DEVICE_SETTING_LOCKED | The device setting is locked.| -| CAMERA_CONFLICT_CAMERA | The device is already started.| -| CAMERA_DEVICE_DISABLED | The camera is disabled for security reasons.| -| CAMERA_DEVICE_PREEMPTED | The camera is preempted.| -| CAMERA_UNRESOLVED_CONFLICTS_WITH_CURRENT_CONFIGURATIONS | The configuration conflicts with the current configuration.
**Since**: 12| -| CAMERA_SERVICE_FATAL_ERROR | A fatal error occurs in the camera service, for example, no camera permission, camera service restart, or abnormal cross-process invocation.| - - -### Camera_ExposureMode - -``` -enum Camera_ExposureMode -``` - -**Description** - -Enumerates the exposure modes. - -**Since**: 11 - -| Value| Description| -| -------- | -------- | -| EXPOSURE_MODE_LOCKED | Exposure locked.| -| EXPOSURE_MODE_AUTO | Auto exposure.| -| EXPOSURE_MODE_CONTINUOUS_AUTO | Continuous auto exposure.| - - -### Camera_FlashMode - -``` -enum Camera_FlashMode -``` - -**Description** - -Enumerates the flash modes. - -**Since**: 11 - -| Value| Description| -| -------- | -------- | -| FLASH_MODE_CLOSE | The flash is off.| -| FLASH_MODE_OPEN | The flash is on.| -| FLASH_MODE_AUTO | The flash mode is auto.| -| FLASH_MODE_ALWAYS_OPEN | The flash is steady on.| - - -### Camera_FocusMode - -``` -enum Camera_FocusMode -``` - -**Description** - -Enumerates the focus modes. - -**Since**: 11 - -| Value| Description| -| -------- | -------- | -| FOCUS_MODE_MANUAL | Manual focus.| -| FOCUS_MODE_CONTINUOUS_AUTO | Continuous auto focus.| -| FOCUS_MODE_AUTO | Auto focus.| -| FOCUS_MODE_LOCKED | Focus locked.| - - -### Camera_FocusState - -``` -enum Camera_FocusState -``` - -**Description** - -Enumerates the focus states. - -**Since**: 11 - -| Value| Description| -| -------- | -------- | -| FOCUS_STATE_SCAN | Focusing.| -| FOCUS_STATE_FOCUSED | Focused.| -| FOCUS_STATE_UNFOCUSED | Unfocused.| - - -### Camera_Format - -``` -enum Camera_Format -``` - -**Description** - -Enumerates the camera output formats. - -**Since**: 11 - -| Value| Description| -| -------- | -------- | -| CAMERA_FORMAT_RGBA_8888 | RGBA 8888.| -| CAMERA_FORMAT_YUV_420_SP | YUV 420 SP.| -| CAMERA_FORMAT_JPEG | JPEG.| -| CAMERA_FORMAT_YCBCR_P010 | YCBCR P010.
**Since**: 12| -| CAMERA_FORMAT_YCRCB_P010 | YCRCB P010.
**Since**: 12| - - -### Camera_HostDeviceType - -``` -enum Camera_HostDeviceType -``` - -**Description** - -Enumerates the remote device types. - -**Since**: 15 - -| Value| Description| -| -------- | -------- | -| HOST_DEVICE_TYPE_UNKNOWN_TYPE | Unknown type.| -| HOST_DEVICE_TYPE_PHONE | Mobile phone.| -| HOST_DEVICE_TYPE_TABLET | Tablet.| - - -### Camera_ImageRotation - -``` -enum Camera_ImageRotation -``` - -**Description** - -Enumerates the image rotation angles. - -**Since**: 11 - -| Value| Description| -| -------- | -------- | -| IAMGE_ROTATION_0 | The image rotates 0 degrees.| -| IAMGE_ROTATION_90 | The image rotates 90 degrees.| -| IAMGE_ROTATION_180 | The image rotates 180 degrees.| -| IAMGE_ROTATION_270 | The image rotates 270 degrees.| - - -### Camera_MetadataObjectType - -``` -enum Camera_MetadataObjectType -``` - -**Description** - -Enumerates the metadata object types. - -**Since**: 11 - -| Value| Description| -| -------- | -------- | -| FACE_DETECTION | Metadata object used for face detection.
The detection point must be in the coordinate system (0-1), where the upper left corner is (0, 0) and the lower right corner is (1, 1).
The coordinate system is based on the horizontal device direction with the device's charging port on the right.
If the layout of a preview screen of an application is based on the vertical direction with the charging port on the lower side,
the layout width and height are (w, h) and the return point is (x, y), then the coordinate point after conversion is (1-y, x).| - - -### Camera_Position - -``` -enum Camera_Position -``` - -**Description** - -Enumerates the camera positions. - -**Since**: 11 - -| Value| Description| -| -------- | -------- | -| CAMERA_POSITION_UNSPECIFIED | A camera that does not have a fixed orientation relative to the device screen.| -| CAMERA_POSITION_BACK | Rear camera.| -| CAMERA_POSITION_FRONT | Front camera.| - - -### Camera_PreconfigRatio - -``` -enum Camera_PreconfigRatio -``` - -**Description** - -Enumerates the preconfigured aspect ratios. - -**Since**: 12 - -| Value| Description| -| -------- | -------- | -| PRECONFIG_RATIO_1_1 | 1:1 aspect ratio.| -| PRECONFIG_RATIO_4_3 | 4:3 aspect ratio.| -| PRECONFIG_RATIO_16_9 | 16:9 aspect ratio.| - - -### Camera_PreconfigType - -``` -enum Camera_PreconfigType -``` - -**Description** - -Enumerates the preconfigured resolution types. - -**Since**: 12 - -| Value| Description| -| -------- | -------- | -| PRECONFIG_720P | 720p resolution.| -| PRECONFIG_1080P | 1080p resolution.| -| PRECONFIG_4K | 4K resolution.| -| PRECONFIG_HIGH_QUALITY | High-quality photos.| - - -### Camera_QualityLevel - -``` -enum Camera_QualityLevel -``` - -**Description** - -Enumerates the image quality levels. - -**Since**: 11 - -| Value| Description| -| -------- | -------- | -| QUALITY_LEVEL_HIGH | High image quality.| -| QUALITY_LEVEL_MEDIUM | Medium image quality.| -| QUALITY_LEVEL_LOW | Low image quality.| - -### Camera_QualityPrioritization - -``` -enum Camera_QualityPrioritization -``` - -**Description** - -Enumerates the priority levels for video recording quality. - -**Since**: 14 - -| Value | Description | -| ------------- | -------------------- | -| HIGH_QUALITY | Prioritizes high-quality video recording. | -| POWER_BALANCE | Prioritizes video recording quality while balancing power consumption.| - -### Camera_SceneMode - -``` -enum Camera_SceneMode -``` - -**Description** - -Enumerates the camera scene modes. - -**Since**: 12 - -| Value| Description| -| -------- | -------- | -| NORMAL_PHOTO | Normal photo mode.| -| NORMAL_VIDEO | Normal video mode.| -| SECURE_PHOTO | Secure mode.| - - -### Camera_SmoothZoomMode - -``` -enum Camera_SmoothZoomMode -``` - -**Description** - -Enumerates the smooth zoom modes. - -**Since**: 12 - -| Value| Description| -| -------- | -------- | -| NORMAL | Bessel curve mode.| - - -### Camera_Status - -``` -enum Camera_Status -``` - -**Description** - -Enumerates the camera statuses. - -**Since**: 11 - -| Value| Description| -| -------- | -------- | -| CAMERA_STATUS_APPEAR | A camera appears.| -| CAMERA_STATUS_DISAPPEAR | The camera disappears.| -| CAMERA_STATUS_AVAILABLE | The camera is available.| -| CAMERA_STATUS_UNAVAILABLE | The camera is unavailable.| - - -### Camera_TorchMode - -``` -enum Camera_TorchMode -``` - -**Description** - -Enumerates the flashlight modes. - -**Since**: 12 - -| Value| Description| -| -------- | -------- | -| OFF | The flashlight is always off.| -| ON | The flashlight is always on.| -| AUTO | The flashlight will be turned on automatically based on the ambient lighting level.| - - -### Camera_Type - -``` -enum Camera_Type -``` - -**Description** - -Enumerates the camera types. - -**Since**: 11 - -| Value| Description| -| -------- | -------- | -| CAMERA_TYPE_DEFAULT | Default camera type.| -| CAMERA_TYPE_WIDE_ANGLE | Wide camera.| -| CAMERA_TYPE_ULTRA_WIDE | Ultra wide camera.| -| CAMERA_TYPE_TELEPHOTO | Telephoto camera.| -| CAMERA_TYPE_TRUE_DEPTH | Camera with depth of field information.| - - -### Camera_VideoStabilizationMode - -``` -enum Camera_VideoStabilizationMode -``` - -**Description** - -Enumerates the video stabilization modes. - -**Since**: 11 - -| Value| Description| -| -------- | -------- | -| STABILIZATION_MODE_OFF | Video stabilization is disabled.| -| STABILIZATION_MODE_LOW | The basic video stabilization algorithm is used.| -| STABILIZATION_MODE_MIDDLE | A video stabilization algorithm with a stabilization effect better than that of the **LOW** type is used.| -| STABILIZATION_MODE_HIGH | A video stabilization algorithm with a stabilization effect better than that of the **MIDDLE** type is used.| -| STABILIZATION_MODE_AUTO | Automatic video stabilization is used. This value is available for HDF cameras.| - - -## Function Description - - -### OH_Camera_DeleteCameraManager() - -``` -Camera_ErrorCode OH_Camera_DeleteCameraManager(Camera_Manager* cameraManager) -``` - -**Description** - -Deletes a **CameraManager** instance. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to the target [Camera_Manager](#camera_manager) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_Camera_GetCameraManager() - -``` -Camera_ErrorCode OH_Camera_GetCameraManager(Camera_Manager** cameraManager) -``` - -**Description** - -Obtains a **CameraManager** instance. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Double pointer to the [Camera_Manager](#camera_manager) instance if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraDevice_GetCameraOrientation() - -``` -Camera_ErrorCode OH_CameraDevice_GetCameraOrientation(Camera_Device* camera, uint32_t* orientation) -``` - -**Description** - -Obtains the sensor direction of a camera device. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| camera | Pointer to the target [Camera_Device](_camera___device.md) instance.| -| orientation | Pointer to the sensor direction obtained.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraInput_Close() - -``` -Camera_ErrorCode OH_CameraInput_Close(Camera_Input* cameraInput) -``` - -**Description** - -Closes a camera. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraInput_Open() - -``` -Camera_ErrorCode OH_CameraInput_Open(Camera_Input* cameraInput) -``` - -**Description** - -Opens a camera. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_CONFLICT_CAMERA**: The camera cannot be used due to a conflict. - -- **CAMERA_DEVICE_DISABLED**: The camera is disabled due to security reasons. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraInput_OpenConcurrentCameras() - -``` -Camera_ErrorCode OH_CameraInput_OpenConcurrentCameras(Camera_Input* cameraInput, Camera_ConcurrentType type) -``` - -**Description** - -Opens the camera based on the specified concurrency type. - -**Since**: 18 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.| -| type | Concurrency type, which is specified by [Camera_ConcurrentType](#camera_concurrenttype).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_CONFLICT_CAMERA**: The camera cannot be used due to a conflict. - -- **CAMERA_DEVICE_DISABLED**: The camera is disabled due to security reasons. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraInput_OpenSecureCamera() - -``` -Camera_ErrorCode OH_CameraInput_OpenSecureCamera(Camera_Input* cameraInput, uint64_t* secureSeqId) -``` - -**Description** - -Opens a camera in secure mode. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.| -| secureSeqId | Pointer to the sequence number of the secure mode camera.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_CONFLICT_CAMERA**: The camera cannot be used due to a conflict. - -- **CAMERA_DEVICE_DISABLED**: The camera is disabled due to security reasons. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraInput_RegisterCallback() - -``` -Camera_ErrorCode OH_CameraInput_RegisterCallback(Camera_Input* cameraInput, CameraInput_Callbacks* callback) -``` - -**Description** - -Registers a callback to listen for camera input events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraInput | Pointer to a [Camera_Input](#camera_input) instance.| -| callback | Pointer to the target callback, which is defined in the [CameraInput_Callbacks](_camera_input___callbacks.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CameraInput_Release() - -``` -Camera_ErrorCode OH_CameraInput_Release(Camera_Input* cameraInput) -``` - -**Description** - -Releases a **CameraInput** instance. - -Either this function or [OH_CameraInput_Close](#oh_camerainput_close) needs to be called. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraInput_UnregisterCallback() - -``` -Camera_ErrorCode OH_CameraInput_UnregisterCallback(Camera_Input* cameraInput, CameraInput_Callbacks* callback) -``` - -**Description** - -Unregisters the callback used to listen for camera input events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraInput | Pointer to a [Camera_Input](#camera_input) instance.| -| callback | Pointer to the target callback, which is defined in the [CameraInput_Callbacks](_camera_input___callbacks.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CameraManager_CreateCameraInput() - -``` -Camera_ErrorCode OH_CameraManager_CreateCameraInput(Camera_Manager* cameraManager, const Camera_Device* camera, Camera_Input** cameraInput) -``` - -**Description** - -Creates a **CameraInput** instance. - -**Since**: 11 - -**Required permissions**: ohos.permission.CAMERA - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| camera | Pointer to the target camera, which is defined in [Camera_Device](_camera___device.md).| -| cameraInput | Double pointer to the [Camera_Input](#camera_input) instance if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraManager_CreateCameraInput_WithPositionAndType() - -``` -Camera_ErrorCode OH_CameraManager_CreateCameraInput_WithPositionAndType(Camera_Manager* cameraManager, Camera_Position position, Camera_Type type, Camera_Input** cameraInput) -``` - -**Description** - -Creates a **CameraInput** instance with the specified location and type. - -**Since**: 11 - -**Required permissions**: ohos.permission.CAMERA - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| position | Camera position, which is defined in [Camera_Position](#camera_position).| -| type | Camera type, which is defined in [Camera_Type](#camera_type).| -| cameraInput | Double pointer to the [Camera_Input](#camera_input) instance if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraManager_CreateCaptureSession() - -``` -Camera_ErrorCode OH_CameraManager_CreateCaptureSession(Camera_Manager* cameraManager, - Camera_CaptureSession** captureSession) -``` - -**Description** - -Creates a **CaptureSession** instance. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| captureSession | Double pointer to the [Camera_CaptureSession](#camera_capturesession) instance if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraManager_CreateMetadataOutput() - -``` -Camera_ErrorCode OH_CameraManager_CreateMetadataOutput(Camera_Manager* cameraManager, const Camera_MetadataObjectType* profile, Camera_MetadataOutput** metadataOutput) -``` - -**Description** - -Creates a **MetadataOutput** instance. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| profile | Pointer to the profile, which is defined in [Camera_MetadataObjectType](#camera_metadataobjecttype).| -| metadataOutput | Double pointer to the [Camera_MetadataOutput](#camera_metadataoutput) instance if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraManager_CreatePhotoOutput() - -``` -Camera_ErrorCode OH_CameraManager_CreatePhotoOutput(Camera_Manager* cameraManager, const Camera_Profile* profile, const char* surfaceId, Camera_PhotoOutput** photoOutput) -``` - -**Description** - -Creates a **PhotoOutput** instance. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| profile | Pointer to the profile, which is defined in [Camera_Profile](_camera___profile.md).| -| surfaceId | Pointer to the surface ID.| -| photoOutput | Double pointer to the [Camera_PhotoOutput](#camera_photooutput) instance if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraManager_CreatePhotoOutputUsedInPreconfig() - -``` -Camera_ErrorCode OH_CameraManager_CreatePhotoOutputUsedInPreconfig(Camera_Manager* cameraManager, const char* surfaceId, Camera_PhotoOutput** photoOutput) -``` - -**Description** - -Creates a **PhotoOutput** instance to be used in a preconfiguration stream. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| surfaceId | Pointer to the surface ID.| -| photoOutput | Double pointer to the [Camera_PhotoOutput](#camera_photooutput) instance if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraManager_CreatePhotoOutputWithoutSurface() - -``` -Camera_ErrorCode OH_CameraManager_CreatePhotoOutputWithoutSurface(Camera_Manager *cameraManager, const Camera_Profile *profile, Camera_PhotoOutput **photoOutput) -``` - -**Description** - -Creates a **PhotoOutput** instance. **surfaceId** is not required in this function. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| profile | Pointer to the profile, which is defined in [Camera_Profile](_camera___profile.md).| -| photoOutput | Double pointer to the [Camera_PhotoOutput](#camera_photooutput) instance if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraManager_CreatePreviewOutput() - -``` -Camera_ErrorCode OH_CameraManager_CreatePreviewOutput(Camera_Manager* cameraManager, const Camera_Profile* profile, const char* surfaceId, Camera_PreviewOutput** previewOutput) -``` - -**Description** - -Creates a **PreviewOutput** instance. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| profile | Pointer to the profile, which is defined in [Camera_Profile](_camera___profile.md).| -| surfaceId | Pointer to the surface ID.| -| previewOutput | Double pointer to the [Camera_PreviewOutput](#camera_previewoutput) instance if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraManager_CreatePreviewOutputUsedInPreconfig() - -``` -Camera_ErrorCode OH_CameraManager_CreatePreviewOutputUsedInPreconfig(Camera_Manager* cameraManager, const char* surfaceId, Camera_PreviewOutput** previewOutput) -``` - -**Description** - -Creates a **PreviewOutput** instance to be used in a preconfiguration stream. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| surfaceId | Pointer to the surface ID.| -| previewOutput | Double pointer to the [Camera_PreviewOutput](#camera_previewoutput) instance if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraManager_CreateVideoOutput() - -``` -Camera_ErrorCode OH_CameraManager_CreateVideoOutput(Camera_Manager* cameraManager, const Camera_VideoProfile* profile, const char* surfaceId, Camera_VideoOutput** videoOutput) -``` - -**Description** - -Creates a **VideoOutput** instance. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| profile | Pointer to the profile, which is defined in the [Camera_VideoProfile](_camera___video_profile.md) struct.| -| surfaceId | Pointer to the surface ID.| -| videoOutput | Double pointer to the [Camera_VideoOutput](#camera_videooutput) instance if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraManager_CreateVideoOutputUsedInPreconfig() - -``` -Camera_ErrorCode OH_CameraManager_CreateVideoOutputUsedInPreconfig(Camera_Manager* cameraManager, const char* surfaceId, Camera_VideoOutput** videoOutput) -``` - -**Description** - -Creates a **VideoOutput** instance to be used in a preconfiguration stream. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| surfaceId | Pointer to the surface ID.| -| videoOutput | Double pointer to the [Camera_VideoOutput](#camera_videooutput) instance if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraManager_DeleteSceneModes() - -``` -Camera_ErrorCode OH_CameraManager_DeleteSceneModes(Camera_Manager* cameraManager, Camera_SceneMode* sceneModes) -``` - -**Description** - -Deletes scene modes. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| sceneModes | Target scene modes, which are defined in [Camera_SceneMode](#camera_scenemode).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CameraManager_DeleteSupportedCameraOutputCapability() - -``` -Camera_ErrorCode OH_CameraManager_DeleteSupportedCameraOutputCapability(Camera_Manager* cameraManager, Camera_OutputCapability* cameraOutputCapability) -``` - -**Description** - -Deletes the output capability supported by a camera. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| cameraOutputCapability | Pointer to the output capability, which is defined in the [Camera_OutputCapability](_camera___output_capability.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CameraManager_DeleteSupportedCameras() - -``` -Camera_ErrorCode OH_CameraManager_DeleteSupportedCameras(Camera_Manager* cameraManager, Camera_Device* cameras, uint32_t size) -``` - -**Description** - -Deletes supported cameras. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| cameras | Pointer to a list of cameras, which are defined in [Camera_Device](_camera___device.md).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CameraManager_GetCameraConcurrentInfos() - -``` -Camera_ErrorCode OH_CameraManager_GetCameraConcurrentInfos(Camera_Manager* cameraManager, const Camera_Device* camera, uint32_t deviceSize, Camera_ConcurrentInfo** cameraConcurrentInfo, uint32_t* infoSize) -``` - -**Description** - -Obtains the concurrency information of the specified cameras. If the return value is empty, concurrency is not supported. - -**Since**: 18 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| camera | Pointer to an array of [Camera_Device](_camera___device.md) instances.| -| deviceSize | Length of the array of [Camera_Device](_camera___device.md) instances.| -| cameraConcurrentInfo | Double pointer to an array of the concurrency information obtained, which is specified by [Camera_ConcurrentInfo](_camera___concurrent_info.md).| -| infoSize | Pointer to the length of the array of the concurrency information obtained.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraManager_GetCameraDevice() - -``` -Camera_ErrorCode OH_CameraManager_GetCameraDevice(Camera_Manager* cameraManager, Camera_Position position, Camera_Type type, Camera_Device* camera) -``` - -**Description** - -Obtains the specified camera based on the camera position and type. - -**Since**: 18 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| position | [Camera_Position](#camera_position) used for query.| -| type | [Camera_Type](#camera_type) used for query.| -| camera | Pointer to a camera, which is defined in [Camera_Device](_camera___device.md).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraManager_GetSupportedCameraOutputCapability() - -``` -Camera_ErrorCode OH_CameraManager_GetSupportedCameraOutputCapability(Camera_Manager* cameraManager, const Camera_Device* camera, Camera_OutputCapability** cameraOutputCapability) -``` - -**Description** - -Obtains the output capability supported by a camera. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| cameras | Pointer to a list of cameras, which are defined in [Camera_Device](_camera___device.md).| -| cameraOutputCapability | Double pointer to the output capability, which is defined in [Camera_OutputCapability](_camera___output_capability.md), if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CameraManager_GetSupportedCameraOutputCapabilityWithSceneMode() - -``` -Camera_ErrorCode OH_CameraManager_GetSupportedCameraOutputCapabilityWithSceneMode(Camera_Manager* cameraManager, const Camera_Device* camera, Camera_SceneMode sceneMode, Camera_OutputCapability** cameraOutputCapability) -``` - -**Description** - -Obtains the output capability supported by a camera in the specified mode. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| camera | Pointer to a camera, which is defined in [Camera_Device](_camera___device.md).| -| sceneMode | Scene mode, which is defined in [Camera_SceneMode](#camera_scenemode).| -| cameraOutputCapability | Double pointer to output capability, which is defined in [Camera_OutputCapability](_camera___output_capability.md), if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraManager_GetSupportedCameras() - -``` -Camera_ErrorCode OH_CameraManager_GetSupportedCameras(Camera_Manager* cameraManager, Camera_Device** cameras, uint32_t* size) -``` - -**Description** - -Obtains the supported cameras. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| cameras | Double pointer to the list of cameras, which is defined in [Camera_Device](_camera___device.md), if the function is successfully called.| -| size | Pointer to the size of the list of cameras.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CameraManager_GetSupportedSceneModes() - -``` -Camera_ErrorCode OH_CameraManager_GetSupportedSceneModes(Camera_Device* camera, Camera_SceneMode** sceneModes, uint32_t* size) -``` - -**Description** - -Obtains the scene modes supported by a camera. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| camera | Pointer to a camera, which is defined in [Camera_Device](_camera___device.md).| -| sceneModes | Double pointer to the list of scene modes, which are defined in [Camera_SceneMode](#camera_scenemode), if the function is successfully called.| -| size | Pointer to the size of the list of scene modes.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraManager_IsCameraMuted() - -``` -Camera_ErrorCode OH_CameraManager_IsCameraMuted(Camera_Manager* cameraManager, bool* isCameraMuted) -``` - -**Description** - -Checks whether a camera is muted. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| isCameraMuted | Pointer to the result that specifies whether the camera is muted if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CameraManager_IsTorchSupported() - -``` -Camera_ErrorCode OH_CameraManager_IsTorchSupported(Camera_Manager* cameraManager, bool* isTorchSupported) -``` - -**Description** - -Checks whether the device supports the flashlight. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| isTorchSupported | Pointer to the result indicating whether the device supports the flashlight.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CameraManager_IsTorchSupportedByTorchMode() - -``` -Camera_ErrorCode OH_CameraManager_IsTorchSupportedByTorchMode(Camera_Manager* cameraManager, Camera_TorchMode torchMode, bool* isTorchSupported) -``` - -**Description** - -Checks whether the device supports the specified flashlight mode. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| torchMode | Target flashlight mode, which is defined in [Camera_TorchMode](#camera_torchmode-1).| -| isTorchSupported | Pointer to the result indicating whether the device supports the flashlight mode.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraManager_RegisterCallback() - -``` -Camera_ErrorCode OH_CameraManager_RegisterCallback(Camera_Manager* cameraManager, CameraManager_Callbacks* callback) -``` - -**Description** - -Registers a callback to listen for camera status changes. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| callback | Pointer to the target callback, which is defined in the [CameraManager_Callbacks](_camera_manager___callbacks.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CameraManager_RegisterTorchStatusCallback() - -``` -Camera_ErrorCode OH_CameraManager_RegisterTorchStatusCallback(Camera_Manager* cameraManager, OH_CameraManager_TorchStatusCallback torchStatusCallback) -``` - -**Description** - -Registers a callback to listen for flashlight status changes. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| torchStatusCallback | Target callback, which is defined in [OH_CameraManager_TorchStatusCallback](#oh_cameramanager_torchstatuscallback).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CameraManager_SetTorchMode() - -``` -Camera_ErrorCode OH_CameraManager_SetTorchMode(Camera_Manager* cameraManager, Camera_TorchMode torchMode) -``` - -**Description** - -Sets a flashlight mode. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| torchMode | Target flashlight mode, which is defined in [Camera_TorchMode](#camera_torchmode).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraManager_UnregisterCallback() - -``` -Camera_ErrorCode OH_CameraManager_UnregisterCallback(Camera_Manager* cameraManager, CameraManager_Callbacks* callback) -``` - -**Description** - -Unregisters the callback used to listen for camera status changes. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| callback | Pointer to the target callback, which is defined in the [CameraManager_Callbacks](_camera_manager___callbacks.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CameraManager_UnregisterTorchStatusCallback() - -``` -Camera_ErrorCode OH_CameraManager_UnregisterTorchStatusCallback(Camera_Manager* cameraManager, OH_CameraManager_TorchStatusCallback torchStatusCallback) -``` - -**Description** - -Unregisters the callback used to listen for flashlight status changes. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| cameraManager | Pointer to a [Camera_Manager](#camera_manager) instance.| -| torchStatusCallback | Target callback, which is defined in [OH_CameraManager_TorchStatusCallback](#oh_cameramanager_torchstatuscallback).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - - -### OH_CaptureSession_AddInput() - -``` -Camera_ErrorCode OH_CaptureSession_AddInput(Camera_CaptureSession* session, Camera_Input* cameraInput) -``` - -**Description** - -Adds a **CameraInput** instance to a session. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed. - - -### OH_CaptureSession_AddMetadataOutput() - -``` -Camera_ErrorCode OH_CaptureSession_AddMetadataOutput(Camera_CaptureSession* session, Camera_MetadataOutput* metadataOutput) -``` - -**Description** - -Adds a **MetadataOutput** instance to a session. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed. - - -### OH_CaptureSession_AddPhotoOutput() - -``` -Camera_ErrorCode OH_CaptureSession_AddPhotoOutput(Camera_CaptureSession* session, Camera_PhotoOutput* photoOutput) -``` - -**Description** - -Adds a **PhotoOutput** instance to a session. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed. - - -### OH_CaptureSession_AddPreviewOutput() - -``` -Camera_ErrorCode OH_CaptureSession_AddPreviewOutput(Camera_CaptureSession* session, Camera_PreviewOutput* previewOutput) -``` - -**Description** - -Adds a **PreviewOutput** instance to a session. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed. - - -### OH_CaptureSession_AddSecureOutput() - -``` -Camera_ErrorCode OH_CaptureSession_AddSecureOutput(Camera_CaptureSession* session, Camera_PreviewOutput* previewOutput) -``` - -**Description** - -Marks a preview output stream as secure output. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed. - -- **CAMERA_SESSION_CONFIG_LOCKED**: The session configuration is locked. - - -### OH_CaptureSession_AddVideoOutput() - -``` -Camera_ErrorCode OH_CaptureSession_AddVideoOutput(Camera_CaptureSession* session, Camera_VideoOutput* videoOutput) -``` - -**Description** - -Adds a **VideoOutput** instance to a session. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed. - - -### OH_CaptureSession_BeginConfig() - -``` -Camera_ErrorCode OH_CaptureSession_BeginConfig(Camera_CaptureSession* session) -``` - -**Description** - -Starts the configuration for a capture session. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed. - - -### OH_CaptureSession_CanAddInput() - -``` -Camera_ErrorCode OH_CaptureSession_CanAddInput(Camera_CaptureSession* session, Camera_Input* cameraInput, bool* isSuccessful) -``` - -**Description** - -Checks whether a **CameraInput** instance can be added to a session. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.| -| isSuccessful | Pointer to the result indicating whether the **CameraInput** instance can be added to the session.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CaptureSession_CanAddPhotoOutput() - -``` -Camera_ErrorCode OH_CaptureSession_CanAddPhotoOutput(Camera_CaptureSession* session, Camera_PhotoOutput* cameraOutput, bool* isSuccessful) -``` - -**Description** - -Checks whether a **PhotoOutput** instance can be added to a session. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| cameraOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| isSuccessful | Pointer to the result indicating whether the **PhotoOutput** instance can be added to the session.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CaptureSession_CanAddPreviewOutput() - -``` -Camera_ErrorCode OH_CaptureSession_CanAddPreviewOutput(Camera_CaptureSession* session, Camera_PreviewOutput* cameraOutput, bool* isSuccessful) -``` - -**Description** - -Checks whether a **PreviewOutput** instance can be added to a session. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| cameraOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| -| isSuccessful | Pointer to the result indicating whether the **PreviewOutput** instance can be added to the session.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CaptureSession_CanAddVideoOutput() - -``` -Camera_ErrorCode OH_CaptureSession_CanAddVideoOutput(Camera_CaptureSession* session, Camera_VideoOutput* cameraOutput, bool* isSuccessful) -``` - -**Description** - -Checks whether a **VideoOutput** instance can be added to a session. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| cameraOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.| -| isSuccessful | Pointer to the result indicating whether the **VideoOutput** instance can be added to the session.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CaptureSession_CanPreconfig() - -``` -Camera_ErrorCode OH_CaptureSession_CanPreconfig(Camera_CaptureSession* session, Camera_PreconfigType preconfigType, bool* canPreconfig) -``` - -**Description** - -Checks whether a preconfigured resolution type is supported. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| preconfigType | Target resolution type, which is defined in [Camera_PreconfigType](#camera_preconfigtype).| -| canPreconfig | Pointer to the result indicating whether the preconfigured resolution type is supported.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CaptureSession_CanPreconfigWithRatio() - -``` -Camera_ErrorCode OH_CaptureSession_CanPreconfigWithRatio(Camera_CaptureSession* session, Camera_PreconfigType preconfigType, Camera_PreconfigRatio preconfigRatio, bool* canPreconfig) -``` - -**Description** - -Checks whether a preconfigured resolution type with an aspect ratio is supported. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| preconfigType | Target resolution type, which is defined in [Camera_PreconfigType](#camera_preconfigtype).| -| preconfigRatio | Target aspect ratio, which is defined in [Camera_PreconfigRatio](#camera_preconfigratio).| -| canPreconfig | Pointer to the result indicating whether the preconfigured resolution type is supported.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CaptureSession_CommitConfig() - -``` -Camera_ErrorCode OH_CaptureSession_CommitConfig(Camera_CaptureSession* session) -``` - -**Description** - -Commits the configuration for a capture session. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CaptureSession_DeleteColorSpaces() - -``` -Camera_ErrorCode OH_CaptureSession_DeleteColorSpaces(Camera_CaptureSession* session, OH_NativeBuffer_ColorSpace* colorSpace) -``` - -**Description** - -Deletes color spaces. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| colorSpace | Pointer to the list of color spaces, which are defined in [OH_NativeBuffer_ColorSpace](../apis-arkgraphics2d/_o_h___native_buffer.md#oh_nativebuffer_colorspace-1).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CaptureSession_GetActiveColorSpace() - -``` -Camera_ErrorCode OH_CaptureSession_GetActiveColorSpace(Camera_CaptureSession* session, OH_NativeBuffer_ColorSpace* colorSpace) -``` - -**Description** - -Obtains the active color space. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| colorSpace | Pointer to the active color space, which is defined in [OH_NativeBuffer_ColorSpace](../apis-arkgraphics2d/_o_h___native_buffer.md#oh_nativebuffer_colorspace-1).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_GetExposureBias() - -``` -Camera_ErrorCode OH_CaptureSession_GetExposureBias(Camera_CaptureSession* session, float* exposureBias) -``` - -**Description** - -Obtains the exposure compensation value in use. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| exposureBias | Pointer to the exposure compensation value.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_GetExposureBiasRange() - -``` -Camera_ErrorCode OH_CaptureSession_GetExposureBiasRange(Camera_CaptureSession* session, float* minExposureBias, float* maxExposureBias, float* step) -``` - -**Description** - -Obtains the exposure compensation values of the device. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| minExposureBias | Pointer to the minimum exposure compensation value.| -| maxExposureBias | Pointer to the maximum exposure compensation value.| -| step | Pointer to the exposure compensation step.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_GetExposureMode() - -``` -Camera_ErrorCode OH_CaptureSession_GetExposureMode(Camera_CaptureSession* session, Camera_ExposureMode* exposureMode) -``` - -**Description** - -Obtains the exposure mode in use. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| exposureMode | Pointer to the exposure mode, which is defined in the [Camera_ExposureMode](#camera_exposuremode) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_GetExposureValue() - -``` -Camera_ErrorCode OH_CaptureSession_GetExposureValue(Camera_CaptureSession* session, float* exposureValue) -``` - -**Description** - -Obtains the exposure value. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| exposureValue | Pointer to the exposure value.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CaptureSession_GetFlashMode() - -``` -Camera_ErrorCode OH_CaptureSession_GetFlashMode(Camera_CaptureSession* session, Camera_FlashMode* flashMode) -``` - -**Description** - -Obtains the flash mode in use. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| flashMode | Pointer to the flash mode, which is defined in the [Camera_FlashMode](#camera_flashmode) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_GetFocalLength() - -``` -Camera_ErrorCode OH_CaptureSession_GetFocalLength(Camera_CaptureSession* session, float* focalLength) -``` - -**Description** - -Obtains the current focal length. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| focalLength | Pointer to the focal length.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_GetFocusMode() - -``` -Camera_ErrorCode OH_CaptureSession_GetFocusMode(Camera_CaptureSession* session, Camera_FocusMode* focusMode) -``` - -**Description** - -Obtains the focus mode in use. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| exposureBias | Pointer to the focus mode, which is defined in the [Camera_FocusMode](#camera_focusmode) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_GetFocusPoint() - -``` -Camera_ErrorCode OH_CaptureSession_GetFocusPoint(Camera_CaptureSession* session, Camera_Point* focusPoint) -``` - -**Description** - -Obtains the focal point in use. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| focusPoint | Pointer to the focal point, which is defined in the [Camera_Point](_camera___point.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_GetMeteringPoint() - -``` -Camera_ErrorCode OH_CaptureSession_GetMeteringPoint(Camera_CaptureSession* session, Camera_Point* point) -``` - -**Description** - -Obtains the metering point in use. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| point | Pointer to the metering point, which is defined in the [Camera_Point](_camera___point.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_GetSupportedColorSpaces() - -``` -Camera_ErrorCode OH_CaptureSession_GetSupportedColorSpaces(Camera_CaptureSession* session, OH_NativeBuffer_ColorSpace** colorSpace, uint32_t* size) -``` - -**Description** - -Obtains the supported color spaces. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| colorSpace | Double pointer to the list of color spaces, which are defined in [OH_NativeBuffer_ColorSpace](../apis-arkgraphics2d/_o_h___native_buffer.md#oh_nativebuffer_colorspace-1), if the function is successfully called.| -| size | Pointer to the size of the list of color spaces, which are defined in [OH_NativeBuffer_ColorSpace](../apis-arkgraphics2d/_o_h___native_buffer.md#oh_nativebuffer_colorspace-1), if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_GetVideoStabilizationMode() - -``` -Camera_ErrorCode OH_CaptureSession_GetVideoStabilizationMode(Camera_CaptureSession* session, Camera_VideoStabilizationMode* mode) -``` - -**Description** - -Obtains the video stabilization mode in use. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| mode | Pointer to the video stabilization mode, which is defined in the [Camera_VideoStabilizationMode](#camera_videostabilizationmode) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_GetZoomRatio() - -``` -Camera_ErrorCode OH_CaptureSession_GetZoomRatio(Camera_CaptureSession* session, float* zoom) -``` - -**Description** - -Obtains the zoom ratio in use. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| zoom | Pointer to the zoom ratio.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_GetZoomRatioRange() - -``` -Camera_ErrorCode OH_CaptureSession_GetZoomRatioRange(Camera_CaptureSession* session, float* minZoom, float* maxZoom) -``` - -**Description** - -Obtains the supported zoom ratio range. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| minZoom | Pointer to the minimum zoom ratio.| -| maxZoom | Pointer to the maximum zoom ratio.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_HasFlash() - -``` -Camera_ErrorCode OH_CaptureSession_HasFlash(Camera_CaptureSession* session, bool* hasFlash) -``` - -**Description** - -Checks whether the device has flash. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| hasFlash | Pointer to the result that specifies whether the device has flash.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_IsExposureModeSupported() - -``` -Camera_ErrorCode OH_CaptureSession_IsExposureModeSupported(Camera_CaptureSession* session, Camera_ExposureMode exposureMode, bool* isSupported) -``` - -**Description** - -Checks whether an exposure mode is supported. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| exposureMode | Target exposure mode, which is defined in the [Camera_ExposureMode](#camera_exposuremode) struct.| -| isSupported | Pointer to the result that specifies whether the exposure mode is supported.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_IsFlashModeSupported() - -``` -Camera_ErrorCode OH_CaptureSession_IsFlashModeSupported(Camera_CaptureSession* session, Camera_FlashMode flashMode, bool* isSupported) -``` - -**Description** - -Checks whether a flash mode is supported. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| flashMode | Target flash mode, which is defined in the [Camera_FlashMode](#camera_flashmode) struct.| -| isSupported | Pointer to the result that specifies whether the flash mode is supported.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_IsFocusModeSupported() - -``` -Camera_ErrorCode OH_CaptureSession_IsFocusModeSupported(Camera_CaptureSession* session, Camera_FocusMode focusMode, bool* isSupported) -``` - -**Description** - -Checks whether a focus mode is supported. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| focusMode | Target focus mode, which is defined in the [Camera_FocusMode](#camera_focusmode-1) struct.| -| isSupported | Pointer to the result that specifies whether the focus mode is supported.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_IsVideoStabilizationModeSupported() - -``` -Camera_ErrorCode OH_CaptureSession_IsVideoStabilizationModeSupported(Camera_CaptureSession* session, Camera_VideoStabilizationMode mode, bool* isSupported) -``` - -**Description** - -Checks whether a video stabilization mode is supported. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| mode | Target video stabilization mode, which is defined in the [Camera_VideoStabilizationMode](#camera_videostabilizationmode-1) struct.| -| isSupported | Pointer to the result that specifies whether the video stabilization mode is supported.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_Preconfig() - -``` -Camera_ErrorCode OH_CaptureSession_Preconfig(Camera_CaptureSession* session, Camera_PreconfigType preconfigType) -``` - -**Description** - -Sets a preconfigured resolution type. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| preconfigType | Target resolution type, which is defined in [Camera_PreconfigType](#camera_preconfigtype-1).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CaptureSession_PreconfigWithRatio() - -``` -Camera_ErrorCode OH_CaptureSession_PreconfigWithRatio(Camera_CaptureSession* session, Camera_PreconfigType preconfigType, Camera_PreconfigRatio preconfigRatio) -``` - -**Description** - -Sets a preconfigured resolution type with an aspect ratio. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| preconfigType | Target resolution type, which is defined in [Camera_PreconfigType](#camera_preconfigtype-1).| -| preconfigRatio | Target aspect ratio, which is defined in [Camera_PreconfigRatio](#camera_preconfigratio-1).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CaptureSession_RegisterCallback() - -``` -Camera_ErrorCode OH_CaptureSession_RegisterCallback(Camera_CaptureSession* session, CaptureSession_Callbacks* callback) -``` - -**Description** - -Registers a callback to listen for capture session events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| callback | Pointer to the target callback, which is defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CaptureSession_RegisterSmoothZoomInfoCallback() - -``` -Camera_ErrorCode OH_CaptureSession_RegisterSmoothZoomInfoCallback(Camera_CaptureSession* session, OH_CaptureSession_OnSmoothZoomInfo smoothZoomInfoCallback) -``` - -**Description** - -Registers a callback to listen for smooth zoom events. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| smoothZoomInfoCallback | Target callback, which is defined in [OH_CaptureSession_OnSmoothZoomInfo](#oh_capturesession_onsmoothzoominfo).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CaptureSession_Release() - -``` -Camera_ErrorCode OH_CaptureSession_Release(Camera_CaptureSession* session) -``` - -**Description** - -Releases a **CaptureSession** instance. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CaptureSession_RemoveInput() - -``` -Camera_ErrorCode OH_CaptureSession_RemoveInput(Camera_CaptureSession* session, Camera_Input* cameraInput) -``` - -**Description** - -Removes a **CameraInput** instance from a session. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| cameraInput | Pointer to the target [Camera_Input](#camera_input) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed. - - -### OH_CaptureSession_RemoveMetadataOutput() - -``` -Camera_ErrorCode OH_CaptureSession_RemoveMetadataOutput(Camera_CaptureSession* session, Camera_MetadataOutput* metadataOutput) -``` - -**Description** - -Removes a **MetadataOutput** instance from a session. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed. - - -### OH_CaptureSession_RemovePhotoOutput() - -``` -Camera_ErrorCode OH_CaptureSession_RemovePhotoOutput(Camera_CaptureSession* session, Camera_PhotoOutput* photoOutput) -``` - -**Description** - -Removes a **PhotoOutput** instance from a session. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed. - - -### OH_CaptureSession_RemovePreviewOutput() - -``` -Camera_ErrorCode OH_CaptureSession_RemovePreviewOutput(Camera_CaptureSession* session, Camera_PreviewOutput* previewOutput) -``` - -**Description** - -Removes a **PreviewOutput** instance from a session. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed. - - -### OH_CaptureSession_RemoveVideoOutput() - -``` -Camera_ErrorCode OH_CaptureSession_RemoveVideoOutput(Camera_CaptureSession* session, Camera_VideoOutput* videoOutput) -``` - -**Description** - -Removes a **VideoOutput** instance from a session. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed. - - -### OH_CaptureSession_SetActiveColorSpace() - -``` -Camera_ErrorCode OH_CaptureSession_SetActiveColorSpace(Camera_CaptureSession* session, OH_NativeBuffer_ColorSpace colorSpace) -``` - -**Description** - -Sets the active color space. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| colorSpace | Target color space, which is defined in [OH_NativeBuffer_ColorSpace](../apis-arkgraphics2d/_o_h___native_buffer.md#oh_nativebuffer_colorspace-1).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_SetExposureBias() - -``` -Camera_ErrorCode OH_CaptureSession_SetExposureBias(Camera_CaptureSession* session, float exposureBias) -``` - -**Description** - -Sets an exposure compensation value for the device. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| exposureBias | Target exposure compensation value.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_SetExposureMode() - -``` -Camera_ErrorCode OH_CaptureSession_SetExposureMode(Camera_CaptureSession* session, Camera_ExposureMode exposureMode) -``` - -**Description** - -Sets an exposure mode for the device. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| exposureMode | Target exposure mode, which is defined in [Camera_ExposureMode](#camera_exposuremode-1).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_SetFlashMode() - -``` -Camera_ErrorCode OH_CaptureSession_SetFlashMode(Camera_CaptureSession* session, Camera_FlashMode flashMode) -``` - -**Description** - -Sets a flash mode for the device. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| flashMode | Target flash mode, which is defined in [Camera_FlashMode](#camera_flashmode-1).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_SetFocusMode() - -``` -Camera_ErrorCode OH_CaptureSession_SetFocusMode(Camera_CaptureSession* session, Camera_FocusMode focusMode) -``` - -**Description** - -Sets a focus mode for the device. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| focusMode | Target focus mode, which is defined in [Camera_FocusMode](#camera_focusmode-1).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_SetFocusPoint() - -``` -Camera_ErrorCode OH_CaptureSession_SetFocusPoint(Camera_CaptureSession* session, Camera_Point focusPoint) -``` - -**Description** - -Sets a focal point for the device. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| focusPoint | Target focal point, which is defined in the [Camera_Point](_camera___point.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_SetMeteringPoint() - -``` -Camera_ErrorCode OH_CaptureSession_SetMeteringPoint(Camera_CaptureSession* session, Camera_Point point) -``` - -**Description** - -Sets the metering point, which is the center point of the metering rectangle. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| point | Target metering point, which is defined in the [Camera_Point](_camera___point.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_SetQualityPrioritization() - -``` -Camera_ErrorCode OH_CaptureSession_SetQualityPrioritization(Camera_CaptureSession* session, Camera_QualityPrioritization qualityPrioritization) -``` - -**Description** - -Sets the priority level for video recording quality. - -> **NOTE** -> -> The default value is **HIGH_QUALITY**. Switching to **POWER_BALANCE** will compromise video recording quality to achieve lower power usage. The extent of power conservation achieved varies depending on the platform. - -**Since**: 14 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| qualityPrioritization | Quality priority to set. The default value is [Camera_QualityPrioritization](#camera_qualityprioritization).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_SetSessionMode() - -``` -Camera_ErrorCode OH_CaptureSession_SetSessionMode(Camera_CaptureSession* session, Camera_SceneMode sceneMode) -``` - -**Description** - -Sets a session mode. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| sceneMode | Target scene mode, which is an enumerated value of [Camera_SceneMode](#camera_scenemode-1).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - -- **CAMERA_OPERATION_NOT_ALLOWED**: The operation is not allowed. - -- **CAMERA_SESSION_CONFIG_LOCKED**: The session configuration is locked. - - -### OH_CaptureSession_SetSmoothZoom() - -``` -Camera_ErrorCode OH_CaptureSession_SetSmoothZoom(Camera_CaptureSession* session, float targetZoom, Camera_SmoothZoomMode smoothZoomMode) -``` - -**Description** - -Sets smooth zoom. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| targetZoom | Target zoom ratio.| -| smoothZoomMode | [Camera_SmoothZoomMode](#camera_smoothzoommode) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_SetVideoStabilizationMode() - -``` -Camera_ErrorCode OH_CaptureSession_SetVideoStabilizationMode(Camera_CaptureSession* session, Camera_VideoStabilizationMode mode) -``` - -**Description** - -Sets a video stabilization mode for the device. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| mode | Target video stabilization mode, which is defined in the [Camera_VideoStabilizationMode](#camera_videostabilizationmode) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_SetZoomRatio() - -``` -Camera_ErrorCode OH_CaptureSession_SetZoomRatio(Camera_CaptureSession* session, float zoom) -``` - -**Description** - -Sets a zoom ratio for the device. - -**Since**: 11 - -**Parameters** - -| Name| Description | -| -------- |-----------------------------------------------------------| -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance. | -| zoom | Target zoom ratio.
It takes some time for the zoom ratio to take effect at the bottom layer. To obtain the correct zoom ratio, you need to wait for one to two frames.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - - -### OH_CaptureSession_Start() - -``` -Camera_ErrorCode OH_CaptureSession_Start(Camera_CaptureSession* session) -``` - -**Description** - -Starts a capture session. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CaptureSession_Stop() - -``` -Camera_ErrorCode OH_CaptureSession_Stop(Camera_CaptureSession* session) -``` - -**Description** - -Stops a capture session. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CaptureSession_UnregisterCallback() - -``` -Camera_ErrorCode OH_CaptureSession_UnregisterCallback(Camera_CaptureSession* session, CaptureSession_Callbacks* callback) -``` - -**Description** - -Unregisters the callback used to listen for capture session events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| callback | Pointer to the target callback, which is defined in the [CaptureSession_Callbacks](_capture_session___callbacks.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CaptureSession_UnregisterSmoothZoomInfoCallback() - -``` -Camera_ErrorCode OH_CaptureSession_UnregisterSmoothZoomInfoCallback(Camera_CaptureSession* session, OH_CaptureSession_OnSmoothZoomInfo smoothZoomInfoCallback) -``` - -**Description** - -Unregisters the callback used to listen for smooth zoom events. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| session | Pointer to the target [Camera_CaptureSession](#camera_capturesession) instance.| -| smoothZoomInfoCallback | Target callback, which is defined in [OH_CaptureSession_OnSmoothZoomInfo](#oh_capturesession_onsmoothzoominfo).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_MetadataOutput_RegisterCallback() - -``` -Camera_ErrorCode OH_MetadataOutput_RegisterCallback(Camera_MetadataOutput* metadataOutput, MetadataOutput_Callbacks* callback) -``` - -**Description** - -Registers a callback to listen for metadata output events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.| -| callback | Pointer to the target callback, which is defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_MetadataOutput_Release() - -``` -Camera_ErrorCode OH_MetadataOutput_Release(Camera_MetadataOutput* metadataOutput) -``` - -**Description** - -Releases a **MetadataOutput** instance. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_MetadataOutput_Start() - -``` -Camera_ErrorCode OH_MetadataOutput_Start(Camera_MetadataOutput* metadataOutput) -``` - -**Description** - -Starts metadata output. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_MetadataOutput_Stop() - -``` -Camera_ErrorCode OH_MetadataOutput_Stop(Camera_MetadataOutput* metadataOutput) -``` - -**Description** - -Stops metadata output. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_MetadataOutput_UnregisterCallback() - -``` -Camera_ErrorCode OH_MetadataOutput_UnregisterCallback(Camera_MetadataOutput* metadataOutput, MetadataOutput_Callbacks* callback) -``` - -**Description** - -Unregisters the callback used to listen for metadata output events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| metadataOutput | Pointer to the target [Camera_MetadataOutput](#camera_metadataoutput) instance.| -| callback | Pointer to the target callback, which is defined in the [MetadataOutput_Callbacks](_metadata_output___callbacks.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PhotoNative_GetMainImage() - -``` -Camera_ErrorCode OH_PhotoNative_GetMainImage(OH_PhotoNative* photo, OH_ImageNative** mainImage) -``` - -**Description** - -Obtains a full quality photo. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photo | Pointer to an [OH_PhotoNative](#oh_photonative) instance.| -| mainImage | Double pointer to the full quality photo, which is an [OH_ImageNative](../apis-image-kit/_image___native_module.md#oh_imagenative) object.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PhotoNative_Release() - -``` -Camera_ErrorCode OH_PhotoNative_Release(OH_PhotoNative* photo) -``` - -**Description** - -Releases a full quality photo. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photo | Pointer to an [OH_PhotoNative](#oh_photonative) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PhotoOutput_Capture() - -``` -Camera_ErrorCode OH_PhotoOutput_Capture(Camera_PhotoOutput* photoOutput) -``` - -**Description** - -Captures a photo. - -**OH_PhotoOutput_Capture()** must be called in prior to **OH_PreviewOutput_Release()**. Otherwise, photo capture fails. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_RUNNING**: The capture session is not running. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PhotoOutput_Capture_WithCaptureSetting() - -``` -Camera_ErrorCode OH_PhotoOutput_Capture_WithCaptureSetting(Camera_PhotoOutput* photoOutput, Camera_PhotoCaptureSetting setting) -``` - -**Description** - -Captures a photo with photographing parameters. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| setting | Photographing parameters, which are defined in the [Camera_PhotoCaptureSetting](_camera___photo_capture_setting.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_RUNNING**: The capture session is not running. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PhotoOutput_DeleteProfile() - -``` -Camera_ErrorCode OH_PhotoOutput_DeleteProfile(Camera_Profile* profile) -``` - -**Description** - -Deletes the profile of this **PhotoOutput** instance. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| profile | Pointer to a [Camera_Profile](_camera___profile.md) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PhotoOutput_EnableMovingPhoto() - -``` -Camera_ErrorCode OH_PhotoOutput_EnableMovingPhoto(Camera_PhotoOutput* photoOutput, bool enabled) -``` - -**Description** - -Enables moving photos. - -**Since**: 12 - -**Required permissions**: ohos.permission.MICROPHONE - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to a [Camera_PhotoOutput](#camera_photooutput) instance.| -| enabled | Whether to enable moving photos.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PhotoOutput_GetActiveProfile() - -``` -Camera_ErrorCode OH_PhotoOutput_GetActiveProfile(Camera_PhotoOutput* photoOutput, Camera_Profile** profile) -``` - -**Description** - -Obtains the profile of a **PhotoOutput** instance. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to a [Camera_PhotoOutput](#camera_photooutput) instance.| -| profile | Double pointer to the profile, which is defined in [Camera_Profile](_camera___profile.md), if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PhotoOutput_GetPhotoRotation() - -``` -Camera_ErrorCode OH_PhotoOutput_GetPhotoRotation(Camera_PhotoOutput* photoOutput, int devicedegree, Camera_ImageRotation* imageRotation) -``` - -**Description** - -Obtains the photo rotation angle. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to a [Camera_PhotoOutput] instance.| -| devicedegree | Rotation angle of the device.| -| imageRotation | Pointer to the preview rotation angle, which is specified by [Camera_ImageRotation](#camera_imagerotation-1).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PhotoOutput_IsMirrorSupported() - -``` -Camera_ErrorCode OH_PhotoOutput_IsMirrorSupported(Camera_PhotoOutput* photoOutput, bool* isSupported) -``` - -**Description** - -Checks whether mirroring is supported. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the [Camera_PhotoOutput](#camera_photooutput) instance, which is used to check whether mirroring is supported.| -| isSupported | Pointer to the result that specifies whether mirroring is supported.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PhotoOutput_EnableMirror() - -``` -Camera_ErrorCode OH_PhotoOutput_EnableMirror(Camera_PhotoOutput* photoOutput, bool enabled) -``` - -**Description** - -Enables dynamic photo capture. - -**Since**: 13 - -**Parameters** - -| Name | Description | -|-------------|---------------------------------------------------------| -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance, for which mirror photography will be enabled or disabled.| -| enabled | Whether to enable or disable dynamic photo capture. The value **true** means to enable dynamic photo capture, and **false** means to disable dynamic photo capture. | - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PhotoOutput_IsMovingPhotoSupported() - -``` -Camera_ErrorCode OH_PhotoOutput_IsMovingPhotoSupported(Camera_PhotoOutput* photoOutput, bool* isSupported) -``` - -**Description** - -Checks whether moving photos are supported. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to a [Camera_PhotoOutput](#camera_photooutput) instance.| -| isSupported | Pointer to the result indicating whether moving photos are supported.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PhotoOutput_RegisterCallback() - -``` -Camera_ErrorCode OH_PhotoOutput_RegisterCallback(Camera_PhotoOutput* photoOutput, PhotoOutput_Callbacks* callback) -``` - -**Description** - -Registers a callback to listen for photo output events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| callback | Pointer to the target callback, which is defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PhotoOutput_RegisterCaptureEndCallback() - -``` -Camera_ErrorCode OH_PhotoOutput_RegisterCaptureEndCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureEnd callback) -``` - -**Description** - -Registers a callback to listen for capture end events. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| callback | Target callback, which is defined in [OH_PhotoOutput_CaptureEnd](#oh_photooutput_captureend).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PhotoOutput_RegisterCaptureReadyCallback() - -``` -Camera_ErrorCode OH_PhotoOutput_RegisterCaptureReadyCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureReady callback) -``` - -**Description** - -Registers a callback to listen for camera ready events. When the callback is received, the next capture can be performed. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| callback | Target callback, which is defined in [OH_PhotoOutput_CaptureReady](#oh_photooutput_captureready).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PhotoOutput_RegisterCaptureStartWithInfoCallback() - -``` -Camera_ErrorCode OH_PhotoOutput_RegisterCaptureStartWithInfoCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureStartWithInfo callback) -``` - -**Description** - -Registers a callback to listen for capture start events. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| callback | Target callback, which is defined in [OH_PhotoOutput_CaptureStartWithInfo](#oh_photooutput_capturestartwithinfo).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PhotoOutput_RegisterEstimatedCaptureDurationCallback() - -``` -Camera_ErrorCode OH_PhotoOutput_RegisterEstimatedCaptureDurationCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_EstimatedCaptureDuration callback) -``` - -**Description** - -Registers a callback to listen for estimated capture duration events. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| callback | Target callback, which is defined in [OH_PhotoOutput_EstimatedCaptureDuration](#oh_photooutput_estimatedcaptureduration).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PhotoOutput_RegisterFrameShutterEndCallback() - -``` -Camera_ErrorCode OH_PhotoOutput_RegisterFrameShutterEndCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_OnFrameShutterEnd callback) -``` - -**Description** - -Registers a callback to listen for frame shutter end events. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| callback | Target callback, which is defined in [OH_PhotoOutput_OnFrameShutterEnd](#oh_photooutput_onframeshutterend).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PhotoOutput_RegisterPhotoAssetAvailableCallback() - -``` -Camera_ErrorCode OH_PhotoOutput_RegisterPhotoAssetAvailableCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_PhotoAssetAvailable callback) -``` - -**Description** - -Registers a callback to listen for photo asset availability events. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| callback | Target callback, which is defined in [OH_PhotoOutput_PhotoAssetAvailable](#oh_photooutput_photoassetavailable).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PhotoOutput_RegisterPhotoAvailableCallback() - -``` -Camera_ErrorCode OH_PhotoOutput_RegisterPhotoAvailableCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_PhotoAvailable callback) -``` - -**Description** - -Registers a callback to listen for photo availability events. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| callback | Target callback, which is defined in [OH_PhotoOutput_PhotoAvailable](#oh_photooutput_photoavailable).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PhotoOutput_Release() - -``` -Camera_ErrorCode OH_PhotoOutput_Release(Camera_PhotoOutput* photoOutput) -``` - -**Description** - -Releases a **PhotoOutput** instance. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PhotoOutput_UnregisterCallback() - -``` -Camera_ErrorCode OH_PhotoOutput_UnregisterCallback(Camera_PhotoOutput* photoOutput, PhotoOutput_Callbacks* callback) -``` - -**Description** - -Unregisters the callback used to listen for photo output events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| callback | Pointer to the target callback, which is defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PhotoOutput_UnregisterCaptureEndCallback() - -``` -Camera_ErrorCode OH_PhotoOutput_UnregisterCaptureEndCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureEnd callback) -``` - -**Description** - -Unregisters the callback used to listen for capture end events. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| callback | Target callback, which is defined in [OH_PhotoOutput_CaptureEnd](#oh_photooutput_captureend).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PhotoOutput_UnregisterCaptureReadyCallback() - -``` -Camera_ErrorCode OH_PhotoOutput_UnregisterCaptureReadyCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureReady callback) -``` - -**Description** - -Unregisters the callback used to listen for camera ready events. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| callback | Target callback, which is defined in [OH_PhotoOutput_CaptureReady](#oh_photooutput_captureready).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - - -### OH_PhotoOutput_UnregisterCaptureStartWithInfoCallback() - -``` -Camera_ErrorCode OH_PhotoOutput_UnregisterCaptureStartWithInfoCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_CaptureStartWithInfo callback) -``` - -**Description** - -Unregisters the callback used to listen for capture start events. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| callback | Target callback, which is defined in [OH_PhotoOutput_CaptureStartWithInfo](#oh_photooutput_capturestartwithinfo).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PhotoOutput_UnregisterEstimatedCaptureDurationCallback() - -``` -Camera_ErrorCode OH_PhotoOutput_UnregisterEstimatedCaptureDurationCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_EstimatedCaptureDuration callback) -``` - -**Description** - -Unregisters the callback used to listen for estimated capture duration events. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| callback | Target callback, which is defined in [OH_PhotoOutput_EstimatedCaptureDuration](#oh_photooutput_estimatedcaptureduration).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PhotoOutput_UnregisterFrameShutterEndCallback() - -``` -Camera_ErrorCode OH_PhotoOutput_UnregisterFrameShutterEndCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_OnFrameShutterEnd callback) -``` - -**Description** - -Unregisters the callback used to listen for frame shutter end events. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| callback | Target callback, which is defined in [OH_PhotoOutput_OnFrameShutterEnd](#oh_photooutput_onframeshutterend).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PhotoOutput_UnregisterPhotoAssetAvailableCallback() - -``` -Camera_ErrorCode OH_PhotoOutput_UnregisterPhotoAssetAvailableCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_PhotoAssetAvailable callback) -``` - -**Description** - -Unregisters the callback used to listen for photo asset availability events. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| callback | Target callback, which is defined in [OH_PhotoOutput_PhotoAssetAvailable](#oh_photooutput_photoassetavailable).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PhotoOutput_UnregisterPhotoAvailableCallback() - -``` -Camera_ErrorCode OH_PhotoOutput_UnregisterPhotoAvailableCallback(Camera_PhotoOutput* photoOutput, OH_PhotoOutput_PhotoAvailable callback) -``` - -**Description** - -Unregisters the callback used to listen for photo availability events. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| photoOutput | Pointer to the target [Camera_PhotoOutput](#camera_photooutput) instance.| -| callback | Target callback, which is defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PreviewOutput_DeleteFrameRates() - -``` -Camera_ErrorCode OH_PreviewOutput_DeleteFrameRates(Camera_PreviewOutput* previewOutput, Camera_FrameRateRange* frameRateRange) -``` - -**Description** - -Deletes the frame rate list. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| -| frameRateRange | Pointer to the list of frame rates, which are defined in [Camera_FrameRateRange](_camera___frame_rate_range.md).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PreviewOutput_DeleteProfile() - -``` -Camera_ErrorCode OH_PreviewOutput_DeleteProfile(Camera_Profile* profile) -``` - -**Description** - -Deletes the profile of this **PreviewOutput** instance. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| profile | Pointer to a [Camera_Profile](_camera___profile.md) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PreviewOutput_GetActiveFrameRate() - -``` -Camera_ErrorCode OH_PreviewOutput_GetActiveFrameRate(Camera_PreviewOutput* previewOutput, Camera_FrameRateRange* frameRateRange) -``` - -**Description** - -Obtains the active frame rates of a **PreviewOutput** instance. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| previewOutput | Pointer to a [Camera_PreviewOutput](#camera_previewoutput) instance.| -| frameRateRange | Pointer to the frame rates, which are defined in [Camera_FrameRateRange](_camera___frame_rate_range.md), if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PreviewOutput_GetActiveProfile() - -``` -Camera_ErrorCode OH_PreviewOutput_GetActiveProfile(Camera_PreviewOutput* previewOutput, Camera_Profile** profile) -``` - -**Description** - -Obtains the profile of a **PreviewOutput** instance. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| previewOutput | Pointer to a [Camera_PreviewOutput](#camera_previewoutput) instance.| -| profile | Double pointer to the profile, which is defined in [Camera_Profile](_camera___profile.md), if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PreviewOutput_GetPreviewRotation() - -``` -Camera_ErrorCode OH_PreviewOutput_GetPreviewRotation(Camera_PreviewOutput *previewOutput, int displayRotation, Camera_ImageRotation* imageRotation) -``` - -**Description** - -Obtains the preview rotation angle. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| previewOutput | Pointer to a [Camera_PreviewOutput](#camera_previewoutput) instance.| -| displayRotation | Current display rotation angle.| -| imageRotation | Pointer to the preview rotation angle, which is specified by [Camera_ImageRotation](#camera_imagerotation-1).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PreviewOutput_GetSupportedFrameRates() - -``` -Camera_ErrorCode OH_PreviewOutput_GetSupportedFrameRates(Camera_PreviewOutput* previewOutput, Camera_FrameRateRange** frameRateRange, uint32_t* size) -``` - -**Description** - -Obtains the list of frame rates supported by a **PreviewOutput** instance. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| previewOutput | Pointer to the [Camera_PreviewOutput](#camera_previewoutput) instance.| -| frameRateRange | Double pointer to the list of frame rates, which are defined in [Camera_FrameRateRange](_camera___frame_rate_range.md), if the function is successfully called.| -| size | Pointer to the size of the list of frame rates.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PreviewOutput_RegisterCallback() - -``` -Camera_ErrorCode OH_PreviewOutput_RegisterCallback(Camera_PreviewOutput* previewOutput, PreviewOutput_Callbacks* callback) -``` - -**Description** - -Registers a callback to listen for preview output events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| -| callback | Pointer to the target callback, which is defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PreviewOutput_Release() - -``` -Camera_ErrorCode OH_PreviewOutput_Release(Camera_PreviewOutput* previewOutput) -``` - -**Description** - -Releases a **PreviewOutput** instance. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PreviewOutput_SetFrameRate() - -``` -Camera_ErrorCode OH_PreviewOutput_SetFrameRate(Camera_PreviewOutput* previewOutput, int32_t minFps, int32_t maxFps) -``` - -**Description** - -Sets the frame rates for a **PreviewOutput** instance. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| -| minFps | Minimum frame rate.| -| maxFps | Maximum frame rate.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_PreviewOutput_SetPreviewRotation() - -``` -Camera_ErrorCode OH_PreviewOutput_SetPreviewRotation(Camera_PreviewOutput* previewOutput, Camera_ImageRotation* previewRotation, bool isDisplayLocked) -``` - -**Description** - -Sets the preview rotation angle. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| previewOutput | Pointer to a [Camera_PreviewOutput](#camera_previewoutput) instance.| -| previewRotation | Pointer to the preview rotation angle, which is specified by [Camera_ImageRotation](#camera_imagerotation-1).| -| isDisplayLocked | Whether the display is locked. The value **TRUE** means that the display is locked.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PreviewOutput_Start() - -``` -Camera_ErrorCode OH_PreviewOutput_Start(Camera_PreviewOutput* previewOutput) -``` - -**Description** - -Starts preview output. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PreviewOutput_Stop() - -``` -Camera_ErrorCode OH_PreviewOutput_Stop(Camera_PreviewOutput* previewOutput) -``` - -**Description** - -Stops preview output. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_PreviewOutput_UnregisterCallback() - -``` -Camera_ErrorCode OH_PreviewOutput_UnregisterCallback(Camera_PreviewOutput* previewOutput, PreviewOutput_Callbacks* callback) -``` - -**Description** - -Unregisters the callback used to listen for preview output events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| previewOutput | Pointer to the target [Camera_PreviewOutput](#camera_previewoutput) instance.| -| callback | Pointer to the target callback, which is defined in the [PreviewOutput_Callbacks](_preview_output___callbacks.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_VideoOutput_DeleteFrameRates() - -``` -Camera_ErrorCode OH_VideoOutput_DeleteFrameRates(Camera_VideoOutput* videoOutput, Camera_FrameRateRange* frameRateRange) -``` - -**Description** - -Deletes the frame rate list. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.| -| frameRateRange | Pointer to the list of frame rates, which are defined in [Camera_FrameRateRange](_camera___frame_rate_range.md).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_VideoOutput_DeleteProfile() - -``` -Camera_ErrorCode OH_VideoOutput_DeleteProfile(Camera_VideoProfile* profile) -``` - -**Description** - -Deletes the profile of this **VideoOutput** instance. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| profile | Pointer to the [Camera_VideoProfile](_camera___video_profile.md) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_VideoOutput_EnableMirror() - -``` -Camera_ErrorCode OH_VideoOutput_EnableMirror(Camera_VideoOutput* videoOutput, bool mirrorMode) -``` - -**Description** - -Enables or disables mirror mode for a video output. - -**Since**: 15 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance.| -| mirrorMode | The value **TRUE** means to enable mirror mode, and **FALSE** means to disable it.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_VideoOutput_GetActiveFrameRate() - -``` -Camera_ErrorCode OH_VideoOutput_GetActiveFrameRate(Camera_VideoOutput* videoOutput, Camera_FrameRateRange* frameRateRange) -``` - -**Description** - -Obtains the active frame rates of a **VideoOutput** instance. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance.| -| frameRateRange | Pointer to the frame rates, which are defined in [Camera_FrameRateRange](_camera___frame_rate_range.md), if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_VideoOutput_GetActiveProfile() - -``` -Camera_ErrorCode OH_VideoOutput_GetActiveProfile(Camera_VideoOutput* videoOutput, Camera_VideoProfile** profile) -``` - -**Description** - -Obtains the profile of a **VideoOutput** instance. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance.| -| profile | Double pointer to the profile, which is defined in [Camera_VideoProfile](_camera___video_profile.md), if the function is successfully called.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_VideoOutput_GetSupportedFrameRates() - -``` -Camera_ErrorCode OH_VideoOutput_GetSupportedFrameRates(Camera_VideoOutput* videoOutput, Camera_FrameRateRange** frameRateRange, uint32_t* size) -``` - -**Description** - -Obtains the list of frame rates supported by a **VideoOutput** instance. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance.| -| frameRateRange | Double pointer to the list of frame rates, which are defined in [Camera_FrameRateRange](_camera___frame_rate_range.md), if the function is successfully called.| -| size | Pointer to the size of the list of frame rates.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_VideoOutput_GetVideoRotation() - -``` -Camera_ErrorCode OH_VideoOutput_GetVideoRotation(Camera_VideoOutput* videoOutput, int deviceDegree, Camera_ImageRotation* imageRotation) -``` - -**Description** - -Obtains the rotation angle of a video output. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance.| -| deviceDegree | Clockwise rotation angle of the device relative to the natural direction (the charging port faces downward).| -| imageRotation | Pointer to the rotation angle of the video output.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_VideoOutput_IsMirrorSupported() - -``` -Camera_ErrorCode OH_VideoOutput_IsMirrorSupported(Camera_VideoOutput* videoOutput, bool* isSupported) -``` - -**Description** - -Checks whether a video output supports mirror mode. - -**Since**: 15 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| videoOutput | Pointer to the [Camera_VideoOutput](#camera_videooutput) instance.| -| isSupported | Pointer to the check result. The value **true** means that mirror mode is supported, and **false** means the opposite.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_VideoOutput_RegisterCallback() - -``` -Camera_ErrorCode OH_VideoOutput_RegisterCallback(Camera_VideoOutput* videoOutput, VideoOutput_Callbacks* callback) -``` - -**Description** - -Registers a callback to listen for video output events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.| -| callback | Pointer to the target callback, which is defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_VideoOutput_Release() - -``` -Camera_ErrorCode OH_VideoOutput_Release(Camera_VideoOutput* videoOutput) -``` - -**Description** - -Releases a **VideoOutput** instance. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_VideoOutput_SetFrameRate() - -``` -Camera_ErrorCode OH_VideoOutput_SetFrameRate(Camera_VideoOutput* videoOutput, int32_t minFps, int32_t maxFps) -``` - -**Description** - -Sets the frame rates for a **VideoOutput** instance. - -**Since**: 12 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.| -| minFps | Minimum frame rate. | -| maxFps | Maximum frame rate. | - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_VideoOutput_Start() - -``` -Camera_ErrorCode OH_VideoOutput_Start(Camera_VideoOutput* videoOutput) -``` - -**Description** - -Starts video output. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SESSION_NOT_CONFIG**: The capture session is not configured. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_VideoOutput_Stop() - -``` -Camera_ErrorCode OH_VideoOutput_Stop(Camera_VideoOutput* videoOutput) -``` - -**Description** - -Stops video output. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_VideoOutput_UnregisterCallback() - -``` -Camera_ErrorCode OH_VideoOutput_UnregisterCallback(Camera_VideoOutput* videoOutput, VideoOutput_Callbacks* callback) -``` - -**Description** - -Unregisters the callback used to listen for video output events. - -**Since**: 11 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| videoOutput | Pointer to the target [Camera_VideoOutput](#camera_videooutput) instance.| -| callback | Pointer to the target callback, which is defined in the [VideoOutput_Callbacks](_video_output___callbacks.md) struct.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - - -### OH_CameraDevice_GetHostDeviceName() - -``` -Camera_ErrorCode OH_CameraDevice_GetHostDeviceName(Camera_Device* camera, char** hostDeviceName) -``` - -**Description** - -Obtains the name of a remote device. - -**Since**: 15 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| camera | Pointer to a [Camera_Device](_camera___device.md) object.| -| hostDeviceName | Double pointer to the name of the remote device.| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful, and the remote device name is returned. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. - - -### OH_CameraDevice_GetHostDeviceType() - -``` -Camera_ErrorCode OH_CameraDevice_GetHostDeviceType(Camera_Device* camera, Camera_HostDeviceType* hostDeviceType) -``` - -**Description** - -Obtains the type of a remote device. - -**Since**: 15 - -**Parameters** - -| Name| Description| -| -------- | -------- | -| camera | Pointer to a [Camera_Device](_camera___device.md) object.| -| hostDeviceType | Double pointer to the remote device type, which is defined in [Camera_HostDeviceType](#camera_hostdevicetype).| - -**Returns** - -Returns one of the codes defined in [Camera_ErrorCode](#camera_errorcode-1): - -- **CAMERA_OK**: The operation is successful, and the remote device type is returned. - -- **CAMERA_INVALID_ARGUMENT**: A parameter is missing or the parameter type is incorrect. - -- **CAMERA_SERVICE_FATAL_ERROR**: A fatal error occurs in the camera service. diff --git a/en/application-dev/reference/apis-driverdevelopment-kit/_base_ddk.md b/en/application-dev/reference/apis-driverdevelopment-kit/_base_ddk.md index cea6abba570..ceded0972f1 100644 --- a/en/application-dev/reference/apis-driverdevelopment-kit/_base_ddk.md +++ b/en/application-dev/reference/apis-driverdevelopment-kit/_base_ddk.md @@ -14,7 +14,7 @@ Provides APIs for creating, mapping, unmapping, and destroying an **Ashmem** obj ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-driverdevelopment-kit/_s_c_s_i.md b/en/application-dev/reference/apis-driverdevelopment-kit/_s_c_s_i.md index 532a91125e5..67dadaa994a 100644 --- a/en/application-dev/reference/apis-driverdevelopment-kit/_s_c_s_i.md +++ b/en/application-dev/reference/apis-driverdevelopment-kit/_s_c_s_i.md @@ -13,7 +13,7 @@ The SCSI Peripheral DDK is a suite dedicated to SCSI device driver development a ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-driverdevelopment-kit/_serial_ddk.md b/en/application-dev/reference/apis-driverdevelopment-kit/_serial_ddk.md index 24e91ac87e5..df107b6b93a 100644 --- a/en/application-dev/reference/apis-driverdevelopment-kit/_serial_ddk.md +++ b/en/application-dev/reference/apis-driverdevelopment-kit/_serial_ddk.md @@ -14,7 +14,7 @@ Serial port communication is often used in industrial scenarios and some legacy ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-driverdevelopment-kit/_usb_ddk.md b/en/application-dev/reference/apis-driverdevelopment-kit/_usb_ddk.md index f07fcc58179..a55783910b7 100644 --- a/en/application-dev/reference/apis-driverdevelopment-kit/_usb_ddk.md +++ b/en/application-dev/reference/apis-driverdevelopment-kit/_usb_ddk.md @@ -14,7 +14,7 @@ Provides USB DDK APIs to open and close USB interfaces, perform non-isochronous ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-drm-kit/_media_key_session___callback.md b/en/application-dev/reference/apis-drm-kit/_media_key_session___callback.md index f35186ecc50..23ecea4f838 100644 --- a/en/application-dev/reference/apis-drm-kit/_media_key_session___callback.md +++ b/en/application-dev/reference/apis-drm-kit/_media_key_session___callback.md @@ -9,7 +9,7 @@ The MediaKeySession_Callback struct describes the callback used to listen for ev **Related module**: [Drm](_drm.md) -**Header file**: [native__mediakeysession_8h.md](native__mediakeysession_8h.md) +**Header file**: [native_mediakeysession.h](native__mediakeysession_8h.md) ## Summary diff --git a/en/application-dev/reference/apis-input-kit/input.md b/en/application-dev/reference/apis-input-kit/input.md index 81427410379..aa7ea436ccc 100644 --- a/en/application-dev/reference/apis-input-kit/input.md +++ b/en/application-dev/reference/apis-input-kit/input.md @@ -10,7 +10,7 @@ Provides C APIs for the multimodal input module. ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-localization-kit/resourcemanager.md b/en/application-dev/reference/apis-localization-kit/resourcemanager.md index 5a9fe7e061d..ceeed817d05 100644 --- a/en/application-dev/reference/apis-localization-kit/resourcemanager.md +++ b/en/application-dev/reference/apis-localization-kit/resourcemanager.md @@ -11,7 +11,7 @@ Provides C APIs for obtaining resources. ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-location-kit/_location.md b/en/application-dev/reference/apis-location-kit/_location.md index c7f54dbe746..7c12f2d431c 100644 --- a/en/application-dev/reference/apis-location-kit/_location.md +++ b/en/application-dev/reference/apis-location-kit/_location.md @@ -11,7 +11,7 @@ Provides APIs for querying the location switch status, and starting and stopping ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-network-kit/_net_connection.md b/en/application-dev/reference/apis-network-kit/_net_connection.md index b71177ea888..d7cf44b045b 100644 --- a/en/application-dev/reference/apis-network-kit/_net_connection.md +++ b/en/application-dev/reference/apis-network-kit/_net_connection.md @@ -11,7 +11,7 @@ Provides the C APIs of the network connection module for network management. ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-network-kit/netstack.md b/en/application-dev/reference/apis-network-kit/netstack.md index 2f61be2e6c8..428022f999f 100644 --- a/en/application-dev/reference/apis-network-kit/netstack.md +++ b/en/application-dev/reference/apis-network-kit/netstack.md @@ -11,7 +11,7 @@ Provides C APIs for the network protocol stack module. ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-neural-network-runtime-kit/_neural_network_runtime.md b/en/application-dev/reference/apis-neural-network-runtime-kit/_neural_network_runtime.md index 159d1b3bddf..b3899cf12cd 100644 --- a/en/application-dev/reference/apis-neural-network-runtime-kit/_neural_network_runtime.md +++ b/en/application-dev/reference/apis-neural-network-runtime-kit/_neural_network_runtime.md @@ -11,7 +11,7 @@ Provides APIs for accelerating the Neural Network Runtime (NNRt) model inference ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-performance-analysis-kit/_hi_app_event.md b/en/application-dev/reference/apis-performance-analysis-kit/_hi_app_event.md index 1e69443d626..ed6f5bb4e66 100644 --- a/en/application-dev/reference/apis-performance-analysis-kit/_hi_app_event.md +++ b/en/application-dev/reference/apis-performance-analysis-kit/_hi_app_event.md @@ -17,7 +17,7 @@ This function allows your application to record fault events, statistics events, ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-performance-analysis-kit/_hi_log.md b/en/application-dev/reference/apis-performance-analysis-kit/_hi_log.md index a015f1bb148..6aeb9be2fe5 100644 --- a/en/application-dev/reference/apis-performance-analysis-kit/_hi_log.md +++ b/en/application-dev/reference/apis-performance-analysis-kit/_hi_log.md @@ -15,7 +15,7 @@ For example, you can use logging functions to output logs of the specified log t ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-telephony-kit/ndk-apis-telephony-data.md b/en/application-dev/reference/apis-telephony-kit/ndk-apis-telephony-data.md index 60bd93cd37d..9c26f8c6d43 100644 --- a/en/application-dev/reference/apis-telephony-kit/ndk-apis-telephony-data.md +++ b/en/application-dev/reference/apis-telephony-kit/ndk-apis-telephony-data.md @@ -11,7 +11,7 @@ Provides C APIs for the cellular data module. ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-telephony-kit/ndk-apis-telephony-radio.md b/en/application-dev/reference/apis-telephony-kit/ndk-apis-telephony-radio.md index 1b881ab7fcd..ec8778b1679 100644 --- a/en/application-dev/reference/apis-telephony-kit/ndk-apis-telephony-radio.md +++ b/en/application-dev/reference/apis-telephony-kit/ndk-apis-telephony-radio.md @@ -11,7 +11,7 @@ Provides C APIs for the radio module. ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-universal-keystore-kit/_huks_key_api.md b/en/application-dev/reference/apis-universal-keystore-kit/_huks_key_api.md index f3b9e7a687d..00d1248a59d 100644 --- a/en/application-dev/reference/apis-universal-keystore-kit/_huks_key_api.md +++ b/en/application-dev/reference/apis-universal-keystore-kit/_huks_key_api.md @@ -13,7 +13,7 @@ Defines the OpenHarmony Universal KeyStore (HUKS) capabilities, including key ma ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-universal-keystore-kit/_huks_param_set_api.md b/en/application-dev/reference/apis-universal-keystore-kit/_huks_param_set_api.md index 423cd11a941..800f32d6760 100644 --- a/en/application-dev/reference/apis-universal-keystore-kit/_huks_param_set_api.md +++ b/en/application-dev/reference/apis-universal-keystore-kit/_huks_param_set_api.md @@ -13,7 +13,7 @@ Defines functions for parameter set lifecycle management, including initializing ## Summary -### File +### Files | Name| Description| | -------- | -------- | diff --git a/en/application-dev/reference/apis-universal-keystore-kit/_huks_type_api.md b/en/application-dev/reference/apis-universal-keystore-kit/_huks_type_api.md index 0cb5c1b938f..196e3389994 100644 --- a/en/application-dev/reference/apis-universal-keystore-kit/_huks_type_api.md +++ b/en/application-dev/reference/apis-universal-keystore-kit/_huks_type_api.md @@ -13,7 +13,7 @@ Defines the macros, enums, structs, and error codes used by OpenHarmony Universa ## Summary -### File +### Files | Name| Description| | -------- | -------- | -- Gitee