My Project
mmal_component_private.h File Reference
#include "mmal.h"
#include "mmal_component.h"

Go to the source code of this file.

Classes

struct  MMAL_COMPONENT_PRIVATE_T
 

Macros

#define MMAL_VIDEO_DECODE   "video_decode"
 
#define MMAL_VIDEO_ENCODE   "video_encode"
 
#define MMAL_VIDEO_RENDER   "video_render"
 
#define MMAL_AUDIO_DECODE   "audio_decode"
 
#define MMAL_AUDIO_ENCODE   "audio_encode"
 
#define MMAL_AUDIO_RENDER   "audio_render"
 
#define MMAL_CAMERA   "camera"
 
#define MMAL_CONSTRUCTOR(func)   void func(void)
 
#define MMAL_DESTRUCTOR(func)   void func(void)
 

Typedefs

typedef MMAL_STATUS_T(* MMAL_COMPONENT_SUPPLIER_FUNCTION_T) (const char *name, MMAL_COMPONENT_T *component)
 

Functions

MMAL_STATUS_T mmal_component_parameter_set (MMAL_PORT_T *control_port, const MMAL_PARAMETER_HEADER_T *param)
 
MMAL_STATUS_T mmal_component_parameter_get (MMAL_PORT_T *control_port, MMAL_PARAMETER_HEADER_T *param)
 
MMAL_STATUS_T mmal_component_action_register (MMAL_COMPONENT_T *component, void(*pf_action)(MMAL_COMPONENT_T *))
 
MMAL_STATUS_T mmal_component_action_deregister (MMAL_COMPONENT_T *component)
 
MMAL_STATUS_T mmal_component_action_trigger (MMAL_COMPONENT_T *component)
 
MMAL_STATUS_T mmal_component_action_lock (MMAL_COMPONENT_T *component)
 
MMAL_STATUS_T mmal_component_action_unlock (MMAL_COMPONENT_T *component)
 
MMAL_STATUS_T mmal_component_create_with_constructor (const char *name, MMAL_STATUS_T(*constructor)(const char *name, MMAL_COMPONENT_T *), struct MMAL_COMPONENT_MODULE_T *constructor_private, MMAL_COMPONENT_T **component)
 
void mmal_component_supplier_register (const char *prefix, MMAL_COMPONENT_SUPPLIER_FUNCTION_T create_fn)
 

Macro Definition Documentation

◆ MMAL_AUDIO_DECODE

#define MMAL_AUDIO_DECODE   "audio_decode"

Definition at line 38 of file mmal_component_private.h.

◆ MMAL_AUDIO_ENCODE

#define MMAL_AUDIO_ENCODE   "audio_encode"

Definition at line 39 of file mmal_component_private.h.

◆ MMAL_AUDIO_RENDER

#define MMAL_AUDIO_RENDER   "audio_render"

Definition at line 40 of file mmal_component_private.h.

◆ MMAL_CAMERA

#define MMAL_CAMERA   "camera"

Definition at line 41 of file mmal_component_private.h.

◆ MMAL_CONSTRUCTOR

#define MMAL_CONSTRUCTOR (   func)    void func(void)

Definition at line 47 of file mmal_component_private.h.

◆ MMAL_DESTRUCTOR

#define MMAL_DESTRUCTOR (   func)    void func(void)

Definition at line 48 of file mmal_component_private.h.

◆ MMAL_VIDEO_DECODE

#define MMAL_VIDEO_DECODE   "video_decode"

Definition at line 35 of file mmal_component_private.h.

◆ MMAL_VIDEO_ENCODE

#define MMAL_VIDEO_ENCODE   "video_encode"

Definition at line 36 of file mmal_component_private.h.

◆ MMAL_VIDEO_RENDER

#define MMAL_VIDEO_RENDER   "video_render"

Definition at line 37 of file mmal_component_private.h.

Typedef Documentation

◆ MMAL_COMPONENT_SUPPLIER_FUNCTION_T

typedef MMAL_STATUS_T(* MMAL_COMPONENT_SUPPLIER_FUNCTION_T) (const char *name, MMAL_COMPONENT_T *component)

Prototype used by components to register themselves to the supplier.

Definition at line 139 of file mmal_component_private.h.

Function Documentation

◆ mmal_component_action_deregister()

MMAL_STATUS_T mmal_component_action_deregister ( MMAL_COMPONENT_T component)

De-registers the current action registered with the core.

Parameters
componentcomponent de-registering the action.
Returns
MMAL_SUCCESS or another status on error.

◆ mmal_component_action_lock()

MMAL_STATUS_T mmal_component_action_lock ( MMAL_COMPONENT_T component)

Lock an action to prevent it from running. Allows a component to make sure no action is running while the lock is taken.

Parameters
componentcomponent.
Returns
MMAL_SUCCESS or another status on error.

◆ mmal_component_action_register()

MMAL_STATUS_T mmal_component_action_register ( MMAL_COMPONENT_T component,
void(*)(MMAL_COMPONENT_T *)  pf_action 
)

Registers an action with the core. The MMAL core allows components to register an action which will be run from a separate thread context when the action is explicitly triggered by the component.

Parameters
componentcomponent registering the action.
actionaction to register.
Returns
MMAL_SUCCESS or another status on error.

◆ mmal_component_action_trigger()

MMAL_STATUS_T mmal_component_action_trigger ( MMAL_COMPONENT_T component)

Triggers a registered action. Explicitly triggers an action registered by a component.

Parameters
componentcomponent on which to trigger the action.
Returns
MMAL_SUCCESS or another status on error.

◆ mmal_component_action_unlock()

MMAL_STATUS_T mmal_component_action_unlock ( MMAL_COMPONENT_T component)

Unlock an action to allow it to run again.

Parameters
componentcomponent.
Returns
MMAL_SUCCESS or another status on error.

◆ mmal_component_create_with_constructor()

MMAL_STATUS_T mmal_component_create_with_constructor ( const char *  name,
MMAL_STATUS_T(*)(const char *name, MMAL_COMPONENT_T *)  constructor,
struct MMAL_COMPONENT_MODULE_T *  constructor_private,
MMAL_COMPONENT_T **  component 
)

Create an instance of a component given a constructor for the component. This allows the creation of client-side components which haven't been registered with the core. See mmal_component_create for the public interface used to create components.

Parameters
namename assigned to the component by the client
constructorconstructor function for the component
constructor_privateprivate data for the constructor
componentreturned component
Returns
MMAL_SUCCESS on success

◆ mmal_component_parameter_get()

MMAL_STATUS_T mmal_component_parameter_get ( MMAL_PORT_T control_port,
MMAL_PARAMETER_HEADER_T param 
)

Get a generic component control parameter.

Parameters
contorl_portcontrol port of component from which to get the parameter.
paramparameter to be retrieved.
Returns
MMAL_SUCCESS or another status on error.

◆ mmal_component_parameter_set()

MMAL_STATUS_T mmal_component_parameter_set ( MMAL_PORT_T control_port,
const MMAL_PARAMETER_HEADER_T param 
)

Set a generic component control parameter.

Parameters
control_portcontrol port of component on which to set the parameter.
paramparameter to be set.
Returns
MMAL_SUCCESS or another status on error.

◆ mmal_component_supplier_register()

void mmal_component_supplier_register ( const char *  prefix,
MMAL_COMPONENT_SUPPLIER_FUNCTION_T  create_fn 
)

Register a component with the mmal component supplier.

Parameters
prefixprefix for this supplier, e.g. "VC"
create_fnfunction which will instantiate a component given a name.