32#define PW_TYPE_INTERFACE_Link PW_TYPE_INFO_INTERFACE_BASE "Link"
34#define PW_LINK_PERM_MASK PW_PERM_R | PW_PERM_X
36#define PW_VERSION_LINK 3
39#ifndef PW_API_LINK_IMPL
40#define PW_API_LINK_IMPL static inline
64#define PW_LINK_CHANGE_MASK_STATE (1 << 0)
65#define PW_LINK_CHANGE_MASK_FORMAT (1 << 1)
66#define PW_LINK_CHANGE_MASK_PROPS (1 << 2)
67#define PW_LINK_CHANGE_MASK_ALL ((1 << 3)-1)
67#define PW_LINK_CHANGE_MASK_ALL ((1 << 3)-1) {
…};
87#define PW_LINK_EVENT_INFO 0
88#define PW_LINK_EVENT_NUM 1
92#define PW_VERSION_LINK_EVENTS 0
102#define PW_LINK_METHOD_ADD_LISTENER 0
103#define PW_LINK_METHOD_NUM 1
107#define PW_VERSION_LINK_METHODS 0
125 listener, events, data);
const char * pw_link_state_as_string(enum pw_link_state state)
Convert a pw_link_state to a readable string.
Definition introspect.c:45
struct pw_link_info * pw_link_info_merge(struct pw_link_info *info, const struct pw_link_info *update, bool reset)
Definition introspect.c:521
void pw_link_info_free(struct pw_link_info *info)
Definition introspect.c:567
struct pw_link_info * pw_link_info_update(struct pw_link_info *info, const struct pw_link_info *update)
Definition introspect.c:560
pw_link_state
The different link states.
Definition link.h:54
#define PW_API_LINK_IMPL
Definition link.h:49
PW_API_LINK_IMPL int pw_link_add_listener(struct pw_link *object, struct spa_hook *listener, const struct pw_link_events *events, void *data)
Definition link.h:137
@ PW_LINK_STATE_ACTIVE
the link is active
Definition link.h:61
@ PW_LINK_STATE_ERROR
the link is in error
Definition link.h:55
@ PW_LINK_STATE_UNLINKED
the link is unlinked
Definition link.h:56
@ PW_LINK_STATE_PAUSED
the link is paused
Definition link.h:60
@ PW_LINK_STATE_NEGOTIATING
the link is negotiating formats
Definition link.h:58
@ PW_LINK_STATE_INIT
the link is initialized
Definition link.h:57
@ PW_LINK_STATE_ALLOCATING
the link is allocating buffers
Definition link.h:59
#define spa_api_method_r(rtype, def, type, o, method, version,...)
Definition hook.h:291
Link events.
Definition link.h:106
uint32_t version
Definition link.h:109
void(* info)(void *data, const struct pw_link_info *info)
Notify link info.
Definition link.h:115
The link information.
Definition link.h:67
uint32_t output_port_id
output port id
Definition link.h:70
uint32_t id
id of the global
Definition link.h:68
uint64_t change_mask
bitfield of changed fields since last call
Definition link.h:81
uint32_t output_node_id
server side output node id
Definition link.h:69
enum pw_link_state state
the current state of the link
Definition link.h:82
const char * error
an error reason if state is error
Definition link.h:83
uint32_t input_node_id
server side input node id
Definition link.h:71
struct spa_pod * format
format over link
Definition link.h:84
uint32_t input_port_id
input port id
Definition link.h:72
Link methods.
Definition link.h:124
uint32_t version
Definition link.h:127
int(* add_listener)(void *object, struct spa_hook *listener, const struct pw_link_events *events, void *data)
Definition link.h:129
A hook, contains the structure with functions and the data passed to the functions.
Definition hook.h:427