• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# OH_ImageReceiverNative
2
3## Overview
4
5The OH_ImageReceiverNative struct describes the image receiver, which is encapsulated at the native layer. The struct cannot be directly operated. Instead, functions must be called to create and release the struct and operate the fields in the struct.
6
7To create an OH_ImageReceiverNative object, call [OH_ImageReceiverNative_Create](capi-image-receiver-native-h.md#oh_imagereceivernative_create).
8
9To release an OH_ImageReceiverNative object, call [OH_ImageReceiverNative_Release](capi-image-receiver-native-h.md#oh_imagereceivernative_release).
10
11The table below describes the content and operation mode of the OH_ImageReceiverNative struct.
12
13| Field Type| Field Name| Field Description|Operation Function| Function Description|
14| -------- | -------- | -------- | -------- | -------- |
15| uint64_t | surfaceId | Surface ID of the receiver.| [OH_ImageReceiverNative_GetReceivingSurfaceId](capi-image-receiver-native-h.md#oh_imagereceivernative_getreceivingsurfaceid) |Obtains the surface ID through an OH_ImageReceiverNative object.|
16| OH_ImageNative | image | Image at the native layer.| [OH_ImageReceiverNative_ReadLatestImage](capi-image-receiver-native-h.md#oh_imagereceivernative_readlatestimage) | Obtains the latest image through an OH_ImageReceiverNative object.|
17| OH_ImageNative | image | Image at the native layer.| [OH_ImageReceiverNative_ReadNextImage](capi-image-receiver-native-h.md#oh_imagereceivernative_readnextimage) |Obtains the next image through an OH_ImageReceiverNative object.|
18| OH_ImageReceiver_OnCallback | callback| Callback function of the image receiver.| [OH_ImageReceiverNative_On](capi-image-receiver-native-h.md#oh_imagereceivernative_on) |Registers an OH_ImageReceiver_OnCallback.|
19| OH_ImageReceiver_OnCallback | callback| Callback function of the image receiver.| [OH_ImageReceiverNative_Off](capi-image-receiver-native-h.md#oh_imagereceivernative_off) |Unregisters an OH_ImageReceiver_OnCallback.|
20| Image_Size | size | Size of an image receiver.| [OH_ImageReceiverNative_GetSize](capi-image-receiver-native-h.md#oh_imagereceivernative_getsize) |Obtains the size of an OH_ImageReceiverNative.|
21|int32_t | capacity| Capacity of an image receiver.| [OH_ImageReceiverNative_GetCapacity](capi-image-receiver-native-h.md#oh_imagereceivernative_getcapacity) |Obtains the capacity of an OH_ImageReceiverNative.|
22
23**Since**: 12
24
25**Related module**: [Image_NativeModule](capi-image-nativemodule.md)
26
27**Header file**: [image_receiver_native.h](capi-image-receiver-native-h.md)
28