Module ohos_sys::native_buffer
source · Available on crate feature
native_buffer only.Expand description
Native Buffer bindings
The native buffer module provides APIs that you can use to apply for, use, and release the shared memory, and query memory properties. The following scenario is common for native buffer development: Use the native buffer APIs to create an OH_NativeBuffer instance, obtain memory properties, and map the corresponding ION memory to the process address space.
Source:
Modules§
Structs§
- @brief OH_NativeBuffer config. \n Used to allocating new OH_NativeBuffer andquery parameters if existing ones.
- @brief Indicates the usage of a native buffer.
Functions§
- @brief Alloc a OH_NativeBuffer that matches the passed BufferRequestConfig. \n A new OH_NativeBuffer instance is created each time this function is called.
- @brief Return a config of the OH_NativeBuffer in the passed OHNativeBufferConfig struct.
- @brief Get the systen wide unique sequence number of the OH_NativeBuffer.
- @brief Provide direct cpu access to the OH_NativeBuffer in the process’s address space.
- @brief Adds the reference count of a OH_NativeBuffer.
- @brief Set the color space of the OH_NativeBuffer.
- @brief Remove direct cpu access ability of the OH_NativeBuffer in the process’s address space.
- @brief Decreases the reference count of a OH_NativeBuffer and, when the reference count reaches 0, \n destroys this OH_NativeBuffer.