preview_output.h

Overview

The preview_output.h file declares the preview output concepts.

Library: libohcamera.so

System capability: SystemCapability.Multimedia.Camera.Core

Since: 11

Related module: OH_Camera

Summary

Structs

Name Description
PreviewOutput_Callbacks Defines the callbacks used for preview output.

Types

Name Description
Camera_PreviewOutput Defines the preview output object.
(*OH_PreviewOutput_OnFrameStart) (Camera_PreviewOutput *previewOutput) Defines the pointer to the callback defined in the PreviewOutput_Callbacks struct and used to report preview output frame start events.
(*OH_PreviewOutput_OnFrameEnd) (Camera_PreviewOutput *previewOutput, int32_t frameCount) Defines the pointer to the callback defined in the PreviewOutput_Callbacks struct and used to report preview output frame end events.
(*OH_PreviewOutput_OnError) (Camera_PreviewOutput *previewOutput, Camera_ErrorCode errorCode) Defines the pointer to the callback defined in the PreviewOutput_Callbacks struct and used to report preview output errors.
PreviewOutput_Callbacks Defines the callbacks used for preview output.

Functions

Name Description
OH_PreviewOutput_RegisterCallback (Camera_PreviewOutput *previewOutput, PreviewOutput_Callbacks *callback) Registers a callback to listen for preview output events.
OH_PreviewOutput_UnregisterCallback (Camera_PreviewOutput *previewOutput, PreviewOutput_Callbacks *callback) Unregisters the callback used to listen for preview output events.
OH_PreviewOutput_Start (Camera_PreviewOutput *previewOutput) Starts preview output.
OH_PreviewOutput_Stop (Camera_PreviewOutput *previewOutput) Stops preview output.
OH_PreviewOutput_Release (Camera_PreviewOutput *previewOutput) Releases a PreviewOutput instance.