My Project
Classes | Typedefs | Functions
utility
Utility functions

Classes

struct  MMAL_WRAPPER_T

Typedefs

typedef struct MMAL_WRAPPER_T MMAL_WRAPPER_T
typedef void(* MMAL_WRAPPER_CALLBACK_T )(MMAL_WRAPPER_T *wrapper)

Functions

MMAL_STATUS_T mmal_wrapper_create (MMAL_WRAPPER_T **wrapper, const char *name)
MMAL_STATUS_T mmal_wrapper_port_enable (MMAL_PORT_T *port, uint32_t flags)
MMAL_STATUS_T mmal_wrapper_port_disable (MMAL_PORT_T *port)
MMAL_STATUS_T mmal_wrapper_buffer_get_empty (MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T **buffer, uint32_t flags)
MMAL_STATUS_T mmal_wrapper_buffer_get_full (MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T **buffer, uint32_t flags)
MMAL_STATUS_T mmal_wrapper_cancel (MMAL_WRAPPER_T *wrapper)
MMAL_STATUS_T mmal_wrapper_destroy (MMAL_WRAPPER_T *wrapper)

MMAL wrapper flags

#define MMAL_WRAPPER_FLAG_WAIT   1
#define MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE   2
#define MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY   4

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

#define MMAL_WRAPPER_FLAG_WAIT   1

The operation should be blocking


Typedef Documentation

typedef void(* MMAL_WRAPPER_CALLBACK_T)(MMAL_WRAPPER_T *wrapper)

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:
wrapperPointer to the wrapper

Forward type definition for a wrapper


Function Documentation

MMAL_STATUS_T mmal_wrapper_buffer_get_empty ( MMAL_PORT_T port,
MMAL_BUFFER_HEADER_T **  buffer,
uint32_t  flags 
)

Wait for an empty buffer to be available on a port.

Parameters:
portport to get an empty buffer from
bufferpoints to the retreived buffer on return
flagsspecify MMAL_WRAPPER_FLAG_WAIT for a blocking operation
Returns:
MMAL_SUCCESS on success.

Wait for an empty buffer to be available on a port

MMAL_STATUS_T mmal_wrapper_buffer_get_full ( MMAL_PORT_T port,
MMAL_BUFFER_HEADER_T **  buffer,
uint32_t  flags 
)

Wait for a full buffer to be available on a port.

Parameters:
portport to get a full buffer from
bufferpoints to the retreived buffer on return
flagsspecify 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:
wrapperThe wrapper on which to cancel operations.
Returns:
MMAL_SUCCESS on success.
MMAL_STATUS_T mmal_wrapper_create ( MMAL_WRAPPER_T **  wrapper,
const char *  name 
)

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:
wrapperThe address of a wrapper pointer that will be set to point to the created wrapper.
nameThe name of the component to create.
Returns:
MMAL_SUCCESS on success.

Destroy a wrapper. Destroys a component wrapper and any resources it owns.

Parameters:
wrapperThe wrapper to be destroyed.
Returns:
MMAL_SUCCESS on success.

Disable a port on a component wrapper.

Parameters:
portport to disable
Returns:
MMAL_SUCCESS on success.
MMAL_STATUS_T mmal_wrapper_port_enable ( MMAL_PORT_T port,
uint32_t  flags 
)

Enable a port on a component wrapper.

Parameters:
portport to enable
flagsused to specify payload allocation flags for the pool
Returns:
MMAL_SUCCESS on success.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines