image_receiver_mdk.h

Overview

The image_receiver_mdk.h file declares the APIs for obtaining image data from the native layer.

Since

10

Related Modules

Image

Summary

Structs

Name Description
OhosImageReceiverInfo Defines the information about an image receiver.

Types

Name Description
ImageReceiverNative Defines the data type name of the image receiver at the native layer.
(*OH_Image_Receiver_On_Callback) () Defines the callbacks for the image interface at the native layer.

Functions

Name Description
OH_Image_Receiver_CreateImageReceiver (napi_env env, struct OhosImageReceiverInfo info, napi_value *res) Creates an ImageReceiver object at the application layer.
OH_Image_Receiver_InitImageReceiverNative (napi_env env, napi_value source) Initializes an ImageReceiverNative object through an ImageReceiver object.
OH_Image_Receiver_GetReceivingSurfaceId (const ImageReceiverNative *native, char *id, size_t len) Obtains the receiver ID through an ImageReceiverNative object.
OH_Image_Receiver_ReadLatestImage (const ImageReceiverNative *native, napi_value *image) Obtains the latest image through an ImageReceiverNative object.
OH_Image_Receiver_ReadNextImage (const ImageReceiverNative *native, napi_value *image) Obtains the next image through an ImageReceiverNative object.
OH_Image_Receiver_On (const ImageReceiverNative *native, OH_Image_Receiver_On_Callback callback) Registers an OH_Image_Receiver_On_Callback callback. This callback is triggered whenever a new image is received.
OH_Image_Receiver_GetSize (const ImageReceiverNative *native, struct OhosImageSize *size) Obtains the size of the image receiver through an ImageReceiverNative object.
OH_Image_Receiver_GetCapacity (const ImageReceiverNative *native, int32_t *capacity) Obtains the capacity of the image receiver through an ImageReceiverNative object.
OH_Image_Receiver_GetFormat (const ImageReceiverNative *native, int32_t *format) Obtains the format of the image receiver through an ImageReceiverNative object.
OH_Image_Receiver_Release (ImageReceiverNative *native) Releases an ImageReceiverNative object.