Go to the source code of this file.
|
typedef void(* | mir_connection_allocate_buffer_android) (MirConnection *connection, int width, int height, unsigned int hal_pixel_format, unsigned int gralloc_usage_flags, MirBufferCallback available_callback, void *available_context) |
| Allocate a MirBuffer usable by the android platform. More...
|
|
typedef struct MirExtensionAndroidBufferV1 | MirExtensionAndroidBufferV1 |
|
typedef MirBuffer *(* | MirConnectionAllocateBufferAndroidSync) (MirConnection *connection, int width, int height, unsigned int hal_pixel_format, unsigned int gralloc_usage_flags) |
| Allocate a MirBuffer usable by the android platform and wait for server response. More...
|
|
typedef bool(* | MirBufferIsAndroidCompatible) (MirBuffer const *buffer) |
| Check if a MirBuffer is suitable for android usage. More...
|
|
typedef void(* | MirBufferAndroidNativeHandle) (MirBuffer const *buffer, int *num_fds, int const **fds, int *num_data, int const **data) |
| Access the data from the native_handle_t of the MirBuffer. More...
|
|
typedef unsigned int(* | MirBufferAndroidHalPixelFormat) (MirBuffer const *buffer) |
| Access the HAL_PIXEL_FORMAT of the buffer. More...
|
|
typedef unsigned int(* | MirBufferAndroidGrallocUsage) (MirBuffer const *buffer) |
| Access the GRALLOC_USAGE_FLAGS of the buffer. More...
|
|
typedef unsigned int(* | MirBufferAndroidStride) (MirBuffer const *buffer) |
| Access the stride in bytes of the buffer. More...
|
|
typedef void(* | MirBufferAndroidIncRef) (MirBuffer *buffer) |
| Increase refcount of the ANativeWindowBuffer. More...
|
|
typedef void(* | MirBufferAndroidDecRef) (MirBuffer *buffer) |
| Decrease refcount of the ANativeWindowBuffer. More...
|
|
typedef struct MirExtensionAndroidBufferV2 | MirExtensionAndroidBufferV2 |
|
◆ mir_connection_allocate_buffer_android
typedef void(* mir_connection_allocate_buffer_android) (MirConnection *connection, int width, int height, unsigned int hal_pixel_format, unsigned int gralloc_usage_flags, MirBufferCallback available_callback, void *available_context) |
Allocate a MirBuffer usable by the android platform.
The callback will be called when the buffer is available for use. The buffer can be destroyed via mir_buffer_release().
- Note
- Not all GRALLOC_USAGE flags or HAL_PIXEL_FORMATs are available. Be sure to check mir_buffer_is_valid() on the returned buffer.
- Parameters
-
[in] | connection | The connection |
[in] | width | Requested buffer width |
[in] | height | Requested buffer height |
[in] | hal_pixel_format | The pixel format, one of Android's HAL_PIXEL_FORMAT*s |
[in] | gralloc_usage_flags | The GRALLOC_USAGE* flags for the buffer. |
[in] | available_callback | The callback called when the buffer is available |
[in] | available_context | The context for the available_callback |
◆ MirBufferAndroidDecRef
typedef void(* MirBufferAndroidDecRef) (MirBuffer *buffer) |
Decrease refcount of the ANativeWindowBuffer.
- Precondition
- The buffer is suitable for android use
- Parameters
-
◆ MirBufferAndroidGrallocUsage
typedef unsigned int(* MirBufferAndroidGrallocUsage) (MirBuffer const *buffer) |
Access the GRALLOC_USAGE_FLAGS of the buffer.
- Precondition
- The buffer is suitable for android use
- Parameters
-
- Returns
- The gralloc_usage of the buffer
◆ MirBufferAndroidHalPixelFormat
typedef unsigned int(* MirBufferAndroidHalPixelFormat) (MirBuffer const *buffer) |
Access the HAL_PIXEL_FORMAT of the buffer.
- Precondition
- The buffer is suitable for android use
- Parameters
-
- Returns
- The hal_pixel_format of the buffer
◆ MirBufferAndroidIncRef
typedef void(* MirBufferAndroidIncRef) (MirBuffer *buffer) |
Increase refcount of the ANativeWindowBuffer.
- Precondition
- The buffer is suitable for android use
- Parameters
-
◆ MirBufferAndroidNativeHandle
typedef void(* MirBufferAndroidNativeHandle) (MirBuffer const *buffer, int *num_fds, int const **fds, int *num_data, int const **data) |
Access the data from the native_handle_t of the MirBuffer.
- Warning
- Take care not to close any of the fds.
- Precondition
- The buffer is suitable for android use
- Parameters
-
[in] | buffer | The buffer |
[out] | num_fds | The number of fds |
[out] | fds | The fds |
[out] | num_data | The number of data |
[out] | data | The data |
◆ MirBufferAndroidStride
typedef unsigned int(* MirBufferAndroidStride) (MirBuffer const *buffer) |
Access the stride in bytes of the buffer.
- Precondition
- The buffer is suitable for android use
- Parameters
-
- Returns
- The stride of the buffer
◆ MirBufferIsAndroidCompatible
typedef bool(* MirBufferIsAndroidCompatible) (MirBuffer const *buffer) |
Check if a MirBuffer is suitable for android usage.
- Parameters
-
- Returns
- True if suitable, false if unsuitable
◆ MirConnectionAllocateBufferAndroidSync
typedef MirBuffer*(* MirConnectionAllocateBufferAndroidSync) (MirConnection *connection, int width, int height, unsigned int hal_pixel_format, unsigned int gralloc_usage_flags) |
Allocate a MirBuffer usable by the android platform and wait for server response.
The callback will be called when the buffer is available for use. The buffer can be destroyed via mir_buffer_release().
- Note
- Not all GRALLOC_USAGE flags or HAL_PIXEL_FORMATs are available. Be sure to check mir_buffer_is_valid() on the returned buffer.
- Parameters
-
[in] | connection | The connection |
[in] | width | Requested buffer width |
[in] | height | Requested buffer height |
[in] | hal_pixel_format | The pixel format, one of Android's HAL_PIXEL_FORMAT*s |
- Returns
- The buffer
◆ MirExtensionAndroidBufferV1
◆ MirExtensionAndroidBufferV2
Copyright © 2012-2021
Canonical Ltd.
Generated on Thu Jun 24 19:55:23 UTC 2021
This documentation is licensed under the GPL version 2 or 3.