harmony 鸿蒙image_receiver_mdk.h

  • 2023-10-30
  • 浏览 (507)

image_receiver_mdk.h

概述

声明从native层获取图片数据的方法。

起始版本:

10

相关模块:

Image

汇总

结构体

名称 描述
OhosImageReceiverInfo 定义ImageReceiver的相关信息。

类型定义

名称 描述
ImageReceiverNative 用于定义ImageReceiverNative数据类型名称。
(*OH_Image_Receiver_On_Callback) () 定义native层图片的回调方法。

函数

名称 描述
OH_Image_Receiver_CreateImageReceiver (napi_env env, struct OhosImageReceiverInfo info, napi_value *res) 创建应用层 ImageReceiver 对象。
OH_Image_Receiver_InitImageReceiverNative (napi_env env, napi_value source) 通过应用层ImageReceiver对象初始化native层ImageReceiverNative对象。
OH_Image_Receiver_GetReceivingSurfaceId (const ImageReceiverNative *native, char *id, size_t len) 通过ImageReceiverNative获取receiver的id。
OH_Image_Receiver_ReadLatestImage (const ImageReceiverNative *native, napi_value *image) 通过ImageReceiverNative获取最新的一张图片。
OH_Image_Receiver_ReadNextImage (const ImageReceiverNative *native, napi_value *image) 通过ImageReceiverNative获取下一张图片。
OH_Image_Receiver_On (const ImageReceiverNative *native, OH_Image_Receiver_On_Callback callback) 注册一个OH_Image_Receiver_On_Callback回调事件。每当接收新图片,该回调事件就会响应。
OH_Image_Receiver_GetSize (const ImageReceiverNative *native, struct OhosImageSize *size) 通过ImageReceiverNative获取ImageReceiver的大小。
OH_Image_Receiver_GetCapacity (const ImageReceiverNative *native, int32_t *capacity) 通过ImageReceiverNative获取ImageReceiver的容量。
OH_Image_Receiver_GetFormat (const ImageReceiverNative *native, int32_t *format) 通过ImageReceiverNative获取ImageReceiver的格式。
OH_Image_Receiver_Release (ImageReceiverNative *native) 释放native层 ImageReceiverNative 对象。

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Native API

harmony 鸿蒙AVCapability

harmony 鸿蒙AVDemuxer

harmony 鸿蒙AVMuxer

harmony 鸿蒙AVScreenCapture

harmony 鸿蒙AVSource

harmony 鸿蒙AudioDecoder

harmony 鸿蒙AudioEncoder

harmony 鸿蒙CodecBase

harmony 鸿蒙Core

0  赞