PipeWire 0.3.15
impl-link.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_LINK_H
26#define PIPEWIRE_IMPL_LINK_H
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
36struct pw_impl_link;
37struct pw_impl_port;
38
39#include <pipewire/impl.h>
40
54#define PW_VERSION_IMPL_LINK_EVENTS 0
55 uint32_t version;
56
58 void (*destroy) (void *data);
59
61 void (*free) (void *data);
62
64 void (*initialized) (void *data);
65
67 void (*info_changed) (void *data, const struct pw_link_info *info);
68
71 void (*state_changed) (void *data, enum pw_link_state old,
72 enum pw_link_state state, const char *error);
73
75 void (*port_unlinked) (void *data, struct pw_impl_port *port);
76};
77
78
81struct pw_impl_link *
82pw_context_create_link(struct pw_context *context,
83 struct pw_impl_port *output,
84 struct pw_impl_port *input,
85 struct spa_pod *format_filter,
86 struct pw_properties *properties ,
87 size_t user_data_size );
88
90void pw_impl_link_destroy(struct pw_impl_link *link);
91
94 struct spa_hook *listener,
95 const struct pw_impl_link_events *events,
96 void *data);
97
99int pw_impl_link_register(struct pw_impl_link *link,
100 struct pw_properties *properties );
101
104
107void *pw_impl_link_get_user_data(struct pw_impl_link *link);
108
110const struct pw_link_info *pw_impl_link_get_info(struct pw_impl_link *link);
111
114
117
120
122struct pw_impl_link *pw_impl_link_find(struct pw_impl_port *output, struct pw_impl_port *input);
123
124#ifdef __cplusplus
125}
126#endif
127
128#endif /* PIPEWIRE_IMPL_LINK_H */
the PipeWire context
A global object visible to remote clients.
The port object.
Definition: filter.c:71
Definition: buffers.c:44
A collection of key/value pairs.
Definition: properties.h:45