The component wrapper utility functions can be used in place of common sequences of calls to the MMAL API in order to control a standalone component. It hides some of the complexity in using standalone components behind a fully synchronous interface.
◆ MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE
#define MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE 2 |
◆ MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY
#define MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY 4 |
◆ MMAL_WRAPPER_FLAG_WAIT
#define MMAL_WRAPPER_FLAG_WAIT 1 |
◆ MMAL_WRAPPER_CALLBACK_T
Definition of the callback used by a wrapper to signal back to the client that a buffer header is available either in the pool or in the output queue.
- Parameters
-
wrapper | Pointer to the wrapper |
Definition at line 52 of file mmal_component_wrapper.h.
◆ MMAL_WRAPPER_T
◆ mmal_wrapper_buffer_get_empty()
Wait for an empty buffer to be available on a port.
- Parameters
-
port | port to get an empty buffer from |
buffer | points to the retreived buffer on return |
flags | specify MMAL_WRAPPER_FLAG_WAIT for a blocking operation |
- Returns
- MMAL_SUCCESS on success.
◆ mmal_wrapper_buffer_get_full()
Wait for a full buffer to be available on a port.
- Parameters
-
port | port to get a full buffer from |
buffer | points to the retreived buffer on return |
flags | specify MMAL_WRAPPER_FLAG_WAIT for a blocking operation |
- Returns
- MMAL_SUCCESS on success.
◆ mmal_wrapper_cancel()
Cancel any ongoing blocking operation on a component wrapper.
- Parameters
-
wrapper | The wrapper on which to cancel operations. |
- Returns
- MMAL_SUCCESS on success.
◆ mmal_wrapper_create()
Create a wrapper around a component. The wrapper shall include a pool of buffer headers for each port. The pools will be suitable for the current format of its associated port.
- Parameters
-
wrapper | The address of a wrapper pointer that will be set to point to the created wrapper. |
name | The name of the component to create. |
- Returns
- MMAL_SUCCESS on success.
◆ mmal_wrapper_destroy()
Destroy a wrapper. Destroys a component wrapper and any resources it owns.
- Parameters
-
wrapper | The wrapper to be destroyed. |
- Returns
- MMAL_SUCCESS on success.
◆ mmal_wrapper_port_disable()
Disable a port on a component wrapper.
- Parameters
-
- Returns
- MMAL_SUCCESS on success.
◆ mmal_wrapper_port_enable()
Enable a port on a component wrapper.
- Parameters
-
port | port to enable |
flags | used to specify payload allocation flags for the pool |
- Returns
- MMAL_SUCCESS on success.