pw_node Class Reference

PipeWire node class. More...

## Public Member Functions

const char * | pw_node_state_as_string (enum pw_node_state state)
| Convert a pw_node_state to a readable string. More...
struct pw_node * | pw_node_new (struct pw_core *core, const char *name, struct pw_properties *properties, size_t user_data_size)
| Create a new node. More...
SPA_EXPORT void | pw_node_destroy (struct pw_node *node)
| Destroy a node. More...
struct pw_port * | pw_node_get_free_port (struct pw_node *node, enum pw_direction direction)
| pw_node_get_free_port: More...
SPA_EXPORT int | pw_node_set_state (struct pw_node *node, enum pw_node_state state)
| Set th node state. More...
void | pw_node_update_state (struct pw_node *node, enum pw_node_state state, char *error)
| Update the node state. More...

## Detailed Description

PipeWire node class.

## Member Function Documentation

## pw_node_destroy()

SPA_EXPORT void pw_node_destroy | ( | struct pw_node * | node | ) |

Destroy a node.

Parameters

  node | a node to destroy

Remove node. This will stop the transfer on the node and free the resources allocated by node.

References pw_loop_invoke.

## pw_node_get_free_port()

struct pw_port * pw_node_get_free_port | ( | struct pw_node * | node,
|  | enum pw_direction | direction
| ) |  |

pw_node_get_free_port:

Parameters

  node | a pw_node
  direction | a pw_direction

Returns
  the new port or NULL on error

Find a new unused port in node with direction

References PW_DIRECTION_INPUT, PW_DIRECTION_OUTPUT, pw_map::pw_map_insert_new(), pw_port_add(), and pw_port_new().

## pw_node_new()

struct pw_node * pw_node_new | ( | struct pw_core * | core,
|  | const char * | name,
|  | struct pw_properties * | properties,
|  | size_t | user_data_size
| ) |  |

Create a new node.

Parameters

  core | the core
  name | node name
  properties | extra properties
  user_data_size | user data size

## pw_node_set_state()

SPA_EXPORT int pw_node_set_state | ( | struct pw_node * | node,
|  | enum pw_node_state | state
| ) |  |

Set th node state.

Parameters

  node | a pw_node
  state | a pw_node_state

Returns
  0 on success < 0 on error

Set the state of node to state.

References pw_node_state_as_string(), PW_NODE_STATE_CREATING, and PW_NODE_STATE_SUSPENDED.

## pw_node_state_as_string()

const char * pw_node_state_as_string | ( | enum pw_node_state | state | ) |

Convert a pw_node_state to a readable string.

## pw_node_update_state()

void pw_node_update_state | ( | struct pw_node * | node,
|  | enum pw_node_state | state,
|  | char * | error
| ) |  |

Update the node state.

Parameters

  node | a pw_node
  state | a pw_node_state
  error | error when state is PW_NODE_STATE_ERROR

Update the state of a node. This method is used from inside node itself.

References pw_node_state_as_string(), and PW_NODE_STATE_IDLE.

The documentation for this class was generated from the following files:

- node.h
- introspect.h
- node.c