|
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_component_topology (MMAL_GRAPH_T *graph, MMAL_COMPONENT_T *component, MMAL_GRAPH_TOPOLOGY_T topology, int8_t *input, unsigned int input_num, int8_t *output, unsigned int output_num) |
|
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) |
|
The graph utility functions allows one to easily create graphs of MMAL components.
◆ MMAL_GRAPH_EVENT_CB
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 |
Definition at line 181 of file mmal_graph.h.
◆ MMAL_GRAPH_T
Structure describing a graph
◆ MMAL_GRAPH_TOPOLOGY_T
List of topology types
Enumerator |
---|
MMAL_GRAPH_TOPOLOGY_ALL | All input ports and output ports are linked
|
MMAL_GRAPH_TOPOLOGY_STRAIGHT | Input ports and output ports of the same index are linked
|
MMAL_GRAPH_TOPOLOGY_CUSTOM | Custom defined topology
|
MMAL_GRAPH_TOPOLOGY_MAX | |
Definition at line 45 of file mmal_graph.h.
◆ mmal_graph_add_component()
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
◆ mmal_graph_add_connection()
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
◆ mmal_graph_add_port()
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
◆ mmal_graph_build()
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
◆ mmal_graph_component_constructor()
Component constructor for a graph. FIXME: private function
- Parameters
-
name | name of the component to create |
component | component |
- Returns
- MMAL_SUCCESS on success
◆ mmal_graph_component_topology()
Describe the topology of the ports of a component. Allows the client to describe the topology of a component. This information is used by the graph to choose which action to perform when enabling / disabling / committing / flushing a port exposed by the graph. Note that by default the topology of a component is set to MMAL_GRAPH_TOPOLOGY_ALL.
- Parameters
-
graph | instance of the graph |
component | component to describe |
topology | type of topology used by this component |
input | output index (or -1 if sink) linked to each input port |
input_num | number of indexes in the input list |
output | input index (or -1 if source) linked to each output port |
output_num | number of indexes in the output list |
- Returns
- MMAL_SUCCESS on success
◆ mmal_graph_create()
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
◆ mmal_graph_destroy()
Destroy a previously created graph
- Parameters
-
- Returns
- MMAL_SUCCESS on success
◆ mmal_graph_disable()
◆ mmal_graph_enable()
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
◆ mmal_graph_find_port()
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
◆ mmal_graph_new_component()
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
◆ mmal_graph_new_connection()
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