My Project

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.

Macro Definition Documentation

◆ MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE

#define MMAL_WRAPPER_FLAG_PAYLOAD_ALLOCATE   2

The pool for the port should allocate memory for the payloads

Definition at line 98 of file mmal_component_wrapper.h.

◆ MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY

#define MMAL_WRAPPER_FLAG_PAYLOAD_USE_SHARED_MEMORY   4

The port will use shared memory payloads

Definition at line 100 of file mmal_component_wrapper.h.

◆ MMAL_WRAPPER_FLAG_WAIT

#define MMAL_WRAPPER_FLAG_WAIT   1

The operation should be blocking

Definition at line 96 of file mmal_component_wrapper.h.

Typedef Documentation

◆ MMAL_WRAPPER_CALLBACK_T

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

Definition at line 52 of file mmal_component_wrapper.h.

◆ MMAL_WRAPPER_T

Forward type definition for a wrapper

Definition at line 45 of file mmal_component_wrapper.h.

Function Documentation

◆ mmal_wrapper_buffer_get_empty()

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.

◆ mmal_wrapper_buffer_get_full()

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.

◆ mmal_wrapper_cancel()

MMAL_STATUS_T mmal_wrapper_cancel ( MMAL_WRAPPER_T wrapper)

Cancel any ongoing blocking operation on a component wrapper.

Parameters
wrapperThe wrapper on which to cancel operations.
Returns
MMAL_SUCCESS on success.

◆ mmal_wrapper_create()

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.

◆ mmal_wrapper_destroy()

MMAL_STATUS_T mmal_wrapper_destroy ( MMAL_WRAPPER_T wrapper)

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

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

◆ mmal_wrapper_port_disable()

MMAL_STATUS_T mmal_wrapper_port_disable ( MMAL_PORT_T port)

Disable a port on a component wrapper.

Parameters
portport to disable
Returns
MMAL_SUCCESS on success.

◆ mmal_wrapper_port_enable()

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.