Classes |
struct | MMAL_GRAPH_T |
Typedefs |
typedef struct MMAL_GRAPH_T | MMAL_GRAPH_T |
typedef void(* | MMAL_GRAPH_EVENT_CB )(MMAL_GRAPH_T *graph, MMAL_PORT_T *port, MMAL_BUFFER_HEADER_T *buffer, void *cb_data) |
Functions |
MMAL_STATUS_T | mmal_graph_create (MMAL_GRAPH_T **graph, unsigned int userdata_size) |
MMAL_STATUS_T | mmal_graph_add_component (MMAL_GRAPH_T *graph, MMAL_COMPONENT_T *component) |
MMAL_STATUS_T | mmal_graph_add_port (MMAL_GRAPH_T *graph, MMAL_PORT_T *port) |
MMAL_STATUS_T | mmal_graph_add_connection (MMAL_GRAPH_T *graph, MMAL_CONNECTION_T *connection) |
MMAL_STATUS_T | mmal_graph_new_component (MMAL_GRAPH_T *graph, const char *name, MMAL_COMPONENT_T **component) |
MMAL_STATUS_T | mmal_graph_new_connection (MMAL_GRAPH_T *graph, MMAL_PORT_T *out, MMAL_PORT_T *in, uint32_t flags, MMAL_CONNECTION_T **connection) |
MMAL_STATUS_T | mmal_graph_enable (MMAL_GRAPH_T *graph, MMAL_GRAPH_EVENT_CB cb, void *cb_data) |
MMAL_STATUS_T | mmal_graph_disable (MMAL_GRAPH_T *graph) |
MMAL_PORT_T * | mmal_graph_find_port (MMAL_GRAPH_T *graph, const char *name, MMAL_PORT_TYPE_T type, unsigned index) |
MMAL_STATUS_T | mmal_graph_build (MMAL_GRAPH_T *ctx, const char *name, MMAL_COMPONENT_T **component) |
MMAL_STATUS_T | mmal_graph_component_constructor (const char *name, MMAL_COMPONENT_T *component) |
MMAL_STATUS_T | mmal_graph_destroy (MMAL_GRAPH_T *ctx) |
Detailed Description
The graph utility functions allows one to easily create graphs of MMAL components.
Typedef Documentation
Definition of the callback used by a graph to send events to the client.
- Parameters:
-
graph | the graph sending the event |
port | the port which generated the event |
buffer | the buffer header containing the event data |
cb_data | data passed back to the client when the callback is invoked |
Structure describing a graph
Function Documentation
Add a component to a graph. Allows the client to add a component to the graph.
- Parameters:
-
graph | instance of the graph |
component | component to add to a graph |
- Returns:
- MMAL_SUCCESS on success
Add a connection to a graph. Allows the client to add an internal connection to a graph.
- Parameters:
-
graph | instance of the graph |
connection | connection to add to the graph |
- Returns:
- MMAL_SUCCESS on success
Add a port to a graph. Allows the client to add an input or output port to a graph. The given port will effectively become an end point for the graph.
- Parameters:
-
graph | instance of the graph |
port | port to add to the graph |
- Returns:
- MMAL_SUCCESS on success
Create an instance of a component from a graph. The newly created component will expose input and output ports to the client. Not that all the exposed ports will be in a disabled state by default.
- Parameters:
-
graph | graph to create the component from |
name | name of the component to create |
component | returned component |
- Returns:
- MMAL_SUCCESS on success
Component constructor for a graph. FIXME: private function
- Parameters:
-
name | name of the component to create |
component | component |
- Returns:
- MMAL_SUCCESS on success
Create an instance of a graph. The newly created graph will need to be populated by the client.
- Parameters:
-
graph | returned graph |
userdata_size | size to be allocated for the userdata field |
- Returns:
- MMAL_SUCCESS on success
Destroy a previously created graph
- Parameters:
-
- Returns:
- MMAL_SUCCESS on success
Enable the graph and start processing.
- Parameters:
-
graph | the graph to enable |
cb | the callback to invoke when an event occurs on any of the internal control ports |
cb_data | data passed back to the client when the callback is invoked |
- Returns:
- MMAL_SUCCESS on success
Find a port in the graph.
- Parameters:
-
graph | graph instance |
name | name of the component of interest |
type | type of port (in/out) |
index | which port index within the component |
- Returns:
- port, or NULL if not found
Create a new component and add it to a graph. Allows the client to create and add a component to the graph.
- Parameters:
-
graph | instance of the graph |
name | name of the component to create |
component | if not NULL, will contain a pointer to the created component |
- Returns:
- MMAL_SUCCESS on success
Create and add a connection to a graph. Allows the client to create and add an internal connection to a graph.
- Parameters:
-
graph | instance of the graph |
out | the output port to use for the connection |
in | the input port to use for the connection |
flags | the flags specifying which type of connection should be created |
connection | if not NULL, will contain a pointer to the created connection |
- Returns:
- MMAL_SUCCESS on success