The BufferHandle struct describes the buffer handle, which is used to transfer and obtain buffer information. The handle contains the file descriptor, size, format, usage, virtual address, shared memory key, physical address, and custom data of the buffer.
Since: 8
Related module: NativeWindow
| Name | Description |
|---|---|
| int32_t fd | File descriptor of the buffer. The value -1 means that the buffer is not supported. |
| int32_t width | Width of the buffer memory, in pixels. |
| int32_t stride | Stride of the buffer memory, in bytes. |
| int32_t height | Height of the buffer memory, in pixels. |
| int32_t size | Size of the buffer memory, in bytes. |
| int32_t format | Format of the buffer memory. For details about available options, see OH_NativeBuffer_Format. |
| uint64_t usage | Usage of the buffer memory, represented as bit flags. For details about available options, see OH_NativeBuffer_Usage. |
| void * virAddr | Virtual address of the buffer memory. |
| int32_t key | Shared memory key of the buffer memory. |
| uint64_t phyAddr | Physical address of the buffer memory. |
| uint32_t reserveFds | Number of file descriptors for extra data. |
| uint32_t reserveInts | Number of integer values for extra data. |
| int32_t reserve [0] | Extra data. |
int32_t BufferHandle::fd
Description
File descriptor of the buffer. The value -1 means that the buffer is not supported.
int32_t BufferHandle::format
Description
Format of the buffer memory. For details about available options, see OH_NativeBuffer_Format.
uint32_t BufferHandle::reserveFds
Description
Number of file descriptors for extra data.
uint32_t BufferHandle::reserveInts
Description
Number of integer values for extra data.
uint64_t BufferHandle::usage
Description
Usage of the buffer memory, represented as bit flags. For details about available options, see OH_NativeBuffer_Usage.