加入收藏
举报
02-14 20:02
#0
文件名称:
BufferStream.md
所在目录:
Openharmony v1.0 / docs / api / api-SmartVision-Devices
文件大小:
6.90 KB
下载地址:
fenwii/OpenHarmony
   
免责声明:本网站仅提供指向 GitHub 上的文件的链接,所有文件的版权归原作者所有,本网站不对文件内容的合法性、准确性或安全性承担任何责任。
文本预览:
# BufferStream
## **Overview**
**Related Modules:**
[Format](Format.md)
**Description:**
Defines the function for reading stream data.
**Since:**
1.0
**Version:**
1.0
## **Summary**
## Data Fields















Variable Name


Description


ReadData )(void *handle, uint8_t *data, int32_t size, int32_t timeOutMs, DataFlags *flags)


int32_t(* 


Reads data from streams, save the data to the buffer pointed by data with the specified size, and returns the size of the read data and type.


GetReadableSize )(const void *handle)


int32_t(* 


Obtains the size of data that can be read.


handle


void * 



## **Details**
## **Field Documentation**
## GetReadableSize
```
int32_t(* BufferStream::GetReadableSize) (const void *[handle](BufferStream.md#ae2019a77aba73fa96d5a716155c7fb7f))
```
**Description:**
Obtains the size of data that can be read.
Before reading data, you should call this function to check whether there is data to read.
**Parameters:**









Name


Description


handle Indicates the pointer to the context handle.

**Returns:**
Returns the size of the read data.
## handle
```
void* BufferStream::handle
```
**Description:**
Context handle
## ReadData
```
int32_t(* BufferStream::ReadData) (void *[handle](BufferStream.md#ae2019a77aba73fa96d5a716155c7fb7f), uint8_t *data, int32_t size, int32_t timeOutMs, [DataFlags](Format.md#gacff079fdf8427c743f9197ea5be33a7f) *flags)
```
**Description:**
Reads data from streams, save the data to the buffer pointed by **data** with the specified **size**, and returns the size of the read data and type.
**Parameters:**





















Name


Description


handle Indicates the pointer to the context handle.
data Indicates the pointer to the buffer to store the read data. The memory is allocated by the caller.
size Indicates the size of the available buffer memory.
timeOutMs Indicates read operation wait time. The value 0 means no wait time.
flags Indicates the pointer to the type of the read data, see DataFlags.

**Returns:**
Returns the size of the read data.
点赞 回复
回帖
支持markdown部分语法 ?