PipeWire: PipeWire Node

PipeWire 0.3.37

Data Structures | Macros | Enumerations | Functions
PipeWire Node

## Data Structures
struct | pw_node_info
| The node information. More...
struct | pw_node_events
| Node events. More...
struct | pw_node_methods
| Node methods. More...

## Macros
#define | PW_TYPE_INTERFACE_Node PW_TYPE_INFO_INTERFACE_BASE "Node"
#define | PW_VERSION_NODE 3
#define | PW_NODE_EVENT_INFO 0
#define | PW_NODE_EVENT_PARAM 1
#define | PW_NODE_EVENT_NUM 2
#define | PW_NODE_METHOD_ADD_LISTENER 0
#define | PW_NODE_METHOD_SUBSCRIBE_PARAMS 1
#define | PW_NODE_METHOD_ENUM_PARAMS 2
#define | PW_NODE_METHOD_SET_PARAM 3
#define | PW_NODE_METHOD_SEND_COMMAND 4
#define | PW_NODE_METHOD_NUM 5
#define | pw_node_method(o, method, version, ...)
#define | pw_node_add_listener(c, ...) pw_node_method(c,add_listener,0,__VA_ARGS__)
| Node. More...
#define | pw_node_subscribe_params(c, ...) pw_node_method(c,subscribe_params,0,__VA_ARGS__)
#define | pw_node_enum_params(c, ...) pw_node_method(c,enum_params,0,__VA_ARGS__)
#define | pw_node_set_param(c, ...) pw_node_method(c,set_param,0,__VA_ARGS__)
#define | pw_node_send_command(c, ...) pw_node_method(c,send_command,0,__VA_ARGS__)

## Enumerations
enum | pw_node_state { PW_NODE_STATE_ERROR = -1 , PW_NODE_STATE_CREATING = 0 , PW_NODE_STATE_SUSPENDED = 1 , PW_NODE_STATE_IDLE = 2 , PW_NODE_STATE_RUNNING = 3 }
| The different node states. More...

## 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_info * | pw_node_info_update (struct pw_node_info *info, const struct pw_node_info *update)
struct pw_node_info * | pw_node_info_merge (struct pw_node_info *info, const struct pw_node_info *update, bool reset)
void | pw_node_info_free (struct pw_node_info *info)

## Detailed Description

## Macro Definition Documentation

## ◆ pw_node_add_listener

#define pw_node_add_listener | ( |  | c,
|  |  | ...
| ) |  | pw_node_method(c,add_listener,0,__VA_ARGS__)

Node.

## ◆ pw_node_enum_params

#define pw_node_enum_params | ( |  | c,
|  |  | ...
| ) |  | pw_node_method(c,enum_params,0,__VA_ARGS__)

## ◆ PW_NODE_EVENT_INFO

#define PW_NODE_EVENT_INFO 0

## ◆ PW_NODE_EVENT_NUM

#define PW_NODE_EVENT_NUM 2

## ◆ PW_NODE_EVENT_PARAM

#define PW_NODE_EVENT_PARAM 1

## ◆ pw_node_method

#define pw_node_method | ( |  | o,
|  |  | method,
|  |  | version,
|  |  | ...
| ) |  |

Value:
({ \
int _res = -ENOTSUP; \
spa_interface_call_res((struct spa_interface*)o, \
struct pw_node_methods, _res, \
method, version, ##__VA_ARGS__); \
_res; \
})
pw_node_methods
Node methods.
Definition: pipewire/src/pipewire/node.h:139
spa_interface
Definition: hook.h:146

## ◆ PW_NODE_METHOD_ADD_LISTENER

#define PW_NODE_METHOD_ADD_LISTENER 0

## ◆ PW_NODE_METHOD_ENUM_PARAMS

#define PW_NODE_METHOD_ENUM_PARAMS 2

## ◆ PW_NODE_METHOD_NUM

#define PW_NODE_METHOD_NUM 5

## ◆ PW_NODE_METHOD_SEND_COMMAND

#define PW_NODE_METHOD_SEND_COMMAND 4

## ◆ PW_NODE_METHOD_SET_PARAM

#define PW_NODE_METHOD_SET_PARAM 3

## ◆ PW_NODE_METHOD_SUBSCRIBE_PARAMS

#define PW_NODE_METHOD_SUBSCRIBE_PARAMS 1

## ◆ pw_node_send_command

#define pw_node_send_command | ( |  | c,
|  |  | ...
| ) |  | pw_node_method(c,send_command,0,__VA_ARGS__)

## ◆ pw_node_set_param

#define pw_node_set_param | ( |  | c,
|  |  | ...
| ) |  | pw_node_method(c,set_param,0,__VA_ARGS__)

## ◆ pw_node_subscribe_params

#define pw_node_subscribe_params | ( |  | c,
|  |  | ...
| ) |  | pw_node_method(c,subscribe_params,0,__VA_ARGS__)

## ◆ PW_TYPE_INTERFACE_Node

#define PW_TYPE_INTERFACE_Node PW_TYPE_INFO_INTERFACE_BASE "Node"

## ◆ PW_VERSION_NODE

#define PW_VERSION_NODE 3

## Enumeration Type Documentation

## ◆ pw_node_state

enum pw_node_state

The different node states.

Enumerator
PW_NODE_STATE_ERROR | error state
PW_NODE_STATE_CREATING | the node is being created
PW_NODE_STATE_SUSPENDED | the node is suspended, the device might be closed
PW_NODE_STATE_IDLE | the node is running but there is no active port
PW_NODE_STATE_RUNNING | the node is running

## Function Documentation

## ◆ pw_node_info_free()

void pw_node_info_free | ( | struct pw_node_info * | info | ) |

References pw_node_info::error, and pw_node_info::props.

## ◆ pw_node_info_merge()

struct pw_node_info * pw_node_info_merge | ( | struct pw_node_info * | info,
|  | const struct pw_node_info * | update,
|  | bool | reset
| ) |  |

References pw_node_info::change_mask, pw_node_info::error, pw_node_info::id, pw_node_info::max_input_ports, pw_node_info::max_output_ports, pw_node_info::n_input_ports, pw_node_info::n_output_ports, pw_node_info::props, PW_NODE_CHANGE_MASK_INPUT_PORTS, PW_NODE_CHANGE_MASK_OUTPUT_PORTS, PW_NODE_CHANGE_MASK_PROPS, PW_NODE_CHANGE_MASK_STATE, and pw_node_info::state.

Referenced by pw_node_info_update().

## ◆ pw_node_info_update()

struct pw_node_info * pw_node_info_update | ( | struct pw_node_info * | info,
|  | const struct pw_node_info * | update
| ) |  |

References pw_node_info_merge().

## ◆ 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.

References PW_NODE_STATE_CREATING, PW_NODE_STATE_ERROR, PW_NODE_STATE_IDLE, PW_NODE_STATE_RUNNING, and PW_NODE_STATE_SUSPENDED.

Referenced by pw_impl_node_set_state().