PipeWire  0.3.33
port.h
Go to the documentation of this file.
1 /* PipeWire
2  *
3  * Copyright © 2018 Wim Taymans
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice (including the next
13  * paragraph) shall be included in all copies or substantial portions of the
14  * Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 
25 #ifndef PIPEWIRE_PORT_H
26 #define PIPEWIRE_PORT_H
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #include <stdarg.h>
33 #include <errno.h>
34 
35 #include <spa/utils/defs.h>
36 #include <spa/utils/hook.h>
37 #include <spa/param/param.h>
38 
39 #include <pipewire/proxy.h>
40 
50 #define PW_TYPE_INTERFACE_Port PW_TYPE_INFO_INTERFACE_BASE "Port"
51 
52 #define PW_VERSION_PORT 3
53 struct pw_port;
54 
56 #define pw_direction spa_direction
57 #define PW_DIRECTION_INPUT SPA_DIRECTION_INPUT
58 #define PW_DIRECTION_OUTPUT SPA_DIRECTION_OUTPUT
59 
61 const char * pw_direction_as_string(enum pw_direction direction);
62 
63 struct pw_port_info {
64  uint32_t id;
65  enum pw_direction direction;
66 #define PW_PORT_CHANGE_MASK_PROPS (1 << 0)
67 #define PW_PORT_CHANGE_MASK_PARAMS (1 << 1)
68 #define PW_PORT_CHANGE_MASK_ALL ((1 << 2)-1)
69  uint64_t change_mask;
70  struct spa_dict *props;
72  uint32_t n_params;
73 };
74 
75 struct pw_port_info *
77  const struct pw_port_info *update);
78 
79 void
80 pw_port_info_free(struct pw_port_info *info);
81 
82 #define PW_PORT_EVENT_INFO 0
83 #define PW_PORT_EVENT_PARAM 1
84 #define PW_PORT_EVENT_NUM 2
85 
88 #define PW_VERSION_PORT_EVENTS 0
89  uint32_t version;
95  void (*info) (void *object, const struct pw_port_info *info);
107  void (*param) (void *object, int seq,
108  uint32_t id, uint32_t index, uint32_t next,
109  const struct spa_pod *param);
110 };
111 
112 #define PW_PORT_METHOD_ADD_LISTENER 0
113 #define PW_PORT_METHOD_SUBSCRIBE_PARAMS 1
114 #define PW_PORT_METHOD_ENUM_PARAMS 2
115 #define PW_PORT_METHOD_NUM 3
116 
119 #define PW_VERSION_PORT_METHODS 0
120  uint32_t version;
121 
122  int (*add_listener) (void *object,
123  struct spa_hook *listener,
124  const struct pw_port_events *events,
125  void *data);
135  int (*subscribe_params) (void *object, uint32_t *ids, uint32_t n_ids);
136 
149  int (*enum_params) (void *object, int seq,
150  uint32_t id, uint32_t start, uint32_t num,
151  const struct spa_pod *filter);
152 };
153 
154 #define pw_port_method(o,method,version,...) \
155 ({ \
156  int _res = -ENOTSUP; \
157  spa_interface_call_res((struct spa_interface*)o, \
158  struct pw_port_methods, _res, \
159  method, version, ##__VA_ARGS__); \
160  _res; \
161 })
162 
163 #define pw_port_add_listener(c,...) pw_port_method(c,add_listener,0,__VA_ARGS__)
164 #define pw_port_subscribe_params(c,...) pw_port_method(c,subscribe_params,0,__VA_ARGS__)
165 #define pw_port_enum_params(c,...) pw_port_method(c,enum_params,0,__VA_ARGS__)
166 
171 #ifdef __cplusplus
172 } /* extern "C" */
173 #endif
174 
175 #endif /* PIPEWIRE_PORT_H */
NAME
#define NAME
Definition: policy-node.c:49
PW_KEY_STREAM_DONT_REMIX
#define PW_KEY_STREAM_DONT_REMIX
don't remix channels
Definition: src/pipewire/keys.h:272
PW_DIRECTION_INPUT
#define PW_DIRECTION_INPUT
Definition: port.h:57
impl::node_list
struct spa_list node_list
Definition: policy-node.c:86
pw_properties_get
int int const char * pw_properties_get(const struct pw_properties *properties, const char *key)
Get a property.
Definition: properties.c:487
pw_node_info::props
struct spa_dict * props
the properties of the node
Definition: src/pipewire/node.h:85
spa_audio_info_raw
Audio information description.
Definition: audio/raw.h:285
spa_pod_object
Definition: pod/pod.h:175
spa_audio_info_raw::rate
uint32_t rate
Definition: audio/raw.h:288
PW_KEY_MEDIA_ROLE
#define PW_KEY_MEDIA_ROLE
Role: Movie, Music, Camera, Screen, Communication, Game, Notification, DSP, Production,...
Definition: src/pipewire/keys.h:281
endpoint::client_id
uint32_t client_id
Definition: policy-ep.c:79
find_data::exclusive
bool exclusive
Definition: policy-ep.c:262
sm_media_session_remove_links
int sm_media_session_remove_links(struct sm_media_session *sess, const struct spa_dict *dict)
Definition: media-session.c:1983
endpoint::format
struct spa_audio_info format
Definition: alsa-endpoint.c:86
NODE_TYPE_UNKNOWN
#define NODE_TYPE_UNKNOWN
Definition: policy-node.c:113
sm_media_session_add_listener
int sm_media_session_add_listener(struct sm_media_session *sess, struct spa_hook *listener, const struct sm_media_session_events *events, void *data)
Definition: media-session.c:1519
endpoint::impl
struct impl * impl
Definition: alsa-endpoint.c:67
endpoint::media_type
uint32_t media_type
Definition: policy-ep.c:88
SPA_POD_Pod
#define SPA_POD_Pod(val)
Definition: vararg.h:100
NODE_TYPE_DEVICE
#define NODE_TYPE_DEVICE
Definition: policy-node.c:115
SPA_POD_Int
#define SPA_POD_Int(val)
Definition: vararg.h:59
spa_zero
#define spa_zero(x)
Definition: defs.h:303
SPA_TYPE_OBJECT_Format
@ SPA_TYPE_OBJECT_Format
Definition: build-12775836/doc/spa/utils/type.h:90
find_data::link_group
const char * link_group
Definition: policy-node.c:556
pw_port_methods
Port methods.
Definition: port.h:118
default_node::key
char * key
Definition: policy-node.c:68
pw_core_info
The core information.
Definition: core.h:73
node::connect_count
int connect_count
Definition: policy-node.c:121
format-utils.h
node::configured
unsigned int configured
Definition: policy-node.c:127
node::direction
enum pw_direction direction
Definition: alsa-monitor.c:69
SPA_PARAM_PORT_CONFIG_format
@ SPA_PARAM_PORT_CONFIG_format
(Object) format filter
Definition: param.h:151
pw_port_info::change_mask
uint64_t change_mask
bitfield of changed fields since last call
Definition: port.h:69
endpoint::linked
uint32_t linked
Definition: policy-ep.c:77
pw_port_info::direction
enum pw_direction direction
port direction
Definition: port.h:65
SPA_TYPE_Id
@ SPA_TYPE_Id
Definition: build-12775836/doc/spa/utils/type.h:47
spa_json_enter_object
int spa_json_enter_object(struct spa_json *iter, struct spa_json *sub)
Definition: json.h:214
pw_port_info_free
void pw_port_info_free(struct pw_port_info *info)
Definition: introspect.c:283
name
const char * name
Definition: media-session.c:2379
pw_port_info::n_params
uint32_t n_params
number of items in params
Definition: port.h:72
PW_NODE_STATE_RUNNING
@ PW_NODE_STATE_RUNNING
the node is running
Definition: src/pipewire/node.h:63
string.h
node::link
struct spa_list link
link in impl node_list
Definition: module-filter-chain.c:156
data
user data to add to an object
Definition: filter.c:75
impl::data
uint8_t data[MAX_BUFFER]
Definition: module-profiler.c:87
pw_port_events::version
uint32_t version
Definition: port.h:89
spa_streq
bool spa_streq(const char *s1, const char *s2)
Definition: string.h:50
spa_list_for_each
#define spa_list_for_each(pos, head, member)
Definition: list.h:111
impl::linking_node_removed
unsigned int linking_node_removed
Definition: policy-node.c:88
node::obj
struct sm_node * obj
Definition: bluez-autoswitch.c:79
spa_format_audio_raw_build
struct spa_pod * spa_format_audio_raw_build(struct spa_pod_builder *builder, uint32_t id, struct spa_audio_info_raw *info)
Definition: audio/format-utils.h:72
pw_port_events
Port events.
Definition: port.h:87
node::priority
int32_t priority
Definition: policy-node.c:111
impl::seq
int seq
Definition: policy-ep.c:65
node::media
char * media
Definition: stream-endpoint.c:70
impl::listener
struct spa_hook listener
Definition: access-flatpak.c:46
device
Definition: alsa-monitor.c:82
node
Definition: module-filter-chain.c:155
node::listener
struct spa_hook listener
Definition: bluez-autoswitch.c:81
impl
Definition: control.c:33
default_node::config
char * config
Definition: policy-node.c:71
spa_audio_info::raw
struct spa_audio_info_raw raw
Definition: param/audio/format.h:44
stream::obj
struct sm_endpoint_stream * obj
Definition: policy-ep.c:99
SPA_PARAM_PORT_CONFIG_direction
@ SPA_PARAM_PORT_CONFIG_direction
direction, input/output (Id enum spa_direction)
Definition: param.h:147
find_data::plugged
uint64_t plugged
Definition: policy-ep.c:264
DEFAULT_CONFIG_AUDIO_SOURCE_KEY
#define DEFAULT_CONFIG_AUDIO_SOURCE_KEY
Definition: policy-node.c:58
PW_KEY_NODE_DONT_RECONNECT
#define PW_KEY_NODE_DONT_RECONNECT
don't reconnect this node
Definition: src/pipewire/keys.h:165
DEFAULT_AUDIO_SOURCE
#define DEFAULT_AUDIO_SOURCE
Definition: policy-node.c:62
spa_pod_object_fixate
int spa_pod_object_fixate(struct spa_pod_object *pod)
Definition: iter.h:431
DEFAULT_VIDEO_SOURCE_KEY
#define DEFAULT_VIDEO_SOURCE_KEY
Definition: policy-node.c:56
node.h
spa_list
Definition: list.h:37
PW_KEY_NODE_LINK_GROUP
#define PW_KEY_NODE_LINK_GROUP
the node is internally linked to nodes with the same link-group
Definition: src/pipewire/keys.h:179
SPA_MEDIA_TYPE_audio
@ SPA_MEDIA_TYPE_audio
Definition: param/format.h:42
spa_strstartswith
bool spa_strstartswith(const char *s, const char *prefix)
Definition: string.h:71
spa_audio_info_raw::format
enum spa_audio_format format
Definition: audio/raw.h:286
sm_media_session_destroy_object
int sm_media_session_destroy_object(struct sm_media_session *sess, uint32_t id)
Definition: media-session.c:1545
endpoint::priority
int32_t priority
Definition: policy-ep.c:80
impl::id
uint32_t id
Definition: module-echo-cancel.c:139
SPA_POD_OPT_Int
#define SPA_POD_OPT_Int(val)
Definition: parser.h:521
PW_KEY_NODE_AUTOCONNECT
#define PW_KEY_NODE_AUTOCONNECT
node wants to be automatically connected to a compatible node
Definition: src/pipewire/keys.h:150
endpoint::exclusive
unsigned int exclusive
Definition: policy-ep.c:93
props
const char * props
Definition: media-session.c:2382
impl::info
struct spa_audio_info_raw info
Definition: module-echo-cancel.c:145
pod.h
ENDPOINT_TYPE_STREAM
#define ENDPOINT_TYPE_STREAM
Definition: policy-ep.c:83
SPA_PARAM_PORT_CONFIG_MODE_dsp
@ SPA_PARAM_PORT_CONFIG_MODE_dsp
dsp configuration, depending on the external format.
Definition: param.h:139
SESSION_KEY
#define SESSION_KEY
Definition: policy-node.c:50
spa_audio_info_raw::channels
uint32_t channels
Definition: audio/raw.h:289
stream
Definition: stream.c:97
pw_port_info::props
struct spa_dict * props
the properties of the port
Definition: port.h:70
impl::endpoint_list
struct spa_list endpoint_list
Definition: policy-ep.c:64
endpoint::busy
unsigned int busy
Definition: policy-ep.c:95
DEFAULT_AUDIO_SOURCE_KEY
#define DEFAULT_AUDIO_SOURCE_KEY
Definition: policy-node.c:55
SPA_PARAM_Format
@ SPA_PARAM_Format
configured format as SPA_TYPE_OBJECT_Format
Definition: param.h:48
node::failed_count
int failed_count
Definition: policy-node.c:122
pw_direction_reverse
enum pw_direction pw_direction_reverse(enum pw_direction direction)
Reverse the direction.
Definition: pipewire.c:729
node::impl
struct impl * impl
Definition: alsa-monitor.c:68
node::active
unsigned int active
Definition: policy-node.c:124
PW_KEY_LINK_INPUT_NODE
#define PW_KEY_LINK_INPUT_NODE
input node id of a link
Definition: src/pipewire/keys.h:198
spa_pod
Definition: pod/pod.h:50
pw_port_info
Definition: port.h:63
sm_policy_ep_start
int sm_policy_ep_start(struct sm_media_session *session)
Definition: policy-ep.c:514
find_node
Definition: module-link-factory.c:298
find_data::priority
int priority
Definition: policy-ep.c:263
node::enabled
unsigned int enabled
Definition: policy-node.c:126
PW_DIRECTION_OUTPUT
#define PW_DIRECTION_OUTPUT
Definition: port.h:58
endpoint::plugged
uint64_t plugged
Definition: policy-ep.c:92
pw_client_error
#define pw_client_error(c,...)
Definition: client.h:170
node::active
unsigned char active
Definition: bluez-autoswitch.c:82
spa_list_remove
void spa_list_remove(struct spa_list *elem)
Definition: list.h:69
impl::now
struct timespec now
Definition: default-profile.c:87
sm_media_session_create_links
int sm_media_session_create_links(struct sm_media_session *sess, const struct spa_dict *dict)
Definition: media-session.c:1901
PW_KEY_STREAM_CAPTURE_SINK
#define PW_KEY_STREAM_CAPTURE_SINK
Try to capture the sink output instead of source output.
Definition: src/pipewire/keys.h:273
SPA_FLAG_SET
#define SPA_FLAG_SET(field, flag)
Definition: defs.h:74
impl::streams_follow_default
bool streams_follow_default
Definition: policy-node.c:93
SPA_AUDIO_MAX_CHANNELS
#define SPA_AUDIO_MAX_CHANNELS
Definition: audio/raw.h:43
PW_KEY_LINK_INPUT_PORT
#define PW_KEY_LINK_INPUT_PORT
input port id of a link
Definition: src/pipewire/keys.h:199
node::failed_peer
struct node * failed_peer
Definition: policy-node.c:108
PW_TYPE_INTERFACE_Node
#define PW_TYPE_INTERFACE_Node
Definition: src/pipewire/node.h:50
endpoint::media
char * media
Definition: policy-ep.c:86
pw_port_methods::version
uint32_t version
Definition: port.h:120
SPA_TIMESPEC_TO_NSEC
#define SPA_TIMESPEC_TO_NSEC(ts)
Definition: defs.h:191
SPA_PARAM_PORT_CONFIG_monitor
@ SPA_PARAM_PORT_CONFIG_monitor
(Bool) enable monitor output ports on input ports
Definition: param.h:149
node::peer
struct node * peer
Definition: policy-node.c:107
filter
Definition: filter.c:126
SPA_PARAM_PortConfig
@ SPA_PARAM_PortConfig
port configuration as SPA_TYPE_OBJECT_ParamPortConfig
Definition: param.h:55
PW_KEY_NODE_NAME
#define PW_KEY_NODE_NAME
node name
Definition: src/pipewire/keys.h:138
PW_KEY_DEVICE_API
#define PW_KEY_DEVICE_API
API this device is accessed with.
Definition: src/pipewire/keys.h:217
spa_hook
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:295
DEFAULT_CONFIG_VIDEO_SOURCE_KEY
#define DEFAULT_CONFIG_VIDEO_SOURCE_KEY
Definition: policy-node.c:59
endpoint::direction
enum pw_direction direction
Definition: policy-ep.c:75
PW_KEY_NODE_PLUGGED
#define PW_KEY_NODE_PLUGGED
when the node was created.
Definition: src/pipewire/keys.h:142
SPA_AUDIO_CHANNEL_FL
@ SPA_AUDIO_CHANNEL_FL
front left
Definition: audio/raw.h:174
param.h
pw_port_info::params
struct spa_param_info * params
parameters
Definition: port.h:71
SPA_FORMAT_AUDIO_rate
@ SPA_FORMAT_AUDIO_rate
sample rate (Int)
Definition: param/format.h:109
spa_json_init
void spa_json_init(struct spa_json *iter, const char *data, size_t size)
Definition: json.h:59
start
int(* start)(struct sm_media_session *sess)
Definition: media-session.c:2381
spa_audio_info_raw::flags
uint32_t flags
Definition: audio/raw.h:287
sm_object_remove_data
int sm_object_remove_data(struct sm_object *obj, const char *id)
Definition: media-session.c:290
sm_object_get_data
void * sm_object_get_data(struct sm_object *obj, const char *id)
Definition: media-session.c:281
SPA_LOG_LEVEL_DEBUG
@ SPA_LOG_LEVEL_DEBUG
Definition: build-12775836/doc/spa/support/log.h:51
stream::impl
struct impl * impl
Definition: restore-stream.c:78
spa_param_info
information about a parameter
Definition: param.h:64
spa_list_init
void spa_list_init(struct spa_list *list)
Definition: list.h:44
node::node
struct spa_node * node
Definition: alsa-monitor.c:76
PW_KEY_LINK_OUTPUT_PORT
#define PW_KEY_LINK_OUTPUT_PORT
output port id of a link
Definition: src/pipewire/keys.h:201
DEFAULT_AUDIO_SINK
#define DEFAULT_AUDIO_SINK
Definition: policy-node.c:61
spa_audio_info::media_subtype
uint32_t media_subtype
Definition: param/audio/format.h:42
spa_pod_builder_init
void spa_pod_builder_init(struct spa_pod_builder *builder, void *data, uint32_t size)
Definition: builder.h:96
PW_KEY_STREAM_MONITOR
#define PW_KEY_STREAM_MONITOR
Indicates that the stream is monitoring and might select a less accurate but faster conversion algori...
Definition: src/pipewire/keys.h:269
pw_log_level_enabled
#define pw_log_level_enabled(lev)
Check if a loglevel is enabled.
Definition: src/pipewire/log.h:78
find_data::impl
struct impl * impl
Definition: policy-ep.c:259
spa_dict
Definition: utils/dict.h:48
PW_KEY_NODE_TARGET
#define PW_KEY_NODE_TARGET
node wants to be connected to the target node/session
Definition: src/pipewire/keys.h:152
DEFAULT_VIDEO_SOURCE
#define DEFAULT_VIDEO_SOURCE
Definition: policy-node.c:63
endpoint::enabled
unsigned int enabled
Definition: policy-ep.c:94
SPA_POD_Bool
#define SPA_POD_Bool(val)
Definition: vararg.h:53
sm_object_add_listener
int sm_object_add_listener(struct sm_object *obj, struct spa_hook *listener, const struct sm_object_events *events, void *data)
Definition: media-session.c:1512
pw_node_set_param
#define pw_node_set_param(c,...)
Definition: src/pipewire/node.h:201
node::format
struct spa_audio_info format
Definition: stream-endpoint.c:74
find_data
Definition: bluez-autoswitch.c:86
spa_dict_lookup
const char * spa_dict_lookup(const struct spa_dict *dict, const char *key)
Definition: utils/dict.h:99
proxy.h
SESSION_KEY
#define SESSION_KEY
Definition: policy-ep.c:49
spa_json_get_string
int spa_json_get_string(struct spa_json *iter, char *res, int maxlen)
Definition: json.h:360
find_data::node
struct node * node
Definition: policy-node.c:553
spa_audio_info
Definition: param/audio/format.h:40
node::monitor
unsigned int monitor
Definition: policy-node.c:129
SPA_PARAM_EnumFormat
@ SPA_PARAM_EnumFormat
available formats as SPA_TYPE_OBJECT_Format
Definition: param.h:47
pw_port_events::info
void(* info)(void *object, const struct pw_port_info *info)
Notify port info.
Definition: port.h:95
spa_pod_parse_object
#define spa_pod_parse_object(pod, type, id,...)
Definition: parser.h:560
default_node
Definition: policy-node.c:67
endpoint::link
struct spa_list link
link in impl endpoint_list
Definition: alsa-endpoint.c:65
PW_ID_CORE
#define PW_ID_CORE
default ID for the core object after connect
Definition: core.h:66
sm_media_session_find_object
struct sm_object * sm_media_session_find_object(struct sm_media_session *sess, uint32_t id)
Definition: media-session.c:1539
node::client_id
uint32_t client_id
Definition: policy-node.c:110
param
Definition: filter.c:80
DEFAULT_CONFIG_AUDIO_SINK_KEY
#define DEFAULT_CONFIG_AUDIO_SINK_KEY
Definition: policy-node.c:57
pw_log_debug
#define pw_log_debug(...)
Definition: src/pipewire/log.h:89
spa_format_parse
int spa_format_parse(const struct spa_pod *format, uint32_t *media_type, uint32_t *media_subtype)
Definition: format-utils.h:42
pw_port_methods::subscribe_params
int(* subscribe_params)(void *object, uint32_t *ids, uint32_t n_ids)
Subscribe to parameter changes.
Definition: port.h:135
PW_KEY_LINK_OUTPUT_NODE
#define PW_KEY_LINK_OUTPUT_NODE
output node id of a link
Definition: src/pipewire/keys.h:200
spa_json_next
int spa_json_next(struct spa_json *iter, const char **value)
Get the next token.
Definition: json.h:74
impl::meta_listener
struct spa_hook meta_listener
Definition: bluez-autoswitch.c:64
endpoint::id
uint32_t id
Definition: policy-ep.c:71
PW_KEY_NODE_EXCLUSIVE
#define PW_KEY_NODE_EXCLUSIVE
node wants exclusive access to resources
Definition: src/pipewire/keys.h:149
endpoint
Definition: alsa-endpoint.c:64
find_data::media
const char * media
Definition: policy-node.c:555
node::capture_sink
unsigned int capture_sink
Definition: policy-node.c:130
DEFAULT_AUDIO_SINK_KEY
#define DEFAULT_AUDIO_SINK_KEY
Definition: policy-node.c:54
SPA_ID_INVALID
#define SPA_ID_INVALID
Definition: defs.h:182
impl::context
struct pw_context * context
Definition: settings.c:43
PW_KEY_MEDIA_CLASS
#define PW_KEY_MEDIA_CLASS
class Ex: "Video/Source"
Definition: src/pipewire/keys.h:285
impl::session
struct sm_media_session * session
Definition: access-flatpak.c:45
find_data::ep
struct endpoint * ep
Definition: policy-ep.c:260
PW_KEY_CLIENT_ID
#define PW_KEY_CLIENT_ID
Client properties.
Definition: src/pipewire/keys.h:131
spa_audio_info_raw::position
uint32_t position[SPA_AUDIO_MAX_CHANNELS]
Definition: audio/raw.h:290
SPA_FORMAT_AUDIO_channels
@ SPA_FORMAT_AUDIO_channels
number of audio channels (Int)
Definition: param/format.h:110
SPA_AUDIO_CHANNEL_FR
@ SPA_AUDIO_CHANNEL_FR
front right
Definition: audio/raw.h:175
stream::endpoint
struct endpoint * endpoint
Definition: alsa-endpoint.c:93
sm_object_add_data
void * sm_object_add_data(struct sm_object *obj, const char *id, size_t size)
Definition: media-session.c:261
spa_pod_copy_array
uint32_t spa_pod_copy_array(const struct spa_pod *pod, uint32_t type, void *values, uint32_t max_values)
Definition: iter.h:344
impl::node_list_changed
unsigned int node_list_changed
Definition: policy-node.c:87
PW_TYPE_INTERFACE_Client
#define PW_TYPE_INTERFACE_Client
Definition: client.h:46
PW_CORE_CHANGE_MASK_PROPS
#define PW_CORE_CHANGE_MASK_PROPS
Definition: core.h:80
pw_port_info::id
uint32_t id
id of the global
Definition: port.h:64
ENDPOINT_TYPE_UNKNOWN
#define ENDPOINT_TYPE_UNKNOWN
Definition: policy-ep.c:82
SPA_FORMAT_AUDIO_format
@ SPA_FORMAT_AUDIO_format
audio format, (Id enum spa_audio_format)
Definition: param/format.h:107
pw_log_warn
#define pw_log_warn(...)
Definition: src/pipewire/log.h:87
node::dont_remix
unsigned int dont_remix
Definition: policy-node.c:128
node::type
uint32_t type
Definition: policy-node.c:116
NAME
#define NAME
Definition: policy-ep.c:48
json.h
spa_pod_builder_add_object
#define spa_pod_builder_add_object(b, type, id,...)
Definition: builder.h:650
SPA_FORMAT_AUDIO_position
@ SPA_FORMAT_AUDIO_position
channel positions (Id enum spa_audio_position)
Definition: param/format.h:111
spa_audio_info::info
union spa_audio_info::@5 info
SPA_AUDIO_FLAG_UNPOSITIONED
#define SPA_AUDIO_FLAG_UNPOSITIONED
Definition: audio/raw.h:283
defs.h
spa_hook_remove
void spa_hook_remove(struct spa_hook *hook)
Remove a hook.
Definition: hook.h:336
SPA_PARAM_PORT_CONFIG_mode
@ SPA_PARAM_PORT_CONFIG_mode
(Id enum spa_param_port_config_mode) mode
Definition: param.h:148
pw_log_info
#define pw_log_info(...)
Definition: src/pipewire/log.h:88
SPA_AUDIO_FORMAT_F32
@ SPA_AUDIO_FORMAT_F32
Definition: audio/raw.h:117
node::virtual
unsigned int virtual
Definition: policy-node.c:131
pw_port_methods::add_listener
int(* add_listener)(void *object, struct spa_hook *listener, const struct pw_port_events *events, void *data)
Definition: port.h:122
stream::obj
struct sm_node * obj
Definition: restore-stream.c:75
spa_debug_pod
int spa_debug_pod(int indent, const struct spa_type_info *info, const struct spa_pod *pod)
Definition: debug/pod.h:200
spa_audio_info::media_type
uint32_t media_type
Definition: param/audio/format.h:41
pipewire.h
default_node::key_config
char * key_config
Definition: policy-node.c:69
sm_media_session_schedule_rescan
int sm_media_session_schedule_rescan(struct sm_media_session *sess)
Definition: media-session.c:1569
impl::sample_rate
uint32_t sample_rate
Definition: policy-node.c:84
pw_direction_as_string
const char * pw_direction_as_string(enum pw_direction direction)
Convert a pw_direction to a readable string.
Definition: introspect.c:52
ENDPOINT_TYPE_DEVICE
#define ENDPOINT_TYPE_DEVICE
Definition: policy-ep.c:84
endpoint::obj
struct sm_endpoint * obj
Definition: policy-ep.c:69
find_data::endpoint
struct endpoint * endpoint
Definition: policy-ep.c:261
SPA_POD_OPT_Pod
#define SPA_POD_OPT_Pod(val)
Definition: parser.h:533
SPA_POD_Id
#define SPA_POD_Id(val)
Definition: vararg.h:56
PW_KEY_PRIORITY_SESSION
#define PW_KEY_PRIORITY_SESSION
priority in session manager
Definition: src/pipewire/keys.h:97
find_data::capture_sink
bool capture_sink
Definition: policy-node.c:557
pw_properties_new
struct pw_properties * pw_properties_new(const char *key,...) 1
Make a new properties object.
Definition: properties.c:98
endpoint::type
uint32_t type
Definition: policy-ep.c:85
SPA_TYPE_OBJECT_ParamPortConfig
@ SPA_TYPE_OBJECT_ParamPortConfig
Definition: build-12775836/doc/spa/utils/type.h:95
default_node::value
char * value
Definition: policy-node.c:70
pw_properties_setf
int pw_properties_setf(struct pw_properties *properties, const char *key, const char *format,...) 1(3
spa_pod_builder
Definition: builder.h:63
hook.h
MAX_LINK_RETRY
#define MAX_LINK_RETRY
Definition: policy-node.c:65
pw_port_info_update
struct pw_port_info * pw_port_info_update(struct pw_port_info *info, const struct pw_port_info *update)
Definition: introspect.c:237
pw_node_info
The node information.
Definition: src/pipewire/node.h:70
props.h
NODE_TYPE_STREAM
#define NODE_TYPE_STREAM
Definition: policy-node.c:114
find_data::direction
enum pw_direction direction
Definition: policy-node.c:558
pw_port_events::param
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:107
pw_direction
#define pw_direction
The direction of a port.
Definition: port.h:56
node::exclusive
unsigned int exclusive
Definition: policy-node.c:125
SPA_MEDIA_SUBTYPE_raw
@ SPA_MEDIA_SUBTYPE_raw
Definition: param/format.h:53
sm_policy_node_start
int sm_policy_node_start(struct sm_media_session *session)
Definition: policy-node.c:1135
impl::defaults
struct default_node defaults[4]
Definition: policy-node.c:91
spa_json
Definition: json.h:49
stream::id
uint32_t id
Definition: restore-stream.c:77
pw_properties
Definition: properties.h:49
pw_properties_free
void pw_properties_free(struct pw_properties *properties)
Free a properties object.
Definition: properties.c:364
node::plugged
uint64_t plugged
Definition: policy-node.c:123
node::id
uint32_t id
Definition: alsa-monitor.c:72
endpoint::media_subtype
uint32_t media_subtype
Definition: policy-ep.c:89
pw_port_methods::enum_params
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:149
node::linking
unsigned int linking
Definition: policy-node.c:132
spa_list_append
#define spa_list_append(list, item)
Definition: list.h:81