Go to the documentation of this file.
25 #ifndef PIPEWIRE_LINK_H
26 #define PIPEWIRE_LINK_H
52 #define PW_TYPE_INTERFACE_Link PW_TYPE_INFO_INTERFACE_BASE "Link"
54 #define PW_VERSION_LINK 3
77 #define PW_LINK_CHANGE_MASK_STATE (1 << 0)
78 #define PW_LINK_CHANGE_MASK_FORMAT (1 << 1)
79 #define PW_LINK_CHANGE_MASK_PROPS (1 << 2)
80 #define PW_LINK_CHANGE_MASK_ALL ((1 << 3)-1)
96 #define PW_LINK_EVENT_INFO 0
97 #define PW_LINK_EVENT_NUM 1
101 #define PW_VERSION_LINK_EVENTS 0
111 #define PW_LINK_METHOD_ADD_LISTENER 0
112 #define PW_LINK_METHOD_NUM 1
116 #define PW_VERSION_LINK_METHODS 0
125 #define pw_link_method(o,method,version,...) \
127 int _res = -ENOTSUP; \
128 spa_interface_call_res((struct spa_interface*)o, \
129 struct pw_link_methods, _res, \
130 method, version, ##__VA_ARGS__); \
134 #define pw_link_add_listener(c,...) pw_link_method(c,add_listener,0,__VA_ARGS__)
#define PW_KEY_DEVICE_NAME
device name
Definition: src/pipewire/keys.h:211
int int const char * pw_properties_get(const struct pw_properties *properties, const char *key)
Get a property.
Definition: properties.c:487
Definition: module-filter-chain.c:176
@ SPA_PARAM_Profile
profile configuration as SPA_TYPE_OBJECT_ParamProfile
Definition: param.h:53
void(* info)(void *object, const struct pw_link_info *info)
Notify link info.
Definition: link.h:108
struct spa_hook listener
Definition: alsa-monitor.c:105
struct pw_link_info * pw_link_info_update(struct pw_link_info *info, const struct pw_link_info *update)
Definition: introspect.c:453
struct pw_properties * props
Definition: alsa-monitor.c:74
struct spa_list device_list
Definition: alsa-monitor.c:128
#define PW_VERSION_NODE
Definition: src/pipewire/node.h:52
uint32_t input_port_id
input port id
Definition: link.h:76
uint32_t id
id of the global
Definition: link.h:72
int priority
Definition: alsa-monitor.c:93
#define SPA_POD_Int(val)
Definition: vararg.h:59
int pw_properties_update(struct pw_properties *props, const struct spa_dict *dict)
Update properties.
Definition: properties.c:298
#define SPA_TYPE_INTERFACE_Device
Definition: build-12775836/doc/spa/monitor/device.h:50
#define SPA_KEY_DEVICE_NICK
the device short name
Definition: build-12775836/doc/spa/monitor/device.h:264
@ PW_LINK_STATE_NEGOTIATING
the link is negotiating formats
Definition: link.h:62
Definition: build-12775836/doc/spa/monitor/device.h:53
Link methods.
Definition: link.h:115
struct spa_list link
link in impl node_list
Definition: module-filter-chain.c:156
user data to add to an object
Definition: filter.c:75
#define SPA_KEY_DEVICE_DESCRIPTION
a device description
Definition: build-12775836/doc/spa/monitor/device.h:265
uint8_t data[MAX_BUFFER]
Definition: module-profiler.c:87
bool spa_streq(const char *s1, const char *s2)
Definition: string.h:50
Link events.
Definition: link.h:100
#define spa_list_for_each(pos, head, member)
Definition: list.h:111
@ PW_LINK_STATE_PAUSED
the link is paused
Definition: link.h:64
const struct spa_dict * props
extra object properties
Definition: build-12775836/doc/spa/monitor/device.h:92
const struct spa_dict * props
device properties
Definition: build-12775836/doc/spa/monitor/device.h:69
struct impl * impl
Definition: alsa-monitor.c:83
const char * error
an error reason if state is error
Definition: link.h:83
uint64_t change_mask
bitfield of changed fields since last call
Definition: link.h:81
struct spa_hook listener
Definition: access-flatpak.c:46
Definition: alsa-monitor.c:82
Definition: module-filter-chain.c:155
uint32_t version
Definition: link.h:102
#define PW_KEY_DEVICE_PRODUCT_NAME
product name if applicable
Definition: src/pipewire/keys.h:227
void pw_proxy_destroy(struct pw_proxy *proxy)
destroy a proxy
Definition: proxy.c:229
int profile
Definition: alsa-monitor.c:95
struct spa_hook session_listener
Definition: alsa-monitor.c:118
Definition: pipewire.c:68
uint32_t id
Definition: module-echo-cancel.c:139
struct pw_properties * pw_properties_new_dict(const struct spa_dict *dict)
Make a new properties object from the given dictionary.
Definition: properties.c:126
#define SPA_POD_BUILDER_INIT(buffer, size)
Definition: builder.h:71
struct spa_audio_info_raw info
Definition: module-echo-cancel.c:145
struct spa_dict dict
dictionary of key/values
Definition: properties.h:50
#define spa_list_consume(pos, head, member)
Definition: list.h:96
#define SPA_TYPE_INTERFACE_Node
Definition: build-12775836/doc/spa/node/node.h:50
struct impl * impl
Definition: alsa-monitor.c:68
struct sm_device * sdevice
Definition: alsa-monitor.c:104
@ SPA_TYPE_OBJECT_ParamProfile
Definition: build-12775836/doc/spa/utils/type.h:94
@ PW_LINK_STATE_ERROR
the link is in error
Definition: link.h:59
void spa_list_remove(struct spa_list *elem)
Definition: list.h:69
struct spa_handle * handle
Definition: alsa-monitor.c:123
@ PW_LINK_STATE_ALLOCATING
the link is allocating buffers
Definition: link.h:63
const char * pw_link_state_as_string(enum pw_link_state state)
Convert a pw_link_state to a readable string.
Definition: introspect.c:64
#define PW_TYPE_INTERFACE_Node
Definition: src/pipewire/node.h:50
enum pw_link_state state
the current state of the link
Definition: link.h:82
#define PW_KEY_NODE_DESCRIPTION
localized human readable node one-line description.
Definition: src/pipewire/keys.h:140
const char * factory_name
a factory name that implements the object
Definition: build-12775836/doc/spa/monitor/device.h:86
#define PW_KEY_NODE_NAME
node name
Definition: src/pipewire/keys.h:138
Definition: build-12775836/doc/spa/node/node.h:53
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:295
uint32_t input_node_id
server side input node id
Definition: link.h:75
void pw_link_info_free(struct pw_link_info *info)
Definition: introspect.c:491
#define SPA_KEY_DEVICE_NAME
the name of the device
Definition: build-12775836/doc/spa/monitor/device.h:262
@ PW_LINK_STATE_INIT
the link is initialized
Definition: link.h:61
#define PW_KEY_DEVICE_DESCRIPTION
localized human readable device one-line description.
Definition: src/pipewire/keys.h:219
#define SPA_KEY_DEVICE_ALIAS
alternative name of the device
Definition: build-12775836/doc/spa/monitor/device.h:263
@ SPA_LOG_LEVEL_DEBUG
Definition: build-12775836/doc/spa/support/log.h:51
void spa_list_init(struct spa_list *list)
Definition: list.h:44
struct spa_node * node
Definition: alsa-monitor.c:76
struct spa_handle * handle
Definition: alsa-monitor.c:100
#define SPA_VERSION_DEVICE_EVENTS
version of the structure
Definition: build-12775836/doc/spa/monitor/device.h:119
#define pw_log_level_enabled(lev)
Check if a loglevel is enabled.
Definition: src/pipewire/log.h:78
Definition: utils/dict.h:48
#define SPA_KEY_DEVICE_BUS_ID
the device bus-id
Definition: build-12775836/doc/spa/monitor/device.h:272
const char * type
the object type managed by this device
Definition: build-12775836/doc/spa/monitor/device.h:85
int spa_debug_dict(int indent, const struct spa_dict *dict)
Definition: debug/dict.h:43
struct spa_handle * pw_context_load_spa_handle(struct pw_context *context, const char *factory_name, const struct spa_dict *info)
Definition: context.c:1340
#define spa_strerror(err)
Definition: result.h:51
uint32_t id
Definition: alsa-monitor.c:85
struct device * device
Definition: alsa-monitor.c:70
#define spa_device_set_param(d,...)
Definition: build-12775836/doc/spa/monitor/device.h:256
#define pw_log_debug(...)
Definition: src/pipewire/log.h:89
struct spa_hook device_listener
Definition: alsa-monitor.c:102
#define spa_handle_get_interface(h,...)
Definition: plugin.h:73
@ PW_LINK_STATE_ACTIVE
the link is active
Definition: link.h:65
struct spa_device * monitor
Definition: alsa-monitor.c:125
Information about the device and parameters it supports.
Definition: build-12775836/doc/spa/monitor/device.h:60
int pw_unload_spa_handle(struct spa_handle *handle)
Definition: pipewire.c:321
struct pw_context * context
Definition: settings.c:43
int pw_properties_set(struct pw_properties *properties, const char *key, const char *value)
Set a property value.
Definition: properties.c:435
struct sm_media_session * session
Definition: access-flatpak.c:45
#define PW_KEY_DEVICE_ID
device properties
Definition: src/pipewire/keys.h:210
int(* add_listener)(void *object, struct spa_hook *listener, const struct pw_link_events *events, void *data)
Definition: link.h:119
#define PW_KEY_FACTORY_NAME
the name of the factory
Definition: src/pipewire/keys.h:260
uint32_t version
Definition: link.h:117
#define pw_log_warn(...)
Definition: src/pipewire/log.h:87
struct spa_device * device
Definition: alsa-monitor.c:101
struct spa_list node_list
Definition: alsa-monitor.c:113
@ SPA_PARAM_PROFILE_index
profile index (Int)
Definition: param.h:113
The link information.
Definition: link.h:71
uint32_t device_id
Definition: alsa-monitor.c:86
#define spa_pod_builder_add_object(b, type, id,...)
Definition: builder.h:650
#define SPA_KEY_DEVICE_BUS_PATH
bus path to the device in the OS' format.
Definition: build-12775836/doc/spa/monitor/device.h:273
void spa_hook_remove(struct spa_hook *hook)
Remove a hook.
Definition: hook.h:336
uint32_t output_node_id
server side output node id
Definition: link.h:73
pw_link_state
The different link states.
Definition: link.h:58
uint32_t output_port_id
output port id
Definition: link.h:74
#define spa_device_add_listener(d,...)
Definition: build-12775836/doc/spa/monitor/device.h:253
#define SPA_NAME_API_LIBCAMERA_ENUM_CLIENT
keys for libcamera factory names
Definition: names.h:126
struct pw_properties * props
Definition: alsa-monitor.c:98
struct spa_list link
Definition: alsa-monitor.c:84
struct spa_pod * format
format over link
Definition: link.h:84
unsigned int appeared
Definition: alsa-monitor.c:110
@ PW_LINK_STATE_UNLINKED
the link is unlinked
Definition: link.h:60
int pw_properties_setf(struct pw_properties *properties, const char *key, const char *format,...) 1(3
spa_device_events:
Definition: build-12775836/doc/spa/monitor/device.h:117
struct spa_dict * props
the properties of the link
Definition: link.h:85
Information about a device object.
Definition: build-12775836/doc/spa/monitor/device.h:81
int sm_libcamera_monitor_start(struct sm_media_session *sess)
Definition: libcamera-monitor.c:465
Definition: properties.h:49
void pw_properties_free(struct pw_properties *properties)
Free a properties object.
Definition: properties.c:364
uint32_t id
Definition: alsa-monitor.c:72
#define pw_log_error(...)
Definition: src/pipewire/log.h:86
#define spa_list_append(list, item)
Definition: list.h:81
struct pw_proxy * proxy
Definition: v4l2-monitor.c:61