PipeWire: PipeWire Port

PipeWire 0.3.34

Data Structures | Macros | Functions
PipeWire Port

## Data Structures
struct | pw_port_info
struct | pw_port_events
| Port events. More...
struct | pw_port_methods
| Port methods. More...

## Macros
#define | PW_TYPE_INTERFACE_Port PW_TYPE_INFO_INTERFACE_BASE "Port"
#define | PW_VERSION_PORT 3
#define | pw_direction spa_direction
| The direction of a port. More...
#define | PW_DIRECTION_INPUT SPA_DIRECTION_INPUT
#define | PW_DIRECTION_OUTPUT SPA_DIRECTION_OUTPUT
#define | PW_PORT_EVENT_INFO 0
#define | PW_PORT_EVENT_PARAM 1
#define | PW_PORT_EVENT_NUM 2
#define | PW_PORT_METHOD_ADD_LISTENER 0
#define | PW_PORT_METHOD_SUBSCRIBE_PARAMS 1
#define | PW_PORT_METHOD_ENUM_PARAMS 2
#define | PW_PORT_METHOD_NUM 3
#define | pw_port_method(o, method, version, ...)
#define | pw_port_add_listener(c, ...) pw_port_method(c,add_listener,0,__VA_ARGS__)
#define | pw_port_subscribe_params(c, ...) pw_port_method(c,subscribe_params,0,__VA_ARGS__)
#define | pw_port_enum_params(c, ...) pw_port_method(c,enum_params,0,__VA_ARGS__)

## Functions
const char * | pw_direction_as_string (enum pw_direction direction)
| Convert a pw_direction to a readable string. More...
struct pw_port_info * | pw_port_info_update (struct pw_port_info *info, const struct pw_port_info *update)
void | pw_port_info_free (struct pw_port_info *info)

## Detailed Description

## Macro Definition Documentation

## ◆ pw_direction

#define pw_direction spa_direction

The direction of a port.

## ◆ PW_DIRECTION_INPUT

#define PW_DIRECTION_INPUT SPA_DIRECTION_INPUT

## ◆ PW_DIRECTION_OUTPUT

#define PW_DIRECTION_OUTPUT SPA_DIRECTION_OUTPUT

## ◆ pw_port_add_listener

#define pw_port_add_listener | ( |  | c,
|  |  | ...
| ) |  | pw_port_method(c,add_listener,0,__VA_ARGS__)

## ◆ pw_port_enum_params

#define pw_port_enum_params | ( |  | c,
|  |  | ...
| ) |  | pw_port_method(c,enum_params,0,__VA_ARGS__)

## ◆ PW_PORT_EVENT_INFO

#define PW_PORT_EVENT_INFO 0

## ◆ PW_PORT_EVENT_NUM

#define PW_PORT_EVENT_NUM 2

## ◆ PW_PORT_EVENT_PARAM

#define PW_PORT_EVENT_PARAM 1

## ◆ pw_port_method

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

Value:
({ \
int _res = -ENOTSUP; \
spa_interface_call_res((struct spa_interface*)o, \
struct pw_port_methods, _res, \
method, version, ##__VA_ARGS__); \
_res; \
})
pw_port_methods
Port methods.
Definition: port.h:118
spa_interface
Definition: hook.h:146

## ◆ PW_PORT_METHOD_ADD_LISTENER

#define PW_PORT_METHOD_ADD_LISTENER 0

## ◆ PW_PORT_METHOD_ENUM_PARAMS

#define PW_PORT_METHOD_ENUM_PARAMS 2

## ◆ PW_PORT_METHOD_NUM

#define PW_PORT_METHOD_NUM 3

## ◆ PW_PORT_METHOD_SUBSCRIBE_PARAMS

#define PW_PORT_METHOD_SUBSCRIBE_PARAMS 1

## ◆ pw_port_subscribe_params

#define pw_port_subscribe_params | ( |  | c,
|  |  | ...
| ) |  | pw_port_method(c,subscribe_params,0,__VA_ARGS__)

## ◆ PW_TYPE_INTERFACE_Port

#define PW_TYPE_INTERFACE_Port PW_TYPE_INFO_INTERFACE_BASE "Port"

## ◆ PW_VERSION_PORT

#define PW_VERSION_PORT 3

## Function Documentation

## ◆ pw_direction_as_string()

const char* pw_direction_as_string | ( | enum pw_direction | direction | ) |

Convert a pw_direction to a readable string.

References PW_DIRECTION_INPUT, and PW_DIRECTION_OUTPUT.

Referenced by pw_context_create_port(), pw_impl_node_get_free_port_id(), and pw_impl_port_recalc_latency().

## ◆ pw_port_info_free()

void pw_port_info_free | ( | struct pw_port_info * | info | ) |

References pw_port_info::props.

## ◆ pw_port_info_update()

struct pw_port_info* pw_port_info_update | ( | struct pw_port_info * | info,
|  | const struct pw_port_info * | update
| ) |  |

References pw_port_info::change_mask, pw_port_info::direction, pw_port_info::id, pw_port_info::props, and PW_PORT_CHANGE_MASK_PROPS.