1e41f4b71Sopenharmony_ci# photo_output.h
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ci## Overview
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ciThe **photo_output.h** file declares the photo output concepts.
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ci**Library**: libohcamera.so
9e41f4b71Sopenharmony_ci
10e41f4b71Sopenharmony_ci**File to include**: <ohcamera/photo_output.h> 
11e41f4b71Sopenharmony_ci
12e41f4b71Sopenharmony_ci**System capability**: SystemCapability.Multimedia.Camera.Core
13e41f4b71Sopenharmony_ci
14e41f4b71Sopenharmony_ci**Since**: 11
15e41f4b71Sopenharmony_ci
16e41f4b71Sopenharmony_ci**Related module**: [OH_Camera](_o_h___camera.md)
17e41f4b71Sopenharmony_ci
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ci## Summary
20e41f4b71Sopenharmony_ci
21e41f4b71Sopenharmony_ci
22e41f4b71Sopenharmony_ci### Structs
23e41f4b71Sopenharmony_ci
24e41f4b71Sopenharmony_ci| Name| Description| 
25e41f4b71Sopenharmony_ci| -------- | -------- |
26e41f4b71Sopenharmony_ci| struct  [PhotoOutput_Callbacks](_photo_output___callbacks.md) | Describes the callbacks related to photo output.| 
27e41f4b71Sopenharmony_ci
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ci### Types
30e41f4b71Sopenharmony_ci
31e41f4b71Sopenharmony_ci| Name| Description| 
32e41f4b71Sopenharmony_ci| -------- | -------- |
33e41f4b71Sopenharmony_ci| typedef struct [Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) [Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) | Defines a struct for the photo output object.| 
34e41f4b71Sopenharmony_ci| typedef void(\* [OH_PhotoOutput_OnFrameStart](_o_h___camera.md#oh_photooutput_onframestart)) ([Camera_PhotoOutput](_o_h___camera.md#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.| 
35e41f4b71Sopenharmony_ci| typedef void(\* [OH_PhotoOutput_OnFrameShutter](_o_h___camera.md#oh_photooutput_onframeshutter)) ([Camera_PhotoOutput](_o_h___camera.md#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.| 
36e41f4b71Sopenharmony_ci| typedef void(\* [OH_PhotoOutput_OnFrameEnd](_o_h___camera.md#oh_photooutput_onframeend)) ([Camera_PhotoOutput](_o_h___camera.md#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.| 
37e41f4b71Sopenharmony_ci| typedef void(\* [OH_PhotoOutput_OnError](_o_h___camera.md#oh_photooutput_onerror)) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) errorCode) | Defines the callback defined in the [PhotoOutput_Callbacks](_photo_output___callbacks.md) struct and used to report photo output errors.| 
38e41f4b71Sopenharmony_ci| typedef void(\* [OH_PhotoOutput_CaptureEnd](_o_h___camera.md#oh_photooutput_captureend)) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, int32_t frameCount) | Defines the callback invoked when the capture ends.| 
39e41f4b71Sopenharmony_ci| typedef void(\* [OH_PhotoOutput_CaptureStartWithInfo](_o_h___camera.md#oh_photooutput_capturestartwithinfo)) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [Camera_CaptureStartInfo](_camera___capture_start_info.md) \*Info) | Defines the callback invoked when the capture starts.| 
40e41f4b71Sopenharmony_ci| typedef void(\* [OH_PhotoOutput_OnFrameShutterEnd](_o_h___camera.md#oh_photooutput_onframeshutterend)) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [Camera_FrameShutterInfo](_camera___frame_shutter_info.md) \*Info) | Defines the callback invoked when frame shutter ends.| 
41e41f4b71Sopenharmony_ci| typedef void(\* [OH_PhotoOutput_CaptureReady](_o_h___camera.md#oh_photooutput_captureready)) ([Camera_PhotoOutput](_o_h___camera.md#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.| 
42e41f4b71Sopenharmony_ci| typedef void(\* [OH_PhotoOutput_EstimatedCaptureDuration](_o_h___camera.md#oh_photooutput_estimatedcaptureduration)) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, int64_t duration) | Defines the callback for the estimated capture duration.| 
43e41f4b71Sopenharmony_ci| typedef void(\* [OH_PhotoOutput_PhotoAvailable](_o_h___camera.md#oh_photooutput_photoavailable)) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [OH_PhotoNative](_o_h___camera.md#oh_photonative) \*photo) | Defines the callback invoked when a high-resolution photo is available.| 
44e41f4b71Sopenharmony_ci| typedef void(\* [OH_PhotoOutput_PhotoAssetAvailable](_o_h___camera.md#oh_photooutput_photoassetavailable)) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, OH_MediaAsset \*photoAsset) | Defines the callback invoked when a photo asset is available.| 
45e41f4b71Sopenharmony_ci| typedef struct [PhotoOutput_Callbacks](_photo_output___callbacks.md) [PhotoOutput_Callbacks](_o_h___camera.md#photooutput_callbacks) | Defines a struct for the callbacks related to photo output.| 
46e41f4b71Sopenharmony_ci
47e41f4b71Sopenharmony_ci
48e41f4b71Sopenharmony_ci### Functions
49e41f4b71Sopenharmony_ci
50e41f4b71Sopenharmony_ci| Name| Description| 
51e41f4b71Sopenharmony_ci| -------- | -------- |
52e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_RegisterCallback](_o_h___camera.md#oh_photooutput_registercallback) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [PhotoOutput_Callbacks](_photo_output___callbacks.md) \*callback) | Registers a callback to listen for photo output events.| 
53e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_UnregisterCallback](_o_h___camera.md#oh_photooutput_unregistercallback) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [PhotoOutput_Callbacks](_photo_output___callbacks.md) \*callback) | Unregisters the callback used to listen for photo output events.| 
54e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_RegisterCaptureStartWithInfoCallback](_o_h___camera.md#oh_photooutput_registercapturestartwithinfocallback) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureStartWithInfo](_o_h___camera.md#oh_photooutput_capturestartwithinfo) callback) | Registers a callback to listen for capture start events.| 
55e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_UnregisterCaptureStartWithInfoCallback](_o_h___camera.md#oh_photooutput_unregistercapturestartwithinfocallback) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureStartWithInfo](_o_h___camera.md#oh_photooutput_capturestartwithinfo) callback) | Unregisters the callback used to listen for capture start events.| 
56e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_RegisterCaptureEndCallback](_o_h___camera.md#oh_photooutput_registercaptureendcallback) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureEnd](_o_h___camera.md#oh_photooutput_captureend) callback) | Registers a callback to listen for capture end events.| 
57e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_UnregisterCaptureEndCallback](_o_h___camera.md#oh_photooutput_unregistercaptureendcallback) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureEnd](_o_h___camera.md#oh_photooutput_captureend) callback) | Unregisters the callback used to listen for capture end events.| 
58e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_RegisterFrameShutterEndCallback](_o_h___camera.md#oh_photooutput_registerframeshutterendcallback) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [OH_PhotoOutput_OnFrameShutterEnd](_o_h___camera.md#oh_photooutput_onframeshutterend) callback) | Registers a callback to listen for frame shutter end events.| 
59e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_UnregisterFrameShutterEndCallback](_o_h___camera.md#oh_photooutput_unregisterframeshutterendcallback) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [OH_PhotoOutput_OnFrameShutterEnd](_o_h___camera.md#oh_photooutput_onframeshutterend) callback) | Unregisters the callback used to listen for frame shutter end events.| 
60e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_RegisterCaptureReadyCallback](_o_h___camera.md#oh_photooutput_registercapturereadycallback) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureReady](_o_h___camera.md#oh_photooutput_captureready) callback) | Registers a callback to listen for camera ready events. After the callback is received, the next capture can be performed.| 
61e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_UnregisterCaptureReadyCallback](_o_h___camera.md#oh_photooutput_unregistercapturereadycallback) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [OH_PhotoOutput_CaptureReady](_o_h___camera.md#oh_photooutput_captureready) callback) | Unregisters the callback used to listen for camera ready events.| 
62e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_RegisterEstimatedCaptureDurationCallback](_o_h___camera.md#oh_photooutput_registerestimatedcapturedurationcallback) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [OH_PhotoOutput_EstimatedCaptureDuration](_o_h___camera.md#oh_photooutput_estimatedcaptureduration) callback) | Registers a callback to listen for estimated capture duration events.| 
63e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_UnregisterEstimatedCaptureDurationCallback](_o_h___camera.md#oh_photooutput_unregisterestimatedcapturedurationcallback) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [OH_PhotoOutput_EstimatedCaptureDuration](_o_h___camera.md#oh_photooutput_estimatedcaptureduration) callback) | Unregisters the callback used to listen for estimated capture duration events.| 
64e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_RegisterPhotoAvailableCallback](_o_h___camera.md#oh_photooutput_registerphotoavailablecallback) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [OH_PhotoOutput_PhotoAvailable](_o_h___camera.md#oh_photooutput_photoavailable) callback) | Registers a callback to listen for photo availability events.| 
65e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_UnregisterPhotoAvailableCallback](_o_h___camera.md#oh_photooutput_unregisterphotoavailablecallback) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [OH_PhotoOutput_PhotoAvailable](_o_h___camera.md#oh_photooutput_photoavailable) callback) | Unregisters the callback used to listen for photo availability events.| 
66e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_RegisterPhotoAssetAvailableCallback](_o_h___camera.md#oh_photooutput_registerphotoassetavailablecallback) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [OH_PhotoOutput_PhotoAssetAvailable](_o_h___camera.md#oh_photooutput_photoassetavailable) callback) | Registers a callback to listen for photo asset availability events.| 
67e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_UnregisterPhotoAssetAvailableCallback](_o_h___camera.md#oh_photooutput_unregisterphotoassetavailablecallback) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [OH_PhotoOutput_PhotoAssetAvailable](_o_h___camera.md#oh_photooutput_photoassetavailable) callback) | Unregisters the callback used to listen for photo asset availability events.| 
68e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_Capture](_o_h___camera.md#oh_photooutput_capture) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput) | Captures a photo.| 
69e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_Capture_WithCaptureSetting](_o_h___camera.md#oh_photooutput_capture_withcapturesetting) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [Camera_PhotoCaptureSetting](_camera___photo_capture_setting.md) setting) | Captures a photo with capture parameters.| 
70e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_Release](_o_h___camera.md#oh_photooutput_release) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput) | Releases a **PhotoOutput** instance.| 
71e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_IsMirrorSupported](_o_h___camera.md#oh_photooutput_ismirrorsupported) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, bool \*isSupported) | Checks whether mirroring is supported.| 
72e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_GetActiveProfile](_o_h___camera.md#oh_photooutput_getactiveprofile) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, [Camera_Profile](_camera___profile.md) \*\*profile) | Obtains the profile of a **PhotoOutput** instance.| 
73e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_DeleteProfile](_o_h___camera.md#oh_photooutput_deleteprofile) ([Camera_Profile](_camera___profile.md) \*profile) | Deletes the profile of this **PhotoOutput** instance.| 
74e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_IsMovingPhotoSupported](_o_h___camera.md#oh_photooutput_ismovingphotosupported) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, bool \*isSupported) | Checks whether moving photos are supported.| 
75e41f4b71Sopenharmony_ci| [Camera_ErrorCode](_o_h___camera.md#camera_errorcode) [OH_PhotoOutput_EnableMovingPhoto](_o_h___camera.md#oh_photooutput_enablemovingphoto) ([Camera_PhotoOutput](_o_h___camera.md#camera_photooutput) \*photoOutput, bool enabled) | Enables moving photos.| 
76