PipeWire  0.3.33
impl-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_IMPL_PORT_H
26 #define PIPEWIRE_IMPL_PORT_H
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #include <spa/utils/hook.h>
33 
43 struct pw_impl_port;
44 struct pw_impl_link;
45 struct pw_control;
46 
47 #include <pipewire/impl.h>
48 
55 };
56 
59 #define PW_VERSION_IMPL_PORT_EVENTS 2
60  uint32_t version;
61 
63  void (*destroy) (void *data);
64 
66  void (*free) (void *data);
67 
69  void (*initialized) (void *data);
70 
72  void (*info_changed) (void *data, const struct pw_port_info *info);
73 
75  void (*link_added) (void *data, struct pw_impl_link *link);
76 
78  void (*link_removed) (void *data, struct pw_impl_link *link);
79 
81  void (*state_changed) (void *data, enum pw_impl_port_state old,
82  enum pw_impl_port_state state, const char *error);
83 
85  void (*control_added) (void *data, struct pw_control *control);
86 
88  void (*control_removed) (void *data, struct pw_control *control);
89 
91  void (*param_changed) (void *data, uint32_t id);
92 
94  void (*latency_changed) (void *data);
95 };
96 
99 struct pw_impl_port *
100 pw_context_create_port(struct pw_context *context,
101  enum pw_direction direction,
102  uint32_t port_id,
103  const struct spa_port_info *info,
104  size_t user_data_size);
105 
107 enum pw_direction pw_impl_port_get_direction(struct pw_impl_port *port);
108 
110 const struct pw_properties *pw_impl_port_get_properties(struct pw_impl_port *port);
111 
113 int pw_impl_port_update_properties(struct pw_impl_port *port, const struct spa_dict *dict);
114 
116 const struct pw_port_info *pw_impl_port_get_info(struct pw_impl_port *port);
117 
119 uint32_t pw_impl_port_get_id(struct pw_impl_port *port);
120 
122 struct pw_impl_node *pw_impl_port_get_node(struct pw_impl_port *port);
123 
125 int pw_impl_port_is_linked(struct pw_impl_port *port);
126 
128 int pw_impl_port_add(struct pw_impl_port *port, struct pw_impl_node *node);
129 
131 void pw_impl_port_add_listener(struct pw_impl_port *port,
132  struct spa_hook *listener,
133  const struct pw_impl_port_events *events,
134  void *data);
135 
140 #ifdef __cplusplus
141 }
142 #endif
143 
144 #endif /* PIPEWIRE_IMPL_PORT_H */
SPA_MEDIA_SUBTYPE_dsp
@ SPA_MEDIA_SUBTYPE_dsp
Definition: param/format.h:54
PW_IMPL_PORT_STATE_INIT
@ PW_IMPL_PORT_STATE_INIT
the port is being created
Definition: impl-port.h:51
PW_KEY_PORT_EXTRA
#define PW_KEY_PORT_EXTRA
api specific extra port info, API name should be prefixed.
Definition: src/pipewire/keys.h:193
PW_KEY_FORMAT_DSP
#define PW_KEY_FORMAT_DSP
format related properties
Definition: src/pipewire/keys.h:302
PW_DIRECTION_INPUT
#define PW_DIRECTION_INPUT
Definition: port.h:57
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
spa_latency_info::max_rate
uint32_t max_rate
Definition: latency-utils.h:42
spa_node_remove_port
#define spa_node_remove_port(n,...)
Definition: build-12775836/doc/spa/node/node.h:656
pw_impl_port_state
pw_impl_port_state
Definition: impl-port.h:49
spa_io_buffers::status
int32_t status
the status code
Definition: io.h:99
result_port_params_data::callback
int(* callback)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, struct spa_pod *param)
Definition: impl-port.c:1126
pw_impl_port_get_id
uint32_t pw_impl_port_get_id(struct pw_impl_port *port)
Get the port id.
Definition: impl-port.c:659
spa_latency_info::direction
enum spa_direction direction
Definition: latency-utils.h:38
spa_result_node_params::next
uint32_t next
next index of iteration
Definition: build-12775836/doc/spa/node/node.h:140
resource_data::subscribe_ids
uint32_t subscribe_ids[MAX_PARAMS]
Definition: impl-device.c:68
PW_KEY_NODE_ID
#define PW_KEY_NODE_ID
Node keys.
Definition: src/pipewire/keys.h:137
SPA_PORT_CHANGE_MASK_PARAMS
#define SPA_PORT_CHANGE_MASK_PARAMS
Definition: build-12775836/doc/spa/node/node.h:98
SPA_PARAM_INFO_WRITE
#define SPA_PARAM_INFO_WRITE
Definition: param.h:69
spa_latency_info_combine
int spa_latency_info_combine(struct spa_latency_info *info, const struct spa_latency_info *other)
Definition: latency-utils.h:63
SPA_PARAM_IO_size
@ SPA_PARAM_IO_size
size of the io area (Int)
Definition: param.h:101
SPA_POD_Int
#define SPA_POD_Int(val)
Definition: vararg.h:59
SPA_STATUS_NEED_DATA
#define SPA_STATUS_NEED_DATA
Definition: io.h:95
spa_zero
#define spa_zero(x)
Definition: defs.h:303
port::params
struct spa_param_info params[N_PORT_PARAMS]
Definition: filter.c:110
control
Definition: stream.c:86
pw_port_methods
Port methods.
Definition: port.h:118
NAME
#define NAME
Definition: impl-port.c:41
PW_KEY_OBJECT_ID
#define PW_KEY_OBJECT_ID
a global object id
Definition: src/pipewire/keys.h:66
port::info
struct spa_port_info info
Definition: filter.c:101
SPA_PORT_CHANGE_MASK_PROPS
#define SPA_PORT_CHANGE_MASK_PROPS
Definition: build-12775836/doc/spa/node/node.h:97
result_port_params_data::impl
struct impl * impl
Definition: impl-port.c:1124
pw_impl_port_set_param
int pw_impl_port_set_param(struct pw_impl_port *port, uint32_t id, uint32_t flags, const struct spa_pod *param)
Definition: impl-port.c:1365
pw_global_register
int pw_global_register(struct pw_global *global)
Register a global object to the context registry.
Definition: global.c:125
format-utils.h
spa_latency_info::max_ns
uint64_t max_ns
Definition: latency-utils.h:44
PW_KEY_PORT_NAME
#define PW_KEY_PORT_NAME
port name
Definition: src/pipewire/keys.h:184
types.h
spa_node_port_enum_params
#define spa_node_port_enum_params(n,...)
Definition: build-12775836/doc/spa/node/node.h:657
pw_impl_port_events::control_removed
void(* control_removed)(void *data, struct pw_control *control)
a control was removed from the port
Definition: impl-port.h:88
spa_latency_info
Definition: latency-utils.h:37
SPA_DICT_ITEM_INIT
#define SPA_DICT_ITEM_INIT(key, value)
Definition: utils/dict.h:46
resource_data
Definition: impl-core.c:74
resource_data::seq
int seq
Definition: impl-device.c:72
string.h
spa_latency_info_compare
int spa_latency_info_compare(const struct spa_latency_info *a, struct spa_latency_info *b)
Definition: latency-utils.h:50
spa_latency_parse
int spa_latency_parse(const struct spa_pod *latency, struct spa_latency_info *info)
Definition: latency-utils.h:83
spa_port_info::n_params
uint32_t n_params
number of items in params
Definition: build-12775836/doc/spa/node/node.h:123
SPA_PARAM_Latency
@ SPA_PARAM_Latency
latency reporting, a SPA_TYPE_OBJECT_ParamLatency
Definition: param.h:59
data
user data to add to an object
Definition: filter.c:75
pw_global_new
struct pw_global * pw_global_new(struct pw_context *context, const char *type, uint32_t version, struct pw_properties *properties, pw_global_bind_func_t func, void *object)
Create a new global object.
Definition: global.c:66
pw_global_add_resource
int pw_global_add_resource(struct pw_global *global, struct pw_resource *resource)
Add a resource to a global.
Definition: global.c:230
SPA_DICT_INIT_ARRAY
#define SPA_DICT_INIT_ARRAY(items)
Definition: utils/dict.h:56
spa_streq
bool spa_streq(const char *s1, const char *s2)
Definition: string.h:50
PW_KEY_OBJECT_PATH
#define PW_KEY_OBJECT_PATH
object properties
Definition: src/pipewire/keys.h:65
resource_data::resource_listener
struct spa_hook resource_listener
Definition: impl-core.c:76
spa_list_for_each
#define spa_list_for_each(pos, head, member)
Definition: list.h:111
PW_BUFFERS_FLAG_DYNAMIC
#define PW_BUFFERS_FLAG_DYNAMIC
buffers have dynamic data
Definition: buffers.h:40
impl::param_list
struct spa_list param_list
Definition: impl-device.c:40
pw_impl_port_events::version
uint32_t version
Definition: impl-port.h:60
port::io
struct spa_io_buffers * io
Definition: filter.c:112
pw_context_create_port
struct pw_impl_port * pw_context_create_port(struct pw_context *context, enum pw_direction direction, uint32_t port_id, const struct spa_port_info *info, size_t user_data_size)
Create a new port.
Definition: impl-port.c:443
pw_impl_port_events
Port events, use pw_impl_port_add_listener.
Definition: impl-port.h:58
spa_port_info::flags
uint64_t flags
port flags
Definition: build-12775836/doc/spa/node/node.h:119
spa_latency_info::min_rate
uint32_t min_rate
Definition: latency-utils.h:41
SPA_EXPORT
#define SPA_EXPORT
Definition: defs.h:208
SPA_DIRECTION_INPUT
@ SPA_DIRECTION_INPUT
Definition: defs.h:79
pw_global_events
Global events, use pw_global_add_listener.
Definition: global.h:68
pw_log_trace
#define pw_log_trace(...)
Definition: src/pipewire/log.h:90
pw_impl_port_get_info
const struct pw_port_info * pw_impl_port_get_info(struct pw_impl_port *port)
Get the port info.
Definition: impl-port.c:700
spa_latency_info::max_quantum
float max_quantum
Definition: latency-utils.h:40
spa_result_node_params::id
uint32_t id
id of parameter
Definition: build-12775836/doc/spa/node/node.h:138
pw_impl_port_recalc_latency
int pw_impl_port_recalc_latency(struct pw_impl_port *port)
Definition: impl-port.c:1301
SPA_PORT_FLAG_PHYSICAL
#define SPA_PORT_FLAG_PHYSICAL
connects to some device
Definition: build-12775836/doc/spa/node/node.h:112
pw_control_new
struct pw_control * pw_control_new(struct pw_context *context, struct pw_impl_port *port, uint32_t id, uint32_t size, size_t user_data_size)
Definition: control.c:40
pw_impl_port_for_each_param
int pw_impl_port_for_each_param(struct pw_impl_port *port, int seq, uint32_t param_id, uint32_t index, uint32_t max, const struct spa_pod *filter, int(*callback)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, struct spa_pod *param), void *data)
Definition: impl-port.c:1157
pw_impl_port_events::control_added
void(* control_added)(void *data, struct pw_control *control)
a control was added to the port
Definition: impl-port.h:85
PW_KEY_PORT_CONTROL
#define PW_KEY_PORT_CONTROL
if this port is a control port
Definition: src/pipewire/keys.h:190
node
Definition: module-filter-chain.c:155
pw_impl_port_register
int pw_impl_port_register(struct pw_impl_port *port, struct pw_properties *properties)
Definition: impl-port.c:877
spa_result_node_params::index
uint32_t index
index of parameter
Definition: build-12775836/doc/spa/node/node.h:139
PW_PORT_CHANGE_MASK_ALL
#define PW_PORT_CHANGE_MASK_ALL
Definition: port.h:68
impl
Definition: control.c:33
spa_node_port_enum_params_sync
int spa_node_port_enum_params_sync(struct spa_node *node, enum spa_direction direction, uint32_t port_id, uint32_t id, uint32_t *index, const struct spa_pod *filter, struct spa_pod **param, struct spa_pod_builder *builder)
Definition: build-12775836/doc/spa/node/utils.h:92
pw_buffers_negotiate
int pw_buffers_negotiate(struct pw_context *context, uint32_t flags, struct spa_node *outnode, uint32_t out_port_id, struct spa_node *innode, uint32_t in_port_id, struct pw_buffers *result)
Definition: buffers.c:238
pw_impl_port_use_buffers
int pw_impl_port_use_buffers(struct pw_impl_port *port, struct pw_impl_port_mix *mix, uint32_t flags, struct spa_buffer **buffers, uint32_t n_buffers)
Definition: impl-port.c:1485
SPA_PARAM_INFO_READ
#define SPA_PARAM_INFO_READ
Definition: param.h:68
spa_hook_list_append
void spa_hook_list_append(struct spa_hook_list *list, struct spa_hook *hook, const void *funcs, void *data)
Append a hook.
Definition: hook.h:316
spa_list
Definition: list.h:37
SPA_PARAM_IO_id
@ SPA_PARAM_IO_id
type ID, uniquely identifies the io area (Id enum spa_io_type)
Definition: param.h:100
SPA_MEDIA_TYPE_audio
@ SPA_MEDIA_TYPE_audio
Definition: param/format.h:42
SPA_NAME_CONTROL_MIXER
#define SPA_NAME_CONTROL_MIXER
mixes control streams
Definition: names.h:51
pw_impl_port_set_mix
int pw_impl_port_set_mix(struct pw_impl_port *port, struct spa_node *node, uint32_t flags)
Definition: impl-port.c:539
pw_impl_port_for_each_filtered_param
int pw_impl_port_for_each_filtered_param(struct pw_impl_port *in_port, struct pw_impl_port *out_port, int seq, uint32_t in_param_id, uint32_t out_param_id, const struct spa_pod *filter, int(*callback)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, struct spa_pod *param), void *data)
Definition: impl-port.c:1259
SPA_PTROFF
#define SPA_PTROFF(ptr_, offset_, type_)
Return the address (buffer + offset) as pointer of type.
Definition: defs.h:159
port::node
struct spa_node * node
Definition: buffers.c:45
SPA_IO_Control
@ SPA_IO_Control
area for control messages, struct spa_io_sequence
Definition: io.h:57
PW_IMPL_PORT_STATE_ERROR
@ PW_IMPL_PORT_STATE_ERROR
the port is in error
Definition: impl-port.h:50
spa_node_port_set_param
#define spa_node_port_set_param(n,...)
Definition: build-12775836/doc/spa/node/node.h:658
SPA_VERSION_NODE_EVENTS
#define SPA_VERSION_NODE_EVENTS
Definition: build-12775836/doc/spa/node/node.h:157
handle
Definition: pipewire.c:68
PW_KEY_PORT_MONITOR
#define PW_KEY_PORT_MONITOR
if this port is a monitor port
Definition: src/pipewire/keys.h:191
impl::id
uint32_t id
Definition: module-echo-cancel.c:139
pw_properties_new_dict
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
pw_impl_port_get_node
struct pw_impl_node * pw_impl_port_get_node(struct pw_impl_port *port)
Get the port parent node or NULL when not yet set.
Definition: impl-port.c:685
SPA_INTERFACE_INIT
#define SPA_INTERFACE_INIT(_type, _version, _funcs, _data)
Initialize a spa_interface.
Definition: hook.h:165
pw_impl_port_get_user_data
void * pw_impl_port_get_user_data(struct pw_impl_port *port)
Definition: impl-port.c:706
SPA_LATENCY_INFO
#define SPA_LATENCY_INFO(dir,...)
Definition: latency-utils.h:47
impl.h
spa_loop
Definition: build-12775836/doc/spa/support/loop.h:44
pw_properties::dict
struct spa_dict dict
dictionary of key/values
Definition: properties.h:50
port::latency
struct spa_latency_info latency[2]
Definition: filter.c:120
SPA_VERSION_NODE
#define SPA_VERSION_NODE
Definition: build-12775836/doc/spa/node/node.h:52
spa_dict_item
Definition: utils/dict.h:41
spa_pod_filter
int spa_pod_filter(struct spa_pod_builder *b, struct spa_pod **result, const struct spa_pod *pod, const struct spa_pod *filter)
Definition: build-12775836/doc/spa/pod/filter.h:387
SPA_CONTAINER_OF
#define SPA_CONTAINER_OF(p, t, m)
Definition: defs.h:170
spa_latency_info::min_ns
uint64_t min_ns
Definition: latency-utils.h:43
SPA_PARAM_Format
@ SPA_PARAM_Format
configured format as SPA_TYPE_OBJECT_Format
Definition: param.h:48
spa_param_info::flags
uint32_t flags
Definition: param.h:71
spa_list_consume
#define spa_list_consume(pos, head, member)
Definition: list.h:96
param_filter::n_params
uint32_t n_params
Definition: impl-port.c:1249
SPA_TYPE_INTERFACE_Node
#define SPA_TYPE_INTERFACE_Node
Definition: build-12775836/doc/spa/node/node.h:50
SPA_AUDIO_FORMAT_DSP_F32
@ SPA_AUDIO_FORMAT_DSP_F32
Definition: audio/raw.h:100
port::link
struct spa_list link
Definition: filter.c:89
pw_direction_reverse
enum pw_direction pw_direction_reverse(enum pw_direction direction)
Reverse the direction.
Definition: pipewire.c:729
spa_io_buffers
IO area to exchange buffers.
Definition: io.h:93
port::port
struct pw_port * port
Definition: filter.c:96
pw_impl_port_get_properties
const struct pw_properties * pw_impl_port_get_properties(struct pw_impl_port *port)
Get the port properties.
Definition: impl-port.c:665
spa_node_add_port
#define spa_node_add_port(n,...)
Definition: build-12775836/doc/spa/node/node.h:655
spa_pod
Definition: pod/pod.h:50
pw_port_info
Definition: port.h:63
SPA_PORT_FLAG_TERMINAL
#define SPA_PORT_FLAG_TERMINAL
data was not created from this port or will not be made available on another port
Definition: build-12775836/doc/spa/node/node.h:113
SPA_IO_Buffers
@ SPA_IO_Buffers
area to exchange buffers, struct spa_io_buffers
Definition: io.h:53
SPA_VERSION_NODE_METHODS
#define SPA_VERSION_NODE_METHODS
Definition: build-12775836/doc/spa/node/node.h:284
pw_global_add_listener
void pw_global_add_listener(struct pw_global *global, struct spa_hook *listener, const struct pw_global_events *events, void *data)
Add an event listener on the global.
Definition: global.c:255
spa_node_port_set_io
#define spa_node_port_set_io(n,...)
Definition: build-12775836/doc/spa/node/node.h:660
SPA_MEDIA_TYPE_application
@ SPA_MEDIA_TYPE_application
Definition: param/format.h:47
spa_result_node_params::param
struct spa_pod * param
the result param
Definition: build-12775836/doc/spa/node/node.h:141
PW_DIRECTION_OUTPUT
#define PW_DIRECTION_OUTPUT
Definition: port.h:58
spa_node_methods
Node methods.
Definition: build-12775836/doc/spa/node/node.h:281
PW_PORT_CHANGE_MASK_PROPS
#define PW_PORT_CHANGE_MASK_PROPS
Definition: port.h:66
utils.h
spa_node_port_use_buffers
#define spa_node_port_use_buffers(n,...)
Definition: build-12775836/doc/spa/node/node.h:659
spa_list_remove
void spa_list_remove(struct spa_list *elem)
Definition: list.h:69
pw_resource_add_object_listener
void pw_resource_add_object_listener(struct pw_resource *resource, struct spa_hook *listener, const void *funcs, void *data)
Set the resource implementation.
Definition: resource.c:174
port
Definition: buffers.c:44
spa_format_audio_dsp_parse
int spa_format_audio_dsp_parse(const struct spa_pod *format, struct spa_audio_info_dsp *info)
Definition: audio/format-utils.h:62
SPA_N_ELEMENTS
#define SPA_N_ELEMENTS(arr)
Definition: defs.h:109
SPA_FLAG_SET
#define SPA_FLAG_SET(field, flag)
Definition: defs.h:74
resource_data::object_listener
struct spa_hook object_listener
Definition: impl-core.c:77
SPA_RESULT_IS_OK
#define SPA_RESULT_IS_OK(res)
Definition: result.h:44
SPA_DIRECTION_REVERSE
#define SPA_DIRECTION_REVERSE(d)
Definition: defs.h:83
SPA_STATUS_HAVE_DATA
#define SPA_STATUS_HAVE_DATA
Definition: io.h:96
spa_buffer
A Buffer.
Definition: buffer/buffer.h:93
pw_control_destroy
void pw_control_destroy(struct pw_control *control)
Definition: control.c:94
SPA_TYPE_OBJECT_ParamIO
@ SPA_TYPE_OBJECT_ParamIO
Definition: build-12775836/doc/spa/utils/type.h:93
spa_latency_build
struct spa_pod * spa_latency_build(struct spa_pod_builder *builder, uint32_t id, const struct spa_latency_info *info)
Definition: latency-utils.h:102
filter
Definition: filter.c:126
spa_node
Definition: build-12775836/doc/spa/node/node.h:53
spa_hook
A hook, contains the structure with functions and the data passed to the functions.
Definition: hook.h:295
pw_impl_port_is_linked
int pw_impl_port_is_linked(struct pw_impl_port *port)
check is a port has links, return 0 if not, 1 if it is linked
Definition: impl-port.c:1359
pw_resource_errorf
void pw_resource_errorf(struct pw_resource *resource, int res, const char *error,...) 1(3
filter.h
PW_VERSION_RESOURCE_EVENTS
#define PW_VERSION_RESOURCE_EVENTS
Definition: resource.h:61
spa_result_node_params
the result of enum_params or port_enum_params.
Definition: build-12775836/doc/spa/node/node.h:137
pw_resource_add_listener
void pw_resource_add_listener(struct pw_resource *resource, struct spa_hook *listener, const struct pw_resource_events *events, void *data)
Add an event listener.
Definition: resource.c:165
SPA_RESULT_TYPE_NODE_PARAMS
#define SPA_RESULT_TYPE_NODE_PARAMS
Definition: build-12775836/doc/spa/node/node.h:129
SPA_PORT_CHANGE_MASK_FLAGS
#define SPA_PORT_CHANGE_MASK_FLAGS
Definition: build-12775836/doc/spa/node/node.h:95
param_filter::data
void * data
Definition: impl-port.c:1248
spa_handle
Definition: plugin.h:44
spa_audio_info_dsp::format
enum spa_audio_format format
Definition: audio/raw.h:305
spa_port_info::change_mask
uint64_t change_mask
Definition: build-12775836/doc/spa/node/node.h:99
SPA_LOG_LEVEL_DEBUG
@ SPA_LOG_LEVEL_DEBUG
Definition: build-12775836/doc/spa/support/log.h:51
SPA_FLAG_IS_SET
#define SPA_FLAG_IS_SET(field, flag)
Definition: defs.h:73
spa_node_port_reuse_buffer
#define spa_node_port_reuse_buffer(n,...)
Definition: build-12775836/doc/spa/node/node.h:662
buffer
Definition: filter.c:59
pw_properties_update_ignore
int pw_properties_update_ignore(struct pw_properties *props, const struct spa_dict *dict, const char *const ignore[])
Definition: properties.c:259
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
spa_list_for_each_safe
#define spa_list_for_each_safe(pos, tmp, head, member)
Definition: list.h:129
impl::pending_list
struct spa_list pending_list
Definition: impl-device.c:41
spa_pod_builder_init
void spa_pod_builder_init(struct spa_pod_builder *builder, void *data, uint32_t size)
Definition: builder.h:96
PW_VERSION_PORT
#define PW_VERSION_PORT
Definition: port.h:52
param_filter::out_param_id
uint32_t out_param_id
Definition: impl-port.c:1245
spa_dict
Definition: utils/dict.h:48
param_filter::seq
int seq
Definition: impl-port.c:1243
SPA_IO_Notify
@ SPA_IO_Notify
area for notify messages, struct spa_io_sequence
Definition: io.h:58
pw_impl_port_add
int pw_impl_port_add(struct pw_impl_port *port, struct pw_impl_node *node)
Add a port to a node.
Definition: impl-port.c:926
spa_port_info
Port information structure.
Definition: build-12775836/doc/spa/node/node.h:94
param_filter
Definition: impl-port.c:1240
SPA_RESULT_IS_ASYNC
#define SPA_RESULT_IS_ASYNC(res)
Definition: result.h:46
SPA_DIRECTION_OUTPUT
@ SPA_DIRECTION_OUTPUT
Definition: defs.h:80
param_filter::in_param_id
uint32_t in_param_id
Definition: impl-port.c:1244
pw_impl_port_init_mix
int pw_impl_port_init_mix(struct pw_impl_port *port, struct pw_impl_port_mix *mix)
Definition: impl-port.c:207
pw_impl_port_events::link_removed
void(* link_removed)(void *data, struct pw_impl_link *link)
a link is removed from this port
Definition: impl-port.h:78
spa_audio_info_dsp
Definition: audio/raw.h:304
SPA_NAME_AUDIO_MIXER_DSP
#define SPA_NAME_AUDIO_MIXER_DSP
mixes mono audio with fixed input and output buffer sizes.
Definition: names.h:57
param_filter::callback
int(* callback)(void *data, int seq, uint32_t id, uint32_t index, uint32_t next, struct spa_pod *param)
Definition: impl-port.c:1246
pw_impl_port_events::param_changed
void(* param_changed)(void *data, uint32_t id)
a parameter changed, since version 1
Definition: impl-port.h:91
pw_impl_port_events::destroy
void(* destroy)(void *data)
The port is destroyed.
Definition: impl-port.h:63
pw_impl_port_add_listener
void pw_impl_port_add_listener(struct pw_impl_port *port, struct spa_hook *listener, const struct pw_impl_port_events *events, void *data)
Add an event listener on the port.
Definition: impl-port.c:691
port::port_id
uint32_t port_id
Definition: buffers.c:47
pw_buffers_clear
void pw_buffers_clear(struct pw_buffers *buffers)
Definition: buffers.c:356
SPA_LOG_LEVEL_ERROR
@ SPA_LOG_LEVEL_ERROR
Definition: build-12775836/doc/spa/support/log.h:48
pw_impl_port_events::latency_changed
void(* latency_changed)(void *data)
latency changed.
Definition: impl-port.h:94
pw_global_update_keys
int pw_global_update_keys(struct pw_global *global, const struct spa_dict *dict, const char *const keys[])
Update the global properties, must be done when unregistered.
Definition: global.c:209
port::flags
uint32_t flags
Definition: filter.c:95
spa_pod_parse_object
#define spa_pod_parse_object(pod, type, id,...)
Definition: parser.h:560
impl::cache_params
unsigned int cache_params
Definition: impl-device.c:43
pw_context_load_spa_handle
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
spa_port_info::params
struct spa_param_info * params
parameter information
Definition: build-12775836/doc/spa/node/node.h:122
spa_strerror
#define spa_strerror(err)
Definition: result.h:51
pw_impl_port_destroy
void pw_impl_port_destroy(struct pw_impl_port *port)
Definition: impl-port.c:1079
pw_resource_new
struct pw_resource * pw_resource_new(struct pw_impl_client *client, uint32_t id, uint32_t permissions, const char *type, uint32_t version, size_t user_data_size)
Make a new resource for client.
Definition: resource.c:43
pw_impl_port_update_state
void pw_impl_port_update_state(struct pw_impl_port *port, enum pw_impl_port_state state, int res, char *error)
Definition: impl-port.c:106
param
Definition: filter.c:80
PW_IMPL_PORT_STATE_CONFIGURE
@ PW_IMPL_PORT_STATE_CONFIGURE
the port is ready for format negotiation
Definition: impl-port.h:52
PW_NODE_CHANGE_MASK_OUTPUT_PORTS
#define PW_NODE_CHANGE_MASK_OUTPUT_PORTS
Definition: src/pipewire/node.h:75
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
param_filter::in_port
struct pw_impl_port * in_port
Definition: impl-port.c:1241
client
Definition: module-protocol-native.c:103
result_port_params_data::count
uint32_t count
Definition: impl-port.c:1130
spa_type_io
const struct spa_type_info spa_type_io[]
Definition: node/type-info.h:46
PW_KEY_PORT_TERMINAL
#define PW_KEY_PORT_TERMINAL
if this port consumes the data
Definition: src/pipewire/keys.h:189
spa_handle_get_interface
#define spa_handle_get_interface(h,...)
Definition: plugin.h:73
pw_log
#define pw_log(lev,...)
Definition: src/pipewire/log.h:80
pw_impl_port_get_direction
enum pw_direction pw_impl_port_get_direction(struct pw_impl_port *port)
Get the port direction.
Definition: impl-port.c:653
pw_global_destroy
void pw_global_destroy(struct pw_global *global)
Destroy a global.
Definition: global.c:369
port::user_data
uint8_t user_data[0]
Definition: filter.c:123
param_filter::out_port
struct pw_impl_port * out_port
Definition: impl-port.c:1242
resource_data::n_subscribe_ids
uint32_t n_subscribe_ids
Definition: impl-device.c:69
SPA_MIN
#define SPA_MIN(a, b)
Definition: defs.h:123
PW_VERSION_GLOBAL_EVENTS
#define PW_VERSION_GLOBAL_EVENTS
Definition: global.h:69
SPA_ID_INVALID
#define SPA_ID_INVALID
Definition: defs.h:182
pw_unload_spa_handle
int pw_unload_spa_handle(struct spa_handle *handle)
Definition: pipewire.c:321
spa_param_info::user
uint32_t user
private user field.
Definition: param.h:72
pw_properties_set
int pw_properties_set(struct pw_properties *properties, const char *key, const char *value)
Set a property value.
Definition: properties.c:435
spa_list_is_empty
#define spa_list_is_empty(l)
Definition: list.h:49
SPA_MEDIA_SUBTYPE_control
@ SPA_MEDIA_SUBTYPE_control
control stream, data contains spa_pod_sequence with control info.
Definition: param/format.h:94
resource_data::data
struct result_device_params_data data
Definition: impl-device.c:76
SPA_PARAM_IO
@ SPA_PARAM_IO
configurable IO areas as SPA_TYPE_OBJECT_ParamIO
Definition: param.h:51
parser.h
spa_pod::type
uint32_t type
Definition: pod/pod.h:52
PW_KEY_PORT_PHYSICAL
#define PW_KEY_PORT_PHYSICAL
if this is a physical port
Definition: src/pipewire/keys.h:188
PW_PORT_CHANGE_MASK_PARAMS
#define PW_PORT_CHANGE_MASK_PARAMS
Definition: port.h:67
spa_param_info::id
uint32_t id
enum spa_param_type
Definition: param.h:65
spa_type_media_subtype
const struct spa_type_info spa_type_media_subtype[]
Definition: param/type-info.h:194
PW_NODE_CHANGE_MASK_INPUT_PORTS
#define PW_NODE_CHANGE_MASK_INPUT_PORTS
Definition: src/pipewire/node.h:74
pw_resource_error
void pw_resource_error(struct pw_resource *resource, int res, const char *error)
Generate an error for a resource.
Definition: resource.c:255
pw_log_warn
#define pw_log_warn(...)
Definition: src/pipewire/log.h:87
pw_impl_port_events::info_changed
void(* info_changed)(void *data, const struct pw_port_info *info)
the port info changed
Definition: impl-port.h:72
pw_impl_port_events::link_added
void(* link_added)(void *data, struct pw_impl_link *link)
a new link is added on this port
Definition: impl-port.h:75
pw_impl_port_release_mix
int pw_impl_port_release_mix(struct pw_impl_port *port, struct pw_impl_port_mix *mix)
Definition: impl-port.c:252
spa_type_media_type
const struct spa_type_info spa_type_media_type[]
Definition: param/type-info.h:180
pw_impl_port_for_each_link
int pw_impl_port_for_each_link(struct pw_impl_port *port, int(*callback)(void *data, struct pw_impl_link *link), void *data)
Definition: impl-port.c:1282
result_port_params_data::data
void * data
Definition: impl-port.c:1125
impl::this
struct pw_control this
Definition: control.c:34
pw_map
A map.
Definition: map.h:55
pw_loop_invoke
#define pw_loop_invoke(l,...)
Definition: src/pipewire/loop.h:63
pw_impl_port_events::initialized
void(* initialized)(void *data)
The port is initialized.
Definition: impl-port.h:69
spa_type_param
const struct spa_type_info spa_type_param[]
Definition: param/type-info.h:46
spa_hook_remove
void spa_hook_remove(struct spa_hook *hook)
Remove a hook.
Definition: hook.h:336
PW_VERSION_PORT_METHODS
#define PW_VERSION_PORT_METHODS
Definition: port.h:119
pw_resource_get_user_data
void * pw_resource_get_user_data(struct pw_resource *resource)
Get the user data for the resource, the size was given in pw_resource_new.
Definition: resource.c:159
spa_node_add_listener
#define spa_node_add_listener(n,...)
Definition: build-12775836/doc/spa/node/node.h:648
port::p
unsigned long p
Definition: module-filter-chain.c:145
spa_io_buffers::buffer_id
uint32_t buffer_id
a buffer id
Definition: io.h:100
spa_node_events
events from the spa_node.
Definition: build-12775836/doc/spa/node/node.h:156
PW_IMPL_PORT_STATE_PAUSED
@ PW_IMPL_PORT_STATE_PAUSED
the port is paused
Definition: impl-port.h:54
pw_impl_port_events::free
void(* free)(void *data)
The port is freed.
Definition: impl-port.h:66
PW_KEY_PORT_ID
#define PW_KEY_PORT_ID
Port keys.
Definition: src/pipewire/keys.h:183
pw_log_trace_fp
#define pw_log_trace_fp(...)
Definition: src/pipewire/log.h:93
PW_KEY_PORT_DIRECTION
#define PW_KEY_PORT_DIRECTION
the port direction, one of "in" or "out" or "control" and "notify" for control ports
Definition: src/pipewire/keys.h:185
resource_data::resource
struct pw_resource * resource
Definition: impl-core.c:75
spa_hook_list_init
void spa_hook_list_init(struct spa_hook_list *list)
Initialize a hook list to the empty list.
Definition: hook.h:305
result_port_params_data::seq
int seq
Definition: impl-port.c:1129
names.h
SPA_NODE_BUFFERS_FLAG_ALLOC
#define SPA_NODE_BUFFERS_FLAG_ALLOC
flags to pass to the use_buffers functions
Definition: build-12775836/doc/spa/node/node.h:256
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
pw_impl_port_events::state_changed
void(* state_changed)(void *data, enum pw_impl_port_state old, enum pw_impl_port_state state, const char *error)
the state of the port changed
Definition: impl-port.h:81
SPA_IO_BUFFERS_INIT
#define SPA_IO_BUFFERS_INIT
Definition: io.h:103
pw_impl_port_unlink
void pw_impl_port_unlink(struct pw_impl_port *port)
Definition: impl-port.c:1027
SPA_POD_Id
#define SPA_POD_Id(val)
Definition: vararg.h:56
pw_impl_port_update_info
void pw_impl_port_update_info(struct pw_impl_port *port, const struct spa_port_info *info)
Definition: impl-port.c:678
SPA_UNLIKELY
#define SPA_UNLIKELY(x)
Definition: defs.h:235
pw_properties_new
struct pw_properties * pw_properties_new(const char *key,...) 1
Make a new properties object.
Definition: properties.c:98
pw_impl_port_update_properties
int pw_impl_port_update_properties(struct pw_impl_port *port, const struct spa_dict *dict)
Update the port properties.
Definition: impl-port.c:671
port::buffers
struct buffer buffers[MAX_BUFFERS]
Definition: filter.c:114
pw_resource_events
Resource events.
Definition: resource.h:60
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
port::direction
enum spa_direction direction
Definition: buffers.c:46
spa_port_info::props
const struct spa_dict * props
extra port properties
Definition: build-12775836/doc/spa/node/node.h:121
pw_resource_events::version
uint32_t version
Definition: resource.h:62
pw_direction
#define pw_direction
The direction of a port.
Definition: port.h:56
port::n_buffers
uint32_t n_buffers
Definition: filter.c:115
port::id
uint32_t id
Definition: filter.c:94
PW_KEY_PORT_ALIAS
#define PW_KEY_PORT_ALIAS
port alias
Definition: src/pipewire/keys.h:187
result_port_params_data
Definition: impl-port.c:1123
result_port_params_data::cache
unsigned int cache
Definition: impl-port.c:1131
PW_KEY_AUDIO_CHANNEL
#define PW_KEY_AUDIO_CHANNEL
audio related properties
Definition: src/pipewire/keys.h:305
pw_properties
Definition: properties.h:49
spa_hook_list_clean
void spa_hook_list_clean(struct spa_hook_list *list)
Remove all hooks from the list.
Definition: hook.h:344
pw_properties_free
void pw_properties_free(struct pw_properties *properties)
Free a properties object.
Definition: properties.c:364
node::id
uint32_t id
Definition: alsa-monitor.c:72
PW_TYPE_INTERFACE_Port
#define PW_TYPE_INTERFACE_Port
Definition: port.h:50
SPA_KEY_LIBRARY_NAME
#define SPA_KEY_LIBRARY_NAME
the name of a library.
Definition: plugin.h:216
pw_log_error
#define pw_log_error(...)
Definition: src/pipewire/log.h:86
spa_debug_type_find_name
const char * spa_debug_type_find_name(const struct spa_type_info *info, uint32_t type)
Definition: types.h:68
PW_IMPL_PORT_STATE_READY
@ PW_IMPL_PORT_STATE_READY
the port is ready for buffer allocation
Definition: impl-port.h:53
spa_list_append
#define spa_list_append(list, item)
Definition: list.h:81
spa_latency_info::min_quantum
float min_quantum
Definition: latency-utils.h:39