MMAL_3-15-2015
Components

Classes

struct  MMAL_COMPONENT_T
 

Typedefs

typedef struct MMAL_COMPONENT_PRIVATE_T MMAL_COMPONENT_PRIVATE_T
 
typedef struct MMAL_COMPONENT_T MMAL_COMPONENT_T
 

Functions

MMAL_STATUS_T mmal_component_create (const char *name, MMAL_COMPONENT_T **component)
 
void mmal_component_acquire (MMAL_COMPONENT_T *component)
 
MMAL_STATUS_T mmal_component_release (MMAL_COMPONENT_T *component)
 
MMAL_STATUS_T mmal_component_destroy (MMAL_COMPONENT_T *component)
 
MMAL_STATUS_T mmal_component_enable (MMAL_COMPONENT_T *component)
 
MMAL_STATUS_T mmal_component_disable (MMAL_COMPONENT_T *component)
 

Detailed Description

Definition of a MMAL component and its associated API. A component will always expose ports which it uses to send and receive data in the form of buffer headers (MMAL_BUFFER_HEADER_T)

Typedef Documentation

Definition of a component.

Function Documentation

void mmal_component_acquire ( MMAL_COMPONENT_T component)

Acquire a reference on a component. Acquiring a reference on a component will prevent a component from being destroyed until the acquired reference is released (by a call to mmal_component_destroy). References are internally counted so all acquired references need a matching call to release them.

Parameters
componentcomponent to acquire
MMAL_STATUS_T mmal_component_create ( const char *  name,
MMAL_COMPONENT_T **  component 
)

Create an instance of a component. The newly created component will expose ports to the client. All the exposed ports are disabled by default. Note that components are reference counted and creating a component automatically acquires a reference to it (released when mmal_component_destroy is called).

Parameters
namename of the component to create, e.g. "video_decode"
componentreturned component
Returns
MMAL_SUCCESS on success
MMAL_STATUS_T mmal_component_destroy ( MMAL_COMPONENT_T component)

Destroy a previously created component Release an acquired reference on a component. Only actually destroys the component when the last reference is being released.

Parameters
componentcomponent to destroy
Returns
MMAL_SUCCESS on success
MMAL_STATUS_T mmal_component_disable ( MMAL_COMPONENT_T component)

Disable processing on a component

Parameters
componentcomponent to disable
Returns
MMAL_SUCCESS on success
MMAL_STATUS_T mmal_component_enable ( MMAL_COMPONENT_T component)

Enable processing on a component

Parameters
componentcomponent to enable
Returns
MMAL_SUCCESS on success
MMAL_STATUS_T mmal_component_release ( MMAL_COMPONENT_T component)

Release a reference on a component Release an acquired reference on a component. Triggers the destruction of the component when the last reference is being released.

Note
This is in fact an alias of mmal_component_destroy which is added to make client code clearer.
Parameters
componentcomponent to release
Returns
MMAL_SUCCESS on success