25 #ifndef PIPEWIRE_LINK_H 26 #define PIPEWIRE_LINK_H 32 #include <spa/utils/defs.h> 33 #include <spa/utils/hook.h> 37 #define PW_TYPE_INTERFACE_Link PW_TYPE_INFO_INTERFACE_BASE "Link" 39 #define PW_VERSION_LINK 3 61 #define PW_LINK_CHANGE_MASK_STATE (1 << 0) 62 #define PW_LINK_CHANGE_MASK_FORMAT (1 << 1) 63 #define PW_LINK_CHANGE_MASK_PROPS (1 << 2) 64 #define PW_LINK_CHANGE_MASK_ALL ((1 << 3)-1) 80 #define PW_LINK_EVENT_INFO 0 81 #define PW_LINK_EVENT_NUM 1 85 #define PW_VERSION_LINK_EVENTS 0 95 #define PW_LINK_METHOD_ADD_LISTENER 0 96 #define PW_LINK_METHOD_NUM 1 100 #define PW_VERSION_LINK_METHODS 0 103 int (*add_listener) (
void *object,
104 struct spa_hook *listener,
109 #define pw_link_method(o,method,version,...) \ 111 int _res = -ENOTSUP; \ 112 spa_interface_call_res((struct spa_interface*)o, \ 113 struct pw_link_methods, _res, \ 114 method, version, ##__VA_ARGS__); \ 118 #define pw_link_add_listener(c,...) pw_link_method(c,add_listener,0,__VA_ARGS__) Link events.
Definition: link.h:84
enum pw_link_state state
the current state of the link
Definition: link.h:66
the link is paused
Definition: link.h:49
void(* info)(void *object, const struct pw_link_info *info)
Notify link info.
Definition: link.h:92
pw_link_state
The different link states.
Definition: link.h:43
uint32_t output_port_id
output port id
Definition: link.h:58
the link is in error
Definition: link.h:44
struct spa_pod * format
format over link
Definition: link.h:68
uint64_t change_mask
bitfield of changed fields since last call
Definition: link.h:65
uint32_t id
id of the global
Definition: link.h:56
the link is negotiating formats
Definition: link.h:47
the link is allocating buffers
Definition: link.h:48
uint32_t version
Definition: link.h:86
const char * error
an error reason if state is error
Definition: link.h:67
Link methods.
Definition: link.h:99
the link is unlinked
Definition: link.h:45
the link is initialized
Definition: link.h:46
The link information.
Definition: link.h:55
struct spa_dict * props
the properties of the link
Definition: link.h:69
uint32_t version
Definition: link.h:101
uint32_t input_port_id
input port id
Definition: link.h:60
uint32_t input_node_id
server side input node id
Definition: link.h:59
uint32_t output_node_id
server side output node id
Definition: link.h:57
void pw_link_info_free(struct pw_link_info *info)
Definition: introspect.c:491
struct pw_link_info * pw_link_info_update(struct pw_link_info *info, const struct pw_link_info *update)
Definition: introspect.c:453
SPA_EXPORT const char * pw_link_state_as_string(enum pw_link_state state)
Definition: introspect.c:66