photo_output.h

Overview

The photo_output.h file declares the photo output concepts.

Library: libohcamera.so

System capability: SystemCapability.Multimedia.Camera.Core

Since: 11

Related module: OH_Camera

Summary

Structs

Name Description
struct  PhotoOutput_Callbacks Defines the callbacks used for photo output.

Types

Name Description
typedef struct Camera_PhotoOutput Camera_PhotoOutput Defines the photo output object.
typedef void(* OH_PhotoOutput_OnFrameStart) (Camera_PhotoOutput *photoOutput) Defines the pointer to the callback defined in the PhotoOutput_Callbacks struct and used to report photo output frame start events.
typedef void(* OH_PhotoOutput_OnFrameShutter) (Camera_PhotoOutput *photoOutput, Camera_FrameShutterInfo *info) Defines the pointer to the callback defined in the PhotoOutput_Callbacks struct and used to report frame shutter events.
typedef void(* OH_PhotoOutput_OnFrameEnd) (Camera_PhotoOutput *photoOutput, int32_t frameCount) Defines the pointer to the callback defined in the PhotoOutput_Callbacks struct and used to report photo output frame end events.
typedef void(* OH_PhotoOutput_OnError) (Camera_PhotoOutput *photoOutput, Camera_ErrorCode errorCode) Defines the pointer to the callback defined in the PhotoOutput_Callbacks struct and used to report photo output errors.
typedef struct PhotoOutput_Callbacks PhotoOutput_Callbacks Defines the callbacks used for photo output.

Functions

Name Description
Camera_ErrorCode OH_PhotoOutput_RegisterCallback (Camera_PhotoOutput *photoOutput, PhotoOutput_Callbacks *callback) Registers a callback to listen for photo output events.
Camera_ErrorCode OH_PhotoOutput_UnregisterCallback (Camera_PhotoOutput *photoOutput, PhotoOutput_Callbacks *callback) Unregisters the callback used to listen for photo output events.
Camera_ErrorCode OH_PhotoOutput_Capture (Camera_PhotoOutput *photoOutput) Captures a photo.
Camera_ErrorCode OH_PhotoOutput_Capture_WithCaptureSetting (Camera_PhotoOutput *photoOutput, Camera_PhotoCaptureSetting setting) Captures a photo with the photographing parameters.
Camera_ErrorCode OH_PhotoOutput_Release (Camera_PhotoOutput *photoOutput) Releases a PhotoOutput instance.
Camera_ErrorCode OH_PhotoOutput_IsMirrorSupported (Camera_PhotoOutput *photoOutput, bool *isSupported) Checks whether mirroring is supported.