Go to the documentation of this file.
25 #ifndef PIPEWIRE_PORT_H
26 #define PIPEWIRE_PORT_H
35 #include <spa/utils/defs.h>
36 #include <spa/utils/hook.h>
37 #include <spa/param/param.h>
41 #define PW_TYPE_INTERFACE_Port PW_TYPE_INFO_INTERFACE_BASE "Port"
43 #define PW_VERSION_PORT 3
47 #define pw_direction spa_direction
48 #define PW_DIRECTION_INPUT SPA_DIRECTION_INPUT
49 #define PW_DIRECTION_OUTPUT SPA_DIRECTION_OUTPUT
64 #define PW_PORT_CHANGE_MASK_PROPS (1 << 0)
65 #define PW_PORT_CHANGE_MASK_PARAMS (1 << 1)
66 #define PW_PORT_CHANGE_MASK_ALL ((1 << 2)-1)
80 #define PW_PORT_EVENT_INFO 0
81 #define PW_PORT_EVENT_PARAM 1
82 #define PW_PORT_EVENT_NUM 2
86 #define PW_VERSION_PORT_EVENTS 0
106 uint32_t
id, uint32_t index, uint32_t next,
107 const struct spa_pod *
param);
110 #define PW_PORT_METHOD_ADD_LISTENER 0
111 #define PW_PORT_METHOD_SUBSCRIBE_PARAMS 1
112 #define PW_PORT_METHOD_ENUM_PARAMS 2
113 #define PW_PORT_METHOD_NUM 3
117 #define PW_VERSION_PORT_METHODS 0
121 struct spa_hook *listener,
148 uint32_t
id, uint32_t start, uint32_t num,
149 const struct spa_pod *
filter);
152 #define pw_port_method(o,method,version,...) \
154 int _res = -ENOTSUP; \
155 spa_interface_call_res((struct spa_interface*)o, \
156 struct pw_port_methods, _res, \
157 method, version, ##__VA_ARGS__); \
161 #define pw_port_add_listener(c,...) pw_port_method(c,add_listener,0,__VA_ARGS__)
162 #define pw_port_subscribe_params(c,...) pw_port_method(c,subscribe_params,0,__VA_ARGS__)
163 #define pw_port_enum_params(c,...) pw_port_method(c,enum_params,0,__VA_ARGS__)
static uint32_t id
Definition: core.h:325
Port methods.
Definition: port.h:116
uint64_t change_mask
bitfield of changed fields since last call
Definition: port.h:67
enum pw_direction direction
port direction
Definition: port.h:63
uint32_t n_params
number of items in params
Definition: port.h:70
uint32_t version
Definition: port.h:87
void pw_port_info_free(struct pw_port_info *info)
Definition: introspect.c:285
Port events.
Definition: port.h:85
#define pw_direction
Definition: port.h:47
const char * pw_direction_as_string(enum pw_direction direction)
Convert a pw_direction to a readable string.
Definition: introspect.c:52
struct pw_port_info * pw_port_info_update(struct pw_port_info *info, const struct pw_port_info *update)
Definition: introspect.c:239
struct spa_dict * props
the properties of the port
Definition: port.h:68
uint32_t version
Definition: port.h:118
struct spa_param_info * params
parameters
Definition: port.h:69
void(* info)(void *object, const struct pw_port_info *info)
Notify port info.
Definition: port.h:93
int(* subscribe_params)(void *object, uint32_t *ids, uint32_t n_ids)
Subscribe to parameter changes.
Definition: port.h:133
uint32_t id
id of the global
Definition: port.h:62
int(* add_listener)(void *object, struct spa_hook *listener, const struct pw_port_events *events, void *data)
Definition: port.h:120
static uint32_t int seq
Definition: core.h:325
void(* param)(void *object, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param)
Notify a port param.
Definition: port.h:105
int(* enum_params)(void *object, int seq, uint32_t id, uint32_t start, uint32_t num, const struct spa_pod *filter)
Enumerate port parameters.
Definition: port.h:147