30#define PW_TYPE_INTERFACE_Port PW_TYPE_INFO_INTERFACE_BASE "Port"
32#define PW_PORT_PERM_MASK PW_PERM_R|PW_PERM_X|PW_PERM_M
34#define PW_VERSION_PORT 3
37#ifndef PW_API_PORT_IMPL
38#define PW_API_PORT_IMPL static inline
42#define pw_direction spa_direction
43#define PW_DIRECTION_INPUT SPA_DIRECTION_INPUT
44#define PW_DIRECTION_OUTPUT SPA_DIRECTION_OUTPUT
52#define PW_PORT_CHANGE_MASK_PROPS (1 << 0)
53#define PW_PORT_CHANGE_MASK_PARAMS (1 << 1)
54#define PW_PORT_CHANGE_MASK_ALL ((1 << 2)-1)
72#define PW_PORT_EVENT_INFO 0
73#define PW_PORT_EVENT_PARAM 1
74#define PW_PORT_EVENT_NUM 2
78#define PW_VERSION_PORT_EVENTS 0
97 void (*param) (
void *data,
int seq,
98 uint32_t
id, uint32_t index, uint32_t next,
102#define PW_PORT_METHOD_ADD_LISTENER 0
103#define PW_PORT_METHOD_SUBSCRIBE_PARAMS 1
104#define PW_PORT_METHOD_ENUM_PARAMS 2
105#define PW_PORT_METHOD_NUM 3
109#define PW_VERSION_PORT_METHODS 0
144 uint32_t
id, uint32_t start, uint32_t num,
157 listener, events, data);
170 int seq, uint32_t
id, uint32_t start, uint32_t num,
175 seq,
id, start, num, filter);
uint32_t int seq
Definition core.h:432
uint32_t id
Definition core.h:432
PW_API_PORT_IMPL int pw_port_add_listener(struct pw_port *object, struct spa_hook *listener, const struct pw_port_events *events, void *data)
Definition port.h:173
const char * pw_direction_as_string(enum pw_direction direction)
Convert a pw_direction to a readable string.
Definition introspect.c:33
void pw_port_info_free(struct pw_port_info *info)
Definition introspect.c:307
#define PW_API_PORT_IMPL
Definition port.h:47
PW_API_PORT_IMPL int pw_port_subscribe_params(struct pw_port *object, uint32_t *ids, uint32_t n_ids)
Subscribe to parameter changes.
Definition port.h:184
struct pw_port_info * pw_port_info_update(struct pw_port_info *info, const struct pw_port_info *update)
Definition introspect.c:300
#define pw_direction
The direction of a port.
Definition port.h:51
PW_API_PORT_IMPL int pw_port_enum_params(struct pw_port *object, int seq, uint32_t id, uint32_t start, uint32_t num, const struct spa_pod *filter)
Enumerate port parameters.
Definition port.h:192
struct pw_port_info * pw_port_info_merge(struct pw_port_info *info, const struct pw_port_info *update, bool reset)
Definition introspect.c:243
#define spa_api_method_r(rtype, def, type, o, method, version,...)
Definition hook.h:291
Port events.
Definition port.h:94
void(* info)(void *data, const struct pw_port_info *info)
Notify port info.
Definition port.h:103
uint32_t version
Definition port.h:97
void(* param)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, const struct spa_pod *param)
Notify a port param.
Definition port.h:115
uint32_t n_params
number of items in params
Definition port.h:72
struct spa_param_info * params
parameters
Definition port.h:71
uint64_t change_mask
bitfield of changed fields since last call
Definition port.h:69
uint32_t id
id of the global
Definition port.h:61
enum pw_direction direction
port direction
Definition port.h:62
Port methods.
Definition port.h:130
int(* subscribe_params)(void *object, uint32_t *ids, uint32_t n_ids)
Subscribe to parameter changes.
Definition port.h:150
uint32_t version
Definition port.h:133
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:166
int(* add_listener)(void *object, struct spa_hook *listener, const struct pw_port_events *events, void *data)
Definition port.h:135
A hook, contains the structure with functions and the data passed to the functions.
Definition hook.h:427
information about a parameter
Definition param.h:51