Detailed Description
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.
Define Documentation
The pool for the port should allocate memory for the payloads
The port will use shared memory payloads
The operation should be blocking
Typedef Documentation
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 |
Forward type definition for a wrapper
Function Documentation
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.
Wait for an empty buffer to be available on a port
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.
Wait for a full buffer to be available on a port
Cancel any ongoing blocking operation on a component wrapper.
- Parameters:
-
wrapper | The wrapper on which to cancel operations. |
- Returns:
- MMAL_SUCCESS on success.
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.
Destroy a wrapper. Destroys a component wrapper and any resources it owns.
- Parameters:
-
wrapper | The wrapper to be destroyed. |
- Returns:
- MMAL_SUCCESS on success.
Disable a port on a component wrapper.
- Parameters:
-
- Returns:
- MMAL_SUCCESS on success.
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.