1use spa_sys::*;
4
5#[repr(C)]
6#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
7pub struct __BindgenBitfieldUnit<Storage> {
8 storage: Storage,
9}
10impl<Storage> __BindgenBitfieldUnit<Storage> {
11 #[inline]
12 pub const fn new(storage: Storage) -> Self {
13 Self { storage }
14 }
15}
16impl<Storage> __BindgenBitfieldUnit<Storage>
17where
18 Storage: AsRef<[u8]> + AsMut<[u8]>,
19{
20 #[inline]
21 fn extract_bit(byte: u8, index: usize) -> bool {
22 let bit_index = if cfg!(target_endian = "big") {
23 7 - (index % 8)
24 } else {
25 index % 8
26 };
27 let mask = 1 << bit_index;
28 byte & mask == mask
29 }
30 #[inline]
31 pub fn get_bit(&self, index: usize) -> bool {
32 debug_assert!(index / 8 < self.storage.as_ref().len());
33 let byte_index = index / 8;
34 let byte = self.storage.as_ref()[byte_index];
35 Self::extract_bit(byte, index)
36 }
37 #[inline]
38 pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool {
39 debug_assert!(index / 8 < core::mem::size_of::<Storage>());
40 let byte_index = index / 8;
41 let byte = unsafe {
42 *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize)
43 };
44 Self::extract_bit(byte, index)
45 }
46 #[inline]
47 fn change_bit(byte: u8, index: usize, val: bool) -> u8 {
48 let bit_index = if cfg!(target_endian = "big") {
49 7 - (index % 8)
50 } else {
51 index % 8
52 };
53 let mask = 1 << bit_index;
54 if val { byte | mask } else { byte & !mask }
55 }
56 #[inline]
57 pub fn set_bit(&mut self, index: usize, val: bool) {
58 debug_assert!(index / 8 < self.storage.as_ref().len());
59 let byte_index = index / 8;
60 let byte = &mut self.storage.as_mut()[byte_index];
61 *byte = Self::change_bit(*byte, index, val);
62 }
63 #[inline]
64 pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) {
65 debug_assert!(index / 8 < core::mem::size_of::<Storage>());
66 let byte_index = index / 8;
67 let byte = unsafe {
68 (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize)
69 };
70 unsafe { *byte = Self::change_bit(*byte, index, val) };
71 }
72 #[inline]
73 pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
74 debug_assert!(bit_width <= 64);
75 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
76 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
77 let mut val = 0;
78 for i in 0..(bit_width as usize) {
79 if self.get_bit(i + bit_offset) {
80 let index = if cfg!(target_endian = "big") {
81 bit_width as usize - 1 - i
82 } else {
83 i
84 };
85 val |= 1 << index;
86 }
87 }
88 val
89 }
90 #[inline]
91 pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 {
92 debug_assert!(bit_width <= 64);
93 debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
94 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
95 let mut val = 0;
96 for i in 0..(bit_width as usize) {
97 if unsafe { Self::raw_get_bit(this, i + bit_offset) } {
98 let index = if cfg!(target_endian = "big") {
99 bit_width as usize - 1 - i
100 } else {
101 i
102 };
103 val |= 1 << index;
104 }
105 }
106 val
107 }
108 #[inline]
109 pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
110 debug_assert!(bit_width <= 64);
111 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
112 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
113 for i in 0..(bit_width as usize) {
114 let mask = 1 << i;
115 let val_bit_is_set = val & mask == mask;
116 let index = if cfg!(target_endian = "big") {
117 bit_width as usize - 1 - i
118 } else {
119 i
120 };
121 self.set_bit(index + bit_offset, val_bit_is_set);
122 }
123 }
124 #[inline]
125 pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) {
126 debug_assert!(bit_width <= 64);
127 debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
128 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
129 for i in 0..(bit_width as usize) {
130 let mask = 1 << i;
131 let val_bit_is_set = val & mask == mask;
132 let index = if cfg!(target_endian = "big") {
133 bit_width as usize - 1 - i
134 } else {
135 i
136 };
137 unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) };
138 }
139 }
140}
141pub const PW_TYPE_INFO_BASE: &[u8; 10] = b"PipeWire:\0";
142pub const PW_TYPE_INFO_Object: &[u8; 16] = b"PipeWire:Object\0";
143pub const PW_TYPE_INFO_OBJECT_BASE: &[u8; 17] = b"PipeWire:Object:\0";
144pub const PW_TYPE_INFO_Interface: &[u8; 19] = b"PipeWire:Interface\0";
145pub const PW_TYPE_INFO_INTERFACE_BASE: &[u8; 20] = b"PipeWire:Interface:\0";
146pub const PW_TYPE_INTERFACE_Core: &[u8; 24] = b"PipeWire:Interface:Core\0";
147pub const PW_TYPE_INTERFACE_Registry: &[u8; 28] = b"PipeWire:Interface:Registry\0";
148pub const PW_CORE_PERM_MASK: u32 = 328;
149pub const PW_VERSION_CORE: u32 = 4;
150pub const PW_VERSION_REGISTRY: u32 = 3;
151pub const PW_DEFAULT_REMOTE: &[u8; 11] = b"pipewire-0\0";
152pub const PW_ID_CORE: u32 = 0;
153pub const PW_ID_ANY: u32 = 4294967295;
154pub const PW_CORE_CHANGE_MASK_PROPS: u32 = 1;
155pub const PW_CORE_CHANGE_MASK_ALL: u32 = 1;
156pub const PW_PROPERTIES_FLAG_NL: u32 = 1;
157pub const PW_PROPERTIES_FLAG_RECURSE: u32 = 2;
158pub const PW_PROPERTIES_FLAG_ENCLOSE: u32 = 4;
159pub const PW_PROPERTIES_FLAG_ARRAY: u32 = 8;
160pub const PW_PROPERTIES_FLAG_COLORS: u32 = 16;
161pub const PW_CORE_EVENT_INFO: u32 = 0;
162pub const PW_CORE_EVENT_DONE: u32 = 1;
163pub const PW_CORE_EVENT_PING: u32 = 2;
164pub const PW_CORE_EVENT_ERROR: u32 = 3;
165pub const PW_CORE_EVENT_REMOVE_ID: u32 = 4;
166pub const PW_CORE_EVENT_BOUND_ID: u32 = 5;
167pub const PW_CORE_EVENT_ADD_MEM: u32 = 6;
168pub const PW_CORE_EVENT_REMOVE_MEM: u32 = 7;
169pub const PW_CORE_EVENT_BOUND_PROPS: u32 = 8;
170pub const PW_CORE_EVENT_NUM: u32 = 9;
171pub const PW_VERSION_CORE_EVENTS: u32 = 1;
172pub const PW_CORE_METHOD_ADD_LISTENER: u32 = 0;
173pub const PW_CORE_METHOD_HELLO: u32 = 1;
174pub const PW_CORE_METHOD_SYNC: u32 = 2;
175pub const PW_CORE_METHOD_PONG: u32 = 3;
176pub const PW_CORE_METHOD_ERROR: u32 = 4;
177pub const PW_CORE_METHOD_GET_REGISTRY: u32 = 5;
178pub const PW_CORE_METHOD_CREATE_OBJECT: u32 = 6;
179pub const PW_CORE_METHOD_DESTROY: u32 = 7;
180pub const PW_CORE_METHOD_NUM: u32 = 8;
181pub const PW_VERSION_CORE_METHODS: u32 = 0;
182pub const PW_REGISTRY_EVENT_GLOBAL: u32 = 0;
183pub const PW_REGISTRY_EVENT_GLOBAL_REMOVE: u32 = 1;
184pub const PW_REGISTRY_EVENT_NUM: u32 = 2;
185pub const PW_VERSION_REGISTRY_EVENTS: u32 = 0;
186pub const PW_REGISTRY_METHOD_ADD_LISTENER: u32 = 0;
187pub const PW_REGISTRY_METHOD_BIND: u32 = 1;
188pub const PW_REGISTRY_METHOD_DESTROY: u32 = 2;
189pub const PW_REGISTRY_METHOD_NUM: u32 = 3;
190pub const PW_VERSION_REGISTRY_METHODS: u32 = 0;
191pub const PW_VERSION_CONTEXT_EVENTS: u32 = 1;
192pub const PW_TYPE_INFO_Protocol: &[u8; 18] = b"PipeWire:Protocol\0";
193pub const PW_TYPE_INFO_PROTOCOL_BASE: &[u8; 19] = b"PipeWire:Protocol:\0";
194pub const PW_PROTOCOL_MARSHAL_FLAG_IMPL: u32 = 1;
195pub const PW_VERSION_PROTOCOL_IMPLEMENTATION: u32 = 1;
196pub const PW_VERSION_PROTOCOL_EVENTS: u32 = 0;
197pub const PW_VERSION_PROXY_EVENTS: u32 = 1;
198pub const PW_PERM_R: u32 = 256;
199pub const PW_PERM_W: u32 = 128;
200pub const PW_PERM_X: u32 = 64;
201pub const PW_PERM_M: u32 = 8;
202pub const PW_PERM_L: u32 = 16;
203pub const PW_PERM_RW: u32 = 384;
204pub const PW_PERM_RWX: u32 = 448;
205pub const PW_PERM_RWXM: u32 = 456;
206pub const PW_PERM_RWXML: u32 = 472;
207pub const PW_PERM_ALL: u32 = 456;
208pub const PW_PERM_INVALID: u32 = 4294967295;
209pub const PW_PERMISSION_FORMAT: &[u8; 11] = b"%c%c%c%c%c\0";
210pub const PW_TYPE_INTERFACE_Client: &[u8; 26] = b"PipeWire:Interface:Client\0";
211pub const PW_CLIENT_PERM_MASK: u32 = 456;
212pub const PW_VERSION_CLIENT: u32 = 3;
213pub const PW_ID_CLIENT: u32 = 1;
214pub const PW_CLIENT_CHANGE_MASK_PROPS: u32 = 1;
215pub const PW_CLIENT_CHANGE_MASK_ALL: u32 = 1;
216pub const PW_CLIENT_EVENT_INFO: u32 = 0;
217pub const PW_CLIENT_EVENT_PERMISSIONS: u32 = 1;
218pub const PW_CLIENT_EVENT_NUM: u32 = 2;
219pub const PW_VERSION_CLIENT_EVENTS: u32 = 0;
220pub const PW_CLIENT_METHOD_ADD_LISTENER: u32 = 0;
221pub const PW_CLIENT_METHOD_ERROR: u32 = 1;
222pub const PW_CLIENT_METHOD_UPDATE_PROPERTIES: u32 = 2;
223pub const PW_CLIENT_METHOD_GET_PERMISSIONS: u32 = 3;
224pub const PW_CLIENT_METHOD_UPDATE_PERMISSIONS: u32 = 4;
225pub const PW_CLIENT_METHOD_NUM: u32 = 5;
226pub const PW_VERSION_CLIENT_METHODS: u32 = 0;
227pub const PW_TYPE_INTERFACE_Device: &[u8; 26] = b"PipeWire:Interface:Device\0";
228pub const PW_DEVICE_PERM_MASK: u32 = 456;
229pub const PW_VERSION_DEVICE: u32 = 3;
230pub const PW_DEVICE_CHANGE_MASK_PROPS: u32 = 1;
231pub const PW_DEVICE_CHANGE_MASK_PARAMS: u32 = 2;
232pub const PW_DEVICE_CHANGE_MASK_ALL: u32 = 3;
233pub const PW_DEVICE_EVENT_INFO: u32 = 0;
234pub const PW_DEVICE_EVENT_PARAM: u32 = 1;
235pub const PW_DEVICE_EVENT_NUM: u32 = 2;
236pub const PW_VERSION_DEVICE_EVENTS: u32 = 0;
237pub const PW_DEVICE_METHOD_ADD_LISTENER: u32 = 0;
238pub const PW_DEVICE_METHOD_SUBSCRIBE_PARAMS: u32 = 1;
239pub const PW_DEVICE_METHOD_ENUM_PARAMS: u32 = 2;
240pub const PW_DEVICE_METHOD_SET_PARAM: u32 = 3;
241pub const PW_DEVICE_METHOD_NUM: u32 = 4;
242pub const PW_VERSION_DEVICE_METHODS: u32 = 0;
243pub const PW_VERSION_MEMPOOL_EVENTS: u32 = 0;
244pub const PW_BUFFERS_FLAG_NONE: u32 = 0;
245pub const PW_BUFFERS_FLAG_NO_MEM: u32 = 1;
246pub const PW_BUFFERS_FLAG_SHARED: u32 = 2;
247pub const PW_BUFFERS_FLAG_DYNAMIC: u32 = 4;
248pub const PW_BUFFERS_FLAG_SHARED_MEM: u32 = 8;
249pub const PW_BUFFERS_FLAG_IN_PRIORITY: u32 = 16;
250pub const PW_BUFFERS_FLAG_ASYNC: u32 = 32;
251pub const PW_TYPE_INTERFACE_Factory: &[u8; 27] = b"PipeWire:Interface:Factory\0";
252pub const PW_FACTORY_PERM_MASK: u32 = 264;
253pub const PW_VERSION_FACTORY: u32 = 3;
254pub const PW_FACTORY_CHANGE_MASK_PROPS: u32 = 1;
255pub const PW_FACTORY_CHANGE_MASK_ALL: u32 = 1;
256pub const PW_FACTORY_EVENT_INFO: u32 = 0;
257pub const PW_FACTORY_EVENT_NUM: u32 = 1;
258pub const PW_VERSION_FACTORY_EVENTS: u32 = 0;
259pub const PW_FACTORY_METHOD_ADD_LISTENER: u32 = 0;
260pub const PW_FACTORY_METHOD_NUM: u32 = 1;
261pub const PW_VERSION_FACTORY_METHODS: u32 = 0;
262pub const PW_KEY_PROTOCOL: &[u8; 18] = b"pipewire.protocol\0";
263pub const PW_KEY_ACCESS: &[u8; 16] = b"pipewire.access\0";
264pub const PW_KEY_CLIENT_ACCESS: &[u8; 23] = b"pipewire.client.access\0";
265pub const PW_KEY_SEC_PID: &[u8; 17] = b"pipewire.sec.pid\0";
266pub const PW_KEY_SEC_UID: &[u8; 17] = b"pipewire.sec.uid\0";
267pub const PW_KEY_SEC_GID: &[u8; 17] = b"pipewire.sec.gid\0";
268pub const PW_KEY_SEC_LABEL: &[u8; 19] = b"pipewire.sec.label\0";
269pub const PW_KEY_SEC_SOCKET: &[u8; 20] = b"pipewire.sec.socket\0";
270pub const PW_KEY_SEC_ENGINE: &[u8; 20] = b"pipewire.sec.engine\0";
271pub const PW_KEY_SEC_APP_ID: &[u8; 20] = b"pipewire.sec.app-id\0";
272pub const PW_KEY_SEC_INSTANCE_ID: &[u8; 25] = b"pipewire.sec.instance-id\0";
273pub const PW_KEY_LIBRARY_NAME_SYSTEM: &[u8; 20] = b"library.name.system\0";
274pub const PW_KEY_LIBRARY_NAME_LOOP: &[u8; 18] = b"library.name.loop\0";
275pub const PW_KEY_LIBRARY_NAME_DBUS: &[u8; 18] = b"library.name.dbus\0";
276pub const PW_KEY_OBJECT_PATH: &[u8; 12] = b"object.path\0";
277pub const PW_KEY_OBJECT_ID: &[u8; 10] = b"object.id\0";
278pub const PW_KEY_OBJECT_SERIAL: &[u8; 14] = b"object.serial\0";
279pub const PW_KEY_OBJECT_LINGER: &[u8; 14] = b"object.linger\0";
280pub const PW_KEY_OBJECT_REGISTER: &[u8; 16] = b"object.register\0";
281pub const PW_KEY_OBJECT_EXPORT: &[u8; 14] = b"object.export\0";
282pub const PW_KEY_CONFIG_PREFIX: &[u8; 14] = b"config.prefix\0";
283pub const PW_KEY_CONFIG_NAME: &[u8; 12] = b"config.name\0";
284pub const PW_KEY_CONFIG_OVERRIDE_PREFIX: &[u8; 23] = b"config.override.prefix\0";
285pub const PW_KEY_CONFIG_OVERRIDE_NAME: &[u8; 21] = b"config.override.name\0";
286pub const PW_KEY_LOOP_NAME: &[u8; 10] = b"loop.name\0";
287pub const PW_KEY_LOOP_CLASS: &[u8; 11] = b"loop.class\0";
288pub const PW_KEY_LOOP_RT_PRIO: &[u8; 13] = b"loop.rt-prio\0";
289pub const PW_KEY_LOOP_CANCEL: &[u8; 12] = b"loop.cancel\0";
290pub const PW_KEY_CONTEXT_PROFILE_MODULES: &[u8; 24] = b"context.profile.modules\0";
291pub const PW_KEY_USER_NAME: &[u8; 18] = b"context.user-name\0";
292pub const PW_KEY_HOST_NAME: &[u8; 18] = b"context.host-name\0";
293pub const PW_KEY_CORE_NAME: &[u8; 10] = b"core.name\0";
294pub const PW_KEY_CORE_VERSION: &[u8; 13] = b"core.version\0";
295pub const PW_KEY_CORE_DAEMON: &[u8; 12] = b"core.daemon\0";
296pub const PW_KEY_CORE_ID: &[u8; 8] = b"core.id\0";
297pub const PW_KEY_CORE_MONITORS: &[u8; 14] = b"core.monitors\0";
298pub const PW_KEY_CPU_MAX_ALIGN: &[u8; 14] = b"cpu.max-align\0";
299pub const PW_KEY_CPU_CORES: &[u8; 10] = b"cpu.cores\0";
300pub const PW_KEY_PRIORITY_SESSION: &[u8; 17] = b"priority.session\0";
301pub const PW_KEY_PRIORITY_DRIVER: &[u8; 16] = b"priority.driver\0";
302pub const PW_KEY_REMOTE_NAME: &[u8; 12] = b"remote.name\0";
303pub const PW_KEY_REMOTE_INTENTION: &[u8; 17] = b"remote.intention\0";
304pub const PW_KEY_APP_NAME: &[u8; 17] = b"application.name\0";
305pub const PW_KEY_APP_ID: &[u8; 15] = b"application.id\0";
306pub const PW_KEY_APP_VERSION: &[u8; 20] = b"application.version\0";
307pub const PW_KEY_APP_ICON: &[u8; 17] = b"application.icon\0";
308pub const PW_KEY_APP_ICON_NAME: &[u8; 22] = b"application.icon-name\0";
309pub const PW_KEY_APP_LANGUAGE: &[u8; 21] = b"application.language\0";
310pub const PW_KEY_APP_PROCESS_ID: &[u8; 23] = b"application.process.id\0";
311pub const PW_KEY_APP_PROCESS_BINARY: &[u8; 27] = b"application.process.binary\0";
312pub const PW_KEY_APP_PROCESS_USER: &[u8; 25] = b"application.process.user\0";
313pub const PW_KEY_APP_PROCESS_HOST: &[u8; 25] = b"application.process.host\0";
314pub const PW_KEY_APP_PROCESS_MACHINE_ID: &[u8; 31] = b"application.process.machine-id\0";
315pub const PW_KEY_APP_PROCESS_SESSION_ID: &[u8; 31] = b"application.process.session-id\0";
316pub const PW_KEY_WINDOW_X11_DISPLAY: &[u8; 19] = b"window.x11.display\0";
317pub const PW_KEY_CLIENT_ID: &[u8; 10] = b"client.id\0";
318pub const PW_KEY_CLIENT_NAME: &[u8; 12] = b"client.name\0";
319pub const PW_KEY_CLIENT_API: &[u8; 11] = b"client.api\0";
320pub const PW_KEY_NODE_ID: &[u8; 8] = b"node.id\0";
321pub const PW_KEY_NODE_NAME: &[u8; 10] = b"node.name\0";
322pub const PW_KEY_NODE_NICK: &[u8; 10] = b"node.nick\0";
323pub const PW_KEY_NODE_DESCRIPTION: &[u8; 17] = b"node.description\0";
324pub const PW_KEY_NODE_PLUGGED: &[u8; 13] = b"node.plugged\0";
325pub const PW_KEY_NODE_SESSION: &[u8; 13] = b"node.session\0";
326pub const PW_KEY_NODE_GROUP: &[u8; 11] = b"node.group\0";
327pub const PW_KEY_NODE_SYNC_GROUP: &[u8; 16] = b"node.sync-group\0";
328pub const PW_KEY_NODE_SYNC: &[u8; 10] = b"node.sync\0";
329pub const PW_KEY_NODE_TRANSPORT: &[u8; 15] = b"node.transport\0";
330pub const PW_KEY_NODE_EXCLUSIVE: &[u8; 15] = b"node.exclusive\0";
331pub const PW_KEY_NODE_AUTOCONNECT: &[u8; 17] = b"node.autoconnect\0";
332pub const PW_KEY_NODE_LATENCY: &[u8; 13] = b"node.latency\0";
333pub const PW_KEY_NODE_MAX_LATENCY: &[u8; 17] = b"node.max-latency\0";
334pub const PW_KEY_NODE_LOCK_QUANTUM: &[u8; 18] = b"node.lock-quantum\0";
335pub const PW_KEY_NODE_FORCE_QUANTUM: &[u8; 19] = b"node.force-quantum\0";
336pub const PW_KEY_NODE_RATE: &[u8; 10] = b"node.rate\0";
337pub const PW_KEY_NODE_LOCK_RATE: &[u8; 15] = b"node.lock-rate\0";
338pub const PW_KEY_NODE_FORCE_RATE: &[u8; 16] = b"node.force-rate\0";
339pub const PW_KEY_NODE_DONT_RECONNECT: &[u8; 20] = b"node.dont-reconnect\0";
340pub const PW_KEY_NODE_ALWAYS_PROCESS: &[u8; 20] = b"node.always-process\0";
341pub const PW_KEY_NODE_WANT_DRIVER: &[u8; 17] = b"node.want-driver\0";
342pub const PW_KEY_NODE_PAUSE_ON_IDLE: &[u8; 19] = b"node.pause-on-idle\0";
343pub const PW_KEY_NODE_SUSPEND_ON_IDLE: &[u8; 21] = b"node.suspend-on-idle\0";
344pub const PW_KEY_NODE_CACHE_PARAMS: &[u8; 18] = b"node.cache-params\0";
345pub const PW_KEY_NODE_TRANSPORT_SYNC: &[u8; 20] = b"node.transport.sync\0";
346pub const PW_KEY_NODE_DRIVER: &[u8; 12] = b"node.driver\0";
347pub const PW_KEY_NODE_SUPPORTS_LAZY: &[u8; 19] = b"node.supports-lazy\0";
348pub const PW_KEY_NODE_SUPPORTS_REQUEST: &[u8; 22] = b"node.supports-request\0";
349pub const PW_KEY_NODE_DRIVER_ID: &[u8; 15] = b"node.driver-id\0";
350pub const PW_KEY_NODE_ASYNC: &[u8; 11] = b"node.async\0";
351pub const PW_KEY_NODE_LOOP_NAME: &[u8; 15] = b"node.loop.name\0";
352pub const PW_KEY_NODE_LOOP_CLASS: &[u8; 16] = b"node.loop.class\0";
353pub const PW_KEY_NODE_STREAM: &[u8; 12] = b"node.stream\0";
354pub const PW_KEY_NODE_VIRTUAL: &[u8; 13] = b"node.virtual\0";
355pub const PW_KEY_NODE_PASSIVE: &[u8; 13] = b"node.passive\0";
356pub const PW_KEY_NODE_LINK_GROUP: &[u8; 16] = b"node.link-group\0";
357pub const PW_KEY_NODE_NETWORK: &[u8; 13] = b"node.network\0";
358pub const PW_KEY_NODE_TRIGGER: &[u8; 13] = b"node.trigger\0";
359pub const PW_KEY_NODE_CHANNELNAMES: &[u8; 19] = b"node.channel-names\0";
360pub const PW_KEY_NODE_DEVICE_PORT_NAME_PREFIX: &[u8; 29] = b"node.device-port-name-prefix\0";
361pub const PW_KEY_PORT_ID: &[u8; 8] = b"port.id\0";
362pub const PW_KEY_PORT_NAME: &[u8; 10] = b"port.name\0";
363pub const PW_KEY_PORT_DIRECTION: &[u8; 15] = b"port.direction\0";
364pub const PW_KEY_PORT_ALIAS: &[u8; 11] = b"port.alias\0";
365pub const PW_KEY_PORT_PHYSICAL: &[u8; 14] = b"port.physical\0";
366pub const PW_KEY_PORT_TERMINAL: &[u8; 14] = b"port.terminal\0";
367pub const PW_KEY_PORT_CONTROL: &[u8; 13] = b"port.control\0";
368pub const PW_KEY_PORT_MONITOR: &[u8; 13] = b"port.monitor\0";
369pub const PW_KEY_PORT_CACHE_PARAMS: &[u8; 18] = b"port.cache-params\0";
370pub const PW_KEY_PORT_EXTRA: &[u8; 11] = b"port.extra\0";
371pub const PW_KEY_PORT_PASSIVE: &[u8; 13] = b"port.passive\0";
372pub const PW_KEY_PORT_IGNORE_LATENCY: &[u8; 20] = b"port.ignore-latency\0";
373pub const PW_KEY_PORT_GROUP: &[u8; 11] = b"port.group\0";
374pub const PW_KEY_LINK_ID: &[u8; 8] = b"link.id\0";
375pub const PW_KEY_LINK_INPUT_NODE: &[u8; 16] = b"link.input.node\0";
376pub const PW_KEY_LINK_INPUT_PORT: &[u8; 16] = b"link.input.port\0";
377pub const PW_KEY_LINK_OUTPUT_NODE: &[u8; 17] = b"link.output.node\0";
378pub const PW_KEY_LINK_OUTPUT_PORT: &[u8; 17] = b"link.output.port\0";
379pub const PW_KEY_LINK_PASSIVE: &[u8; 13] = b"link.passive\0";
380pub const PW_KEY_LINK_FEEDBACK: &[u8; 14] = b"link.feedback\0";
381pub const PW_KEY_LINK_ASYNC: &[u8; 11] = b"link.async\0";
382pub const PW_KEY_DEVICE_ID: &[u8; 10] = b"device.id\0";
383pub const PW_KEY_DEVICE_NAME: &[u8; 12] = b"device.name\0";
384pub const PW_KEY_DEVICE_PLUGGED: &[u8; 15] = b"device.plugged\0";
385pub const PW_KEY_DEVICE_NICK: &[u8; 12] = b"device.nick\0";
386pub const PW_KEY_DEVICE_STRING: &[u8; 14] = b"device.string\0";
387pub const PW_KEY_DEVICE_API: &[u8; 11] = b"device.api\0";
388pub const PW_KEY_DEVICE_DESCRIPTION: &[u8; 19] = b"device.description\0";
389pub const PW_KEY_DEVICE_BUS_PATH: &[u8; 16] = b"device.bus-path\0";
390pub const PW_KEY_DEVICE_SERIAL: &[u8; 14] = b"device.serial\0";
391pub const PW_KEY_DEVICE_VENDOR_ID: &[u8; 17] = b"device.vendor.id\0";
392pub const PW_KEY_DEVICE_VENDOR_NAME: &[u8; 19] = b"device.vendor.name\0";
393pub const PW_KEY_DEVICE_PRODUCT_ID: &[u8; 18] = b"device.product.id\0";
394pub const PW_KEY_DEVICE_PRODUCT_NAME: &[u8; 20] = b"device.product.name\0";
395pub const PW_KEY_DEVICE_CLASS: &[u8; 13] = b"device.class\0";
396pub const PW_KEY_DEVICE_FORM_FACTOR: &[u8; 19] = b"device.form-factor\0";
397pub const PW_KEY_DEVICE_BUS: &[u8; 11] = b"device.bus\0";
398pub const PW_KEY_DEVICE_SUBSYSTEM: &[u8; 17] = b"device.subsystem\0";
399pub const PW_KEY_DEVICE_SYSFS_PATH: &[u8; 18] = b"device.sysfs.path\0";
400pub const PW_KEY_DEVICE_ICON: &[u8; 12] = b"device.icon\0";
401pub const PW_KEY_DEVICE_ICON_NAME: &[u8; 17] = b"device.icon-name\0";
402pub const PW_KEY_DEVICE_INTENDED_ROLES: &[u8; 22] = b"device.intended-roles\0";
403pub const PW_KEY_DEVICE_CACHE_PARAMS: &[u8; 20] = b"device.cache-params\0";
404pub const PW_KEY_MODULE_ID: &[u8; 10] = b"module.id\0";
405pub const PW_KEY_MODULE_NAME: &[u8; 12] = b"module.name\0";
406pub const PW_KEY_MODULE_AUTHOR: &[u8; 14] = b"module.author\0";
407pub const PW_KEY_MODULE_DESCRIPTION: &[u8; 19] = b"module.description\0";
408pub const PW_KEY_MODULE_USAGE: &[u8; 13] = b"module.usage\0";
409pub const PW_KEY_MODULE_VERSION: &[u8; 15] = b"module.version\0";
410pub const PW_KEY_MODULE_DEPRECATED: &[u8; 18] = b"module.deprecated\0";
411pub const PW_KEY_FACTORY_ID: &[u8; 11] = b"factory.id\0";
412pub const PW_KEY_FACTORY_NAME: &[u8; 13] = b"factory.name\0";
413pub const PW_KEY_FACTORY_USAGE: &[u8; 14] = b"factory.usage\0";
414pub const PW_KEY_FACTORY_TYPE_NAME: &[u8; 18] = b"factory.type.name\0";
415pub const PW_KEY_FACTORY_TYPE_VERSION: &[u8; 21] = b"factory.type.version\0";
416pub const PW_KEY_STREAM_IS_LIVE: &[u8; 15] = b"stream.is-live\0";
417pub const PW_KEY_STREAM_LATENCY_MIN: &[u8; 19] = b"stream.latency.min\0";
418pub const PW_KEY_STREAM_LATENCY_MAX: &[u8; 19] = b"stream.latency.max\0";
419pub const PW_KEY_STREAM_MONITOR: &[u8; 15] = b"stream.monitor\0";
420pub const PW_KEY_STREAM_DONT_REMIX: &[u8; 18] = b"stream.dont-remix\0";
421pub const PW_KEY_STREAM_CAPTURE_SINK: &[u8; 20] = b"stream.capture.sink\0";
422pub const PW_KEY_MEDIA_TYPE: &[u8; 11] = b"media.type\0";
423pub const PW_KEY_MEDIA_CATEGORY: &[u8; 15] = b"media.category\0";
424pub const PW_KEY_MEDIA_ROLE: &[u8; 11] = b"media.role\0";
425pub const PW_KEY_MEDIA_CLASS: &[u8; 12] = b"media.class\0";
426pub const PW_KEY_MEDIA_NAME: &[u8; 11] = b"media.name\0";
427pub const PW_KEY_MEDIA_TITLE: &[u8; 12] = b"media.title\0";
428pub const PW_KEY_MEDIA_ARTIST: &[u8; 13] = b"media.artist\0";
429pub const PW_KEY_MEDIA_ALBUM: &[u8; 12] = b"media.album\0";
430pub const PW_KEY_MEDIA_COPYRIGHT: &[u8; 16] = b"media.copyright\0";
431pub const PW_KEY_MEDIA_SOFTWARE: &[u8; 15] = b"media.software\0";
432pub const PW_KEY_MEDIA_LANGUAGE: &[u8; 15] = b"media.language\0";
433pub const PW_KEY_MEDIA_FILENAME: &[u8; 15] = b"media.filename\0";
434pub const PW_KEY_MEDIA_ICON: &[u8; 11] = b"media.icon\0";
435pub const PW_KEY_MEDIA_ICON_NAME: &[u8; 16] = b"media.icon-name\0";
436pub const PW_KEY_MEDIA_COMMENT: &[u8; 14] = b"media.comment\0";
437pub const PW_KEY_MEDIA_DATE: &[u8; 11] = b"media.date\0";
438pub const PW_KEY_MEDIA_FORMAT: &[u8; 13] = b"media.format\0";
439pub const PW_KEY_FORMAT_DSP: &[u8; 11] = b"format.dsp\0";
440pub const PW_KEY_AUDIO_CHANNEL: &[u8; 14] = b"audio.channel\0";
441pub const PW_KEY_AUDIO_RATE: &[u8; 11] = b"audio.rate\0";
442pub const PW_KEY_AUDIO_CHANNELS: &[u8; 15] = b"audio.channels\0";
443pub const PW_KEY_AUDIO_FORMAT: &[u8; 13] = b"audio.format\0";
444pub const PW_KEY_AUDIO_ALLOWED_RATES: &[u8; 20] = b"audio.allowed-rates\0";
445pub const PW_KEY_VIDEO_RATE: &[u8; 16] = b"video.framerate\0";
446pub const PW_KEY_VIDEO_FORMAT: &[u8; 13] = b"video.format\0";
447pub const PW_KEY_VIDEO_SIZE: &[u8; 11] = b"video.size\0";
448pub const PW_KEY_TARGET_OBJECT: &[u8; 14] = b"target.object\0";
449pub const PW_TYPE_INTERFACE_Link: &[u8; 24] = b"PipeWire:Interface:Link\0";
450pub const PW_LINK_PERM_MASK: u32 = 320;
451pub const PW_VERSION_LINK: u32 = 3;
452pub const PW_LINK_CHANGE_MASK_STATE: u32 = 1;
453pub const PW_LINK_CHANGE_MASK_FORMAT: u32 = 2;
454pub const PW_LINK_CHANGE_MASK_PROPS: u32 = 4;
455pub const PW_LINK_CHANGE_MASK_ALL: u32 = 7;
456pub const PW_LINK_EVENT_INFO: u32 = 0;
457pub const PW_LINK_EVENT_NUM: u32 = 1;
458pub const PW_VERSION_LINK_EVENTS: u32 = 0;
459pub const PW_LINK_METHOD_ADD_LISTENER: u32 = 0;
460pub const PW_LINK_METHOD_NUM: u32 = 1;
461pub const PW_VERSION_LINK_METHODS: u32 = 0;
462pub const PW_VERSION_MAIN_LOOP_EVENTS: u32 = 0;
463pub const PW_TYPE_INTERFACE_Module: &[u8; 26] = b"PipeWire:Interface:Module\0";
464pub const PW_MODULE_PERM_MASK: u32 = 264;
465pub const PW_VERSION_MODULE: u32 = 3;
466pub const PW_MODULE_CHANGE_MASK_PROPS: u32 = 1;
467pub const PW_MODULE_CHANGE_MASK_ALL: u32 = 1;
468pub const PW_MODULE_EVENT_INFO: u32 = 0;
469pub const PW_MODULE_EVENT_NUM: u32 = 1;
470pub const PW_VERSION_MODULE_EVENTS: u32 = 0;
471pub const PW_MODULE_METHOD_ADD_LISTENER: u32 = 0;
472pub const PW_MODULE_METHOD_NUM: u32 = 1;
473pub const PW_VERSION_MODULE_METHODS: u32 = 0;
474pub const PW_TYPE_INTERFACE_Node: &[u8; 24] = b"PipeWire:Interface:Node\0";
475pub const PW_NODE_PERM_MASK: u32 = 472;
476pub const PW_VERSION_NODE: u32 = 3;
477pub const PW_NODE_CHANGE_MASK_INPUT_PORTS: u32 = 1;
478pub const PW_NODE_CHANGE_MASK_OUTPUT_PORTS: u32 = 2;
479pub const PW_NODE_CHANGE_MASK_STATE: u32 = 4;
480pub const PW_NODE_CHANGE_MASK_PROPS: u32 = 8;
481pub const PW_NODE_CHANGE_MASK_PARAMS: u32 = 16;
482pub const PW_NODE_CHANGE_MASK_ALL: u32 = 31;
483pub const PW_NODE_EVENT_INFO: u32 = 0;
484pub const PW_NODE_EVENT_PARAM: u32 = 1;
485pub const PW_NODE_EVENT_NUM: u32 = 2;
486pub const PW_VERSION_NODE_EVENTS: u32 = 0;
487pub const PW_NODE_METHOD_ADD_LISTENER: u32 = 0;
488pub const PW_NODE_METHOD_SUBSCRIBE_PARAMS: u32 = 1;
489pub const PW_NODE_METHOD_ENUM_PARAMS: u32 = 2;
490pub const PW_NODE_METHOD_SET_PARAM: u32 = 3;
491pub const PW_NODE_METHOD_SEND_COMMAND: u32 = 4;
492pub const PW_NODE_METHOD_NUM: u32 = 5;
493pub const PW_VERSION_NODE_METHODS: u32 = 0;
494pub const PW_TYPE_INTERFACE_Port: &[u8; 24] = b"PipeWire:Interface:Port\0";
495pub const PW_PORT_PERM_MASK: u32 = 328;
496pub const PW_VERSION_PORT: u32 = 3;
497pub const PW_DIRECTION_INPUT: u32 = 0;
498pub const PW_DIRECTION_OUTPUT: u32 = 1;
499pub const PW_PORT_CHANGE_MASK_PROPS: u32 = 1;
500pub const PW_PORT_CHANGE_MASK_PARAMS: u32 = 2;
501pub const PW_PORT_CHANGE_MASK_ALL: u32 = 3;
502pub const PW_PORT_EVENT_INFO: u32 = 0;
503pub const PW_PORT_EVENT_PARAM: u32 = 1;
504pub const PW_PORT_EVENT_NUM: u32 = 2;
505pub const PW_VERSION_PORT_EVENTS: u32 = 0;
506pub const PW_PORT_METHOD_ADD_LISTENER: u32 = 0;
507pub const PW_PORT_METHOD_SUBSCRIBE_PARAMS: u32 = 1;
508pub const PW_PORT_METHOD_ENUM_PARAMS: u32 = 2;
509pub const PW_PORT_METHOD_NUM: u32 = 3;
510pub const PW_VERSION_PORT_METHODS: u32 = 0;
511pub const PW_VERSION_STREAM_EVENTS: u32 = 2;
512pub const PW_VERSION_FILTER_EVENTS: u32 = 1;
513pub const PW_VERSION_THREAD_LOOP_EVENTS: u32 = 0;
514pub const PW_VERSION_DATA_LOOP_EVENTS: u32 = 0;
515pub const PW_API_VERSION: &[u8; 4] = b"0.3\0";
516pub const PW_MAJOR: u32 = 1;
517pub const PW_MINOR: u32 = 4;
518pub const PW_MICRO: u32 = 9;
519pub const PW_TYPE_INTERFACE_ClientNode: &[u8; 30] = b"PipeWire:Interface:ClientNode\0";
520pub const PW_VERSION_CLIENT_NODE: u32 = 6;
521pub const PW_CLIENT_NODE_EVENT_TRANSPORT: u32 = 0;
522pub const PW_CLIENT_NODE_EVENT_SET_PARAM: u32 = 1;
523pub const PW_CLIENT_NODE_EVENT_SET_IO: u32 = 2;
524pub const PW_CLIENT_NODE_EVENT_EVENT: u32 = 3;
525pub const PW_CLIENT_NODE_EVENT_COMMAND: u32 = 4;
526pub const PW_CLIENT_NODE_EVENT_ADD_PORT: u32 = 5;
527pub const PW_CLIENT_NODE_EVENT_REMOVE_PORT: u32 = 6;
528pub const PW_CLIENT_NODE_EVENT_PORT_SET_PARAM: u32 = 7;
529pub const PW_CLIENT_NODE_EVENT_PORT_USE_BUFFERS: u32 = 8;
530pub const PW_CLIENT_NODE_EVENT_PORT_SET_IO: u32 = 9;
531pub const PW_CLIENT_NODE_EVENT_SET_ACTIVATION: u32 = 10;
532pub const PW_CLIENT_NODE_EVENT_PORT_SET_MIX_INFO: u32 = 11;
533pub const PW_CLIENT_NODE_EVENT_NUM: u32 = 12;
534pub const PW_VERSION_CLIENT_NODE_EVENTS: u32 = 1;
535pub const PW_CLIENT_NODE_METHOD_ADD_LISTENER: u32 = 0;
536pub const PW_CLIENT_NODE_METHOD_GET_NODE: u32 = 1;
537pub const PW_CLIENT_NODE_METHOD_UPDATE: u32 = 2;
538pub const PW_CLIENT_NODE_METHOD_PORT_UPDATE: u32 = 3;
539pub const PW_CLIENT_NODE_METHOD_SET_ACTIVE: u32 = 4;
540pub const PW_CLIENT_NODE_METHOD_EVENT: u32 = 5;
541pub const PW_CLIENT_NODE_METHOD_PORT_BUFFERS: u32 = 6;
542pub const PW_CLIENT_NODE_METHOD_NUM: u32 = 7;
543pub const PW_VERSION_CLIENT_NODE_METHODS: u32 = 0;
544pub const PW_CLIENT_NODE_UPDATE_PARAMS: u32 = 1;
545pub const PW_CLIENT_NODE_UPDATE_INFO: u32 = 2;
546pub const PW_CLIENT_NODE_PORT_UPDATE_PARAMS: u32 = 1;
547pub const PW_CLIENT_NODE_PORT_UPDATE_INFO: u32 = 2;
548pub const PW_TYPE_INTERFACE_Metadata: &[u8; 28] = b"PipeWire:Interface:Metadata\0";
549pub const PW_METADATA_PERM_MASK: u32 = 448;
550pub const PW_VERSION_METADATA: u32 = 3;
551pub const PW_METADATA_EVENT_PROPERTY: u32 = 0;
552pub const PW_METADATA_EVENT_NUM: u32 = 1;
553pub const PW_VERSION_METADATA_EVENTS: u32 = 0;
554pub const PW_METADATA_METHOD_ADD_LISTENER: u32 = 0;
555pub const PW_METADATA_METHOD_SET_PROPERTY: u32 = 1;
556pub const PW_METADATA_METHOD_CLEAR: u32 = 2;
557pub const PW_METADATA_METHOD_NUM: u32 = 3;
558pub const PW_VERSION_METADATA_METHODS: u32 = 0;
559pub const PW_KEY_METADATA_NAME: &[u8; 14] = b"metadata.name\0";
560pub const PW_KEY_METADATA_VALUES: &[u8; 16] = b"metadata.values\0";
561pub const PW_TYPE_INTERFACE_Profiler: &[u8; 28] = b"PipeWire:Interface:Profiler\0";
562pub const PW_VERSION_PROFILER: u32 = 3;
563pub const PW_PROFILER_PERM_MASK: u32 = 256;
564pub const PW_PROFILER_EVENT_PROFILE: u32 = 0;
565pub const PW_PROFILER_EVENT_NUM: u32 = 1;
566pub const PW_VERSION_PROFILER_EVENTS: u32 = 0;
567pub const PW_PROFILER_METHOD_ADD_LISTENER: u32 = 0;
568pub const PW_PROFILER_METHOD_NUM: u32 = 1;
569pub const PW_VERSION_PROFILER_METHODS: u32 = 0;
570pub const PW_KEY_PROFILER_NAME: &[u8; 14] = b"profiler.name\0";
571pub const PW_VERSION_CONTROL_EVENTS: u32 = 0;
572pub const PW_VERSION_IMPL_CORE_EVENTS: u32 = 0;
573pub const PW_VERSION_IMPL_DEVICE_EVENTS: u32 = 0;
574pub const PW_VERSION_IMPL_FACTORY_EVENTS: u32 = 0;
575pub const PW_VERSION_IMPL_FACTORY_IMPLEMENTATION: u32 = 0;
576pub const PW_VERSION_IMPL_LINK_EVENTS: u32 = 0;
577pub const PW_VERSION_IMPL_METADATA_EVENTS: u32 = 0;
578pub const PW_VERSION_IMPL_MODULE_EVENTS: u32 = 0;
579pub const PW_VERSION_IMPL_NODE_EVENTS: u32 = 0;
580pub const PW_VERSION_IMPL_NODE_RT_EVENTS: u32 = 0;
581pub const PW_VERSION_IMPL_PORT_EVENTS: u32 = 3;
582pub const PW_VERSION_GLOBAL_EVENTS: u32 = 0;
583pub const PW_VERSION_IMPL_CLIENT_EVENTS: u32 = 0;
584pub const PW_VERSION_RESOURCE_EVENTS: u32 = 0;
585pub const PW_TYPE_INFO_PROTOCOL_Native: &[u8; 25] = b"PipeWire:Protocol:Native\0";
586pub const PW_VERSION_PROTOCOL_NATIVE_EXT: u32 = 0;
587pub const PW_VERSION_SESSION_INFO: u32 = 0;
588pub const PW_SESSION_CHANGE_MASK_PROPS: u32 = 1;
589pub const PW_SESSION_CHANGE_MASK_PARAMS: u32 = 2;
590pub const PW_SESSION_CHANGE_MASK_ALL: u32 = 3;
591pub const PW_VERSION_ENDPOINT_INFO: u32 = 0;
592pub const PW_ENDPOINT_FLAG_PROVIDES_SESSION: u32 = 1;
593pub const PW_ENDPOINT_CHANGE_MASK_STREAMS: u32 = 1;
594pub const PW_ENDPOINT_CHANGE_MASK_SESSION: u32 = 2;
595pub const PW_ENDPOINT_CHANGE_MASK_PROPS: u32 = 4;
596pub const PW_ENDPOINT_CHANGE_MASK_PARAMS: u32 = 8;
597pub const PW_ENDPOINT_CHANGE_MASK_ALL: u32 = 15;
598pub const PW_VERSION_ENDPOINT_STREAM_INFO: u32 = 0;
599pub const PW_ENDPOINT_STREAM_CHANGE_MASK_LINK_PARAMS: u32 = 1;
600pub const PW_ENDPOINT_STREAM_CHANGE_MASK_PROPS: u32 = 2;
601pub const PW_ENDPOINT_STREAM_CHANGE_MASK_PARAMS: u32 = 4;
602pub const PW_ENDPOINT_STREAM_CHANGE_MASK_ALL: u32 = 7;
603pub const PW_VERSION_ENDPOINT_LINK_INFO: u32 = 0;
604pub const PW_ENDPOINT_LINK_CHANGE_MASK_STATE: u32 = 1;
605pub const PW_ENDPOINT_LINK_CHANGE_MASK_PROPS: u32 = 2;
606pub const PW_ENDPOINT_LINK_CHANGE_MASK_PARAMS: u32 = 4;
607pub const PW_ENDPOINT_LINK_CHANGE_MASK_ALL: u32 = 7;
608pub const PW_TYPE_INTERFACE_Session: &[u8; 27] = b"PipeWire:Interface:Session\0";
609pub const PW_SESSION_PERM_MASK: u32 = 448;
610pub const PW_VERSION_SESSION: u32 = 0;
611pub const PW_TYPE_INTERFACE_Endpoint: &[u8; 28] = b"PipeWire:Interface:Endpoint\0";
612pub const PW_ENDPOINT_PERM_MASK: u32 = 448;
613pub const PW_VERSION_ENDPOINT: u32 = 0;
614pub const PW_TYPE_INTERFACE_EndpointStream: &[u8; 34] = b"PipeWire:Interface:EndpointStream\0";
615pub const PW_ENDPOINT_STREAM_PERM_MASK: u32 = 448;
616pub const PW_VERSION_ENDPOINT_STREAM: u32 = 0;
617pub const PW_TYPE_INTERFACE_EndpointLink: &[u8; 32] = b"PipeWire:Interface:EndpointLink\0";
618pub const PW_ENDPOINT_LINK_PERM_MASK: u32 = 448;
619pub const PW_VERSION_ENDPOINT_LINK: u32 = 0;
620pub const PW_SESSION_EVENT_INFO: u32 = 0;
621pub const PW_SESSION_EVENT_PARAM: u32 = 1;
622pub const PW_SESSION_EVENT_NUM: u32 = 2;
623pub const PW_VERSION_SESSION_EVENTS: u32 = 0;
624pub const PW_SESSION_METHOD_ADD_LISTENER: u32 = 0;
625pub const PW_SESSION_METHOD_SUBSCRIBE_PARAMS: u32 = 1;
626pub const PW_SESSION_METHOD_ENUM_PARAMS: u32 = 2;
627pub const PW_SESSION_METHOD_SET_PARAM: u32 = 3;
628pub const PW_SESSION_METHOD_CREATE_LINK: u32 = 4;
629pub const PW_SESSION_METHOD_NUM: u32 = 5;
630pub const PW_VERSION_SESSION_METHODS: u32 = 0;
631pub const PW_ENDPOINT_EVENT_INFO: u32 = 0;
632pub const PW_ENDPOINT_EVENT_PARAM: u32 = 1;
633pub const PW_ENDPOINT_EVENT_NUM: u32 = 2;
634pub const PW_VERSION_ENDPOINT_EVENTS: u32 = 0;
635pub const PW_ENDPOINT_METHOD_ADD_LISTENER: u32 = 0;
636pub const PW_ENDPOINT_METHOD_SUBSCRIBE_PARAMS: u32 = 1;
637pub const PW_ENDPOINT_METHOD_ENUM_PARAMS: u32 = 2;
638pub const PW_ENDPOINT_METHOD_SET_PARAM: u32 = 3;
639pub const PW_ENDPOINT_METHOD_CREATE_LINK: u32 = 4;
640pub const PW_ENDPOINT_METHOD_NUM: u32 = 5;
641pub const PW_VERSION_ENDPOINT_METHODS: u32 = 0;
642pub const PW_ENDPOINT_STREAM_EVENT_INFO: u32 = 0;
643pub const PW_ENDPOINT_STREAM_EVENT_PARAM: u32 = 1;
644pub const PW_ENDPOINT_STREAM_EVENT_NUM: u32 = 2;
645pub const PW_VERSION_ENDPOINT_STREAM_EVENTS: u32 = 0;
646pub const PW_ENDPOINT_STREAM_METHOD_ADD_LISTENER: u32 = 0;
647pub const PW_ENDPOINT_STREAM_METHOD_SUBSCRIBE_PARAMS: u32 = 1;
648pub const PW_ENDPOINT_STREAM_METHOD_ENUM_PARAMS: u32 = 2;
649pub const PW_ENDPOINT_STREAM_METHOD_SET_PARAM: u32 = 3;
650pub const PW_ENDPOINT_STREAM_METHOD_NUM: u32 = 4;
651pub const PW_VERSION_ENDPOINT_STREAM_METHODS: u32 = 0;
652pub const PW_ENDPOINT_LINK_EVENT_INFO: u32 = 0;
653pub const PW_ENDPOINT_LINK_EVENT_PARAM: u32 = 1;
654pub const PW_ENDPOINT_LINK_EVENT_NUM: u32 = 2;
655pub const PW_VERSION_ENDPOINT_LINK_EVENTS: u32 = 0;
656pub const PW_ENDPOINT_LINK_METHOD_ADD_LISTENER: u32 = 0;
657pub const PW_ENDPOINT_LINK_METHOD_SUBSCRIBE_PARAMS: u32 = 1;
658pub const PW_ENDPOINT_LINK_METHOD_ENUM_PARAMS: u32 = 2;
659pub const PW_ENDPOINT_LINK_METHOD_SET_PARAM: u32 = 3;
660pub const PW_ENDPOINT_LINK_METHOD_REQUEST_STATE: u32 = 4;
661pub const PW_ENDPOINT_LINK_METHOD_DESTROY: u32 = 5;
662pub const PW_ENDPOINT_LINK_METHOD_NUM: u32 = 6;
663pub const PW_VERSION_ENDPOINT_LINK_METHODS: u32 = 0;
664pub const PW_TYPE_INTERFACE_ClientEndpoint: &[u8; 34] = b"PipeWire:Interface:ClientEndpoint\0";
665pub const PW_VERSION_CLIENT_ENDPOINT: u32 = 0;
666pub const PW_CLIENT_ENDPOINT_EVENT_SET_SESSION_ID: u32 = 0;
667pub const PW_CLIENT_ENDPOINT_EVENT_SET_PARAM: u32 = 1;
668pub const PW_CLIENT_ENDPOINT_EVENT_STREAM_SET_PARAM: u32 = 2;
669pub const PW_CLIENT_ENDPOINT_EVENT_CREATE_LINK: u32 = 3;
670pub const PW_CLIENT_ENDPOINT_EVENT_NUM: u32 = 4;
671pub const PW_VERSION_CLIENT_ENDPOINT_EVENTS: u32 = 0;
672pub const PW_CLIENT_ENDPOINT_METHOD_ADD_LISTENER: u32 = 0;
673pub const PW_CLIENT_ENDPOINT_METHOD_UPDATE: u32 = 1;
674pub const PW_CLIENT_ENDPOINT_METHOD_STREAM_UPDATE: u32 = 2;
675pub const PW_CLIENT_ENDPOINT_METHOD_NUM: u32 = 3;
676pub const PW_VERSION_CLIENT_ENDPOINT_METHODS: u32 = 0;
677pub const PW_CLIENT_ENDPOINT_UPDATE_PARAMS: u32 = 1;
678pub const PW_CLIENT_ENDPOINT_UPDATE_INFO: u32 = 2;
679pub const PW_CLIENT_ENDPOINT_STREAM_UPDATE_PARAMS: u32 = 1;
680pub const PW_CLIENT_ENDPOINT_STREAM_UPDATE_INFO: u32 = 2;
681pub const PW_CLIENT_ENDPOINT_STREAM_UPDATE_DESTROYED: u32 = 4;
682pub const PW_TYPE_INTERFACE_ClientSession: &[u8; 33] = b"PipeWire:Interface:ClientSession\0";
683pub const PW_VERSION_CLIENT_SESSION: u32 = 0;
684pub const PW_CLIENT_SESSION_EVENT_SET_PARAM: u32 = 0;
685pub const PW_CLIENT_SESSION_EVENT_LINK_SET_PARAM: u32 = 1;
686pub const PW_CLIENT_SESSION_EVENT_LINK_REQUEST_STATE: u32 = 2;
687pub const PW_CLIENT_SESSION_EVENT_NUM: u32 = 3;
688pub const PW_VERSION_CLIENT_SESSION_EVENTS: u32 = 0;
689pub const PW_CLIENT_SESSION_METHOD_ADD_LISTENER: u32 = 0;
690pub const PW_CLIENT_SESSION_METHOD_UPDATE: u32 = 1;
691pub const PW_CLIENT_SESSION_METHOD_LINK_UPDATE: u32 = 2;
692pub const PW_CLIENT_SESSION_METHOD_NUM: u32 = 3;
693pub const PW_VERSION_CLIENT_SESSION_METHODS: u32 = 0;
694pub const PW_CLIENT_SESSION_UPDATE_PARAMS: u32 = 1;
695pub const PW_CLIENT_SESSION_UPDATE_INFO: u32 = 2;
696pub const PW_CLIENT_SESSION_LINK_UPDATE_PARAMS: u32 = 1;
697pub const PW_CLIENT_SESSION_LINK_UPDATE_INFO: u32 = 2;
698pub const PW_CLIENT_SESSION_LINK_UPDATE_DESTROYED: u32 = 4;
699pub const PW_KEY_SESSION_ID: &[u8; 11] = b"session.id\0";
700pub const PW_KEY_ENDPOINT_ID: &[u8; 12] = b"endpoint.id\0";
701pub const PW_KEY_ENDPOINT_NAME: &[u8; 14] = b"endpoint.name\0";
702pub const PW_KEY_ENDPOINT_MONITOR: &[u8; 17] = b"endpoint.monitor\0";
703pub const PW_KEY_ENDPOINT_CLIENT_ID: &[u8; 19] = b"endpoint.client.id\0";
704pub const PW_KEY_ENDPOINT_ICON_NAME: &[u8; 19] = b"endpoint.icon-name\0";
705pub const PW_KEY_ENDPOINT_AUTOCONNECT: &[u8; 21] = b"endpoint.autoconnect\0";
706pub const PW_KEY_ENDPOINT_TARGET: &[u8; 16] = b"endpoint.target\0";
707pub const PW_KEY_ENDPOINT_STREAM_ID: &[u8; 19] = b"endpoint-stream.id\0";
708pub const PW_KEY_ENDPOINT_STREAM_NAME: &[u8; 21] = b"endpoint-stream.name\0";
709pub const PW_KEY_ENDPOINT_STREAM_DESCRIPTION: &[u8; 28] = b"endpoint-stream.description\0";
710pub const PW_KEY_ENDPOINT_LINK_OUTPUT_ENDPOINT: &[u8; 30] = b"endpoint-link.output.endpoint\0";
711pub const PW_KEY_ENDPOINT_LINK_OUTPUT_STREAM: &[u8; 28] = b"endpoint-link.output.stream\0";
712pub const PW_KEY_ENDPOINT_LINK_INPUT_ENDPOINT: &[u8; 29] = b"endpoint-link.input.endpoint\0";
713pub const PW_KEY_ENDPOINT_LINK_INPUT_STREAM: &[u8; 27] = b"endpoint-link.input.stream\0";
714pub type __off_t = ::std::os::raw::c_long;
715pub type __off64_t = ::std::os::raw::c_long;
716pub type __time_t = ::std::os::raw::c_long;
717pub type __syscall_slong_t = ::std::os::raw::c_long;
718#[repr(C)]
719#[derive(Debug, Copy, Clone)]
720pub struct timespec {
721 pub tv_sec: __time_t,
722 pub tv_nsec: __syscall_slong_t,
723}
724#[allow(clippy::unnecessary_operation, clippy::identity_op)]
725const _: () = {
726 ["Size of timespec"][::std::mem::size_of::<timespec>() - 16usize];
727 ["Alignment of timespec"][::std::mem::align_of::<timespec>() - 8usize];
728 ["Offset of field: timespec::tv_sec"][::std::mem::offset_of!(timespec, tv_sec) - 0usize];
729 ["Offset of field: timespec::tv_nsec"][::std::mem::offset_of!(timespec, tv_nsec) - 8usize];
730};
731pub type __gnuc_va_list = __builtin_va_list;
732pub type FILE = _IO_FILE;
733#[repr(C)]
734#[derive(Debug, Copy, Clone)]
735pub struct _IO_marker {
736 _unused: [u8; 0],
737}
738#[repr(C)]
739#[derive(Debug, Copy, Clone)]
740pub struct _IO_codecvt {
741 _unused: [u8; 0],
742}
743#[repr(C)]
744#[derive(Debug, Copy, Clone)]
745pub struct _IO_wide_data {
746 _unused: [u8; 0],
747}
748pub type _IO_lock_t = ::std::os::raw::c_void;
749#[repr(C)]
750#[derive(Debug, Copy, Clone)]
751pub struct _IO_FILE {
752 pub _flags: ::std::os::raw::c_int,
753 pub _IO_read_ptr: *mut ::std::os::raw::c_char,
754 pub _IO_read_end: *mut ::std::os::raw::c_char,
755 pub _IO_read_base: *mut ::std::os::raw::c_char,
756 pub _IO_write_base: *mut ::std::os::raw::c_char,
757 pub _IO_write_ptr: *mut ::std::os::raw::c_char,
758 pub _IO_write_end: *mut ::std::os::raw::c_char,
759 pub _IO_buf_base: *mut ::std::os::raw::c_char,
760 pub _IO_buf_end: *mut ::std::os::raw::c_char,
761 pub _IO_save_base: *mut ::std::os::raw::c_char,
762 pub _IO_backup_base: *mut ::std::os::raw::c_char,
763 pub _IO_save_end: *mut ::std::os::raw::c_char,
764 pub _markers: *mut _IO_marker,
765 pub _chain: *mut _IO_FILE,
766 pub _fileno: ::std::os::raw::c_int,
767 pub _bitfield_align_1: [u32; 0],
768 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
769 pub _short_backupbuf: [::std::os::raw::c_char; 1usize],
770 pub _old_offset: __off_t,
771 pub _cur_column: ::std::os::raw::c_ushort,
772 pub _vtable_offset: ::std::os::raw::c_schar,
773 pub _shortbuf: [::std::os::raw::c_char; 1usize],
774 pub _lock: *mut _IO_lock_t,
775 pub _offset: __off64_t,
776 pub _codecvt: *mut _IO_codecvt,
777 pub _wide_data: *mut _IO_wide_data,
778 pub _freeres_list: *mut _IO_FILE,
779 pub _freeres_buf: *mut ::std::os::raw::c_void,
780 pub _prevchain: *mut *mut _IO_FILE,
781 pub _mode: ::std::os::raw::c_int,
782 pub _unused2: [::std::os::raw::c_char; 20usize],
783}
784#[allow(clippy::unnecessary_operation, clippy::identity_op)]
785const _: () = {
786 ["Size of _IO_FILE"][::std::mem::size_of::<_IO_FILE>() - 216usize];
787 ["Alignment of _IO_FILE"][::std::mem::align_of::<_IO_FILE>() - 8usize];
788 ["Offset of field: _IO_FILE::_flags"][::std::mem::offset_of!(_IO_FILE, _flags) - 0usize];
789 ["Offset of field: _IO_FILE::_IO_read_ptr"]
790 [::std::mem::offset_of!(_IO_FILE, _IO_read_ptr) - 8usize];
791 ["Offset of field: _IO_FILE::_IO_read_end"]
792 [::std::mem::offset_of!(_IO_FILE, _IO_read_end) - 16usize];
793 ["Offset of field: _IO_FILE::_IO_read_base"]
794 [::std::mem::offset_of!(_IO_FILE, _IO_read_base) - 24usize];
795 ["Offset of field: _IO_FILE::_IO_write_base"]
796 [::std::mem::offset_of!(_IO_FILE, _IO_write_base) - 32usize];
797 ["Offset of field: _IO_FILE::_IO_write_ptr"]
798 [::std::mem::offset_of!(_IO_FILE, _IO_write_ptr) - 40usize];
799 ["Offset of field: _IO_FILE::_IO_write_end"]
800 [::std::mem::offset_of!(_IO_FILE, _IO_write_end) - 48usize];
801 ["Offset of field: _IO_FILE::_IO_buf_base"]
802 [::std::mem::offset_of!(_IO_FILE, _IO_buf_base) - 56usize];
803 ["Offset of field: _IO_FILE::_IO_buf_end"]
804 [::std::mem::offset_of!(_IO_FILE, _IO_buf_end) - 64usize];
805 ["Offset of field: _IO_FILE::_IO_save_base"]
806 [::std::mem::offset_of!(_IO_FILE, _IO_save_base) - 72usize];
807 ["Offset of field: _IO_FILE::_IO_backup_base"]
808 [::std::mem::offset_of!(_IO_FILE, _IO_backup_base) - 80usize];
809 ["Offset of field: _IO_FILE::_IO_save_end"]
810 [::std::mem::offset_of!(_IO_FILE, _IO_save_end) - 88usize];
811 ["Offset of field: _IO_FILE::_markers"][::std::mem::offset_of!(_IO_FILE, _markers) - 96usize];
812 ["Offset of field: _IO_FILE::_chain"][::std::mem::offset_of!(_IO_FILE, _chain) - 104usize];
813 ["Offset of field: _IO_FILE::_fileno"][::std::mem::offset_of!(_IO_FILE, _fileno) - 112usize];
814 ["Offset of field: _IO_FILE::_short_backupbuf"]
815 [::std::mem::offset_of!(_IO_FILE, _short_backupbuf) - 119usize];
816 ["Offset of field: _IO_FILE::_old_offset"]
817 [::std::mem::offset_of!(_IO_FILE, _old_offset) - 120usize];
818 ["Offset of field: _IO_FILE::_cur_column"]
819 [::std::mem::offset_of!(_IO_FILE, _cur_column) - 128usize];
820 ["Offset of field: _IO_FILE::_vtable_offset"]
821 [::std::mem::offset_of!(_IO_FILE, _vtable_offset) - 130usize];
822 ["Offset of field: _IO_FILE::_shortbuf"]
823 [::std::mem::offset_of!(_IO_FILE, _shortbuf) - 131usize];
824 ["Offset of field: _IO_FILE::_lock"][::std::mem::offset_of!(_IO_FILE, _lock) - 136usize];
825 ["Offset of field: _IO_FILE::_offset"][::std::mem::offset_of!(_IO_FILE, _offset) - 144usize];
826 ["Offset of field: _IO_FILE::_codecvt"][::std::mem::offset_of!(_IO_FILE, _codecvt) - 152usize];
827 ["Offset of field: _IO_FILE::_wide_data"]
828 [::std::mem::offset_of!(_IO_FILE, _wide_data) - 160usize];
829 ["Offset of field: _IO_FILE::_freeres_list"]
830 [::std::mem::offset_of!(_IO_FILE, _freeres_list) - 168usize];
831 ["Offset of field: _IO_FILE::_freeres_buf"]
832 [::std::mem::offset_of!(_IO_FILE, _freeres_buf) - 176usize];
833 ["Offset of field: _IO_FILE::_prevchain"]
834 [::std::mem::offset_of!(_IO_FILE, _prevchain) - 184usize];
835 ["Offset of field: _IO_FILE::_mode"][::std::mem::offset_of!(_IO_FILE, _mode) - 192usize];
836 ["Offset of field: _IO_FILE::_unused2"][::std::mem::offset_of!(_IO_FILE, _unused2) - 196usize];
837};
838impl _IO_FILE {
839 #[inline]
840 pub fn _flags2(&self) -> ::std::os::raw::c_int {
841 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) }
842 }
843 #[inline]
844 pub fn set__flags2(&mut self, val: ::std::os::raw::c_int) {
845 unsafe {
846 let val: u32 = ::std::mem::transmute(val);
847 self._bitfield_1.set(0usize, 24u8, val as u64)
848 }
849 }
850 #[inline]
851 pub unsafe fn _flags2_raw(this: *const Self) -> ::std::os::raw::c_int {
852 unsafe {
853 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
854 ::std::ptr::addr_of!((*this)._bitfield_1),
855 0usize,
856 24u8,
857 ) as u32)
858 }
859 }
860 #[inline]
861 pub unsafe fn set__flags2_raw(this: *mut Self, val: ::std::os::raw::c_int) {
862 unsafe {
863 let val: u32 = ::std::mem::transmute(val);
864 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
865 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
866 0usize,
867 24u8,
868 val as u64,
869 )
870 }
871 }
872 #[inline]
873 pub fn new_bitfield_1(_flags2: ::std::os::raw::c_int) -> __BindgenBitfieldUnit<[u8; 3usize]> {
874 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
875 __bindgen_bitfield_unit.set(0usize, 24u8, {
876 let _flags2: u32 = unsafe { ::std::mem::transmute(_flags2) };
877 _flags2 as u64
878 });
879 __bindgen_bitfield_unit
880 }
881}
882pub type va_list = __gnuc_va_list;
883#[doc = " \\addtogroup pw_array\n \\{"]
884#[repr(C)]
885#[derive(Debug, Copy, Clone)]
886pub struct pw_array {
887 #[doc = "< pointer to array data"]
888 pub data: *mut ::std::os::raw::c_void,
889 #[doc = "< length of array in bytes"]
890 pub size: usize,
891 #[doc = "< number of allocated memory in \\a data"]
892 pub alloc: usize,
893 #[doc = "< number of bytes to extend with, 0 when the\n data should not expand"]
894 pub extend: usize,
895}
896#[allow(clippy::unnecessary_operation, clippy::identity_op)]
897const _: () = {
898 ["Size of pw_array"][::std::mem::size_of::<pw_array>() - 32usize];
899 ["Alignment of pw_array"][::std::mem::align_of::<pw_array>() - 8usize];
900 ["Offset of field: pw_array::data"][::std::mem::offset_of!(pw_array, data) - 0usize];
901 ["Offset of field: pw_array::size"][::std::mem::offset_of!(pw_array, size) - 8usize];
902 ["Offset of field: pw_array::alloc"][::std::mem::offset_of!(pw_array, alloc) - 16usize];
903 ["Offset of field: pw_array::extend"][::std::mem::offset_of!(pw_array, extend) - 24usize];
904};
905pub const PW_TYPE_FIRST: _bindgen_ty_11 = 33554432;
906#[doc = " \\addtogroup pw_type\n \\{"]
907pub type _bindgen_ty_11 = ::std::os::raw::c_uint;
908unsafe extern "C" {
909 pub fn pw_type_info() -> *const spa_type_info;
910}
911#[doc = " \\addtogroup pw_proxy\n \\{"]
912#[repr(C)]
913#[derive(Debug, Copy, Clone)]
914pub struct pw_proxy {
915 _unused: [u8; 0],
916}
917#[doc = " \\addtogroup pw_protocol\n \\{"]
918#[repr(C)]
919#[derive(Debug, Copy, Clone)]
920pub struct pw_protocol {
921 _unused: [u8; 0],
922}
923#[doc = " \\addtogroup pw_context\n @{"]
924#[repr(C)]
925#[derive(Debug, Copy, Clone)]
926pub struct pw_context {
927 _unused: [u8; 0],
928}
929#[doc = " \\addtogroup pw_global\n \\{"]
930#[repr(C)]
931#[derive(Debug, Copy, Clone)]
932pub struct pw_global {
933 _unused: [u8; 0],
934}
935#[doc = " \\addtogroup api_pw_impl"]
936#[repr(C)]
937#[derive(Debug, Copy, Clone)]
938pub struct pw_impl_client {
939 _unused: [u8; 0],
940}
941#[doc = " \\defgroup pw_impl_node Node Impl\n\n The node object processes data. The node has a list of\n input and output ports (\\ref pw_impl_port) on which it\n will receive and send out buffers respectively.\n/\n/**\n \\addtogroup pw_impl_node\n \\{"]
942#[repr(C)]
943#[derive(Debug, Copy, Clone)]
944pub struct pw_impl_node {
945 _unused: [u8; 0],
946}
947#[repr(C)]
948#[derive(Debug, Copy, Clone)]
949pub struct pw_core {
950 _unused: [u8; 0],
951}
952#[repr(C)]
953#[derive(Debug, Copy, Clone)]
954pub struct pw_registry {
955 _unused: [u8; 0],
956}
957#[doc = " The core information. Extra information may be added in later versions,\n clients must not assume a constant struct size"]
958#[repr(C)]
959#[derive(Debug, Copy, Clone)]
960pub struct pw_core_info {
961 #[doc = "< id of the global"]
962 pub id: u32,
963 #[doc = "< a random cookie for identifying this instance of PipeWire"]
964 pub cookie: u32,
965 #[doc = "< name of the user that started the core"]
966 pub user_name: *const ::std::os::raw::c_char,
967 #[doc = "< name of the machine the core is running on"]
968 pub host_name: *const ::std::os::raw::c_char,
969 #[doc = "< version of the core"]
970 pub version: *const ::std::os::raw::c_char,
971 #[doc = "< name of the core"]
972 pub name: *const ::std::os::raw::c_char,
973 #[doc = "< bitfield of changed fields since last call"]
974 pub change_mask: u64,
975 #[doc = "< extra properties"]
976 pub props: *mut spa_dict,
977}
978#[allow(clippy::unnecessary_operation, clippy::identity_op)]
979const _: () = {
980 ["Size of pw_core_info"][::std::mem::size_of::<pw_core_info>() - 56usize];
981 ["Alignment of pw_core_info"][::std::mem::align_of::<pw_core_info>() - 8usize];
982 ["Offset of field: pw_core_info::id"][::std::mem::offset_of!(pw_core_info, id) - 0usize];
983 ["Offset of field: pw_core_info::cookie"]
984 [::std::mem::offset_of!(pw_core_info, cookie) - 4usize];
985 ["Offset of field: pw_core_info::user_name"]
986 [::std::mem::offset_of!(pw_core_info, user_name) - 8usize];
987 ["Offset of field: pw_core_info::host_name"]
988 [::std::mem::offset_of!(pw_core_info, host_name) - 16usize];
989 ["Offset of field: pw_core_info::version"]
990 [::std::mem::offset_of!(pw_core_info, version) - 24usize];
991 ["Offset of field: pw_core_info::name"][::std::mem::offset_of!(pw_core_info, name) - 32usize];
992 ["Offset of field: pw_core_info::change_mask"]
993 [::std::mem::offset_of!(pw_core_info, change_mask) - 40usize];
994 ["Offset of field: pw_core_info::props"][::std::mem::offset_of!(pw_core_info, props) - 48usize];
995};
996#[doc = " \\addtogroup pw_properties\n \\{"]
997#[repr(C)]
998pub struct pw_properties {
999 #[doc = "< dictionary of key/values"]
1000 pub dict: spa_dict,
1001 #[doc = "< extra flags"]
1002 pub flags: u32,
1003}
1004#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1005const _: () = {
1006 ["Size of pw_properties"][::std::mem::size_of::<pw_properties>() - 24usize];
1007 ["Alignment of pw_properties"][::std::mem::align_of::<pw_properties>() - 8usize];
1008 ["Offset of field: pw_properties::dict"][::std::mem::offset_of!(pw_properties, dict) - 0usize];
1009 ["Offset of field: pw_properties::flags"]
1010 [::std::mem::offset_of!(pw_properties, flags) - 16usize];
1011};
1012unsafe extern "C" {
1013 pub fn pw_properties_new(key: *const ::std::os::raw::c_char, ...) -> *mut pw_properties;
1014}
1015unsafe extern "C" {
1016 pub fn pw_properties_new_dict(dict: *const spa_dict) -> *mut pw_properties;
1017}
1018unsafe extern "C" {
1019 pub fn pw_properties_new_string(args: *const ::std::os::raw::c_char) -> *mut pw_properties;
1020}
1021unsafe extern "C" {
1022 pub fn pw_properties_new_string_checked(
1023 args: *const ::std::os::raw::c_char,
1024 size: usize,
1025 loc: *mut spa_error_location,
1026 ) -> *mut pw_properties;
1027}
1028unsafe extern "C" {
1029 pub fn pw_properties_copy(properties: *const pw_properties) -> *mut pw_properties;
1030}
1031unsafe extern "C" {
1032 pub fn pw_properties_update_keys(
1033 props: *mut pw_properties,
1034 dict: *const spa_dict,
1035 keys: *const *const ::std::os::raw::c_char,
1036 ) -> ::std::os::raw::c_int;
1037}
1038unsafe extern "C" {
1039 pub fn pw_properties_update_ignore(
1040 props: *mut pw_properties,
1041 dict: *const spa_dict,
1042 ignore: *const *const ::std::os::raw::c_char,
1043 ) -> ::std::os::raw::c_int;
1044}
1045unsafe extern "C" {
1046 pub fn pw_properties_update(
1047 props: *mut pw_properties,
1048 dict: *const spa_dict,
1049 ) -> ::std::os::raw::c_int;
1050}
1051unsafe extern "C" {
1052 pub fn pw_properties_update_string(
1053 props: *mut pw_properties,
1054 str_: *const ::std::os::raw::c_char,
1055 size: usize,
1056 ) -> ::std::os::raw::c_int;
1057}
1058unsafe extern "C" {
1059 pub fn pw_properties_update_string_checked(
1060 props: *mut pw_properties,
1061 str_: *const ::std::os::raw::c_char,
1062 size: usize,
1063 loc: *mut spa_error_location,
1064 ) -> ::std::os::raw::c_int;
1065}
1066unsafe extern "C" {
1067 pub fn pw_properties_add(
1068 oldprops: *mut pw_properties,
1069 dict: *const spa_dict,
1070 ) -> ::std::os::raw::c_int;
1071}
1072unsafe extern "C" {
1073 pub fn pw_properties_add_keys(
1074 oldprops: *mut pw_properties,
1075 dict: *const spa_dict,
1076 keys: *const *const ::std::os::raw::c_char,
1077 ) -> ::std::os::raw::c_int;
1078}
1079unsafe extern "C" {
1080 pub fn pw_properties_clear(properties: *mut pw_properties);
1081}
1082unsafe extern "C" {
1083 pub fn pw_properties_free(properties: *mut pw_properties);
1084}
1085unsafe extern "C" {
1086 pub fn pw_properties_set(
1087 properties: *mut pw_properties,
1088 key: *const ::std::os::raw::c_char,
1089 value: *const ::std::os::raw::c_char,
1090 ) -> ::std::os::raw::c_int;
1091}
1092unsafe extern "C" {
1093 pub fn pw_properties_setf(
1094 properties: *mut pw_properties,
1095 key: *const ::std::os::raw::c_char,
1096 format: *const ::std::os::raw::c_char,
1097 ...
1098 ) -> ::std::os::raw::c_int;
1099}
1100unsafe extern "C" {
1101 pub fn pw_properties_setva(
1102 properties: *mut pw_properties,
1103 key: *const ::std::os::raw::c_char,
1104 format: *const ::std::os::raw::c_char,
1105 args: *mut __va_list_tag,
1106 ) -> ::std::os::raw::c_int;
1107}
1108unsafe extern "C" {
1109 pub fn pw_properties_get(
1110 properties: *const pw_properties,
1111 key: *const ::std::os::raw::c_char,
1112 ) -> *const ::std::os::raw::c_char;
1113}
1114unsafe extern "C" {
1115 pub fn pw_properties_fetch_uint32(
1116 properties: *const pw_properties,
1117 key: *const ::std::os::raw::c_char,
1118 value: *mut u32,
1119 ) -> ::std::os::raw::c_int;
1120}
1121unsafe extern "C" {
1122 pub fn pw_properties_fetch_int32(
1123 properties: *const pw_properties,
1124 key: *const ::std::os::raw::c_char,
1125 value: *mut i32,
1126 ) -> ::std::os::raw::c_int;
1127}
1128unsafe extern "C" {
1129 pub fn pw_properties_fetch_uint64(
1130 properties: *const pw_properties,
1131 key: *const ::std::os::raw::c_char,
1132 value: *mut u64,
1133 ) -> ::std::os::raw::c_int;
1134}
1135unsafe extern "C" {
1136 pub fn pw_properties_fetch_int64(
1137 properties: *const pw_properties,
1138 key: *const ::std::os::raw::c_char,
1139 value: *mut i64,
1140 ) -> ::std::os::raw::c_int;
1141}
1142unsafe extern "C" {
1143 pub fn pw_properties_fetch_bool(
1144 properties: *const pw_properties,
1145 key: *const ::std::os::raw::c_char,
1146 value: *mut bool,
1147 ) -> ::std::os::raw::c_int;
1148}
1149unsafe extern "C" {
1150 pub fn pw_properties_iterate(
1151 properties: *const pw_properties,
1152 state: *mut *mut ::std::os::raw::c_void,
1153 ) -> *const ::std::os::raw::c_char;
1154}
1155unsafe extern "C" {
1156 pub fn pw_properties_serialize_dict(
1157 f: *mut FILE,
1158 dict: *const spa_dict,
1159 flags: u32,
1160 ) -> ::std::os::raw::c_int;
1161}
1162unsafe extern "C" {
1163 #[doc = " Update an existing \\ref pw_core_info with \\a update with reset. When info is NULL,\n a new one will be allocated. Returns NULL on failure."]
1164 pub fn pw_core_info_update(
1165 info: *mut pw_core_info,
1166 update: *const pw_core_info,
1167 ) -> *mut pw_core_info;
1168}
1169unsafe extern "C" {
1170 #[doc = " Update an existing \\ref pw_core_info with \\a update. When info is NULL, a new one\n will be allocated. Returns NULL on failure"]
1171 pub fn pw_core_info_merge(
1172 info: *mut pw_core_info,
1173 update: *const pw_core_info,
1174 reset: bool,
1175 ) -> *mut pw_core_info;
1176}
1177unsafe extern "C" {
1178 #[doc = " Free a \\ref pw_core_info"]
1179 pub fn pw_core_info_free(info: *mut pw_core_info);
1180}
1181#[doc = " \\struct pw_core_events\n \\brief Core events"]
1182#[repr(C)]
1183#[derive(Debug, Copy, Clone)]
1184pub struct pw_core_events {
1185 pub version: u32,
1186 #[doc = " Notify new core info\n\n This event is emitted when first bound to the core or when the\n hello method is called.\n\n \\param info new core info"]
1187 pub info: ::std::option::Option<
1188 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_core_info),
1189 >,
1190 #[doc = " Emit a done event\n\n The done event is emitted as a result of a sync method with the\n same seq number.\n\n \\param seq the seq number passed to the sync method call"]
1191 pub done: ::std::option::Option<
1192 unsafe extern "C" fn(
1193 data: *mut ::std::os::raw::c_void,
1194 id: u32,
1195 seq: ::std::os::raw::c_int,
1196 ),
1197 >,
1198 #[doc = " Emit a ping event\n\n The client should reply with a pong reply with the same seq\n number."]
1199 pub ping: ::std::option::Option<
1200 unsafe extern "C" fn(
1201 data: *mut ::std::os::raw::c_void,
1202 id: u32,
1203 seq: ::std::os::raw::c_int,
1204 ),
1205 >,
1206 #[doc = " Fatal error event\n\n The error event is sent out when a fatal (non-recoverable)\n error has occurred. The id argument is the proxy object where\n the error occurred, most often in response to a request to that\n object. The message is a brief description of the error,\n for (debugging) convenience.\n\n This event is usually also emitted on the proxy object with\n \\a id.\n\n \\param id object where the error occurred\n \\param seq the sequence number that generated the error\n \\param res error code\n \\param message error description"]
1207 pub error: ::std::option::Option<
1208 unsafe extern "C" fn(
1209 data: *mut ::std::os::raw::c_void,
1210 id: u32,
1211 seq: ::std::os::raw::c_int,
1212 res: ::std::os::raw::c_int,
1213 message: *const ::std::os::raw::c_char,
1214 ),
1215 >,
1216 #[doc = " Remove an object ID\n\n This event is used internally by the object ID management\n logic. When a client deletes an object, the server will send\n this event to acknowledge that it has seen the delete request.\n When the client receives this event, it will know that it can\n safely reuse the object ID.\n\n \\param id deleted object ID"]
1217 pub remove_id:
1218 ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, id: u32)>,
1219 #[doc = " Notify an object binding\n\n This event is emitted when a local object ID is bound to a\n global ID. It is emitted before the global becomes visible in the\n registry.\n\n The bound_props event is an enhanced version of this event that\n also contains the extra global properties.\n\n \\param id bound object ID\n \\param global_id the global id bound to"]
1220 pub bound_id: ::std::option::Option<
1221 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, id: u32, global_id: u32),
1222 >,
1223 #[doc = " Add memory for a client\n\n Memory is given to a client as \\a fd of a certain\n memory \\a type.\n\n Further references to this fd will be made with the per memory\n unique identifier \\a id.\n\n \\param id the unique id of the memory\n \\param type the memory type, one of enum spa_data_type\n \\param fd the file descriptor\n \\param flags extra flags"]
1224 pub add_mem: ::std::option::Option<
1225 unsafe extern "C" fn(
1226 data: *mut ::std::os::raw::c_void,
1227 id: u32,
1228 type_: u32,
1229 fd: ::std::os::raw::c_int,
1230 flags: u32,
1231 ),
1232 >,
1233 #[doc = " Remove memory for a client\n\n \\param id the memory id to remove"]
1234 pub remove_mem:
1235 ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, id: u32)>,
1236 #[doc = " Notify an object binding\n\n This event is emitted when a local object ID is bound to a\n global ID. It is emitted before the global becomes visible in the\n registry.\n\n This is an enhanced version of the bound_id event.\n\n \\param id bound object ID\n \\param global_id the global id bound to\n \\param props The properties of the new global object.\n\n Since version 4:1"]
1237 pub bound_props: ::std::option::Option<
1238 unsafe extern "C" fn(
1239 data: *mut ::std::os::raw::c_void,
1240 id: u32,
1241 global_id: u32,
1242 props: *const spa_dict,
1243 ),
1244 >,
1245}
1246#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1247const _: () = {
1248 ["Size of pw_core_events"][::std::mem::size_of::<pw_core_events>() - 80usize];
1249 ["Alignment of pw_core_events"][::std::mem::align_of::<pw_core_events>() - 8usize];
1250 ["Offset of field: pw_core_events::version"]
1251 [::std::mem::offset_of!(pw_core_events, version) - 0usize];
1252 ["Offset of field: pw_core_events::info"]
1253 [::std::mem::offset_of!(pw_core_events, info) - 8usize];
1254 ["Offset of field: pw_core_events::done"]
1255 [::std::mem::offset_of!(pw_core_events, done) - 16usize];
1256 ["Offset of field: pw_core_events::ping"]
1257 [::std::mem::offset_of!(pw_core_events, ping) - 24usize];
1258 ["Offset of field: pw_core_events::error"]
1259 [::std::mem::offset_of!(pw_core_events, error) - 32usize];
1260 ["Offset of field: pw_core_events::remove_id"]
1261 [::std::mem::offset_of!(pw_core_events, remove_id) - 40usize];
1262 ["Offset of field: pw_core_events::bound_id"]
1263 [::std::mem::offset_of!(pw_core_events, bound_id) - 48usize];
1264 ["Offset of field: pw_core_events::add_mem"]
1265 [::std::mem::offset_of!(pw_core_events, add_mem) - 56usize];
1266 ["Offset of field: pw_core_events::remove_mem"]
1267 [::std::mem::offset_of!(pw_core_events, remove_mem) - 64usize];
1268 ["Offset of field: pw_core_events::bound_props"]
1269 [::std::mem::offset_of!(pw_core_events, bound_props) - 72usize];
1270};
1271#[doc = " \\struct pw_core_methods\n \\brief Core methods\n\n The core global object. This is a singleton object used for\n creating new objects in the remote PipeWire instance. It is\n also used for internal features."]
1272#[repr(C)]
1273#[derive(Debug, Copy, Clone)]
1274pub struct pw_core_methods {
1275 pub version: u32,
1276 pub add_listener: ::std::option::Option<
1277 unsafe extern "C" fn(
1278 object: *mut ::std::os::raw::c_void,
1279 listener: *mut spa_hook,
1280 events: *const pw_core_events,
1281 data: *mut ::std::os::raw::c_void,
1282 ) -> ::std::os::raw::c_int,
1283 >,
1284 #[doc = " Start a conversation with the server. This will send\n the core info and will destroy all resources for the client\n (except the core and client resource).\n\n This requires X permissions on the core."]
1285 pub hello: ::std::option::Option<
1286 unsafe extern "C" fn(
1287 object: *mut ::std::os::raw::c_void,
1288 version: u32,
1289 ) -> ::std::os::raw::c_int,
1290 >,
1291 #[doc = " Do server roundtrip\n\n Ask the server to emit the 'done' event with \\a seq.\n\n Since methods are handled in-order and events are delivered\n in-order, this can be used as a barrier to ensure all previous\n methods and the resulting events have been handled.\n\n \\param seq the seq number passed to the done event\n\n This requires X permissions on the core."]
1292 pub sync: ::std::option::Option<
1293 unsafe extern "C" fn(
1294 object: *mut ::std::os::raw::c_void,
1295 id: u32,
1296 seq: ::std::os::raw::c_int,
1297 ) -> ::std::os::raw::c_int,
1298 >,
1299 #[doc = " Reply to a server ping event.\n\n Reply to the server ping event with the same seq.\n\n \\param seq the seq number received in the ping event\n\n This requires X permissions on the core."]
1300 pub pong: ::std::option::Option<
1301 unsafe extern "C" fn(
1302 object: *mut ::std::os::raw::c_void,
1303 id: u32,
1304 seq: ::std::os::raw::c_int,
1305 ) -> ::std::os::raw::c_int,
1306 >,
1307 #[doc = " Fatal error event\n\n The error method is sent out when a fatal (non-recoverable)\n error has occurred. The id argument is the proxy object where\n the error occurred, most often in response to an event on that\n object. The message is a brief description of the error,\n for (debugging) convenience.\n\n This method is usually also emitted on the resource object with\n \\a id.\n\n \\param id resource id where the error occurred\n \\param res error code\n \\param message error description\n\n This requires X permissions on the core."]
1308 pub error: ::std::option::Option<
1309 unsafe extern "C" fn(
1310 object: *mut ::std::os::raw::c_void,
1311 id: u32,
1312 seq: ::std::os::raw::c_int,
1313 res: ::std::os::raw::c_int,
1314 message: *const ::std::os::raw::c_char,
1315 ) -> ::std::os::raw::c_int,
1316 >,
1317 #[doc = " Get the registry object\n\n Create a registry object that allows the client to list and bind\n the global objects available from the PipeWire server\n \\param version the client version\n \\param user_data_size extra size\n\n This requires X permissions on the core."]
1318 pub get_registry: ::std::option::Option<
1319 unsafe extern "C" fn(
1320 object: *mut ::std::os::raw::c_void,
1321 version: u32,
1322 user_data_size: usize,
1323 ) -> *mut pw_registry,
1324 >,
1325 #[doc = " Create a new object on the PipeWire server from a factory.\n\n \\param factory_name the factory name to use\n \\param type the interface to bind to\n \\param version the version of the interface\n \\param props extra properties\n \\param user_data_size extra size\n\n This requires X permissions on the core."]
1326 pub create_object: ::std::option::Option<
1327 unsafe extern "C" fn(
1328 object: *mut ::std::os::raw::c_void,
1329 factory_name: *const ::std::os::raw::c_char,
1330 type_: *const ::std::os::raw::c_char,
1331 version: u32,
1332 props: *const spa_dict,
1333 user_data_size: usize,
1334 ) -> *mut ::std::os::raw::c_void,
1335 >,
1336 #[doc = " Destroy an resource\n\n Destroy the server resource for the given proxy.\n\n \\param obj the proxy to destroy\n\n This requires X permissions on the core."]
1337 pub destroy: ::std::option::Option<
1338 unsafe extern "C" fn(
1339 object: *mut ::std::os::raw::c_void,
1340 proxy: *mut ::std::os::raw::c_void,
1341 ) -> ::std::os::raw::c_int,
1342 >,
1343}
1344#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1345const _: () = {
1346 ["Size of pw_core_methods"][::std::mem::size_of::<pw_core_methods>() - 72usize];
1347 ["Alignment of pw_core_methods"][::std::mem::align_of::<pw_core_methods>() - 8usize];
1348 ["Offset of field: pw_core_methods::version"]
1349 [::std::mem::offset_of!(pw_core_methods, version) - 0usize];
1350 ["Offset of field: pw_core_methods::add_listener"]
1351 [::std::mem::offset_of!(pw_core_methods, add_listener) - 8usize];
1352 ["Offset of field: pw_core_methods::hello"]
1353 [::std::mem::offset_of!(pw_core_methods, hello) - 16usize];
1354 ["Offset of field: pw_core_methods::sync"]
1355 [::std::mem::offset_of!(pw_core_methods, sync) - 24usize];
1356 ["Offset of field: pw_core_methods::pong"]
1357 [::std::mem::offset_of!(pw_core_methods, pong) - 32usize];
1358 ["Offset of field: pw_core_methods::error"]
1359 [::std::mem::offset_of!(pw_core_methods, error) - 40usize];
1360 ["Offset of field: pw_core_methods::get_registry"]
1361 [::std::mem::offset_of!(pw_core_methods, get_registry) - 48usize];
1362 ["Offset of field: pw_core_methods::create_object"]
1363 [::std::mem::offset_of!(pw_core_methods, create_object) - 56usize];
1364 ["Offset of field: pw_core_methods::destroy"]
1365 [::std::mem::offset_of!(pw_core_methods, destroy) - 64usize];
1366};
1367#[doc = " Registry events"]
1368#[repr(C)]
1369#[derive(Debug, Copy, Clone)]
1370pub struct pw_registry_events {
1371 pub version: u32,
1372 #[doc = " Notify of a new global object\n\n The registry emits this event when a new global object is\n available.\n\n \\param id the global object id\n \\param permissions the permissions of the object\n \\param type the type of the interface\n \\param version the version of the interface\n \\param props extra properties of the global"]
1373 pub global: ::std::option::Option<
1374 unsafe extern "C" fn(
1375 data: *mut ::std::os::raw::c_void,
1376 id: u32,
1377 permissions: u32,
1378 type_: *const ::std::os::raw::c_char,
1379 version: u32,
1380 props: *const spa_dict,
1381 ),
1382 >,
1383 #[doc = " Notify of a global object removal\n\n Emitted when a global object was removed from the registry.\n If the client has any bindings to the global, it should destroy\n those.\n\n \\param id the id of the global that was removed"]
1384 pub global_remove:
1385 ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, id: u32)>,
1386}
1387#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1388const _: () = {
1389 ["Size of pw_registry_events"][::std::mem::size_of::<pw_registry_events>() - 24usize];
1390 ["Alignment of pw_registry_events"][::std::mem::align_of::<pw_registry_events>() - 8usize];
1391 ["Offset of field: pw_registry_events::version"]
1392 [::std::mem::offset_of!(pw_registry_events, version) - 0usize];
1393 ["Offset of field: pw_registry_events::global"]
1394 [::std::mem::offset_of!(pw_registry_events, global) - 8usize];
1395 ["Offset of field: pw_registry_events::global_remove"]
1396 [::std::mem::offset_of!(pw_registry_events, global_remove) - 16usize];
1397};
1398#[doc = " Registry methods"]
1399#[repr(C)]
1400#[derive(Debug, Copy, Clone)]
1401pub struct pw_registry_methods {
1402 pub version: u32,
1403 pub add_listener: ::std::option::Option<
1404 unsafe extern "C" fn(
1405 object: *mut ::std::os::raw::c_void,
1406 listener: *mut spa_hook,
1407 events: *const pw_registry_events,
1408 data: *mut ::std::os::raw::c_void,
1409 ) -> ::std::os::raw::c_int,
1410 >,
1411 #[doc = " Bind to a global object\n\n Bind to the global object with \\a id and use the client proxy\n with new_id as the proxy. After this call, methods can be\n send to the remote global object and events can be received\n\n \\param id the global id to bind to\n \\param type the interface type to bind to\n \\param version the interface version to use\n \\returns the new object"]
1412 pub bind: ::std::option::Option<
1413 unsafe extern "C" fn(
1414 object: *mut ::std::os::raw::c_void,
1415 id: u32,
1416 type_: *const ::std::os::raw::c_char,
1417 version: u32,
1418 use_data_size: usize,
1419 ) -> *mut ::std::os::raw::c_void,
1420 >,
1421 #[doc = " Attempt to destroy a global object\n\n Try to destroy the global object.\n\n \\param id the global id to destroy. The client needs X permissions\n on the global."]
1422 pub destroy: ::std::option::Option<
1423 unsafe extern "C" fn(object: *mut ::std::os::raw::c_void, id: u32) -> ::std::os::raw::c_int,
1424 >,
1425}
1426#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1427const _: () = {
1428 ["Size of pw_registry_methods"][::std::mem::size_of::<pw_registry_methods>() - 32usize];
1429 ["Alignment of pw_registry_methods"][::std::mem::align_of::<pw_registry_methods>() - 8usize];
1430 ["Offset of field: pw_registry_methods::version"]
1431 [::std::mem::offset_of!(pw_registry_methods, version) - 0usize];
1432 ["Offset of field: pw_registry_methods::add_listener"]
1433 [::std::mem::offset_of!(pw_registry_methods, add_listener) - 8usize];
1434 ["Offset of field: pw_registry_methods::bind"]
1435 [::std::mem::offset_of!(pw_registry_methods, bind) - 16usize];
1436 ["Offset of field: pw_registry_methods::destroy"]
1437 [::std::mem::offset_of!(pw_registry_methods, destroy) - 24usize];
1438};
1439unsafe extern "C" {
1440 #[doc = " Connect to a PipeWire instance\n\n \\param context a \\ref pw_context\n \\param properties optional properties, ownership of the properties is\n\ttaken.\n \\param user_data_size extra user data size\n\n \\return a \\ref pw_core on success or NULL with errno set on error. The core\n will have an id of \\ref PW_ID_CORE (0)"]
1441 pub fn pw_context_connect(
1442 context: *mut pw_context,
1443 properties: *mut pw_properties,
1444 user_data_size: usize,
1445 ) -> *mut pw_core;
1446}
1447unsafe extern "C" {
1448 #[doc = " Connect to a PipeWire instance on the given socket\n\n \\param context a \\ref pw_context\n \\param fd the connected socket to use, the socket will be closed\n\tautomatically on disconnect or error.\n \\param properties optional properties, ownership of the properties is\n\ttaken.\n \\param user_data_size extra user data size\n\n \\return a \\ref pw_core on success or NULL with errno set on error"]
1449 pub fn pw_context_connect_fd(
1450 context: *mut pw_context,
1451 fd: ::std::os::raw::c_int,
1452 properties: *mut pw_properties,
1453 user_data_size: usize,
1454 ) -> *mut pw_core;
1455}
1456unsafe extern "C" {
1457 #[doc = " Connect to a given PipeWire instance\n\n \\param context a \\ref pw_context to connect to\n \\param properties optional properties, ownership of the properties is\n\ttaken.\n \\param user_data_size extra user data size\n\n \\return a \\ref pw_core on success or NULL with errno set on error"]
1458 pub fn pw_context_connect_self(
1459 context: *mut pw_context,
1460 properties: *mut pw_properties,
1461 user_data_size: usize,
1462 ) -> *mut pw_core;
1463}
1464unsafe extern "C" {
1465 #[doc = " Steal the fd of the core connection or < 0 on error. The core\n will be disconnected after this call."]
1466 pub fn pw_core_steal_fd(core: *mut pw_core) -> ::std::os::raw::c_int;
1467}
1468unsafe extern "C" {
1469 #[doc = " Pause or resume the core. When the core is paused, no new events\n will be dispatched until the core is resumed again."]
1470 pub fn pw_core_set_paused(core: *mut pw_core, paused: bool) -> ::std::os::raw::c_int;
1471}
1472unsafe extern "C" {
1473 #[doc = " disconnect and destroy a core"]
1474 pub fn pw_core_disconnect(core: *mut pw_core) -> ::std::os::raw::c_int;
1475}
1476unsafe extern "C" {
1477 #[doc = " Get the user_data. It is of the size specified when this object was\n constructed"]
1478 pub fn pw_core_get_user_data(core: *mut pw_core) -> *mut ::std::os::raw::c_void;
1479}
1480#[repr(C)]
1481#[derive(Debug, Copy, Clone)]
1482pub struct pw_client {
1483 _unused: [u8; 0],
1484}
1485unsafe extern "C" {
1486 #[doc = " Get the client proxy of the connected core. This will have the id\n of PW_ID_CLIENT (1)"]
1487 pub fn pw_core_get_client(core: *mut pw_core) -> *mut pw_client;
1488}
1489unsafe extern "C" {
1490 #[doc = " Get the context object used to created this core"]
1491 pub fn pw_core_get_context(core: *mut pw_core) -> *mut pw_context;
1492}
1493unsafe extern "C" {
1494 #[doc = " Get properties from the core"]
1495 pub fn pw_core_get_properties(core: *mut pw_core) -> *const pw_properties;
1496}
1497unsafe extern "C" {
1498 #[doc = " Update the core properties. This updates the properties\n of the associated client.\n \\return the number of properties that were updated"]
1499 pub fn pw_core_update_properties(
1500 core: *mut pw_core,
1501 dict: *const spa_dict,
1502 ) -> ::std::os::raw::c_int;
1503}
1504unsafe extern "C" {
1505 #[doc = " Get the core mempool object"]
1506 pub fn pw_core_get_mempool(core: *mut pw_core) -> *mut pw_mempool;
1507}
1508unsafe extern "C" {
1509 #[doc = " Get the proxy with the given id"]
1510 pub fn pw_core_find_proxy(core: *mut pw_core, id: u32) -> *mut pw_proxy;
1511}
1512unsafe extern "C" {
1513 #[doc = " Export an object into the PipeWire instance associated with core"]
1514 pub fn pw_core_export(
1515 core: *mut pw_core,
1516 type_: *const ::std::os::raw::c_char,
1517 props: *const spa_dict,
1518 object: *mut ::std::os::raw::c_void,
1519 user_data_size: usize,
1520 ) -> *mut pw_proxy;
1521}
1522#[doc = " \\addtogroup pw_loop\n \\{"]
1523#[repr(C)]
1524#[derive(Debug, Copy, Clone)]
1525pub struct pw_loop {
1526 #[doc = "< system utils"]
1527 pub system: *mut spa_system,
1528 #[doc = "< wrapped loop"]
1529 pub loop_: *mut spa_loop,
1530 #[doc = "< loop control"]
1531 pub control: *mut spa_loop_control,
1532 #[doc = "< loop utils"]
1533 pub utils: *mut spa_loop_utils,
1534 pub name: *const ::std::os::raw::c_char,
1535}
1536#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1537const _: () = {
1538 ["Size of pw_loop"][::std::mem::size_of::<pw_loop>() - 40usize];
1539 ["Alignment of pw_loop"][::std::mem::align_of::<pw_loop>() - 8usize];
1540 ["Offset of field: pw_loop::system"][::std::mem::offset_of!(pw_loop, system) - 0usize];
1541 ["Offset of field: pw_loop::loop_"][::std::mem::offset_of!(pw_loop, loop_) - 8usize];
1542 ["Offset of field: pw_loop::control"][::std::mem::offset_of!(pw_loop, control) - 16usize];
1543 ["Offset of field: pw_loop::utils"][::std::mem::offset_of!(pw_loop, utils) - 24usize];
1544 ["Offset of field: pw_loop::name"][::std::mem::offset_of!(pw_loop, name) - 32usize];
1545};
1546unsafe extern "C" {
1547 pub fn pw_loop_new(props: *const spa_dict) -> *mut pw_loop;
1548}
1549unsafe extern "C" {
1550 pub fn pw_loop_destroy(loop_: *mut pw_loop);
1551}
1552unsafe extern "C" {
1553 pub fn pw_loop_set_name(
1554 loop_: *mut pw_loop,
1555 name: *const ::std::os::raw::c_char,
1556 ) -> ::std::os::raw::c_int;
1557}
1558#[doc = " context events emitted by the context object added with \\ref pw_context_add_listener"]
1559#[repr(C)]
1560#[derive(Debug, Copy, Clone)]
1561pub struct pw_context_events {
1562 pub version: u32,
1563 #[doc = " The context is being destroyed"]
1564 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
1565 #[doc = " The context is being freed"]
1566 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
1567 #[doc = " a new client object is added"]
1568 pub check_access: ::std::option::Option<
1569 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, client: *mut pw_impl_client),
1570 >,
1571 #[doc = " a new global object was added"]
1572 pub global_added: ::std::option::Option<
1573 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, global: *mut pw_global),
1574 >,
1575 #[doc = " a global object was removed"]
1576 pub global_removed: ::std::option::Option<
1577 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, global: *mut pw_global),
1578 >,
1579 #[doc = " a driver was added, since 0.3.75 version:1"]
1580 pub driver_added: ::std::option::Option<
1581 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, node: *mut pw_impl_node),
1582 >,
1583 #[doc = " a driver was removed, since 0.3.75 version:1"]
1584 pub driver_removed: ::std::option::Option<
1585 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, node: *mut pw_impl_node),
1586 >,
1587}
1588#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1589const _: () = {
1590 ["Size of pw_context_events"][::std::mem::size_of::<pw_context_events>() - 64usize];
1591 ["Alignment of pw_context_events"][::std::mem::align_of::<pw_context_events>() - 8usize];
1592 ["Offset of field: pw_context_events::version"]
1593 [::std::mem::offset_of!(pw_context_events, version) - 0usize];
1594 ["Offset of field: pw_context_events::destroy"]
1595 [::std::mem::offset_of!(pw_context_events, destroy) - 8usize];
1596 ["Offset of field: pw_context_events::free"]
1597 [::std::mem::offset_of!(pw_context_events, free) - 16usize];
1598 ["Offset of field: pw_context_events::check_access"]
1599 [::std::mem::offset_of!(pw_context_events, check_access) - 24usize];
1600 ["Offset of field: pw_context_events::global_added"]
1601 [::std::mem::offset_of!(pw_context_events, global_added) - 32usize];
1602 ["Offset of field: pw_context_events::global_removed"]
1603 [::std::mem::offset_of!(pw_context_events, global_removed) - 40usize];
1604 ["Offset of field: pw_context_events::driver_added"]
1605 [::std::mem::offset_of!(pw_context_events, driver_added) - 48usize];
1606 ["Offset of field: pw_context_events::driver_removed"]
1607 [::std::mem::offset_of!(pw_context_events, driver_removed) - 56usize];
1608};
1609unsafe extern "C" {
1610 #[doc = " Make a new context object for a given main_loop. Ownership of the properties is taken, even\n if the function returns NULL.\n\n \\param main_loop A main loop to run in. This must stay alive unil pw_context_destroy() is called.\n \\param props extra properties\n \\param user_data_size extra user data size\n \\return The context object on success, or NULL on failure, in which case errno is set."]
1611 pub fn pw_context_new(
1612 main_loop: *mut pw_loop,
1613 props: *mut pw_properties,
1614 user_data_size: usize,
1615 ) -> *mut pw_context;
1616}
1617unsafe extern "C" {
1618 #[doc = " destroy a context object, all resources except the main_loop will be destroyed"]
1619 pub fn pw_context_destroy(context: *mut pw_context);
1620}
1621unsafe extern "C" {
1622 #[doc = " Get the context user data"]
1623 pub fn pw_context_get_user_data(context: *mut pw_context) -> *mut ::std::os::raw::c_void;
1624}
1625unsafe extern "C" {
1626 #[doc = " Add a new event listener to a context"]
1627 pub fn pw_context_add_listener(
1628 context: *mut pw_context,
1629 listener: *mut spa_hook,
1630 events: *const pw_context_events,
1631 data: *mut ::std::os::raw::c_void,
1632 );
1633}
1634unsafe extern "C" {
1635 #[doc = " Get the context properties"]
1636 pub fn pw_context_get_properties(context: *mut pw_context) -> *const pw_properties;
1637}
1638unsafe extern "C" {
1639 #[doc = " Update the context properties"]
1640 pub fn pw_context_update_properties(
1641 context: *mut pw_context,
1642 dict: *const spa_dict,
1643 ) -> ::std::os::raw::c_int;
1644}
1645unsafe extern "C" {
1646 #[doc = " Get a config section for this context. Since 0.3.22, deprecated,\n use pw_context_conf_section_for_each()."]
1647 pub fn pw_context_get_conf_section(
1648 context: *mut pw_context,
1649 section: *const ::std::os::raw::c_char,
1650 ) -> *const ::std::os::raw::c_char;
1651}
1652unsafe extern "C" {
1653 #[doc = " Parse a standard config section for this context. Since 0.3.22"]
1654 pub fn pw_context_parse_conf_section(
1655 context: *mut pw_context,
1656 conf: *mut pw_properties,
1657 section: *const ::std::os::raw::c_char,
1658 ) -> ::std::os::raw::c_int;
1659}
1660unsafe extern "C" {
1661 #[doc = " update properties from a section into props. Since 0.3.45"]
1662 pub fn pw_context_conf_update_props(
1663 context: *mut pw_context,
1664 section: *const ::std::os::raw::c_char,
1665 props: *mut pw_properties,
1666 ) -> ::std::os::raw::c_int;
1667}
1668unsafe extern "C" {
1669 #[doc = " emit callback for all config sections. Since 0.3.45"]
1670 pub fn pw_context_conf_section_for_each(
1671 context: *mut pw_context,
1672 section: *const ::std::os::raw::c_char,
1673 callback: ::std::option::Option<
1674 unsafe extern "C" fn(
1675 data: *mut ::std::os::raw::c_void,
1676 location: *const ::std::os::raw::c_char,
1677 section: *const ::std::os::raw::c_char,
1678 str_: *const ::std::os::raw::c_char,
1679 len: usize,
1680 ) -> ::std::os::raw::c_int,
1681 >,
1682 data: *mut ::std::os::raw::c_void,
1683 ) -> ::std::os::raw::c_int;
1684}
1685unsafe extern "C" {
1686 #[doc = " emit callback for all matched properties. Since 0.3.46"]
1687 pub fn pw_context_conf_section_match_rules(
1688 context: *mut pw_context,
1689 section: *const ::std::os::raw::c_char,
1690 props: *const spa_dict,
1691 callback: ::std::option::Option<
1692 unsafe extern "C" fn(
1693 data: *mut ::std::os::raw::c_void,
1694 location: *const ::std::os::raw::c_char,
1695 action: *const ::std::os::raw::c_char,
1696 str_: *const ::std::os::raw::c_char,
1697 len: usize,
1698 ) -> ::std::os::raw::c_int,
1699 >,
1700 data: *mut ::std::os::raw::c_void,
1701 ) -> ::std::os::raw::c_int;
1702}
1703unsafe extern "C" {
1704 #[doc = " Get the context support objects"]
1705 pub fn pw_context_get_support(
1706 context: *mut pw_context,
1707 n_support: *mut u32,
1708 ) -> *const spa_support;
1709}
1710unsafe extern "C" {
1711 #[doc = " Get the context main loop. Returns the value passed to pw_context_new()."]
1712 pub fn pw_context_get_main_loop(context: *mut pw_context) -> *mut pw_loop;
1713}
1714#[doc = " \\addtogroup pw_data_loop\n \\{"]
1715#[repr(C)]
1716#[derive(Debug, Copy, Clone)]
1717pub struct pw_data_loop {
1718 _unused: [u8; 0],
1719}
1720unsafe extern "C" {
1721 #[doc = " Get the context data loop. This loop runs on the realtime thread. This\n acquires a loop from the generic data.rt class. Use pw_context_acquire_loop() instead.\n Since 0.3.56"]
1722 pub fn pw_context_get_data_loop(context: *mut pw_context) -> *mut pw_data_loop;
1723}
1724unsafe extern "C" {
1725 #[doc = " Get a data-loop.\n Since 1.1.0"]
1726 pub fn pw_context_acquire_loop(
1727 context: *mut pw_context,
1728 props: *const spa_dict,
1729 ) -> *mut pw_loop;
1730}
1731unsafe extern "C" {
1732 #[doc = " Release a data-loop.\n Since 1.1.0"]
1733 pub fn pw_context_release_loop(context: *mut pw_context, loop_: *mut pw_loop);
1734}
1735#[doc = " \\addtogroup pw_work_queue\n \\{"]
1736#[repr(C)]
1737#[derive(Debug, Copy, Clone)]
1738pub struct pw_work_queue {
1739 _unused: [u8; 0],
1740}
1741unsafe extern "C" {
1742 #[doc = " Get the work queue from the context: Since 0.3.26"]
1743 pub fn pw_context_get_work_queue(context: *mut pw_context) -> *mut pw_work_queue;
1744}
1745unsafe extern "C" {
1746 #[doc = " Get the memory pool from the context: Since 0.3.74"]
1747 pub fn pw_context_get_mempool(context: *mut pw_context) -> *mut pw_mempool;
1748}
1749unsafe extern "C" {
1750 #[doc = " Iterate the globals of the context. The callback should return\n 0 to fetch the next item, any other value stops the iteration and returns\n the value. When all callbacks return 0, this function returns 0 when all\n globals are iterated."]
1751 pub fn pw_context_for_each_global(
1752 context: *mut pw_context,
1753 callback: ::std::option::Option<
1754 unsafe extern "C" fn(
1755 data: *mut ::std::os::raw::c_void,
1756 global: *mut pw_global,
1757 ) -> ::std::os::raw::c_int,
1758 >,
1759 data: *mut ::std::os::raw::c_void,
1760 ) -> ::std::os::raw::c_int;
1761}
1762unsafe extern "C" {
1763 #[doc = " Find a context global by id.\n\n \\return The global on success, or NULL on failure. If id is \\ref PW_ID_CORE,\n this function will always return a non-NULL value."]
1764 pub fn pw_context_find_global(context: *mut pw_context, id: u32) -> *mut pw_global;
1765}
1766unsafe extern "C" {
1767 #[doc = " add a spa library for the given factory_name regex"]
1768 pub fn pw_context_add_spa_lib(
1769 context: *mut pw_context,
1770 factory_regex: *const ::std::os::raw::c_char,
1771 lib: *const ::std::os::raw::c_char,
1772 ) -> ::std::os::raw::c_int;
1773}
1774unsafe extern "C" {
1775 #[doc = " find the library name for a spa factory"]
1776 pub fn pw_context_find_spa_lib(
1777 context: *mut pw_context,
1778 factory_name: *const ::std::os::raw::c_char,
1779 ) -> *const ::std::os::raw::c_char;
1780}
1781unsafe extern "C" {
1782 #[doc = " Load a SPA handle from a context. On failure returns NULL and sets errno."]
1783 pub fn pw_context_load_spa_handle(
1784 context: *mut pw_context,
1785 factory_name: *const ::std::os::raw::c_char,
1786 info: *const spa_dict,
1787 ) -> *mut spa_handle;
1788}
1789#[doc = " data for registering export functions"]
1790#[repr(C)]
1791pub struct pw_export_type {
1792 pub link: spa_list,
1793 pub type_: *const ::std::os::raw::c_char,
1794 pub func: ::std::option::Option<
1795 unsafe extern "C" fn(
1796 core: *mut pw_core,
1797 type_: *const ::std::os::raw::c_char,
1798 props: *const spa_dict,
1799 object: *mut ::std::os::raw::c_void,
1800 user_data_size: usize,
1801 ) -> *mut pw_proxy,
1802 >,
1803}
1804#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1805const _: () = {
1806 ["Size of pw_export_type"][::std::mem::size_of::<pw_export_type>() - 32usize];
1807 ["Alignment of pw_export_type"][::std::mem::align_of::<pw_export_type>() - 8usize];
1808 ["Offset of field: pw_export_type::link"]
1809 [::std::mem::offset_of!(pw_export_type, link) - 0usize];
1810 ["Offset of field: pw_export_type::type_"]
1811 [::std::mem::offset_of!(pw_export_type, type_) - 16usize];
1812 ["Offset of field: pw_export_type::func"]
1813 [::std::mem::offset_of!(pw_export_type, func) - 24usize];
1814};
1815unsafe extern "C" {
1816 #[doc = " register a type that can be exported on a context_proxy. This is usually used by\n extension modules"]
1817 pub fn pw_context_register_export_type(
1818 context: *mut pw_context,
1819 type_: *mut pw_export_type,
1820 ) -> ::std::os::raw::c_int;
1821}
1822unsafe extern "C" {
1823 #[doc = " find information about registered export type"]
1824 pub fn pw_context_find_export_type(
1825 context: *mut pw_context,
1826 type_: *const ::std::os::raw::c_char,
1827 ) -> *const pw_export_type;
1828}
1829unsafe extern "C" {
1830 #[doc = " add an object to the context\n\n \\param context The context.\n \\param type The type of the object, usually a `TYPE_INTERFACE_` value.\n \\param value The object value. Must last as long as the context and must\n be of the type corresponding to the type.\n \\return A negative number on failure (out of memory)."]
1831 pub fn pw_context_set_object(
1832 context: *mut pw_context,
1833 type_: *const ::std::os::raw::c_char,
1834 value: *mut ::std::os::raw::c_void,
1835 ) -> ::std::os::raw::c_int;
1836}
1837unsafe extern "C" {
1838 #[doc = " get an object from the context\n\n \\param context The context.\n \\param type The string corresponding to the object's interface.\n \\return The object, or NULL if the object does not exist."]
1839 pub fn pw_context_get_object(
1840 context: *mut pw_context,
1841 type_: *const ::std::os::raw::c_char,
1842 ) -> *mut ::std::os::raw::c_void;
1843}
1844#[doc = " a function to destroy an item"]
1845pub type pw_destroy_t =
1846 ::std::option::Option<unsafe extern "C" fn(object: *mut ::std::os::raw::c_void)>;
1847unsafe extern "C" {
1848 pub fn pw_split_walk(
1849 str_: *const ::std::os::raw::c_char,
1850 delimiter: *const ::std::os::raw::c_char,
1851 len: *mut usize,
1852 state: *mut *const ::std::os::raw::c_char,
1853 ) -> *const ::std::os::raw::c_char;
1854}
1855unsafe extern "C" {
1856 pub fn pw_split_strv(
1857 str_: *const ::std::os::raw::c_char,
1858 delimiter: *const ::std::os::raw::c_char,
1859 max_tokens: ::std::os::raw::c_int,
1860 n_tokens: *mut ::std::os::raw::c_int,
1861 ) -> *mut *mut ::std::os::raw::c_char;
1862}
1863unsafe extern "C" {
1864 pub fn pw_split_ip(
1865 str_: *mut ::std::os::raw::c_char,
1866 delimiter: *const ::std::os::raw::c_char,
1867 max_tokens: ::std::os::raw::c_int,
1868 tokens: *mut *mut ::std::os::raw::c_char,
1869 ) -> ::std::os::raw::c_int;
1870}
1871unsafe extern "C" {
1872 pub fn pw_strv_parse(
1873 val: *const ::std::os::raw::c_char,
1874 len: usize,
1875 max_tokens: ::std::os::raw::c_int,
1876 n_tokens: *mut ::std::os::raw::c_int,
1877 ) -> *mut *mut ::std::os::raw::c_char;
1878}
1879unsafe extern "C" {
1880 pub fn pw_strv_find(
1881 a: *mut *mut ::std::os::raw::c_char,
1882 b: *const ::std::os::raw::c_char,
1883 ) -> ::std::os::raw::c_int;
1884}
1885unsafe extern "C" {
1886 pub fn pw_strv_find_common(
1887 a: *mut *mut ::std::os::raw::c_char,
1888 b: *mut *mut ::std::os::raw::c_char,
1889 ) -> ::std::os::raw::c_int;
1890}
1891unsafe extern "C" {
1892 pub fn pw_free_strv(str_: *mut *mut ::std::os::raw::c_char);
1893}
1894unsafe extern "C" {
1895 pub fn pw_strip(
1896 str_: *mut ::std::os::raw::c_char,
1897 whitespace: *const ::std::os::raw::c_char,
1898 ) -> *mut ::std::os::raw::c_char;
1899}
1900unsafe extern "C" {
1901 pub fn pw_getrandom(
1902 buf: *mut ::std::os::raw::c_void,
1903 buflen: usize,
1904 flags: ::std::os::raw::c_uint,
1905 ) -> isize;
1906}
1907unsafe extern "C" {
1908 pub fn pw_random(buf: *mut ::std::os::raw::c_void, buflen: usize);
1909}
1910unsafe extern "C" {
1911 pub fn pw_reallocarray(
1912 ptr: *mut ::std::os::raw::c_void,
1913 nmemb: usize,
1914 size: usize,
1915 ) -> *mut ::std::os::raw::c_void;
1916}
1917#[repr(C)]
1918pub struct pw_protocol_client {
1919 #[doc = "< link in protocol client_list"]
1920 pub link: spa_list,
1921 #[doc = "< the owner protocol"]
1922 pub protocol: *mut pw_protocol,
1923 pub core: *mut pw_core,
1924 pub connect: ::std::option::Option<
1925 unsafe extern "C" fn(
1926 client: *mut pw_protocol_client,
1927 props: *const spa_dict,
1928 done_callback: ::std::option::Option<
1929 unsafe extern "C" fn(
1930 data: *mut ::std::os::raw::c_void,
1931 result: ::std::os::raw::c_int,
1932 ),
1933 >,
1934 data: *mut ::std::os::raw::c_void,
1935 ) -> ::std::os::raw::c_int,
1936 >,
1937 pub connect_fd: ::std::option::Option<
1938 unsafe extern "C" fn(
1939 client: *mut pw_protocol_client,
1940 fd: ::std::os::raw::c_int,
1941 close: bool,
1942 ) -> ::std::os::raw::c_int,
1943 >,
1944 pub steal_fd: ::std::option::Option<
1945 unsafe extern "C" fn(client: *mut pw_protocol_client) -> ::std::os::raw::c_int,
1946 >,
1947 pub disconnect: ::std::option::Option<unsafe extern "C" fn(client: *mut pw_protocol_client)>,
1948 pub destroy: ::std::option::Option<unsafe extern "C" fn(client: *mut pw_protocol_client)>,
1949 pub set_paused: ::std::option::Option<
1950 unsafe extern "C" fn(
1951 client: *mut pw_protocol_client,
1952 paused: bool,
1953 ) -> ::std::os::raw::c_int,
1954 >,
1955}
1956#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1957const _: () = {
1958 ["Size of pw_protocol_client"][::std::mem::size_of::<pw_protocol_client>() - 80usize];
1959 ["Alignment of pw_protocol_client"][::std::mem::align_of::<pw_protocol_client>() - 8usize];
1960 ["Offset of field: pw_protocol_client::link"]
1961 [::std::mem::offset_of!(pw_protocol_client, link) - 0usize];
1962 ["Offset of field: pw_protocol_client::protocol"]
1963 [::std::mem::offset_of!(pw_protocol_client, protocol) - 16usize];
1964 ["Offset of field: pw_protocol_client::core"]
1965 [::std::mem::offset_of!(pw_protocol_client, core) - 24usize];
1966 ["Offset of field: pw_protocol_client::connect"]
1967 [::std::mem::offset_of!(pw_protocol_client, connect) - 32usize];
1968 ["Offset of field: pw_protocol_client::connect_fd"]
1969 [::std::mem::offset_of!(pw_protocol_client, connect_fd) - 40usize];
1970 ["Offset of field: pw_protocol_client::steal_fd"]
1971 [::std::mem::offset_of!(pw_protocol_client, steal_fd) - 48usize];
1972 ["Offset of field: pw_protocol_client::disconnect"]
1973 [::std::mem::offset_of!(pw_protocol_client, disconnect) - 56usize];
1974 ["Offset of field: pw_protocol_client::destroy"]
1975 [::std::mem::offset_of!(pw_protocol_client, destroy) - 64usize];
1976 ["Offset of field: pw_protocol_client::set_paused"]
1977 [::std::mem::offset_of!(pw_protocol_client, set_paused) - 72usize];
1978};
1979#[repr(C)]
1980pub struct pw_protocol_server {
1981 #[doc = "< link in protocol server_list"]
1982 pub link: spa_list,
1983 #[doc = "< the owner protocol"]
1984 pub protocol: *mut pw_protocol,
1985 pub core: *mut pw_impl_core,
1986 #[doc = "< list of clients of this protocol"]
1987 pub client_list: spa_list,
1988 pub destroy: ::std::option::Option<unsafe extern "C" fn(listen: *mut pw_protocol_server)>,
1989}
1990#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1991const _: () = {
1992 ["Size of pw_protocol_server"][::std::mem::size_of::<pw_protocol_server>() - 56usize];
1993 ["Alignment of pw_protocol_server"][::std::mem::align_of::<pw_protocol_server>() - 8usize];
1994 ["Offset of field: pw_protocol_server::link"]
1995 [::std::mem::offset_of!(pw_protocol_server, link) - 0usize];
1996 ["Offset of field: pw_protocol_server::protocol"]
1997 [::std::mem::offset_of!(pw_protocol_server, protocol) - 16usize];
1998 ["Offset of field: pw_protocol_server::core"]
1999 [::std::mem::offset_of!(pw_protocol_server, core) - 24usize];
2000 ["Offset of field: pw_protocol_server::client_list"]
2001 [::std::mem::offset_of!(pw_protocol_server, client_list) - 32usize];
2002 ["Offset of field: pw_protocol_server::destroy"]
2003 [::std::mem::offset_of!(pw_protocol_server, destroy) - 48usize];
2004};
2005#[repr(C)]
2006#[derive(Debug, Copy, Clone)]
2007pub struct pw_protocol_marshal {
2008 #[doc = "< interface type"]
2009 pub type_: *const ::std::os::raw::c_char,
2010 #[doc = "< version"]
2011 pub version: u32,
2012 #[doc = "< version"]
2013 pub flags: u32,
2014 #[doc = "< number of client methods"]
2015 pub n_client_methods: u32,
2016 #[doc = "< number of server methods"]
2017 pub n_server_methods: u32,
2018 pub client_marshal: *const ::std::os::raw::c_void,
2019 pub server_demarshal: *const ::std::os::raw::c_void,
2020 pub server_marshal: *const ::std::os::raw::c_void,
2021 pub client_demarshal: *const ::std::os::raw::c_void,
2022}
2023#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2024const _: () = {
2025 ["Size of pw_protocol_marshal"][::std::mem::size_of::<pw_protocol_marshal>() - 56usize];
2026 ["Alignment of pw_protocol_marshal"][::std::mem::align_of::<pw_protocol_marshal>() - 8usize];
2027 ["Offset of field: pw_protocol_marshal::type_"]
2028 [::std::mem::offset_of!(pw_protocol_marshal, type_) - 0usize];
2029 ["Offset of field: pw_protocol_marshal::version"]
2030 [::std::mem::offset_of!(pw_protocol_marshal, version) - 8usize];
2031 ["Offset of field: pw_protocol_marshal::flags"]
2032 [::std::mem::offset_of!(pw_protocol_marshal, flags) - 12usize];
2033 ["Offset of field: pw_protocol_marshal::n_client_methods"]
2034 [::std::mem::offset_of!(pw_protocol_marshal, n_client_methods) - 16usize];
2035 ["Offset of field: pw_protocol_marshal::n_server_methods"]
2036 [::std::mem::offset_of!(pw_protocol_marshal, n_server_methods) - 20usize];
2037 ["Offset of field: pw_protocol_marshal::client_marshal"]
2038 [::std::mem::offset_of!(pw_protocol_marshal, client_marshal) - 24usize];
2039 ["Offset of field: pw_protocol_marshal::server_demarshal"]
2040 [::std::mem::offset_of!(pw_protocol_marshal, server_demarshal) - 32usize];
2041 ["Offset of field: pw_protocol_marshal::server_marshal"]
2042 [::std::mem::offset_of!(pw_protocol_marshal, server_marshal) - 40usize];
2043 ["Offset of field: pw_protocol_marshal::client_demarshal"]
2044 [::std::mem::offset_of!(pw_protocol_marshal, client_demarshal) - 48usize];
2045};
2046#[repr(C)]
2047#[derive(Debug, Copy, Clone)]
2048pub struct pw_protocol_implementation {
2049 pub version: u32,
2050 pub new_client: ::std::option::Option<
2051 unsafe extern "C" fn(
2052 protocol: *mut pw_protocol,
2053 core: *mut pw_core,
2054 props: *const spa_dict,
2055 ) -> *mut pw_protocol_client,
2056 >,
2057 pub add_server: ::std::option::Option<
2058 unsafe extern "C" fn(
2059 protocol: *mut pw_protocol,
2060 core: *mut pw_impl_core,
2061 props: *const spa_dict,
2062 ) -> *mut pw_protocol_server,
2063 >,
2064 pub add_fd_server: ::std::option::Option<
2065 unsafe extern "C" fn(
2066 protocol: *mut pw_protocol,
2067 core: *mut pw_impl_core,
2068 listen_fd: ::std::os::raw::c_int,
2069 close_fd: ::std::os::raw::c_int,
2070 props: *const spa_dict,
2071 ) -> *mut pw_protocol_server,
2072 >,
2073}
2074#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2075const _: () = {
2076 ["Size of pw_protocol_implementation"]
2077 [::std::mem::size_of::<pw_protocol_implementation>() - 32usize];
2078 ["Alignment of pw_protocol_implementation"]
2079 [::std::mem::align_of::<pw_protocol_implementation>() - 8usize];
2080 ["Offset of field: pw_protocol_implementation::version"]
2081 [::std::mem::offset_of!(pw_protocol_implementation, version) - 0usize];
2082 ["Offset of field: pw_protocol_implementation::new_client"]
2083 [::std::mem::offset_of!(pw_protocol_implementation, new_client) - 8usize];
2084 ["Offset of field: pw_protocol_implementation::add_server"]
2085 [::std::mem::offset_of!(pw_protocol_implementation, add_server) - 16usize];
2086 ["Offset of field: pw_protocol_implementation::add_fd_server"]
2087 [::std::mem::offset_of!(pw_protocol_implementation, add_fd_server) - 24usize];
2088};
2089#[repr(C)]
2090#[derive(Debug, Copy, Clone)]
2091pub struct pw_protocol_events {
2092 pub version: u32,
2093 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
2094}
2095#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2096const _: () = {
2097 ["Size of pw_protocol_events"][::std::mem::size_of::<pw_protocol_events>() - 16usize];
2098 ["Alignment of pw_protocol_events"][::std::mem::align_of::<pw_protocol_events>() - 8usize];
2099 ["Offset of field: pw_protocol_events::version"]
2100 [::std::mem::offset_of!(pw_protocol_events, version) - 0usize];
2101 ["Offset of field: pw_protocol_events::destroy"]
2102 [::std::mem::offset_of!(pw_protocol_events, destroy) - 8usize];
2103};
2104unsafe extern "C" {
2105 pub fn pw_protocol_new(
2106 context: *mut pw_context,
2107 name: *const ::std::os::raw::c_char,
2108 user_data_size: usize,
2109 ) -> *mut pw_protocol;
2110}
2111unsafe extern "C" {
2112 pub fn pw_protocol_destroy(protocol: *mut pw_protocol);
2113}
2114unsafe extern "C" {
2115 pub fn pw_protocol_get_context(protocol: *mut pw_protocol) -> *mut pw_context;
2116}
2117unsafe extern "C" {
2118 pub fn pw_protocol_get_user_data(protocol: *mut pw_protocol) -> *mut ::std::os::raw::c_void;
2119}
2120unsafe extern "C" {
2121 pub fn pw_protocol_get_implementation(
2122 protocol: *mut pw_protocol,
2123 ) -> *const pw_protocol_implementation;
2124}
2125unsafe extern "C" {
2126 pub fn pw_protocol_get_extension(protocol: *mut pw_protocol) -> *const ::std::os::raw::c_void;
2127}
2128unsafe extern "C" {
2129 pub fn pw_protocol_add_listener(
2130 protocol: *mut pw_protocol,
2131 listener: *mut spa_hook,
2132 events: *const pw_protocol_events,
2133 data: *mut ::std::os::raw::c_void,
2134 );
2135}
2136unsafe extern "C" {
2137 pub fn pw_protocol_add_marshal(
2138 protocol: *mut pw_protocol,
2139 marshal: *const pw_protocol_marshal,
2140 ) -> ::std::os::raw::c_int;
2141}
2142unsafe extern "C" {
2143 pub fn pw_protocol_get_marshal(
2144 protocol: *mut pw_protocol,
2145 type_: *const ::std::os::raw::c_char,
2146 version: u32,
2147 flags: u32,
2148 ) -> *const pw_protocol_marshal;
2149}
2150unsafe extern "C" {
2151 pub fn pw_context_find_protocol(
2152 context: *mut pw_context,
2153 name: *const ::std::os::raw::c_char,
2154 ) -> *mut pw_protocol;
2155}
2156#[doc = " Proxy events, use \\ref pw_proxy_add_listener"]
2157#[repr(C)]
2158#[derive(Debug, Copy, Clone)]
2159pub struct pw_proxy_events {
2160 pub version: u32,
2161 #[doc = " The proxy is destroyed"]
2162 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
2163 #[doc = " a proxy is bound to a global id"]
2164 pub bound: ::std::option::Option<
2165 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, global_id: u32),
2166 >,
2167 #[doc = " a proxy is removed from the server. Use pw_proxy_destroy to\n free the proxy."]
2168 pub removed: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
2169 #[doc = " a reply to a sync method completed"]
2170 pub done: ::std::option::Option<
2171 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, seq: ::std::os::raw::c_int),
2172 >,
2173 #[doc = " an error occurred on the proxy"]
2174 pub error: ::std::option::Option<
2175 unsafe extern "C" fn(
2176 data: *mut ::std::os::raw::c_void,
2177 seq: ::std::os::raw::c_int,
2178 res: ::std::os::raw::c_int,
2179 message: *const ::std::os::raw::c_char,
2180 ),
2181 >,
2182 pub bound_props: ::std::option::Option<
2183 unsafe extern "C" fn(
2184 data: *mut ::std::os::raw::c_void,
2185 global_id: u32,
2186 props: *const spa_dict,
2187 ),
2188 >,
2189}
2190#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2191const _: () = {
2192 ["Size of pw_proxy_events"][::std::mem::size_of::<pw_proxy_events>() - 56usize];
2193 ["Alignment of pw_proxy_events"][::std::mem::align_of::<pw_proxy_events>() - 8usize];
2194 ["Offset of field: pw_proxy_events::version"]
2195 [::std::mem::offset_of!(pw_proxy_events, version) - 0usize];
2196 ["Offset of field: pw_proxy_events::destroy"]
2197 [::std::mem::offset_of!(pw_proxy_events, destroy) - 8usize];
2198 ["Offset of field: pw_proxy_events::bound"]
2199 [::std::mem::offset_of!(pw_proxy_events, bound) - 16usize];
2200 ["Offset of field: pw_proxy_events::removed"]
2201 [::std::mem::offset_of!(pw_proxy_events, removed) - 24usize];
2202 ["Offset of field: pw_proxy_events::done"]
2203 [::std::mem::offset_of!(pw_proxy_events, done) - 32usize];
2204 ["Offset of field: pw_proxy_events::error"]
2205 [::std::mem::offset_of!(pw_proxy_events, error) - 40usize];
2206 ["Offset of field: pw_proxy_events::bound_props"]
2207 [::std::mem::offset_of!(pw_proxy_events, bound_props) - 48usize];
2208};
2209unsafe extern "C" {
2210 pub fn pw_proxy_new(
2211 factory: *mut pw_proxy,
2212 type_: *const ::std::os::raw::c_char,
2213 version: u32,
2214 user_data_size: usize,
2215 ) -> *mut pw_proxy;
2216}
2217unsafe extern "C" {
2218 #[doc = " Add an event listener to proxy"]
2219 pub fn pw_proxy_add_listener(
2220 proxy: *mut pw_proxy,
2221 listener: *mut spa_hook,
2222 events: *const pw_proxy_events,
2223 data: *mut ::std::os::raw::c_void,
2224 );
2225}
2226unsafe extern "C" {
2227 #[doc = " Add a listener for the events received from the remote object. The\n events depend on the type of the remote object type."]
2228 pub fn pw_proxy_add_object_listener(
2229 proxy: *mut pw_proxy,
2230 listener: *mut spa_hook,
2231 funcs: *const ::std::os::raw::c_void,
2232 data: *mut ::std::os::raw::c_void,
2233 );
2234}
2235unsafe extern "C" {
2236 #[doc = " destroy a proxy"]
2237 pub fn pw_proxy_destroy(proxy: *mut pw_proxy);
2238}
2239unsafe extern "C" {
2240 pub fn pw_proxy_ref(proxy: *mut pw_proxy);
2241}
2242unsafe extern "C" {
2243 pub fn pw_proxy_unref(proxy: *mut pw_proxy);
2244}
2245unsafe extern "C" {
2246 #[doc = " Get the user_data. The size was given in \\ref pw_proxy_new"]
2247 pub fn pw_proxy_get_user_data(proxy: *mut pw_proxy) -> *mut ::std::os::raw::c_void;
2248}
2249unsafe extern "C" {
2250 #[doc = " Get the local id of the proxy"]
2251 pub fn pw_proxy_get_id(proxy: *mut pw_proxy) -> u32;
2252}
2253unsafe extern "C" {
2254 #[doc = " Get the type and version of the proxy"]
2255 pub fn pw_proxy_get_type(
2256 proxy: *mut pw_proxy,
2257 version: *mut u32,
2258 ) -> *const ::std::os::raw::c_char;
2259}
2260unsafe extern "C" {
2261 #[doc = " Get the protocol used for the proxy"]
2262 pub fn pw_proxy_get_protocol(proxy: *mut pw_proxy) -> *mut pw_protocol;
2263}
2264unsafe extern "C" {
2265 #[doc = " Generate an sync method for a proxy. This will generate a done event\n with the same seq number of the reply."]
2266 pub fn pw_proxy_sync(proxy: *mut pw_proxy, seq: ::std::os::raw::c_int)
2267 -> ::std::os::raw::c_int;
2268}
2269unsafe extern "C" {
2270 #[doc = " Set the global id this proxy is bound to. This is usually used internally\n and will also emit the bound event"]
2271 pub fn pw_proxy_set_bound_id(proxy: *mut pw_proxy, global_id: u32) -> ::std::os::raw::c_int;
2272}
2273unsafe extern "C" {
2274 #[doc = " Get the global id bound to this proxy of SPA_ID_INVALID when not bound\n to a global"]
2275 pub fn pw_proxy_get_bound_id(proxy: *mut pw_proxy) -> u32;
2276}
2277unsafe extern "C" {
2278 #[doc = " Generate an error for a proxy"]
2279 pub fn pw_proxy_error(
2280 proxy: *mut pw_proxy,
2281 res: ::std::os::raw::c_int,
2282 error: *const ::std::os::raw::c_char,
2283 ) -> ::std::os::raw::c_int;
2284}
2285unsafe extern "C" {
2286 pub fn pw_proxy_errorf(
2287 proxy: *mut pw_proxy,
2288 res: ::std::os::raw::c_int,
2289 error: *const ::std::os::raw::c_char,
2290 ...
2291 ) -> ::std::os::raw::c_int;
2292}
2293unsafe extern "C" {
2294 #[doc = " Get the listener of proxy"]
2295 pub fn pw_proxy_get_object_listeners(proxy: *mut pw_proxy) -> *mut spa_hook_list;
2296}
2297unsafe extern "C" {
2298 #[doc = " Get the marshal functions for the proxy"]
2299 pub fn pw_proxy_get_marshal(proxy: *mut pw_proxy) -> *const pw_protocol_marshal;
2300}
2301unsafe extern "C" {
2302 #[doc = " Install a marshal function on a proxy"]
2303 pub fn pw_proxy_install_marshal(
2304 proxy: *mut pw_proxy,
2305 implementor: bool,
2306 ) -> ::std::os::raw::c_int;
2307}
2308#[repr(C)]
2309#[derive(Debug, Copy, Clone)]
2310pub struct pw_permission {
2311 #[doc = "< id of object, PW_ID_ANY for default permission"]
2312 pub id: u32,
2313 #[doc = "< bitmask of above permissions"]
2314 pub permissions: u32,
2315}
2316#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2317const _: () = {
2318 ["Size of pw_permission"][::std::mem::size_of::<pw_permission>() - 8usize];
2319 ["Alignment of pw_permission"][::std::mem::align_of::<pw_permission>() - 4usize];
2320 ["Offset of field: pw_permission::id"][::std::mem::offset_of!(pw_permission, id) - 0usize];
2321 ["Offset of field: pw_permission::permissions"]
2322 [::std::mem::offset_of!(pw_permission, permissions) - 4usize];
2323};
2324#[doc = " The client information. Extra information can be added in later versions"]
2325#[repr(C)]
2326#[derive(Debug, Copy, Clone)]
2327pub struct pw_client_info {
2328 #[doc = "< id of the global"]
2329 pub id: u32,
2330 #[doc = "< bitfield of changed fields since last call"]
2331 pub change_mask: u64,
2332 #[doc = "< extra properties"]
2333 pub props: *mut spa_dict,
2334}
2335#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2336const _: () = {
2337 ["Size of pw_client_info"][::std::mem::size_of::<pw_client_info>() - 24usize];
2338 ["Alignment of pw_client_info"][::std::mem::align_of::<pw_client_info>() - 8usize];
2339 ["Offset of field: pw_client_info::id"][::std::mem::offset_of!(pw_client_info, id) - 0usize];
2340 ["Offset of field: pw_client_info::change_mask"]
2341 [::std::mem::offset_of!(pw_client_info, change_mask) - 8usize];
2342 ["Offset of field: pw_client_info::props"]
2343 [::std::mem::offset_of!(pw_client_info, props) - 16usize];
2344};
2345unsafe extern "C" {
2346 #[doc = " Update an existing \\ref pw_client_info with \\a update with reset"]
2347 pub fn pw_client_info_update(
2348 info: *mut pw_client_info,
2349 update: *const pw_client_info,
2350 ) -> *mut pw_client_info;
2351}
2352unsafe extern "C" {
2353 #[doc = " Merge an existing \\ref pw_client_info with \\a update"]
2354 pub fn pw_client_info_merge(
2355 info: *mut pw_client_info,
2356 update: *const pw_client_info,
2357 reset: bool,
2358 ) -> *mut pw_client_info;
2359}
2360unsafe extern "C" {
2361 #[doc = " Free a \\ref pw_client_info"]
2362 pub fn pw_client_info_free(info: *mut pw_client_info);
2363}
2364#[doc = " Client events"]
2365#[repr(C)]
2366#[derive(Debug, Copy, Clone)]
2367pub struct pw_client_events {
2368 pub version: u32,
2369 #[doc = " Notify client info\n\n \\param info info about the client"]
2370 pub info: ::std::option::Option<
2371 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_client_info),
2372 >,
2373 #[doc = " Notify a client permission\n\n Event emitted as a result of the get_permissions method.\n\n \\param default_permissions the default permissions\n \\param index the index of the first permission entry\n \\param n_permissions the number of permissions\n \\param permissions the permissions"]
2374 pub permissions: ::std::option::Option<
2375 unsafe extern "C" fn(
2376 data: *mut ::std::os::raw::c_void,
2377 index: u32,
2378 n_permissions: u32,
2379 permissions: *const pw_permission,
2380 ),
2381 >,
2382}
2383#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2384const _: () = {
2385 ["Size of pw_client_events"][::std::mem::size_of::<pw_client_events>() - 24usize];
2386 ["Alignment of pw_client_events"][::std::mem::align_of::<pw_client_events>() - 8usize];
2387 ["Offset of field: pw_client_events::version"]
2388 [::std::mem::offset_of!(pw_client_events, version) - 0usize];
2389 ["Offset of field: pw_client_events::info"]
2390 [::std::mem::offset_of!(pw_client_events, info) - 8usize];
2391 ["Offset of field: pw_client_events::permissions"]
2392 [::std::mem::offset_of!(pw_client_events, permissions) - 16usize];
2393};
2394#[doc = " Client methods"]
2395#[repr(C)]
2396#[derive(Debug, Copy, Clone)]
2397pub struct pw_client_methods {
2398 pub version: u32,
2399 pub add_listener: ::std::option::Option<
2400 unsafe extern "C" fn(
2401 object: *mut ::std::os::raw::c_void,
2402 listener: *mut spa_hook,
2403 events: *const pw_client_events,
2404 data: *mut ::std::os::raw::c_void,
2405 ) -> ::std::os::raw::c_int,
2406 >,
2407 #[doc = " Send an error to a client\n\n \\param id the global id to report the error on\n \\param res an errno style error code\n \\param message an error string\n\n This requires W and X permissions on the client."]
2408 pub error: ::std::option::Option<
2409 unsafe extern "C" fn(
2410 object: *mut ::std::os::raw::c_void,
2411 id: u32,
2412 res: ::std::os::raw::c_int,
2413 message: *const ::std::os::raw::c_char,
2414 ) -> ::std::os::raw::c_int,
2415 >,
2416 #[doc = " Update client properties\n\n \\param props new properties\n\n This requires W and X permissions on the client."]
2417 pub update_properties: ::std::option::Option<
2418 unsafe extern "C" fn(
2419 object: *mut ::std::os::raw::c_void,
2420 props: *const spa_dict,
2421 ) -> ::std::os::raw::c_int,
2422 >,
2423 #[doc = " Get client permissions\n\n A permissions event will be emitted with the permissions.\n\n \\param index the first index to query, 0 for first\n \\param num the maximum number of items to get\n\n This requires W and X permissions on the client."]
2424 pub get_permissions: ::std::option::Option<
2425 unsafe extern "C" fn(
2426 object: *mut ::std::os::raw::c_void,
2427 index: u32,
2428 num: u32,
2429 ) -> ::std::os::raw::c_int,
2430 >,
2431 #[doc = " Manage the permissions of the global objects for this\n client\n\n Update the permissions of the global objects using the\n provided array with permissions\n\n Globals can use the default permissions or can have specific\n permissions assigned to them.\n\n \\param n_permissions number of permissions\n \\param permissions array of permissions\n\n This requires W and X permissions on the client."]
2432 pub update_permissions: ::std::option::Option<
2433 unsafe extern "C" fn(
2434 object: *mut ::std::os::raw::c_void,
2435 n_permissions: u32,
2436 permissions: *const pw_permission,
2437 ) -> ::std::os::raw::c_int,
2438 >,
2439}
2440#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2441const _: () = {
2442 ["Size of pw_client_methods"][::std::mem::size_of::<pw_client_methods>() - 48usize];
2443 ["Alignment of pw_client_methods"][::std::mem::align_of::<pw_client_methods>() - 8usize];
2444 ["Offset of field: pw_client_methods::version"]
2445 [::std::mem::offset_of!(pw_client_methods, version) - 0usize];
2446 ["Offset of field: pw_client_methods::add_listener"]
2447 [::std::mem::offset_of!(pw_client_methods, add_listener) - 8usize];
2448 ["Offset of field: pw_client_methods::error"]
2449 [::std::mem::offset_of!(pw_client_methods, error) - 16usize];
2450 ["Offset of field: pw_client_methods::update_properties"]
2451 [::std::mem::offset_of!(pw_client_methods, update_properties) - 24usize];
2452 ["Offset of field: pw_client_methods::get_permissions"]
2453 [::std::mem::offset_of!(pw_client_methods, get_permissions) - 32usize];
2454 ["Offset of field: pw_client_methods::update_permissions"]
2455 [::std::mem::offset_of!(pw_client_methods, update_permissions) - 40usize];
2456};
2457unsafe extern "C" {
2458 #[doc = " \\addtogroup pw_conf\n \\{"]
2459 pub fn pw_conf_load_conf_for_context(
2460 props: *mut pw_properties,
2461 conf: *mut pw_properties,
2462 ) -> ::std::os::raw::c_int;
2463}
2464unsafe extern "C" {
2465 pub fn pw_conf_load_conf(
2466 prefix: *const ::std::os::raw::c_char,
2467 name: *const ::std::os::raw::c_char,
2468 conf: *mut pw_properties,
2469 ) -> ::std::os::raw::c_int;
2470}
2471unsafe extern "C" {
2472 pub fn pw_conf_load_state(
2473 prefix: *const ::std::os::raw::c_char,
2474 name: *const ::std::os::raw::c_char,
2475 conf: *mut pw_properties,
2476 ) -> ::std::os::raw::c_int;
2477}
2478unsafe extern "C" {
2479 pub fn pw_conf_save_state(
2480 prefix: *const ::std::os::raw::c_char,
2481 name: *const ::std::os::raw::c_char,
2482 conf: *const pw_properties,
2483 ) -> ::std::os::raw::c_int;
2484}
2485unsafe extern "C" {
2486 pub fn pw_conf_find_match(arr: *mut spa_json, props: *const spa_dict, condition: bool) -> bool;
2487}
2488unsafe extern "C" {
2489 pub fn pw_conf_section_update_props(
2490 conf: *const spa_dict,
2491 section: *const ::std::os::raw::c_char,
2492 props: *mut pw_properties,
2493 ) -> ::std::os::raw::c_int;
2494}
2495unsafe extern "C" {
2496 pub fn pw_conf_section_update_props_rules(
2497 conf: *const spa_dict,
2498 context: *const spa_dict,
2499 section: *const ::std::os::raw::c_char,
2500 props: *mut pw_properties,
2501 ) -> ::std::os::raw::c_int;
2502}
2503unsafe extern "C" {
2504 pub fn pw_conf_section_for_each(
2505 conf: *const spa_dict,
2506 section: *const ::std::os::raw::c_char,
2507 callback: ::std::option::Option<
2508 unsafe extern "C" fn(
2509 data: *mut ::std::os::raw::c_void,
2510 location: *const ::std::os::raw::c_char,
2511 section: *const ::std::os::raw::c_char,
2512 str_: *const ::std::os::raw::c_char,
2513 len: usize,
2514 ) -> ::std::os::raw::c_int,
2515 >,
2516 data: *mut ::std::os::raw::c_void,
2517 ) -> ::std::os::raw::c_int;
2518}
2519unsafe extern "C" {
2520 pub fn pw_conf_match_rules(
2521 str_: *const ::std::os::raw::c_char,
2522 len: usize,
2523 location: *const ::std::os::raw::c_char,
2524 props: *const spa_dict,
2525 callback: ::std::option::Option<
2526 unsafe extern "C" fn(
2527 data: *mut ::std::os::raw::c_void,
2528 location: *const ::std::os::raw::c_char,
2529 action: *const ::std::os::raw::c_char,
2530 str_: *const ::std::os::raw::c_char,
2531 len: usize,
2532 ) -> ::std::os::raw::c_int,
2533 >,
2534 data: *mut ::std::os::raw::c_void,
2535 ) -> ::std::os::raw::c_int;
2536}
2537unsafe extern "C" {
2538 pub fn pw_conf_section_match_rules(
2539 conf: *const spa_dict,
2540 section: *const ::std::os::raw::c_char,
2541 props: *const spa_dict,
2542 callback: ::std::option::Option<
2543 unsafe extern "C" fn(
2544 data: *mut ::std::os::raw::c_void,
2545 location: *const ::std::os::raw::c_char,
2546 action: *const ::std::os::raw::c_char,
2547 str_: *const ::std::os::raw::c_char,
2548 len: usize,
2549 ) -> ::std::os::raw::c_int,
2550 >,
2551 data: *mut ::std::os::raw::c_void,
2552 ) -> ::std::os::raw::c_int;
2553}
2554#[repr(C)]
2555#[derive(Debug, Copy, Clone)]
2556pub struct pw_device {
2557 _unused: [u8; 0],
2558}
2559#[doc = " The device information. Extra information can be added in later versions"]
2560#[repr(C)]
2561#[derive(Debug, Copy, Clone)]
2562pub struct pw_device_info {
2563 #[doc = "< id of the global"]
2564 pub id: u32,
2565 #[doc = "< bitfield of changed fields since last call"]
2566 pub change_mask: u64,
2567 #[doc = "< extra properties"]
2568 pub props: *mut spa_dict,
2569 #[doc = "< parameters"]
2570 pub params: *mut spa_param_info,
2571 #[doc = "< number of items in \\a params"]
2572 pub n_params: u32,
2573}
2574#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2575const _: () = {
2576 ["Size of pw_device_info"][::std::mem::size_of::<pw_device_info>() - 40usize];
2577 ["Alignment of pw_device_info"][::std::mem::align_of::<pw_device_info>() - 8usize];
2578 ["Offset of field: pw_device_info::id"][::std::mem::offset_of!(pw_device_info, id) - 0usize];
2579 ["Offset of field: pw_device_info::change_mask"]
2580 [::std::mem::offset_of!(pw_device_info, change_mask) - 8usize];
2581 ["Offset of field: pw_device_info::props"]
2582 [::std::mem::offset_of!(pw_device_info, props) - 16usize];
2583 ["Offset of field: pw_device_info::params"]
2584 [::std::mem::offset_of!(pw_device_info, params) - 24usize];
2585 ["Offset of field: pw_device_info::n_params"]
2586 [::std::mem::offset_of!(pw_device_info, n_params) - 32usize];
2587};
2588unsafe extern "C" {
2589 #[doc = " Update and existing \\ref pw_device_info with \\a update and reset"]
2590 pub fn pw_device_info_update(
2591 info: *mut pw_device_info,
2592 update: *const pw_device_info,
2593 ) -> *mut pw_device_info;
2594}
2595unsafe extern "C" {
2596 #[doc = " Merge and existing \\ref pw_device_info with \\a update"]
2597 pub fn pw_device_info_merge(
2598 info: *mut pw_device_info,
2599 update: *const pw_device_info,
2600 reset: bool,
2601 ) -> *mut pw_device_info;
2602}
2603unsafe extern "C" {
2604 #[doc = " Free a \\ref pw_device_info"]
2605 pub fn pw_device_info_free(info: *mut pw_device_info);
2606}
2607#[doc = " Device events"]
2608#[repr(C)]
2609#[derive(Debug, Copy, Clone)]
2610pub struct pw_device_events {
2611 pub version: u32,
2612 #[doc = " Notify device info\n\n \\param info info about the device"]
2613 pub info: ::std::option::Option<
2614 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_device_info),
2615 >,
2616 #[doc = " Notify a device param\n\n Event emitted as a result of the enum_params method.\n\n \\param seq the sequence number of the request\n \\param id the param id\n \\param index the param index\n \\param next the param index of the next param\n \\param param the parameter"]
2617 pub param: ::std::option::Option<
2618 unsafe extern "C" fn(
2619 data: *mut ::std::os::raw::c_void,
2620 seq: ::std::os::raw::c_int,
2621 id: u32,
2622 index: u32,
2623 next: u32,
2624 param: *const spa_pod,
2625 ),
2626 >,
2627}
2628#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2629const _: () = {
2630 ["Size of pw_device_events"][::std::mem::size_of::<pw_device_events>() - 24usize];
2631 ["Alignment of pw_device_events"][::std::mem::align_of::<pw_device_events>() - 8usize];
2632 ["Offset of field: pw_device_events::version"]
2633 [::std::mem::offset_of!(pw_device_events, version) - 0usize];
2634 ["Offset of field: pw_device_events::info"]
2635 [::std::mem::offset_of!(pw_device_events, info) - 8usize];
2636 ["Offset of field: pw_device_events::param"]
2637 [::std::mem::offset_of!(pw_device_events, param) - 16usize];
2638};
2639#[doc = " Device methods"]
2640#[repr(C)]
2641#[derive(Debug, Copy, Clone)]
2642pub struct pw_device_methods {
2643 pub version: u32,
2644 pub add_listener: ::std::option::Option<
2645 unsafe extern "C" fn(
2646 object: *mut ::std::os::raw::c_void,
2647 listener: *mut spa_hook,
2648 events: *const pw_device_events,
2649 data: *mut ::std::os::raw::c_void,
2650 ) -> ::std::os::raw::c_int,
2651 >,
2652 #[doc = " Subscribe to parameter changes\n\n Automatically emit param events for the given ids when\n they are changed.\n\n \\param ids an array of param ids\n \\param n_ids the number of ids in \\a ids\n\n This requires X permissions on the device."]
2653 pub subscribe_params: ::std::option::Option<
2654 unsafe extern "C" fn(
2655 object: *mut ::std::os::raw::c_void,
2656 ids: *mut u32,
2657 n_ids: u32,
2658 ) -> ::std::os::raw::c_int,
2659 >,
2660 #[doc = " Enumerate device parameters\n\n Start enumeration of device parameters. For each param, a\n param event will be emitted.\n\n \\param seq a sequence number to place in the reply\n \\param id the parameter id to enum or PW_ID_ANY for all\n \\param start the start index or 0 for the first param\n \\param num the maximum number of params to retrieve\n \\param filter a param filter or NULL\n\n This requires X permissions on the device."]
2661 pub enum_params: ::std::option::Option<
2662 unsafe extern "C" fn(
2663 object: *mut ::std::os::raw::c_void,
2664 seq: ::std::os::raw::c_int,
2665 id: u32,
2666 start: u32,
2667 num: u32,
2668 filter: *const spa_pod,
2669 ) -> ::std::os::raw::c_int,
2670 >,
2671 #[doc = " Set a parameter on the device\n\n \\param id the parameter id to set\n \\param flags extra parameter flags\n \\param param the parameter to set\n\n This requires W and X permissions on the device."]
2672 pub set_param: ::std::option::Option<
2673 unsafe extern "C" fn(
2674 object: *mut ::std::os::raw::c_void,
2675 id: u32,
2676 flags: u32,
2677 param: *const spa_pod,
2678 ) -> ::std::os::raw::c_int,
2679 >,
2680}
2681#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2682const _: () = {
2683 ["Size of pw_device_methods"][::std::mem::size_of::<pw_device_methods>() - 40usize];
2684 ["Alignment of pw_device_methods"][::std::mem::align_of::<pw_device_methods>() - 8usize];
2685 ["Offset of field: pw_device_methods::version"]
2686 [::std::mem::offset_of!(pw_device_methods, version) - 0usize];
2687 ["Offset of field: pw_device_methods::add_listener"]
2688 [::std::mem::offset_of!(pw_device_methods, add_listener) - 8usize];
2689 ["Offset of field: pw_device_methods::subscribe_params"]
2690 [::std::mem::offset_of!(pw_device_methods, subscribe_params) - 16usize];
2691 ["Offset of field: pw_device_methods::enum_params"]
2692 [::std::mem::offset_of!(pw_device_methods, enum_params) - 24usize];
2693 ["Offset of field: pw_device_methods::set_param"]
2694 [::std::mem::offset_of!(pw_device_methods, set_param) - 32usize];
2695};
2696pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_NONE: pw_memblock_flags = 0;
2697#[doc = "< memory is readable"]
2698pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_READABLE: pw_memblock_flags = 1;
2699#[doc = "< memory is writable"]
2700pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_WRITABLE: pw_memblock_flags = 2;
2701#[doc = "< seal the fd"]
2702pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_SEAL: pw_memblock_flags = 4;
2703#[doc = "< mmap the fd"]
2704pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_MAP: pw_memblock_flags = 8;
2705#[doc = "< don't close fd"]
2706pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_DONT_CLOSE: pw_memblock_flags = 16;
2707#[doc = "< don't notify events"]
2708pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_DONT_NOTIFY: pw_memblock_flags = 32;
2709#[doc = "< the fd can not be mmapped"]
2710pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_UNMAPPABLE: pw_memblock_flags = 64;
2711pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_READWRITE: pw_memblock_flags = 3;
2712#[doc = " Flags passed to \\ref pw_mempool_alloc()"]
2713pub type pw_memblock_flags = ::std::os::raw::c_uint;
2714pub const pw_memmap_flags_PW_MEMMAP_FLAG_NONE: pw_memmap_flags = 0;
2715#[doc = "< map in read mode"]
2716pub const pw_memmap_flags_PW_MEMMAP_FLAG_READ: pw_memmap_flags = 1;
2717#[doc = "< map in write mode"]
2718pub const pw_memmap_flags_PW_MEMMAP_FLAG_WRITE: pw_memmap_flags = 2;
2719#[doc = "< map the same area twice after each other,\n creating a circular ringbuffer"]
2720pub const pw_memmap_flags_PW_MEMMAP_FLAG_TWICE: pw_memmap_flags = 4;
2721#[doc = "< writes will be private"]
2722pub const pw_memmap_flags_PW_MEMMAP_FLAG_PRIVATE: pw_memmap_flags = 8;
2723#[doc = "< lock the memory into RAM"]
2724pub const pw_memmap_flags_PW_MEMMAP_FLAG_LOCKED: pw_memmap_flags = 16;
2725pub const pw_memmap_flags_PW_MEMMAP_FLAG_READWRITE: pw_memmap_flags = 3;
2726pub type pw_memmap_flags = ::std::os::raw::c_uint;
2727#[repr(C)]
2728#[derive(Debug, Copy, Clone)]
2729pub struct pw_memchunk {
2730 _unused: [u8; 0],
2731}
2732#[doc = " A memory pool is a collection of pw_memblocks"]
2733#[repr(C)]
2734#[derive(Debug, Copy, Clone)]
2735pub struct pw_mempool {
2736 pub props: *mut pw_properties,
2737}
2738#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2739const _: () = {
2740 ["Size of pw_mempool"][::std::mem::size_of::<pw_mempool>() - 8usize];
2741 ["Alignment of pw_mempool"][::std::mem::align_of::<pw_mempool>() - 8usize];
2742 ["Offset of field: pw_mempool::props"][::std::mem::offset_of!(pw_mempool, props) - 0usize];
2743};
2744#[doc = " Memory block structure"]
2745#[repr(C)]
2746#[derive(Debug, Copy, Clone)]
2747pub struct pw_memblock {
2748 #[doc = "< owner pool"]
2749 pub pool: *mut pw_mempool,
2750 #[doc = "< unique id"]
2751 pub id: u32,
2752 #[doc = "< refcount"]
2753 pub ref_: ::std::os::raw::c_int,
2754 #[doc = "< flags for the memory block on of enum pw_memblock_flags"]
2755 pub flags: u32,
2756 #[doc = "< type of the fd, one of enum spa_data_type"]
2757 pub type_: u32,
2758 #[doc = "< fd"]
2759 pub fd: ::std::os::raw::c_int,
2760 #[doc = "< size of memory"]
2761 pub size: u32,
2762 #[doc = "< optional map when PW_MEMBLOCK_FLAG_MAP was given"]
2763 pub map: *mut pw_memmap,
2764}
2765#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2766const _: () = {
2767 ["Size of pw_memblock"][::std::mem::size_of::<pw_memblock>() - 40usize];
2768 ["Alignment of pw_memblock"][::std::mem::align_of::<pw_memblock>() - 8usize];
2769 ["Offset of field: pw_memblock::pool"][::std::mem::offset_of!(pw_memblock, pool) - 0usize];
2770 ["Offset of field: pw_memblock::id"][::std::mem::offset_of!(pw_memblock, id) - 8usize];
2771 ["Offset of field: pw_memblock::ref_"][::std::mem::offset_of!(pw_memblock, ref_) - 12usize];
2772 ["Offset of field: pw_memblock::flags"][::std::mem::offset_of!(pw_memblock, flags) - 16usize];
2773 ["Offset of field: pw_memblock::type_"][::std::mem::offset_of!(pw_memblock, type_) - 20usize];
2774 ["Offset of field: pw_memblock::fd"][::std::mem::offset_of!(pw_memblock, fd) - 24usize];
2775 ["Offset of field: pw_memblock::size"][::std::mem::offset_of!(pw_memblock, size) - 28usize];
2776 ["Offset of field: pw_memblock::map"][::std::mem::offset_of!(pw_memblock, map) - 32usize];
2777};
2778#[doc = " a mapped region of a pw_memblock"]
2779#[repr(C)]
2780#[derive(Debug, Copy, Clone)]
2781pub struct pw_memmap {
2782 #[doc = "< owner memblock"]
2783 pub block: *mut pw_memblock,
2784 #[doc = "< mapped pointer"]
2785 pub ptr: *mut ::std::os::raw::c_void,
2786 #[doc = "< flags for the mapping on of enum pw_memmap_flags"]
2787 pub flags: u32,
2788 #[doc = "< offset in memblock"]
2789 pub offset: u32,
2790 #[doc = "< size in memblock"]
2791 pub size: u32,
2792 #[doc = "< user tag"]
2793 pub tag: [u32; 5usize],
2794}
2795#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2796const _: () = {
2797 ["Size of pw_memmap"][::std::mem::size_of::<pw_memmap>() - 48usize];
2798 ["Alignment of pw_memmap"][::std::mem::align_of::<pw_memmap>() - 8usize];
2799 ["Offset of field: pw_memmap::block"][::std::mem::offset_of!(pw_memmap, block) - 0usize];
2800 ["Offset of field: pw_memmap::ptr"][::std::mem::offset_of!(pw_memmap, ptr) - 8usize];
2801 ["Offset of field: pw_memmap::flags"][::std::mem::offset_of!(pw_memmap, flags) - 16usize];
2802 ["Offset of field: pw_memmap::offset"][::std::mem::offset_of!(pw_memmap, offset) - 20usize];
2803 ["Offset of field: pw_memmap::size"][::std::mem::offset_of!(pw_memmap, size) - 24usize];
2804 ["Offset of field: pw_memmap::tag"][::std::mem::offset_of!(pw_memmap, tag) - 28usize];
2805};
2806#[repr(C)]
2807#[derive(Debug, Copy, Clone)]
2808pub struct pw_mempool_events {
2809 pub version: u32,
2810 #[doc = " the pool is destroyed"]
2811 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
2812 #[doc = " a new memory block is added to the pool"]
2813 pub added: ::std::option::Option<
2814 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, block: *mut pw_memblock),
2815 >,
2816 #[doc = " a memory block is removed from the pool"]
2817 pub removed: ::std::option::Option<
2818 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, block: *mut pw_memblock),
2819 >,
2820}
2821#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2822const _: () = {
2823 ["Size of pw_mempool_events"][::std::mem::size_of::<pw_mempool_events>() - 32usize];
2824 ["Alignment of pw_mempool_events"][::std::mem::align_of::<pw_mempool_events>() - 8usize];
2825 ["Offset of field: pw_mempool_events::version"]
2826 [::std::mem::offset_of!(pw_mempool_events, version) - 0usize];
2827 ["Offset of field: pw_mempool_events::destroy"]
2828 [::std::mem::offset_of!(pw_mempool_events, destroy) - 8usize];
2829 ["Offset of field: pw_mempool_events::added"]
2830 [::std::mem::offset_of!(pw_mempool_events, added) - 16usize];
2831 ["Offset of field: pw_mempool_events::removed"]
2832 [::std::mem::offset_of!(pw_mempool_events, removed) - 24usize];
2833};
2834unsafe extern "C" {
2835 #[doc = " Create a new memory pool"]
2836 pub fn pw_mempool_new(props: *mut pw_properties) -> *mut pw_mempool;
2837}
2838unsafe extern "C" {
2839 #[doc = " Listen for events"]
2840 pub fn pw_mempool_add_listener(
2841 pool: *mut pw_mempool,
2842 listener: *mut spa_hook,
2843 events: *const pw_mempool_events,
2844 data: *mut ::std::os::raw::c_void,
2845 );
2846}
2847unsafe extern "C" {
2848 #[doc = " Clear a pool"]
2849 pub fn pw_mempool_clear(pool: *mut pw_mempool);
2850}
2851unsafe extern "C" {
2852 #[doc = " Clear and destroy a pool"]
2853 pub fn pw_mempool_destroy(pool: *mut pw_mempool);
2854}
2855unsafe extern "C" {
2856 #[doc = " Allocate a memory block from the pool"]
2857 pub fn pw_mempool_alloc(
2858 pool: *mut pw_mempool,
2859 flags: pw_memblock_flags,
2860 type_: u32,
2861 size: usize,
2862 ) -> *mut pw_memblock;
2863}
2864unsafe extern "C" {
2865 #[doc = " Import a block from another pool"]
2866 pub fn pw_mempool_import_block(
2867 pool: *mut pw_mempool,
2868 mem: *mut pw_memblock,
2869 ) -> *mut pw_memblock;
2870}
2871unsafe extern "C" {
2872 #[doc = " Import an fd into the pool"]
2873 pub fn pw_mempool_import(
2874 pool: *mut pw_mempool,
2875 flags: pw_memblock_flags,
2876 type_: u32,
2877 fd: ::std::os::raw::c_int,
2878 ) -> *mut pw_memblock;
2879}
2880unsafe extern "C" {
2881 #[doc = " Free a memblock regardless of the refcount and destroy all mappings"]
2882 pub fn pw_memblock_free(mem: *mut pw_memblock);
2883}
2884unsafe extern "C" {
2885 #[doc = " Remove a memblock for given \\a id"]
2886 pub fn pw_mempool_remove_id(pool: *mut pw_mempool, id: u32) -> ::std::os::raw::c_int;
2887}
2888unsafe extern "C" {
2889 #[doc = " Find memblock for given \\a ptr"]
2890 pub fn pw_mempool_find_ptr(
2891 pool: *mut pw_mempool,
2892 ptr: *const ::std::os::raw::c_void,
2893 ) -> *mut pw_memblock;
2894}
2895unsafe extern "C" {
2896 #[doc = " Find memblock for given \\a id"]
2897 pub fn pw_mempool_find_id(pool: *mut pw_mempool, id: u32) -> *mut pw_memblock;
2898}
2899unsafe extern "C" {
2900 #[doc = " Find memblock for given \\a fd"]
2901 pub fn pw_mempool_find_fd(pool: *mut pw_mempool, fd: ::std::os::raw::c_int)
2902 -> *mut pw_memblock;
2903}
2904unsafe extern "C" {
2905 #[doc = " Map a region of a memory block"]
2906 pub fn pw_memblock_map(
2907 block: *mut pw_memblock,
2908 flags: pw_memmap_flags,
2909 offset: u32,
2910 size: u32,
2911 tag: *mut u32,
2912 ) -> *mut pw_memmap;
2913}
2914unsafe extern "C" {
2915 #[doc = " Map a region of a memory block with \\a id"]
2916 pub fn pw_mempool_map_id(
2917 pool: *mut pw_mempool,
2918 id: u32,
2919 flags: pw_memmap_flags,
2920 offset: u32,
2921 size: u32,
2922 tag: *mut u32,
2923 ) -> *mut pw_memmap;
2924}
2925unsafe extern "C" {
2926 pub fn pw_mempool_import_map(
2927 pool: *mut pw_mempool,
2928 other: *mut pw_mempool,
2929 data: *mut ::std::os::raw::c_void,
2930 size: u32,
2931 tag: *mut u32,
2932 ) -> *mut pw_memmap;
2933}
2934unsafe extern "C" {
2935 #[doc = " find a map with the given tag"]
2936 pub fn pw_mempool_find_tag(pool: *mut pw_mempool, tag: *mut u32, size: usize)
2937 -> *mut pw_memmap;
2938}
2939unsafe extern "C" {
2940 #[doc = " Unmap a region"]
2941 pub fn pw_memmap_free(map: *mut pw_memmap) -> ::std::os::raw::c_int;
2942}
2943#[doc = " parameters to map a memory range"]
2944#[repr(C)]
2945#[derive(Debug, Copy, Clone)]
2946pub struct pw_map_range {
2947 pub start: u32,
2948 #[doc = " offset in first page with start of data"]
2949 pub offset: u32,
2950 #[doc = " page aligned offset to map"]
2951 pub size: u32,
2952}
2953#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2954const _: () = {
2955 ["Size of pw_map_range"][::std::mem::size_of::<pw_map_range>() - 12usize];
2956 ["Alignment of pw_map_range"][::std::mem::align_of::<pw_map_range>() - 4usize];
2957 ["Offset of field: pw_map_range::start"][::std::mem::offset_of!(pw_map_range, start) - 0usize];
2958 ["Offset of field: pw_map_range::offset"]
2959 [::std::mem::offset_of!(pw_map_range, offset) - 4usize];
2960 ["Offset of field: pw_map_range::size"][::std::mem::offset_of!(pw_map_range, size) - 8usize];
2961};
2962#[repr(C)]
2963#[derive(Debug, Copy, Clone)]
2964pub struct pw_buffers {
2965 #[doc = "< allocated buffer memory"]
2966 pub mem: *mut pw_memblock,
2967 #[doc = "< port buffers"]
2968 pub buffers: *mut *mut spa_buffer,
2969 #[doc = "< number of port buffers"]
2970 pub n_buffers: u32,
2971 #[doc = "< flags"]
2972 pub flags: u32,
2973}
2974#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2975const _: () = {
2976 ["Size of pw_buffers"][::std::mem::size_of::<pw_buffers>() - 24usize];
2977 ["Alignment of pw_buffers"][::std::mem::align_of::<pw_buffers>() - 8usize];
2978 ["Offset of field: pw_buffers::mem"][::std::mem::offset_of!(pw_buffers, mem) - 0usize];
2979 ["Offset of field: pw_buffers::buffers"][::std::mem::offset_of!(pw_buffers, buffers) - 8usize];
2980 ["Offset of field: pw_buffers::n_buffers"]
2981 [::std::mem::offset_of!(pw_buffers, n_buffers) - 16usize];
2982 ["Offset of field: pw_buffers::flags"][::std::mem::offset_of!(pw_buffers, flags) - 20usize];
2983};
2984unsafe extern "C" {
2985 pub fn pw_buffers_negotiate(
2986 context: *mut pw_context,
2987 flags: u32,
2988 outnode: *mut spa_node,
2989 out_port_id: u32,
2990 innode: *mut spa_node,
2991 in_port_id: u32,
2992 result: *mut pw_buffers,
2993 ) -> ::std::os::raw::c_int;
2994}
2995unsafe extern "C" {
2996 pub fn pw_buffers_clear(buffers: *mut pw_buffers);
2997}
2998#[repr(C)]
2999#[derive(Debug, Copy, Clone)]
3000pub struct pw_factory {
3001 _unused: [u8; 0],
3002}
3003#[doc = " The factory information. Extra information can be added in later versions"]
3004#[repr(C)]
3005#[derive(Debug, Copy, Clone)]
3006pub struct pw_factory_info {
3007 #[doc = "< id of the global"]
3008 pub id: u32,
3009 #[doc = "< name the factory"]
3010 pub name: *const ::std::os::raw::c_char,
3011 #[doc = "< type of the objects created by this factory"]
3012 pub type_: *const ::std::os::raw::c_char,
3013 #[doc = "< version of the objects"]
3014 pub version: u32,
3015 #[doc = "< bitfield of changed fields since last call"]
3016 pub change_mask: u64,
3017 #[doc = "< the properties of the factory"]
3018 pub props: *mut spa_dict,
3019}
3020#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3021const _: () = {
3022 ["Size of pw_factory_info"][::std::mem::size_of::<pw_factory_info>() - 48usize];
3023 ["Alignment of pw_factory_info"][::std::mem::align_of::<pw_factory_info>() - 8usize];
3024 ["Offset of field: pw_factory_info::id"][::std::mem::offset_of!(pw_factory_info, id) - 0usize];
3025 ["Offset of field: pw_factory_info::name"]
3026 [::std::mem::offset_of!(pw_factory_info, name) - 8usize];
3027 ["Offset of field: pw_factory_info::type_"]
3028 [::std::mem::offset_of!(pw_factory_info, type_) - 16usize];
3029 ["Offset of field: pw_factory_info::version"]
3030 [::std::mem::offset_of!(pw_factory_info, version) - 24usize];
3031 ["Offset of field: pw_factory_info::change_mask"]
3032 [::std::mem::offset_of!(pw_factory_info, change_mask) - 32usize];
3033 ["Offset of field: pw_factory_info::props"]
3034 [::std::mem::offset_of!(pw_factory_info, props) - 40usize];
3035};
3036unsafe extern "C" {
3037 pub fn pw_factory_info_update(
3038 info: *mut pw_factory_info,
3039 update: *const pw_factory_info,
3040 ) -> *mut pw_factory_info;
3041}
3042unsafe extern "C" {
3043 pub fn pw_factory_info_merge(
3044 info: *mut pw_factory_info,
3045 update: *const pw_factory_info,
3046 reset: bool,
3047 ) -> *mut pw_factory_info;
3048}
3049unsafe extern "C" {
3050 pub fn pw_factory_info_free(info: *mut pw_factory_info);
3051}
3052#[doc = " Factory events"]
3053#[repr(C)]
3054#[derive(Debug, Copy, Clone)]
3055pub struct pw_factory_events {
3056 pub version: u32,
3057 #[doc = " Notify factory info\n\n \\param info info about the factory"]
3058 pub info: ::std::option::Option<
3059 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_factory_info),
3060 >,
3061}
3062#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3063const _: () = {
3064 ["Size of pw_factory_events"][::std::mem::size_of::<pw_factory_events>() - 16usize];
3065 ["Alignment of pw_factory_events"][::std::mem::align_of::<pw_factory_events>() - 8usize];
3066 ["Offset of field: pw_factory_events::version"]
3067 [::std::mem::offset_of!(pw_factory_events, version) - 0usize];
3068 ["Offset of field: pw_factory_events::info"]
3069 [::std::mem::offset_of!(pw_factory_events, info) - 8usize];
3070};
3071#[doc = " Factory methods"]
3072#[repr(C)]
3073#[derive(Debug, Copy, Clone)]
3074pub struct pw_factory_methods {
3075 pub version: u32,
3076 pub add_listener: ::std::option::Option<
3077 unsafe extern "C" fn(
3078 object: *mut ::std::os::raw::c_void,
3079 listener: *mut spa_hook,
3080 events: *const pw_factory_events,
3081 data: *mut ::std::os::raw::c_void,
3082 ) -> ::std::os::raw::c_int,
3083 >,
3084}
3085#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3086const _: () = {
3087 ["Size of pw_factory_methods"][::std::mem::size_of::<pw_factory_methods>() - 16usize];
3088 ["Alignment of pw_factory_methods"][::std::mem::align_of::<pw_factory_methods>() - 8usize];
3089 ["Offset of field: pw_factory_methods::version"]
3090 [::std::mem::offset_of!(pw_factory_methods, version) - 0usize];
3091 ["Offset of field: pw_factory_methods::add_listener"]
3092 [::std::mem::offset_of!(pw_factory_methods, add_listener) - 8usize];
3093};
3094unsafe extern "C" {
3095 #[doc = " \\addtogroup pw_log\n \\{\n/\n/** The global log level"]
3096 pub static mut pw_log_level: spa_log_level;
3097}
3098unsafe extern "C" {
3099 pub static PW_LOG_TOPIC_DEFAULT: *mut spa_log_topic;
3100}
3101unsafe extern "C" {
3102 #[doc = " Configure a logging module. This is usually done automatically\n in pw_init() but you can install a custom logger before calling\n pw_init()."]
3103 pub fn pw_log_set(log: *mut spa_log);
3104}
3105unsafe extern "C" {
3106 #[doc = " Get the log interface"]
3107 pub fn pw_log_get() -> *mut spa_log;
3108}
3109unsafe extern "C" {
3110 #[doc = " Configure the logging level"]
3111 pub fn pw_log_set_level(level: spa_log_level);
3112}
3113unsafe extern "C" {
3114 #[doc = " Configure the logging level using a string\n in PIPEWIRE_DEBUG format.\n\n \\since 1.1.0"]
3115 pub fn pw_log_set_level_string(str_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
3116}
3117unsafe extern "C" {
3118 #[doc = " Log a message for a topic"]
3119 pub fn pw_log_logt(
3120 level: spa_log_level,
3121 topic: *const spa_log_topic,
3122 file: *const ::std::os::raw::c_char,
3123 line: ::std::os::raw::c_int,
3124 func: *const ::std::os::raw::c_char,
3125 fmt: *const ::std::os::raw::c_char,
3126 ...
3127 );
3128}
3129unsafe extern "C" {
3130 #[doc = " Log a message for a topic"]
3131 pub fn pw_log_logtv(
3132 level: spa_log_level,
3133 topic: *const spa_log_topic,
3134 file: *const ::std::os::raw::c_char,
3135 line: ::std::os::raw::c_int,
3136 func: *const ::std::os::raw::c_char,
3137 fmt: *const ::std::os::raw::c_char,
3138 args: *mut __va_list_tag,
3139 );
3140}
3141unsafe extern "C" {
3142 #[doc = " Log a message for the default topic"]
3143 pub fn pw_log_log(
3144 level: spa_log_level,
3145 file: *const ::std::os::raw::c_char,
3146 line: ::std::os::raw::c_int,
3147 func: *const ::std::os::raw::c_char,
3148 fmt: *const ::std::os::raw::c_char,
3149 ...
3150 );
3151}
3152unsafe extern "C" {
3153 #[doc = " Log a message for the default topic"]
3154 pub fn pw_log_logv(
3155 level: spa_log_level,
3156 file: *const ::std::os::raw::c_char,
3157 line: ::std::os::raw::c_int,
3158 func: *const ::std::os::raw::c_char,
3159 fmt: *const ::std::os::raw::c_char,
3160 args: *mut __va_list_tag,
3161 );
3162}
3163unsafe extern "C" {
3164 #[doc = " Register log topic with the logger, to enable dynamic log levels.\n Topic must be unregistered before freeing it or plugin unload.\n May be used instead of \\ref PW_LOG_TOPIC_INIT\n This function is threadsafe.\n\n \\since 1.1.0"]
3165 pub fn pw_log_topic_register(t: *mut spa_log_topic);
3166}
3167unsafe extern "C" {
3168 #[doc = " Unregister log topic. This function is threadsafe.\n\n \\since 1.1.0"]
3169 pub fn pw_log_topic_unregister(t: *mut spa_log_topic);
3170}
3171#[repr(C)]
3172#[derive(Debug, Copy, Clone)]
3173pub struct pw_link {
3174 _unused: [u8; 0],
3175}
3176#[doc = "< the link is in error"]
3177pub const pw_link_state_PW_LINK_STATE_ERROR: pw_link_state = -2;
3178#[doc = "< the link is unlinked"]
3179pub const pw_link_state_PW_LINK_STATE_UNLINKED: pw_link_state = -1;
3180#[doc = "< the link is initialized"]
3181pub const pw_link_state_PW_LINK_STATE_INIT: pw_link_state = 0;
3182#[doc = "< the link is negotiating formats"]
3183pub const pw_link_state_PW_LINK_STATE_NEGOTIATING: pw_link_state = 1;
3184#[doc = "< the link is allocating buffers"]
3185pub const pw_link_state_PW_LINK_STATE_ALLOCATING: pw_link_state = 2;
3186#[doc = "< the link is paused"]
3187pub const pw_link_state_PW_LINK_STATE_PAUSED: pw_link_state = 3;
3188#[doc = "< the link is active"]
3189pub const pw_link_state_PW_LINK_STATE_ACTIVE: pw_link_state = 4;
3190#[doc = " \\enum pw_link_state The different link states"]
3191pub type pw_link_state = ::std::os::raw::c_int;
3192unsafe extern "C" {
3193 #[doc = " Convert a \\ref pw_link_state to a readable string"]
3194 pub fn pw_link_state_as_string(state: pw_link_state) -> *const ::std::os::raw::c_char;
3195}
3196#[doc = " The link information. Extra information can be added in later versions"]
3197#[repr(C)]
3198#[derive(Debug, Copy, Clone)]
3199pub struct pw_link_info {
3200 #[doc = "< id of the global"]
3201 pub id: u32,
3202 #[doc = "< server side output node id"]
3203 pub output_node_id: u32,
3204 #[doc = "< output port id"]
3205 pub output_port_id: u32,
3206 #[doc = "< server side input node id"]
3207 pub input_node_id: u32,
3208 #[doc = "< input port id"]
3209 pub input_port_id: u32,
3210 #[doc = "< bitfield of changed fields since last call"]
3211 pub change_mask: u64,
3212 #[doc = "< the current state of the link"]
3213 pub state: pw_link_state,
3214 #[doc = "< an error reason if \\a state is error"]
3215 pub error: *const ::std::os::raw::c_char,
3216 #[doc = "< format over link"]
3217 pub format: *mut spa_pod,
3218 #[doc = "< the properties of the link"]
3219 pub props: *mut spa_dict,
3220}
3221#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3222const _: () = {
3223 ["Size of pw_link_info"][::std::mem::size_of::<pw_link_info>() - 64usize];
3224 ["Alignment of pw_link_info"][::std::mem::align_of::<pw_link_info>() - 8usize];
3225 ["Offset of field: pw_link_info::id"][::std::mem::offset_of!(pw_link_info, id) - 0usize];
3226 ["Offset of field: pw_link_info::output_node_id"]
3227 [::std::mem::offset_of!(pw_link_info, output_node_id) - 4usize];
3228 ["Offset of field: pw_link_info::output_port_id"]
3229 [::std::mem::offset_of!(pw_link_info, output_port_id) - 8usize];
3230 ["Offset of field: pw_link_info::input_node_id"]
3231 [::std::mem::offset_of!(pw_link_info, input_node_id) - 12usize];
3232 ["Offset of field: pw_link_info::input_port_id"]
3233 [::std::mem::offset_of!(pw_link_info, input_port_id) - 16usize];
3234 ["Offset of field: pw_link_info::change_mask"]
3235 [::std::mem::offset_of!(pw_link_info, change_mask) - 24usize];
3236 ["Offset of field: pw_link_info::state"][::std::mem::offset_of!(pw_link_info, state) - 32usize];
3237 ["Offset of field: pw_link_info::error"][::std::mem::offset_of!(pw_link_info, error) - 40usize];
3238 ["Offset of field: pw_link_info::format"]
3239 [::std::mem::offset_of!(pw_link_info, format) - 48usize];
3240 ["Offset of field: pw_link_info::props"][::std::mem::offset_of!(pw_link_info, props) - 56usize];
3241};
3242unsafe extern "C" {
3243 pub fn pw_link_info_update(
3244 info: *mut pw_link_info,
3245 update: *const pw_link_info,
3246 ) -> *mut pw_link_info;
3247}
3248unsafe extern "C" {
3249 pub fn pw_link_info_merge(
3250 info: *mut pw_link_info,
3251 update: *const pw_link_info,
3252 reset: bool,
3253 ) -> *mut pw_link_info;
3254}
3255unsafe extern "C" {
3256 pub fn pw_link_info_free(info: *mut pw_link_info);
3257}
3258#[doc = " Link events"]
3259#[repr(C)]
3260#[derive(Debug, Copy, Clone)]
3261pub struct pw_link_events {
3262 pub version: u32,
3263 #[doc = " Notify link info\n\n \\param info info about the link"]
3264 pub info: ::std::option::Option<
3265 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_link_info),
3266 >,
3267}
3268#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3269const _: () = {
3270 ["Size of pw_link_events"][::std::mem::size_of::<pw_link_events>() - 16usize];
3271 ["Alignment of pw_link_events"][::std::mem::align_of::<pw_link_events>() - 8usize];
3272 ["Offset of field: pw_link_events::version"]
3273 [::std::mem::offset_of!(pw_link_events, version) - 0usize];
3274 ["Offset of field: pw_link_events::info"]
3275 [::std::mem::offset_of!(pw_link_events, info) - 8usize];
3276};
3277#[doc = " Link methods"]
3278#[repr(C)]
3279#[derive(Debug, Copy, Clone)]
3280pub struct pw_link_methods {
3281 pub version: u32,
3282 pub add_listener: ::std::option::Option<
3283 unsafe extern "C" fn(
3284 object: *mut ::std::os::raw::c_void,
3285 listener: *mut spa_hook,
3286 events: *const pw_link_events,
3287 data: *mut ::std::os::raw::c_void,
3288 ) -> ::std::os::raw::c_int,
3289 >,
3290}
3291#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3292const _: () = {
3293 ["Size of pw_link_methods"][::std::mem::size_of::<pw_link_methods>() - 16usize];
3294 ["Alignment of pw_link_methods"][::std::mem::align_of::<pw_link_methods>() - 8usize];
3295 ["Offset of field: pw_link_methods::version"]
3296 [::std::mem::offset_of!(pw_link_methods, version) - 0usize];
3297 ["Offset of field: pw_link_methods::add_listener"]
3298 [::std::mem::offset_of!(pw_link_methods, add_listener) - 8usize];
3299};
3300#[doc = " A main loop object"]
3301#[repr(C)]
3302#[derive(Debug, Copy, Clone)]
3303pub struct pw_main_loop {
3304 _unused: [u8; 0],
3305}
3306#[doc = " Events of the main loop"]
3307#[repr(C)]
3308#[derive(Debug, Copy, Clone)]
3309pub struct pw_main_loop_events {
3310 pub version: u32,
3311 #[doc = " Emitted when the main loop is destroyed"]
3312 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
3313}
3314#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3315const _: () = {
3316 ["Size of pw_main_loop_events"][::std::mem::size_of::<pw_main_loop_events>() - 16usize];
3317 ["Alignment of pw_main_loop_events"][::std::mem::align_of::<pw_main_loop_events>() - 8usize];
3318 ["Offset of field: pw_main_loop_events::version"]
3319 [::std::mem::offset_of!(pw_main_loop_events, version) - 0usize];
3320 ["Offset of field: pw_main_loop_events::destroy"]
3321 [::std::mem::offset_of!(pw_main_loop_events, destroy) - 8usize];
3322};
3323unsafe extern "C" {
3324 #[doc = " Create a new main loop."]
3325 pub fn pw_main_loop_new(props: *const spa_dict) -> *mut pw_main_loop;
3326}
3327unsafe extern "C" {
3328 #[doc = " Add an event listener"]
3329 pub fn pw_main_loop_add_listener(
3330 loop_: *mut pw_main_loop,
3331 listener: *mut spa_hook,
3332 events: *const pw_main_loop_events,
3333 data: *mut ::std::os::raw::c_void,
3334 );
3335}
3336unsafe extern "C" {
3337 #[doc = " Get the loop implementation"]
3338 pub fn pw_main_loop_get_loop(loop_: *mut pw_main_loop) -> *mut pw_loop;
3339}
3340unsafe extern "C" {
3341 #[doc = " Destroy a loop"]
3342 pub fn pw_main_loop_destroy(loop_: *mut pw_main_loop);
3343}
3344unsafe extern "C" {
3345 #[doc = " Run a main loop. This blocks until \\ref pw_main_loop_quit is called.\n\n @return 0 on success, otherwise a negative number."]
3346 pub fn pw_main_loop_run(loop_: *mut pw_main_loop) -> ::std::os::raw::c_int;
3347}
3348unsafe extern "C" {
3349 #[doc = " Quit a main loop"]
3350 pub fn pw_main_loop_quit(loop_: *mut pw_main_loop) -> ::std::os::raw::c_int;
3351}
3352#[doc = " \\private\n An entry in the map. This is used internally only. Each element in the\n backing pw_array is a union pw_map_item. For real items, the data pointer\n points to the item. If an element has been removed, pw_map->free_list\n is the index of the most recently removed item. That item contains\n the index of the next removed item until item->next is SPA_ID_INVALID.\n\n The free list is prepended only, the last item to be removed will be the\n first item to get re-used on the next insert."]
3353#[repr(C)]
3354#[derive(Copy, Clone)]
3355pub union pw_map_item {
3356 pub next: usize,
3357 pub data: *mut ::std::os::raw::c_void,
3358}
3359#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3360const _: () = {
3361 ["Size of pw_map_item"][::std::mem::size_of::<pw_map_item>() - 8usize];
3362 ["Alignment of pw_map_item"][::std::mem::align_of::<pw_map_item>() - 8usize];
3363 ["Offset of field: pw_map_item::next"][::std::mem::offset_of!(pw_map_item, next) - 0usize];
3364 ["Offset of field: pw_map_item::data"][::std::mem::offset_of!(pw_map_item, data) - 0usize];
3365};
3366#[doc = " A map. This struct should be treated as opaque by the caller."]
3367#[repr(C)]
3368#[derive(Debug, Copy, Clone)]
3369pub struct pw_map {
3370 pub items: pw_array,
3371 pub free_list: u32,
3372}
3373#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3374const _: () = {
3375 ["Size of pw_map"][::std::mem::size_of::<pw_map>() - 40usize];
3376 ["Alignment of pw_map"][::std::mem::align_of::<pw_map>() - 8usize];
3377 ["Offset of field: pw_map::items"][::std::mem::offset_of!(pw_map, items) - 0usize];
3378 ["Offset of field: pw_map::free_list"][::std::mem::offset_of!(pw_map, free_list) - 32usize];
3379};
3380#[repr(C)]
3381#[derive(Debug, Copy, Clone)]
3382pub struct pw_module {
3383 _unused: [u8; 0],
3384}
3385#[doc = " The module information. Extra information can be added in later versions"]
3386#[repr(C)]
3387#[derive(Debug, Copy, Clone)]
3388pub struct pw_module_info {
3389 #[doc = "< id of the global"]
3390 pub id: u32,
3391 #[doc = "< name of the module"]
3392 pub name: *const ::std::os::raw::c_char,
3393 #[doc = "< filename of the module"]
3394 pub filename: *const ::std::os::raw::c_char,
3395 #[doc = "< arguments passed to the module"]
3396 pub args: *const ::std::os::raw::c_char,
3397 #[doc = "< bitfield of changed fields since last call"]
3398 pub change_mask: u64,
3399 #[doc = "< extra properties"]
3400 pub props: *mut spa_dict,
3401}
3402#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3403const _: () = {
3404 ["Size of pw_module_info"][::std::mem::size_of::<pw_module_info>() - 48usize];
3405 ["Alignment of pw_module_info"][::std::mem::align_of::<pw_module_info>() - 8usize];
3406 ["Offset of field: pw_module_info::id"][::std::mem::offset_of!(pw_module_info, id) - 0usize];
3407 ["Offset of field: pw_module_info::name"]
3408 [::std::mem::offset_of!(pw_module_info, name) - 8usize];
3409 ["Offset of field: pw_module_info::filename"]
3410 [::std::mem::offset_of!(pw_module_info, filename) - 16usize];
3411 ["Offset of field: pw_module_info::args"]
3412 [::std::mem::offset_of!(pw_module_info, args) - 24usize];
3413 ["Offset of field: pw_module_info::change_mask"]
3414 [::std::mem::offset_of!(pw_module_info, change_mask) - 32usize];
3415 ["Offset of field: pw_module_info::props"]
3416 [::std::mem::offset_of!(pw_module_info, props) - 40usize];
3417};
3418unsafe extern "C" {
3419 #[doc = " Update and existing \\ref pw_module_info with \\a update with reset"]
3420 pub fn pw_module_info_update(
3421 info: *mut pw_module_info,
3422 update: *const pw_module_info,
3423 ) -> *mut pw_module_info;
3424}
3425unsafe extern "C" {
3426 #[doc = " Merge and existing \\ref pw_module_info with \\a update"]
3427 pub fn pw_module_info_merge(
3428 info: *mut pw_module_info,
3429 update: *const pw_module_info,
3430 reset: bool,
3431 ) -> *mut pw_module_info;
3432}
3433unsafe extern "C" {
3434 #[doc = " Free a \\ref pw_module_info"]
3435 pub fn pw_module_info_free(info: *mut pw_module_info);
3436}
3437#[doc = " Module events"]
3438#[repr(C)]
3439#[derive(Debug, Copy, Clone)]
3440pub struct pw_module_events {
3441 pub version: u32,
3442 #[doc = " Notify module info\n\n \\param info info about the module"]
3443 pub info: ::std::option::Option<
3444 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_module_info),
3445 >,
3446}
3447#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3448const _: () = {
3449 ["Size of pw_module_events"][::std::mem::size_of::<pw_module_events>() - 16usize];
3450 ["Alignment of pw_module_events"][::std::mem::align_of::<pw_module_events>() - 8usize];
3451 ["Offset of field: pw_module_events::version"]
3452 [::std::mem::offset_of!(pw_module_events, version) - 0usize];
3453 ["Offset of field: pw_module_events::info"]
3454 [::std::mem::offset_of!(pw_module_events, info) - 8usize];
3455};
3456#[doc = " Module methods"]
3457#[repr(C)]
3458#[derive(Debug, Copy, Clone)]
3459pub struct pw_module_methods {
3460 pub version: u32,
3461 pub add_listener: ::std::option::Option<
3462 unsafe extern "C" fn(
3463 object: *mut ::std::os::raw::c_void,
3464 listener: *mut spa_hook,
3465 events: *const pw_module_events,
3466 data: *mut ::std::os::raw::c_void,
3467 ) -> ::std::os::raw::c_int,
3468 >,
3469}
3470#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3471const _: () = {
3472 ["Size of pw_module_methods"][::std::mem::size_of::<pw_module_methods>() - 16usize];
3473 ["Alignment of pw_module_methods"][::std::mem::align_of::<pw_module_methods>() - 8usize];
3474 ["Offset of field: pw_module_methods::version"]
3475 [::std::mem::offset_of!(pw_module_methods, version) - 0usize];
3476 ["Offset of field: pw_module_methods::add_listener"]
3477 [::std::mem::offset_of!(pw_module_methods, add_listener) - 8usize];
3478};
3479#[repr(C)]
3480#[derive(Debug, Copy, Clone)]
3481pub struct pw_node {
3482 _unused: [u8; 0],
3483}
3484#[doc = "< error state"]
3485pub const pw_node_state_PW_NODE_STATE_ERROR: pw_node_state = -1;
3486#[doc = "< the node is being created"]
3487pub const pw_node_state_PW_NODE_STATE_CREATING: pw_node_state = 0;
3488#[doc = "< the node is suspended, the device might\n be closed"]
3489pub const pw_node_state_PW_NODE_STATE_SUSPENDED: pw_node_state = 1;
3490#[doc = "< the node is running but there is no active\n port"]
3491pub const pw_node_state_PW_NODE_STATE_IDLE: pw_node_state = 2;
3492#[doc = "< the node is running"]
3493pub const pw_node_state_PW_NODE_STATE_RUNNING: pw_node_state = 3;
3494#[doc = " \\enum pw_node_state The different node states"]
3495pub type pw_node_state = ::std::os::raw::c_int;
3496unsafe extern "C" {
3497 #[doc = " Convert a \\ref pw_node_state to a readable string"]
3498 pub fn pw_node_state_as_string(state: pw_node_state) -> *const ::std::os::raw::c_char;
3499}
3500#[doc = " The node information. Extra information can be added in later versions"]
3501#[repr(C)]
3502#[derive(Debug, Copy, Clone)]
3503pub struct pw_node_info {
3504 #[doc = "< id of the global"]
3505 pub id: u32,
3506 #[doc = "< maximum number of inputs"]
3507 pub max_input_ports: u32,
3508 #[doc = "< maximum number of outputs"]
3509 pub max_output_ports: u32,
3510 #[doc = "< bitfield of changed fields since last call"]
3511 pub change_mask: u64,
3512 #[doc = "< number of inputs"]
3513 pub n_input_ports: u32,
3514 #[doc = "< number of outputs"]
3515 pub n_output_ports: u32,
3516 #[doc = "< the current state of the node"]
3517 pub state: pw_node_state,
3518 #[doc = "< an error reason if \\a state is error"]
3519 pub error: *const ::std::os::raw::c_char,
3520 #[doc = "< the properties of the node"]
3521 pub props: *mut spa_dict,
3522 #[doc = "< parameters"]
3523 pub params: *mut spa_param_info,
3524 #[doc = "< number of items in \\a params"]
3525 pub n_params: u32,
3526}
3527#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3528const _: () = {
3529 ["Size of pw_node_info"][::std::mem::size_of::<pw_node_info>() - 72usize];
3530 ["Alignment of pw_node_info"][::std::mem::align_of::<pw_node_info>() - 8usize];
3531 ["Offset of field: pw_node_info::id"][::std::mem::offset_of!(pw_node_info, id) - 0usize];
3532 ["Offset of field: pw_node_info::max_input_ports"]
3533 [::std::mem::offset_of!(pw_node_info, max_input_ports) - 4usize];
3534 ["Offset of field: pw_node_info::max_output_ports"]
3535 [::std::mem::offset_of!(pw_node_info, max_output_ports) - 8usize];
3536 ["Offset of field: pw_node_info::change_mask"]
3537 [::std::mem::offset_of!(pw_node_info, change_mask) - 16usize];
3538 ["Offset of field: pw_node_info::n_input_ports"]
3539 [::std::mem::offset_of!(pw_node_info, n_input_ports) - 24usize];
3540 ["Offset of field: pw_node_info::n_output_ports"]
3541 [::std::mem::offset_of!(pw_node_info, n_output_ports) - 28usize];
3542 ["Offset of field: pw_node_info::state"][::std::mem::offset_of!(pw_node_info, state) - 32usize];
3543 ["Offset of field: pw_node_info::error"][::std::mem::offset_of!(pw_node_info, error) - 40usize];
3544 ["Offset of field: pw_node_info::props"][::std::mem::offset_of!(pw_node_info, props) - 48usize];
3545 ["Offset of field: pw_node_info::params"]
3546 [::std::mem::offset_of!(pw_node_info, params) - 56usize];
3547 ["Offset of field: pw_node_info::n_params"]
3548 [::std::mem::offset_of!(pw_node_info, n_params) - 64usize];
3549};
3550unsafe extern "C" {
3551 pub fn pw_node_info_update(
3552 info: *mut pw_node_info,
3553 update: *const pw_node_info,
3554 ) -> *mut pw_node_info;
3555}
3556unsafe extern "C" {
3557 pub fn pw_node_info_merge(
3558 info: *mut pw_node_info,
3559 update: *const pw_node_info,
3560 reset: bool,
3561 ) -> *mut pw_node_info;
3562}
3563unsafe extern "C" {
3564 pub fn pw_node_info_free(info: *mut pw_node_info);
3565}
3566#[doc = " Node events"]
3567#[repr(C)]
3568#[derive(Debug, Copy, Clone)]
3569pub struct pw_node_events {
3570 pub version: u32,
3571 #[doc = " Notify node info\n\n \\param info info about the node"]
3572 pub info: ::std::option::Option<
3573 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_node_info),
3574 >,
3575 #[doc = " Notify a node param\n\n Event emitted as a result of the enum_params method.\n\n \\param seq the sequence number of the request\n \\param id the param id\n \\param index the param index\n \\param next the param index of the next param\n \\param param the parameter"]
3576 pub param: ::std::option::Option<
3577 unsafe extern "C" fn(
3578 data: *mut ::std::os::raw::c_void,
3579 seq: ::std::os::raw::c_int,
3580 id: u32,
3581 index: u32,
3582 next: u32,
3583 param: *const spa_pod,
3584 ),
3585 >,
3586}
3587#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3588const _: () = {
3589 ["Size of pw_node_events"][::std::mem::size_of::<pw_node_events>() - 24usize];
3590 ["Alignment of pw_node_events"][::std::mem::align_of::<pw_node_events>() - 8usize];
3591 ["Offset of field: pw_node_events::version"]
3592 [::std::mem::offset_of!(pw_node_events, version) - 0usize];
3593 ["Offset of field: pw_node_events::info"]
3594 [::std::mem::offset_of!(pw_node_events, info) - 8usize];
3595 ["Offset of field: pw_node_events::param"]
3596 [::std::mem::offset_of!(pw_node_events, param) - 16usize];
3597};
3598#[doc = " Node methods"]
3599#[repr(C)]
3600#[derive(Debug, Copy, Clone)]
3601pub struct pw_node_methods {
3602 pub version: u32,
3603 pub add_listener: ::std::option::Option<
3604 unsafe extern "C" fn(
3605 object: *mut ::std::os::raw::c_void,
3606 listener: *mut spa_hook,
3607 events: *const pw_node_events,
3608 data: *mut ::std::os::raw::c_void,
3609 ) -> ::std::os::raw::c_int,
3610 >,
3611 #[doc = " Subscribe to parameter changes\n\n Automatically emit param events for the given ids when\n they are changed.\n\n \\param ids an array of param ids\n \\param n_ids the number of ids in \\a ids\n\n This requires X permissions on the node."]
3612 pub subscribe_params: ::std::option::Option<
3613 unsafe extern "C" fn(
3614 object: *mut ::std::os::raw::c_void,
3615 ids: *mut u32,
3616 n_ids: u32,
3617 ) -> ::std::os::raw::c_int,
3618 >,
3619 #[doc = " Enumerate node parameters\n\n Start enumeration of node parameters. For each param, a\n param event will be emitted.\n\n \\param seq a sequence number to place in the reply\n \\param id the parameter id to enum or PW_ID_ANY for all\n \\param start the start index or 0 for the first param\n \\param num the maximum number of params to retrieve\n \\param filter a param filter or NULL\n\n This requires X permissions on the node."]
3620 pub enum_params: ::std::option::Option<
3621 unsafe extern "C" fn(
3622 object: *mut ::std::os::raw::c_void,
3623 seq: ::std::os::raw::c_int,
3624 id: u32,
3625 start: u32,
3626 num: u32,
3627 filter: *const spa_pod,
3628 ) -> ::std::os::raw::c_int,
3629 >,
3630 #[doc = " Set a parameter on the node\n\n \\param id the parameter id to set\n \\param flags extra parameter flags\n \\param param the parameter to set\n\n This requires X and W permissions on the node."]
3631 pub set_param: ::std::option::Option<
3632 unsafe extern "C" fn(
3633 object: *mut ::std::os::raw::c_void,
3634 id: u32,
3635 flags: u32,
3636 param: *const spa_pod,
3637 ) -> ::std::os::raw::c_int,
3638 >,
3639 #[doc = " Send a command to the node\n\n \\param command the command to send\n\n This requires X and W permissions on the node."]
3640 pub send_command: ::std::option::Option<
3641 unsafe extern "C" fn(
3642 object: *mut ::std::os::raw::c_void,
3643 command: *const spa_command,
3644 ) -> ::std::os::raw::c_int,
3645 >,
3646}
3647#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3648const _: () = {
3649 ["Size of pw_node_methods"][::std::mem::size_of::<pw_node_methods>() - 48usize];
3650 ["Alignment of pw_node_methods"][::std::mem::align_of::<pw_node_methods>() - 8usize];
3651 ["Offset of field: pw_node_methods::version"]
3652 [::std::mem::offset_of!(pw_node_methods, version) - 0usize];
3653 ["Offset of field: pw_node_methods::add_listener"]
3654 [::std::mem::offset_of!(pw_node_methods, add_listener) - 8usize];
3655 ["Offset of field: pw_node_methods::subscribe_params"]
3656 [::std::mem::offset_of!(pw_node_methods, subscribe_params) - 16usize];
3657 ["Offset of field: pw_node_methods::enum_params"]
3658 [::std::mem::offset_of!(pw_node_methods, enum_params) - 24usize];
3659 ["Offset of field: pw_node_methods::set_param"]
3660 [::std::mem::offset_of!(pw_node_methods, set_param) - 32usize];
3661 ["Offset of field: pw_node_methods::send_command"]
3662 [::std::mem::offset_of!(pw_node_methods, send_command) - 40usize];
3663};
3664#[repr(C)]
3665#[derive(Debug, Copy, Clone)]
3666pub struct pw_port {
3667 _unused: [u8; 0],
3668}
3669unsafe extern "C" {
3670 #[doc = " Convert a \\ref pw_direction to a readable string"]
3671 pub fn pw_direction_as_string(direction: spa_direction) -> *const ::std::os::raw::c_char;
3672}
3673#[repr(C)]
3674pub struct pw_port_info {
3675 #[doc = "< id of the global"]
3676 pub id: u32,
3677 #[doc = "< port direction"]
3678 pub direction: spa_direction,
3679 #[doc = "< bitfield of changed fields since last call"]
3680 pub change_mask: u64,
3681 #[doc = "< the properties of the port"]
3682 pub props: *mut spa_dict,
3683 #[doc = "< parameters"]
3684 pub params: *mut spa_param_info,
3685 #[doc = "< number of items in \\a params"]
3686 pub n_params: u32,
3687}
3688#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3689const _: () = {
3690 ["Size of pw_port_info"][::std::mem::size_of::<pw_port_info>() - 40usize];
3691 ["Alignment of pw_port_info"][::std::mem::align_of::<pw_port_info>() - 8usize];
3692 ["Offset of field: pw_port_info::id"][::std::mem::offset_of!(pw_port_info, id) - 0usize];
3693 ["Offset of field: pw_port_info::direction"]
3694 [::std::mem::offset_of!(pw_port_info, direction) - 4usize];
3695 ["Offset of field: pw_port_info::change_mask"]
3696 [::std::mem::offset_of!(pw_port_info, change_mask) - 8usize];
3697 ["Offset of field: pw_port_info::props"][::std::mem::offset_of!(pw_port_info, props) - 16usize];
3698 ["Offset of field: pw_port_info::params"]
3699 [::std::mem::offset_of!(pw_port_info, params) - 24usize];
3700 ["Offset of field: pw_port_info::n_params"]
3701 [::std::mem::offset_of!(pw_port_info, n_params) - 32usize];
3702};
3703unsafe extern "C" {
3704 pub fn pw_port_info_update(
3705 info: *mut pw_port_info,
3706 update: *const pw_port_info,
3707 ) -> *mut pw_port_info;
3708}
3709unsafe extern "C" {
3710 pub fn pw_port_info_merge(
3711 info: *mut pw_port_info,
3712 update: *const pw_port_info,
3713 reset: bool,
3714 ) -> *mut pw_port_info;
3715}
3716unsafe extern "C" {
3717 pub fn pw_port_info_free(info: *mut pw_port_info);
3718}
3719#[doc = " Port events"]
3720#[repr(C)]
3721#[derive(Debug, Copy, Clone)]
3722pub struct pw_port_events {
3723 pub version: u32,
3724 #[doc = " Notify port info\n\n \\param info info about the port"]
3725 pub info: ::std::option::Option<
3726 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_port_info),
3727 >,
3728 #[doc = " Notify a port param\n\n Event emitted as a result of the enum_params method.\n\n \\param seq the sequence number of the request\n \\param id the param id\n \\param index the param index\n \\param next the param index of the next param\n \\param param the parameter"]
3729 pub param: ::std::option::Option<
3730 unsafe extern "C" fn(
3731 data: *mut ::std::os::raw::c_void,
3732 seq: ::std::os::raw::c_int,
3733 id: u32,
3734 index: u32,
3735 next: u32,
3736 param: *const spa_pod,
3737 ),
3738 >,
3739}
3740#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3741const _: () = {
3742 ["Size of pw_port_events"][::std::mem::size_of::<pw_port_events>() - 24usize];
3743 ["Alignment of pw_port_events"][::std::mem::align_of::<pw_port_events>() - 8usize];
3744 ["Offset of field: pw_port_events::version"]
3745 [::std::mem::offset_of!(pw_port_events, version) - 0usize];
3746 ["Offset of field: pw_port_events::info"]
3747 [::std::mem::offset_of!(pw_port_events, info) - 8usize];
3748 ["Offset of field: pw_port_events::param"]
3749 [::std::mem::offset_of!(pw_port_events, param) - 16usize];
3750};
3751#[doc = " Port methods"]
3752#[repr(C)]
3753#[derive(Debug, Copy, Clone)]
3754pub struct pw_port_methods {
3755 pub version: u32,
3756 pub add_listener: ::std::option::Option<
3757 unsafe extern "C" fn(
3758 object: *mut ::std::os::raw::c_void,
3759 listener: *mut spa_hook,
3760 events: *const pw_port_events,
3761 data: *mut ::std::os::raw::c_void,
3762 ) -> ::std::os::raw::c_int,
3763 >,
3764 #[doc = " Subscribe to parameter changes\n\n Automatically emit param events for the given ids when\n they are changed.\n\n \\param ids an array of param ids\n \\param n_ids the number of ids in \\a ids\n\n This requires X permissions on the port."]
3765 pub subscribe_params: ::std::option::Option<
3766 unsafe extern "C" fn(
3767 object: *mut ::std::os::raw::c_void,
3768 ids: *mut u32,
3769 n_ids: u32,
3770 ) -> ::std::os::raw::c_int,
3771 >,
3772 #[doc = " Enumerate port parameters\n\n Start enumeration of port parameters. For each param, a\n param event will be emitted.\n\n \\param seq a sequence number returned in the reply\n \\param id the parameter id to enumerate\n \\param start the start index or 0 for the first param\n \\param num the maximum number of params to retrieve\n \\param filter a param filter or NULL\n\n This requires X permissions on the port."]
3773 pub enum_params: ::std::option::Option<
3774 unsafe extern "C" fn(
3775 object: *mut ::std::os::raw::c_void,
3776 seq: ::std::os::raw::c_int,
3777 id: u32,
3778 start: u32,
3779 num: u32,
3780 filter: *const spa_pod,
3781 ) -> ::std::os::raw::c_int,
3782 >,
3783}
3784#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3785const _: () = {
3786 ["Size of pw_port_methods"][::std::mem::size_of::<pw_port_methods>() - 32usize];
3787 ["Alignment of pw_port_methods"][::std::mem::align_of::<pw_port_methods>() - 8usize];
3788 ["Offset of field: pw_port_methods::version"]
3789 [::std::mem::offset_of!(pw_port_methods, version) - 0usize];
3790 ["Offset of field: pw_port_methods::add_listener"]
3791 [::std::mem::offset_of!(pw_port_methods, add_listener) - 8usize];
3792 ["Offset of field: pw_port_methods::subscribe_params"]
3793 [::std::mem::offset_of!(pw_port_methods, subscribe_params) - 16usize];
3794 ["Offset of field: pw_port_methods::enum_params"]
3795 [::std::mem::offset_of!(pw_port_methods, enum_params) - 24usize];
3796};
3797#[doc = " \\addtogroup pw_stream\n \\{"]
3798#[repr(C)]
3799#[derive(Debug, Copy, Clone)]
3800pub struct pw_stream {
3801 _unused: [u8; 0],
3802}
3803#[doc = "< the stream is in error"]
3804pub const pw_stream_state_PW_STREAM_STATE_ERROR: pw_stream_state = -1;
3805#[doc = "< unconnected"]
3806pub const pw_stream_state_PW_STREAM_STATE_UNCONNECTED: pw_stream_state = 0;
3807#[doc = "< connection is in progress"]
3808pub const pw_stream_state_PW_STREAM_STATE_CONNECTING: pw_stream_state = 1;
3809#[doc = "< paused"]
3810pub const pw_stream_state_PW_STREAM_STATE_PAUSED: pw_stream_state = 2;
3811#[doc = "< streaming"]
3812pub const pw_stream_state_PW_STREAM_STATE_STREAMING: pw_stream_state = 3;
3813#[doc = " \\enum pw_stream_state The state of a stream"]
3814pub type pw_stream_state = ::std::os::raw::c_int;
3815#[doc = " a buffer structure obtained from pw_stream_dequeue_buffer(). The size of this\n structure can grow as more fields are added in the future"]
3816#[repr(C)]
3817#[derive(Debug, Copy, Clone)]
3818pub struct pw_buffer {
3819 #[doc = "< the spa buffer"]
3820 pub buffer: *mut spa_buffer,
3821 #[doc = "< user data attached to the buffer. The user of\n the stream can set custom data associated with the\n buffer, typically in the add_buffer event. Any\n cleanup should be performed in the remove_buffer\n event. The user data is returned unmodified each\n time a buffer is dequeued."]
3822 pub user_data: *mut ::std::os::raw::c_void,
3823 #[doc = "< This field is set by the user and the sum of\n all queued buffers is returned in the time info.\n For audio, it is advised to use the number of\n frames in the buffer for this field."]
3824 pub size: u64,
3825 #[doc = "< For playback streams, this field contains the\n suggested amount of data to provide. For audio\n streams this will be the amount of frames\n required by the resampler. This field is 0\n when no suggestion is provided. Since 0.3.49"]
3826 pub requested: u64,
3827 #[doc = "< For capture streams, this field contains the\n cycle time in nanoseconds when this buffer was\n queued in the stream. It can be compared against\n the pw_time values or pw_stream_get_nsec()\n Since 1.0.5"]
3828 pub time: u64,
3829}
3830#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3831const _: () = {
3832 ["Size of pw_buffer"][::std::mem::size_of::<pw_buffer>() - 40usize];
3833 ["Alignment of pw_buffer"][::std::mem::align_of::<pw_buffer>() - 8usize];
3834 ["Offset of field: pw_buffer::buffer"][::std::mem::offset_of!(pw_buffer, buffer) - 0usize];
3835 ["Offset of field: pw_buffer::user_data"]
3836 [::std::mem::offset_of!(pw_buffer, user_data) - 8usize];
3837 ["Offset of field: pw_buffer::size"][::std::mem::offset_of!(pw_buffer, size) - 16usize];
3838 ["Offset of field: pw_buffer::requested"]
3839 [::std::mem::offset_of!(pw_buffer, requested) - 24usize];
3840 ["Offset of field: pw_buffer::time"][::std::mem::offset_of!(pw_buffer, time) - 32usize];
3841};
3842#[repr(C)]
3843#[derive(Debug, Copy, Clone)]
3844pub struct pw_stream_control {
3845 #[doc = "< name of the control"]
3846 pub name: *const ::std::os::raw::c_char,
3847 #[doc = "< extra flags (unused)"]
3848 pub flags: u32,
3849 #[doc = "< default value"]
3850 pub def: f32,
3851 #[doc = "< min value"]
3852 pub min: f32,
3853 #[doc = "< max value"]
3854 pub max: f32,
3855 #[doc = "< array of values"]
3856 pub values: *mut f32,
3857 #[doc = "< number of values in array"]
3858 pub n_values: u32,
3859 #[doc = "< max values that can be set on this control"]
3860 pub max_values: u32,
3861}
3862#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3863const _: () = {
3864 ["Size of pw_stream_control"][::std::mem::size_of::<pw_stream_control>() - 40usize];
3865 ["Alignment of pw_stream_control"][::std::mem::align_of::<pw_stream_control>() - 8usize];
3866 ["Offset of field: pw_stream_control::name"]
3867 [::std::mem::offset_of!(pw_stream_control, name) - 0usize];
3868 ["Offset of field: pw_stream_control::flags"]
3869 [::std::mem::offset_of!(pw_stream_control, flags) - 8usize];
3870 ["Offset of field: pw_stream_control::def"]
3871 [::std::mem::offset_of!(pw_stream_control, def) - 12usize];
3872 ["Offset of field: pw_stream_control::min"]
3873 [::std::mem::offset_of!(pw_stream_control, min) - 16usize];
3874 ["Offset of field: pw_stream_control::max"]
3875 [::std::mem::offset_of!(pw_stream_control, max) - 20usize];
3876 ["Offset of field: pw_stream_control::values"]
3877 [::std::mem::offset_of!(pw_stream_control, values) - 24usize];
3878 ["Offset of field: pw_stream_control::n_values"]
3879 [::std::mem::offset_of!(pw_stream_control, n_values) - 32usize];
3880 ["Offset of field: pw_stream_control::max_values"]
3881 [::std::mem::offset_of!(pw_stream_control, max_values) - 36usize];
3882};
3883#[doc = " A time structure.\n\n Use pw_stream_get_time_n() to get an updated time snapshot of the stream.\n The time snapshot can give information about the time in the driver of the\n graph, the delay to the edge of the graph and the internal queuing in the\n stream.\n\n pw_time.ticks gives a monotonic increasing counter of the time in the graph\n driver. I can be used to generate a timetime to schedule samples as well\n as detect discontinuities in the timeline caused by xruns.\n\n pw_time.delay is expressed as pw_time.rate, the time domain of the graph. This\n value, and pw_time.ticks, were captured at pw_time.now and can be extrapolated\n to the current time like this:\n\n\\code{.c}\n uint64_t now = pw_stream_get_nsec(stream);\n int64_t diff = now - pw_time.now;\n int64_t elapsed = (pw_time.rate.denom * diff) / (pw_time.rate.num * SPA_NSEC_PER_SEC);\n\\endcode\n\n pw_time.delay contains the total delay that a signal will travel through the\n graph. This includes the delay caused by filters in the graph as well as delays\n caused by the hardware. The delay is usually quite stable and should only change when\n the topology, quantum or samplerate of the graph changes.\n\n The delay requires the application to send the stream early relative to other synchronized\n streams in order to arrive at the edge of the graph in time. This is usually done by\n delaying the other streams with the given delay.\n\n Note that the delay can be negative. A negative delay means that this stream should be\n delayed with the (positive) delay relative to other streams.\n\n pw_time.queued and pw_time.buffered is expressed in the time domain of the stream,\n or the format that is used for the buffers of this stream.\n\n pw_time.queued is the sum of all the pw_buffer.size fields of the buffers that are\n currently queued in the stream but not yet processed. The application can choose\n the units of this value, for example, time, samples, frames or bytes (below\n expressed as app.rate).\n\n pw_time.buffered is format dependent, for audio/raw it contains the number of frames\n that are buffered inside the resampler/converter.\n\n The total delay of data in a stream is the sum of the queued and buffered data\n (not yet processed data) and the delay to the edge of the graph, usually a\n playback or capture device.\n\n For an audio playback stream, if you were to queue a buffer, the total delay\n in milliseconds for the first sample in the newly queued buffer to be played\n by the hardware can be calculated as:\n\n\\code{.unparsed}\n (pw_time.buffered * 1000 / stream.samplerate) +\n (pw_time.queued * 1000 / app.rate) +\n ((pw_time.delay - elapsed) * 1000 * pw_time.rate.num / pw_time.rate.denom)\n\\endcode\n\n The current extrapolated time (in ms) in the source or sink can be calculated as:\n\n\\code{.unparsed}\n (pw_time.ticks + elapsed) * 1000 * pw_time.rate.num / pw_time.rate.denom\n\\endcode\n\n Below is an overview of the different timing values:\n\n\\code{.unparsed}\n stream time domain graph time domain\n /-----------------------\\/-----------------------------\\\n\n queue +-+ +-+ +-----------+ +--------+\n ----> | | | |->| converter | -> graph -> | kernel | -> speaker\n <---- +-+ +-+ +-----------+ +--------+\n dequeue buffers \\-------------------/\\--------/\n graph internal\n latency latency\n \\--------/\\-------------/\\-----------------------------/\n queued buffered delay\n\\endcode"]
3884#[repr(C)]
3885pub struct pw_time {
3886 #[doc = "< the time in nanoseconds. This is the time when this\n time report was updated. It is usually updated every\n graph cycle. You can use pw_stream_get_nsec() to\n calculate the elapsed time between this report and\n the current time and calculate updated ticks and delay\n values."]
3887 pub now: i64,
3888 #[doc = "< the rate of \\a ticks and delay. This is usually\n expressed in 1/<samplerate>."]
3889 pub rate: spa_fraction,
3890 #[doc = "< the ticks at \\a now. This is the current time that\n the remote end is reading/writing. This is monotonicaly\n increasing."]
3891 pub ticks: u64,
3892 #[doc = "< delay to device. This is the time it will take for\n the next output sample of the stream to be presented by\n the playback device or the time a sample traveled\n from the capture device. This delay includes the\n delay introduced by all filters on the path between\n the stream and the device. The delay is normally\n constant in a graph and can change when the topology\n of the graph or the quantum changes. This delay does\n not include the delay caused by queued buffers."]
3893 pub delay: i64,
3894 #[doc = "< data queued in the stream, this is the sum\n of the size fields in the pw_buffer that are\n currently queued"]
3895 pub queued: u64,
3896 #[doc = "< for audio/raw streams, this contains the extra\n number of frames buffered in the resampler.\n Since 0.3.50."]
3897 pub buffered: u64,
3898 #[doc = "< the number of buffers that are queued. Since 0.3.50"]
3899 pub queued_buffers: u32,
3900 #[doc = "< the number of buffers that can be dequeued. Since 0.3.50"]
3901 pub avail_buffers: u32,
3902 #[doc = "< for audio/raw playback streams, this contains the number of\n samples requested by the resampler for the current\n quantum. for audio/raw capture streams this will be the number\n of samples available for the current quantum. Since 1.1.0"]
3903 pub size: u64,
3904}
3905#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3906const _: () = {
3907 ["Size of pw_time"][::std::mem::size_of::<pw_time>() - 64usize];
3908 ["Alignment of pw_time"][::std::mem::align_of::<pw_time>() - 8usize];
3909 ["Offset of field: pw_time::now"][::std::mem::offset_of!(pw_time, now) - 0usize];
3910 ["Offset of field: pw_time::rate"][::std::mem::offset_of!(pw_time, rate) - 8usize];
3911 ["Offset of field: pw_time::ticks"][::std::mem::offset_of!(pw_time, ticks) - 16usize];
3912 ["Offset of field: pw_time::delay"][::std::mem::offset_of!(pw_time, delay) - 24usize];
3913 ["Offset of field: pw_time::queued"][::std::mem::offset_of!(pw_time, queued) - 32usize];
3914 ["Offset of field: pw_time::buffered"][::std::mem::offset_of!(pw_time, buffered) - 40usize];
3915 ["Offset of field: pw_time::queued_buffers"]
3916 [::std::mem::offset_of!(pw_time, queued_buffers) - 48usize];
3917 ["Offset of field: pw_time::avail_buffers"]
3918 [::std::mem::offset_of!(pw_time, avail_buffers) - 52usize];
3919 ["Offset of field: pw_time::size"][::std::mem::offset_of!(pw_time, size) - 56usize];
3920};
3921#[doc = " Events for a stream. These events are always called from the mainloop\n unless explicitly documented otherwise."]
3922#[repr(C)]
3923#[derive(Debug, Copy, Clone)]
3924pub struct pw_stream_events {
3925 pub version: u32,
3926 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
3927 #[doc = " when the stream state changes. Since 1.4 this also sets errno when the\n new state is PW_STREAM_STATE_ERROR"]
3928 pub state_changed: ::std::option::Option<
3929 unsafe extern "C" fn(
3930 data: *mut ::std::os::raw::c_void,
3931 old: pw_stream_state,
3932 state: pw_stream_state,
3933 error: *const ::std::os::raw::c_char,
3934 ),
3935 >,
3936 #[doc = " Notify information about a control."]
3937 pub control_info: ::std::option::Option<
3938 unsafe extern "C" fn(
3939 data: *mut ::std::os::raw::c_void,
3940 id: u32,
3941 control: *const pw_stream_control,
3942 ),
3943 >,
3944 #[doc = " when io changed on the stream."]
3945 pub io_changed: ::std::option::Option<
3946 unsafe extern "C" fn(
3947 data: *mut ::std::os::raw::c_void,
3948 id: u32,
3949 area: *mut ::std::os::raw::c_void,
3950 size: u32,
3951 ),
3952 >,
3953 #[doc = " when a parameter changed"]
3954 pub param_changed: ::std::option::Option<
3955 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, id: u32, param: *const spa_pod),
3956 >,
3957 #[doc = " when a new buffer was created for this stream"]
3958 pub add_buffer: ::std::option::Option<
3959 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, buffer: *mut pw_buffer),
3960 >,
3961 #[doc = " when a buffer was destroyed for this stream"]
3962 pub remove_buffer: ::std::option::Option<
3963 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, buffer: *mut pw_buffer),
3964 >,
3965 #[doc = " when a buffer can be queued (for playback streams) or\n dequeued (for capture streams). This is normally called from the\n mainloop but can also be called directly from the realtime data\n thread if the user is prepared to deal with this."]
3966 pub process: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
3967 #[doc = " The stream is drained"]
3968 pub drained: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
3969 #[doc = " A command notify, Since 0.3.39:1"]
3970 pub command: ::std::option::Option<
3971 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, command: *const spa_command),
3972 >,
3973 #[doc = " a trigger_process completed. Since version 0.3.40:2.\n This is normally called from the mainloop but since 1.1.0 it\n can also be called directly from the realtime data\n thread if the user is prepared to deal with this."]
3974 pub trigger_done:
3975 ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
3976}
3977#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3978const _: () = {
3979 ["Size of pw_stream_events"][::std::mem::size_of::<pw_stream_events>() - 96usize];
3980 ["Alignment of pw_stream_events"][::std::mem::align_of::<pw_stream_events>() - 8usize];
3981 ["Offset of field: pw_stream_events::version"]
3982 [::std::mem::offset_of!(pw_stream_events, version) - 0usize];
3983 ["Offset of field: pw_stream_events::destroy"]
3984 [::std::mem::offset_of!(pw_stream_events, destroy) - 8usize];
3985 ["Offset of field: pw_stream_events::state_changed"]
3986 [::std::mem::offset_of!(pw_stream_events, state_changed) - 16usize];
3987 ["Offset of field: pw_stream_events::control_info"]
3988 [::std::mem::offset_of!(pw_stream_events, control_info) - 24usize];
3989 ["Offset of field: pw_stream_events::io_changed"]
3990 [::std::mem::offset_of!(pw_stream_events, io_changed) - 32usize];
3991 ["Offset of field: pw_stream_events::param_changed"]
3992 [::std::mem::offset_of!(pw_stream_events, param_changed) - 40usize];
3993 ["Offset of field: pw_stream_events::add_buffer"]
3994 [::std::mem::offset_of!(pw_stream_events, add_buffer) - 48usize];
3995 ["Offset of field: pw_stream_events::remove_buffer"]
3996 [::std::mem::offset_of!(pw_stream_events, remove_buffer) - 56usize];
3997 ["Offset of field: pw_stream_events::process"]
3998 [::std::mem::offset_of!(pw_stream_events, process) - 64usize];
3999 ["Offset of field: pw_stream_events::drained"]
4000 [::std::mem::offset_of!(pw_stream_events, drained) - 72usize];
4001 ["Offset of field: pw_stream_events::command"]
4002 [::std::mem::offset_of!(pw_stream_events, command) - 80usize];
4003 ["Offset of field: pw_stream_events::trigger_done"]
4004 [::std::mem::offset_of!(pw_stream_events, trigger_done) - 88usize];
4005};
4006unsafe extern "C" {
4007 #[doc = " Convert a stream state to a readable string"]
4008 pub fn pw_stream_state_as_string(state: pw_stream_state) -> *const ::std::os::raw::c_char;
4009}
4010#[doc = "< no flags"]
4011pub const pw_stream_flags_PW_STREAM_FLAG_NONE: pw_stream_flags = 0;
4012#[doc = "< try to automatically connect\n this stream"]
4013pub const pw_stream_flags_PW_STREAM_FLAG_AUTOCONNECT: pw_stream_flags = 1;
4014#[doc = "< start the stream inactive,\n pw_stream_set_active() needs to be\n called explicitly"]
4015pub const pw_stream_flags_PW_STREAM_FLAG_INACTIVE: pw_stream_flags = 2;
4016#[doc = "< mmap the buffers except DmaBuf that is not\n explicitly marked as mappable."]
4017pub const pw_stream_flags_PW_STREAM_FLAG_MAP_BUFFERS: pw_stream_flags = 4;
4018#[doc = "< be a driver"]
4019pub const pw_stream_flags_PW_STREAM_FLAG_DRIVER: pw_stream_flags = 8;
4020#[doc = "< call process from the realtime\n thread. You MUST use RT safe functions\n in the process callback."]
4021pub const pw_stream_flags_PW_STREAM_FLAG_RT_PROCESS: pw_stream_flags = 16;
4022#[doc = "< don't convert format"]
4023pub const pw_stream_flags_PW_STREAM_FLAG_NO_CONVERT: pw_stream_flags = 32;
4024#[doc = "< require exclusive access to the\n device"]
4025pub const pw_stream_flags_PW_STREAM_FLAG_EXCLUSIVE: pw_stream_flags = 64;
4026#[doc = "< don't try to reconnect this stream\n when the sink/source is removed"]
4027pub const pw_stream_flags_PW_STREAM_FLAG_DONT_RECONNECT: pw_stream_flags = 128;
4028#[doc = "< the application will allocate buffer\n memory. In the add_buffer event, the\n data of the buffer should be set"]
4029pub const pw_stream_flags_PW_STREAM_FLAG_ALLOC_BUFFERS: pw_stream_flags = 256;
4030#[doc = "< the output stream will not be scheduled\n automatically but _trigger_process()\n needs to be called. This can be used\n when the output of the stream depends\n on input from other streams."]
4031pub const pw_stream_flags_PW_STREAM_FLAG_TRIGGER: pw_stream_flags = 512;
4032#[doc = "< Buffers will not be dequeued/queued from\n the realtime process() function. This is\n assumed when RT_PROCESS is unset but can\n also be the case when the process() function\n does a trigger_process() that will then\n dequeue/queue a buffer from another process()\n function. since 0.3.73"]
4033pub const pw_stream_flags_PW_STREAM_FLAG_ASYNC: pw_stream_flags = 1024;
4034#[doc = "< Call process as soon as there is a buffer\n to dequeue. This is only relevant for\n playback and when not using RT_PROCESS. It\n can be used to keep the maximum number of\n buffers queued. Since 0.3.81"]
4035pub const pw_stream_flags_PW_STREAM_FLAG_EARLY_PROCESS: pw_stream_flags = 2048;
4036#[doc = "< Call trigger_done from the realtime\n thread. You MUST use RT safe functions\n in the trigger_done callback. Since 1.1.0"]
4037pub const pw_stream_flags_PW_STREAM_FLAG_RT_TRIGGER_DONE: pw_stream_flags = 4096;
4038#[doc = " \\enum pw_stream_flags Extra flags that can be used in \\ref pw_stream_connect()"]
4039pub type pw_stream_flags = ::std::os::raw::c_uint;
4040unsafe extern "C" {
4041 #[doc = " Create a new unconnected \\ref pw_stream\n \\return a newly allocated \\ref pw_stream"]
4042 pub fn pw_stream_new(
4043 core: *mut pw_core,
4044 name: *const ::std::os::raw::c_char,
4045 props: *mut pw_properties,
4046 ) -> *mut pw_stream;
4047}
4048unsafe extern "C" {
4049 pub fn pw_stream_new_simple(
4050 loop_: *mut pw_loop,
4051 name: *const ::std::os::raw::c_char,
4052 props: *mut pw_properties,
4053 events: *const pw_stream_events,
4054 data: *mut ::std::os::raw::c_void,
4055 ) -> *mut pw_stream;
4056}
4057unsafe extern "C" {
4058 #[doc = " Destroy a stream"]
4059 pub fn pw_stream_destroy(stream: *mut pw_stream);
4060}
4061unsafe extern "C" {
4062 pub fn pw_stream_add_listener(
4063 stream: *mut pw_stream,
4064 listener: *mut spa_hook,
4065 events: *const pw_stream_events,
4066 data: *mut ::std::os::raw::c_void,
4067 );
4068}
4069unsafe extern "C" {
4070 #[doc = " Get the current stream state. Since 1.4 this also sets errno when the\n state is PW_STREAM_STATE_ERROR"]
4071 pub fn pw_stream_get_state(
4072 stream: *mut pw_stream,
4073 error: *mut *const ::std::os::raw::c_char,
4074 ) -> pw_stream_state;
4075}
4076unsafe extern "C" {
4077 pub fn pw_stream_get_name(stream: *mut pw_stream) -> *const ::std::os::raw::c_char;
4078}
4079unsafe extern "C" {
4080 pub fn pw_stream_get_core(stream: *mut pw_stream) -> *mut pw_core;
4081}
4082unsafe extern "C" {
4083 pub fn pw_stream_get_properties(stream: *mut pw_stream) -> *const pw_properties;
4084}
4085unsafe extern "C" {
4086 pub fn pw_stream_update_properties(
4087 stream: *mut pw_stream,
4088 dict: *const spa_dict,
4089 ) -> ::std::os::raw::c_int;
4090}
4091unsafe extern "C" {
4092 #[doc = " Connect a stream for input or output on \\a port_path.\n \\return 0 on success < 0 on error.\n\n You should connect to the process event and use pw_stream_dequeue_buffer()\n to get the latest metadata and data."]
4093 pub fn pw_stream_connect(
4094 stream: *mut pw_stream,
4095 direction: spa_direction,
4096 target_id: u32,
4097 flags: pw_stream_flags,
4098 params: *mut *const spa_pod,
4099 n_params: u32,
4100 ) -> ::std::os::raw::c_int;
4101}
4102unsafe extern "C" {
4103 #[doc = " Get the node ID of the stream.\n \\return node ID."]
4104 pub fn pw_stream_get_node_id(stream: *mut pw_stream) -> u32;
4105}
4106unsafe extern "C" {
4107 #[doc = " Disconnect \\a stream"]
4108 pub fn pw_stream_disconnect(stream: *mut pw_stream) -> ::std::os::raw::c_int;
4109}
4110unsafe extern "C" {
4111 #[doc = " Set the stream in error state"]
4112 pub fn pw_stream_set_error(
4113 stream: *mut pw_stream,
4114 res: ::std::os::raw::c_int,
4115 error: *const ::std::os::raw::c_char,
4116 ...
4117 ) -> ::std::os::raw::c_int;
4118}
4119unsafe extern "C" {
4120 #[doc = " Update the param exposed on the stream."]
4121 pub fn pw_stream_update_params(
4122 stream: *mut pw_stream,
4123 params: *mut *const spa_pod,
4124 n_params: u32,
4125 ) -> ::std::os::raw::c_int;
4126}
4127unsafe extern "C" {
4128 #[doc = " Set a parameter on the stream. This is like pw_stream_set_control() but with\n a complete spa_pod param. It can also be called from the param_changed event handler\n to intercept and modify the param for the adapter. Since 0.3.70"]
4129 pub fn pw_stream_set_param(
4130 stream: *mut pw_stream,
4131 id: u32,
4132 param: *const spa_pod,
4133 ) -> ::std::os::raw::c_int;
4134}
4135unsafe extern "C" {
4136 #[doc = " Get control values"]
4137 pub fn pw_stream_get_control(stream: *mut pw_stream, id: u32) -> *const pw_stream_control;
4138}
4139unsafe extern "C" {
4140 #[doc = " Set control values"]
4141 pub fn pw_stream_set_control(
4142 stream: *mut pw_stream,
4143 id: u32,
4144 n_values: u32,
4145 values: *mut f32,
4146 ...
4147 ) -> ::std::os::raw::c_int;
4148}
4149unsafe extern "C" {
4150 #[doc = " Query the time on the stream, RT safe"]
4151 pub fn pw_stream_get_time_n(
4152 stream: *mut pw_stream,
4153 time: *mut pw_time,
4154 size: usize,
4155 ) -> ::std::os::raw::c_int;
4156}
4157unsafe extern "C" {
4158 #[doc = " Get the current time in nanoseconds. This value can be compared with\n the \\ref pw_time.now value. RT safe. Since 1.1.0"]
4159 pub fn pw_stream_get_nsec(stream: *mut pw_stream) -> u64;
4160}
4161unsafe extern "C" {
4162 #[doc = " Get the data loop that is doing the processing of this stream. This loop\n is assigned after pw_stream_connect(). * Since 1.1.0"]
4163 pub fn pw_stream_get_data_loop(stream: *mut pw_stream) -> *mut pw_loop;
4164}
4165unsafe extern "C" {
4166 #[doc = " Query the time on the stream, deprecated since 0.3.50,\n use pw_stream_get_time_n() to get the fields added since 0.3.50. RT safe."]
4167 pub fn pw_stream_get_time(stream: *mut pw_stream, time: *mut pw_time) -> ::std::os::raw::c_int;
4168}
4169unsafe extern "C" {
4170 #[doc = " Get a buffer that can be filled for playback streams or consumed\n for capture streams. RT safe."]
4171 pub fn pw_stream_dequeue_buffer(stream: *mut pw_stream) -> *mut pw_buffer;
4172}
4173unsafe extern "C" {
4174 #[doc = " Submit a buffer for playback or recycle a buffer for capture. RT safe."]
4175 pub fn pw_stream_queue_buffer(
4176 stream: *mut pw_stream,
4177 buffer: *mut pw_buffer,
4178 ) -> ::std::os::raw::c_int;
4179}
4180unsafe extern "C" {
4181 #[doc = " Return a buffer to the queue without using it. This makes the buffer\n immediately available to dequeue again. RT safe."]
4182 pub fn pw_stream_return_buffer(
4183 stream: *mut pw_stream,
4184 buffer: *mut pw_buffer,
4185 ) -> ::std::os::raw::c_int;
4186}
4187unsafe extern "C" {
4188 #[doc = " Activate or deactivate the stream"]
4189 pub fn pw_stream_set_active(stream: *mut pw_stream, active: bool) -> ::std::os::raw::c_int;
4190}
4191unsafe extern "C" {
4192 #[doc = " Flush a stream. When \\a drain is true, the drained callback will\n be called when all data is played or recorded. The stream can be resumed\n after the drain by setting it active again with\n \\ref pw_stream_set_active(). A flush without a drain is mostly useful afer\n a state change to PAUSED, to flush any remaining data from the queues and\n the converters. RT safe."]
4193 pub fn pw_stream_flush(stream: *mut pw_stream, drain: bool) -> ::std::os::raw::c_int;
4194}
4195unsafe extern "C" {
4196 #[doc = " Check if the stream is driving. The stream needs to have the\n PW_STREAM_FLAG_DRIVER set. When the stream is driving,\n pw_stream_trigger_process() needs to be called when data is\n available (output) or needed (input). Since 0.3.34"]
4197 pub fn pw_stream_is_driving(stream: *mut pw_stream) -> bool;
4198}
4199unsafe extern "C" {
4200 #[doc = " Check if the graph is using lazy scheduling. If the stream is\n driving according to \\ref pw_stream_is_driving(), then it should\n consider taking into account the RequestProcess commands when\n driving the graph.\n\n If the stream is not driving, it should send out RequestProcess\n events with \\ref pw_stream_emit_event() or indirectly with\n \\ref pw_stream_trigger_process() to suggest a new graph cycle\n to the driver.\n\n It is not a requirement that all RequestProcess events/commands\n need to start a graph cycle.\n Since 1.4.0"]
4201 pub fn pw_stream_is_lazy(stream: *mut pw_stream) -> bool;
4202}
4203unsafe extern "C" {
4204 #[doc = " Trigger a push/pull on the stream. One iteration of the graph will\n be scheduled when the stream is driving according to\n \\ref pw_stream_is_driving(). If it successfully finishes, process()\n will be called and the trigger_done event will be emitted. It is\n possible for the graph iteration to not finish, so\n pw_stream_trigger_process() needs to be called again even if process()\n and trigger_done is not called.\n\n If there is a deadline after which the stream will have xrun,\n pw_stream_trigger_process() should be called then, whether or not\n process()/trigger_done has been called. Sound hardware will xrun if\n there is any delay in audio processing, so the ALSA plugin triggers the\n graph every quantum to ensure audio keeps flowing. Drivers that\n do not have a deadline, such as the freewheel driver, should\n use a timeout to ensure that forward progress keeps being made.\n A reasonable choice of deadline is three times the quantum: if\n the graph is taking 3x longer than normal, it is likely that it\n is hung and should be retriggered.\n\n Streams that are not drivers according to \\ref pw_stream_is_driving()\n can also call this method. The result is that a RequestProcess event\n is sent to the driver. If the graph is lazy scheduling according to\n \\ref pw_stream_is_lazy(), this might result in a graph cycle by the\n driver. If the graph is not lazy scheduling and the stream is not a\n driver, this method will have no effect.\n\n RT safe.\n\n Since 0.3.34"]
4205 pub fn pw_stream_trigger_process(stream: *mut pw_stream) -> ::std::os::raw::c_int;
4206}
4207unsafe extern "C" {
4208 #[doc = " Emit an event from this stream. RT safe.\n Since 1.2.6"]
4209 pub fn pw_stream_emit_event(
4210 stream: *mut pw_stream,
4211 event: *const spa_event,
4212 ) -> ::std::os::raw::c_int;
4213}
4214unsafe extern "C" {
4215 #[doc = " Adjust the rate of the stream.\n When the stream is using an adaptive resampler, adjust the resampler rate.\n When there is no resampler, -ENOTSUP is returned. Activating the adaptive\n resampler will add a small amount of delay to the samples, you can deactivate\n it again by setting a value <= 0.0. RT safe.\n Since 1.4.0"]
4216 pub fn pw_stream_set_rate(stream: *mut pw_stream, rate: f64) -> ::std::os::raw::c_int;
4217}
4218#[doc = " \\addtogroup pw_filter\n \\{"]
4219#[repr(C)]
4220#[derive(Debug, Copy, Clone)]
4221pub struct pw_filter {
4222 _unused: [u8; 0],
4223}
4224#[doc = "< the stream is in error"]
4225pub const pw_filter_state_PW_FILTER_STATE_ERROR: pw_filter_state = -1;
4226#[doc = "< unconnected"]
4227pub const pw_filter_state_PW_FILTER_STATE_UNCONNECTED: pw_filter_state = 0;
4228#[doc = "< connection is in progress"]
4229pub const pw_filter_state_PW_FILTER_STATE_CONNECTING: pw_filter_state = 1;
4230#[doc = "< filter is connected and paused"]
4231pub const pw_filter_state_PW_FILTER_STATE_PAUSED: pw_filter_state = 2;
4232#[doc = "< filter is streaming"]
4233pub const pw_filter_state_PW_FILTER_STATE_STREAMING: pw_filter_state = 3;
4234#[doc = " \\enum pw_filter_state The state of a filter"]
4235pub type pw_filter_state = ::std::os::raw::c_int;
4236#[doc = " Events for a filter. These events are always called from the mainloop\n unless explicitly documented otherwise."]
4237#[repr(C)]
4238#[derive(Debug, Copy, Clone)]
4239pub struct pw_filter_events {
4240 pub version: u32,
4241 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
4242 #[doc = " when the filter state changes. Since 1.4 this also sets errno when the\n new state is PW_FILTER_STATE_ERROR"]
4243 pub state_changed: ::std::option::Option<
4244 unsafe extern "C" fn(
4245 data: *mut ::std::os::raw::c_void,
4246 old: pw_filter_state,
4247 state: pw_filter_state,
4248 error: *const ::std::os::raw::c_char,
4249 ),
4250 >,
4251 #[doc = " when io changed on a port of the filter (when port_data is NULL)."]
4252 pub io_changed: ::std::option::Option<
4253 unsafe extern "C" fn(
4254 data: *mut ::std::os::raw::c_void,
4255 port_data: *mut ::std::os::raw::c_void,
4256 id: u32,
4257 area: *mut ::std::os::raw::c_void,
4258 size: u32,
4259 ),
4260 >,
4261 #[doc = " when a parameter changed on a port of the filter (when port_data is NULL)."]
4262 pub param_changed: ::std::option::Option<
4263 unsafe extern "C" fn(
4264 data: *mut ::std::os::raw::c_void,
4265 port_data: *mut ::std::os::raw::c_void,
4266 id: u32,
4267 param: *const spa_pod,
4268 ),
4269 >,
4270 #[doc = " when a new buffer was created for a port"]
4271 pub add_buffer: ::std::option::Option<
4272 unsafe extern "C" fn(
4273 data: *mut ::std::os::raw::c_void,
4274 port_data: *mut ::std::os::raw::c_void,
4275 buffer: *mut pw_buffer,
4276 ),
4277 >,
4278 #[doc = " when a buffer was destroyed for a port"]
4279 pub remove_buffer: ::std::option::Option<
4280 unsafe extern "C" fn(
4281 data: *mut ::std::os::raw::c_void,
4282 port_data: *mut ::std::os::raw::c_void,
4283 buffer: *mut pw_buffer,
4284 ),
4285 >,
4286 #[doc = " do processing. This is normally called from the\n mainloop but can also be called directly from the realtime data\n thread if the user is prepared to deal with this with the\n PW_FILTER_FLAG_RT_PROCESS. Only call methods marked with RT safe\n from this event when called from the realtime thread."]
4287 pub process: ::std::option::Option<
4288 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, position: *mut spa_io_position),
4289 >,
4290 #[doc = " The filter is drained"]
4291 pub drained: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
4292 #[doc = " A command notify, Since 0.3.39:1"]
4293 pub command: ::std::option::Option<
4294 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, command: *const spa_command),
4295 >,
4296}
4297#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4298const _: () = {
4299 ["Size of pw_filter_events"][::std::mem::size_of::<pw_filter_events>() - 80usize];
4300 ["Alignment of pw_filter_events"][::std::mem::align_of::<pw_filter_events>() - 8usize];
4301 ["Offset of field: pw_filter_events::version"]
4302 [::std::mem::offset_of!(pw_filter_events, version) - 0usize];
4303 ["Offset of field: pw_filter_events::destroy"]
4304 [::std::mem::offset_of!(pw_filter_events, destroy) - 8usize];
4305 ["Offset of field: pw_filter_events::state_changed"]
4306 [::std::mem::offset_of!(pw_filter_events, state_changed) - 16usize];
4307 ["Offset of field: pw_filter_events::io_changed"]
4308 [::std::mem::offset_of!(pw_filter_events, io_changed) - 24usize];
4309 ["Offset of field: pw_filter_events::param_changed"]
4310 [::std::mem::offset_of!(pw_filter_events, param_changed) - 32usize];
4311 ["Offset of field: pw_filter_events::add_buffer"]
4312 [::std::mem::offset_of!(pw_filter_events, add_buffer) - 40usize];
4313 ["Offset of field: pw_filter_events::remove_buffer"]
4314 [::std::mem::offset_of!(pw_filter_events, remove_buffer) - 48usize];
4315 ["Offset of field: pw_filter_events::process"]
4316 [::std::mem::offset_of!(pw_filter_events, process) - 56usize];
4317 ["Offset of field: pw_filter_events::drained"]
4318 [::std::mem::offset_of!(pw_filter_events, drained) - 64usize];
4319 ["Offset of field: pw_filter_events::command"]
4320 [::std::mem::offset_of!(pw_filter_events, command) - 72usize];
4321};
4322unsafe extern "C" {
4323 #[doc = " Convert a filter state to a readable string"]
4324 pub fn pw_filter_state_as_string(state: pw_filter_state) -> *const ::std::os::raw::c_char;
4325}
4326#[doc = "< no flags"]
4327pub const pw_filter_flags_PW_FILTER_FLAG_NONE: pw_filter_flags = 0;
4328#[doc = "< start the filter inactive,\n pw_filter_set_active() needs to be\n called explicitly"]
4329pub const pw_filter_flags_PW_FILTER_FLAG_INACTIVE: pw_filter_flags = 1;
4330#[doc = "< be a driver"]
4331pub const pw_filter_flags_PW_FILTER_FLAG_DRIVER: pw_filter_flags = 2;
4332#[doc = "< call process from the realtime\n thread. Only call methods marked as\n RT safe."]
4333pub const pw_filter_flags_PW_FILTER_FLAG_RT_PROCESS: pw_filter_flags = 4;
4334#[doc = "< don't call the default latency algorithm\n but emit the param_changed event for the\n ports when Latency params are received."]
4335pub const pw_filter_flags_PW_FILTER_FLAG_CUSTOM_LATENCY: pw_filter_flags = 8;
4336#[doc = "< the filter will not be scheduled\n automatically but _trigger_process()\n needs to be called. This can be used\n when the filter depends on processing\n of other filters."]
4337pub const pw_filter_flags_PW_FILTER_FLAG_TRIGGER: pw_filter_flags = 16;
4338#[doc = "< Buffers will not be dequeued/queued from\n the realtime process() function. This is\n assumed when RT_PROCESS is unset but can\n also be the case when the process() function\n does a trigger_process() that will then\n dequeue/queue a buffer from another process()\n function. since 0.3.73"]
4339pub const pw_filter_flags_PW_FILTER_FLAG_ASYNC: pw_filter_flags = 32;
4340#[doc = " \\enum pw_filter_flags Extra flags that can be used in \\ref pw_filter_connect()"]
4341pub type pw_filter_flags = ::std::os::raw::c_uint;
4342#[doc = "< no flags"]
4343pub const pw_filter_port_flags_PW_FILTER_PORT_FLAG_NONE: pw_filter_port_flags = 0;
4344#[doc = "< mmap the buffers except DmaBuf that is not\n explicitly marked as mappable."]
4345pub const pw_filter_port_flags_PW_FILTER_PORT_FLAG_MAP_BUFFERS: pw_filter_port_flags = 1;
4346#[doc = "< the application will allocate buffer\n memory. In the add_buffer event, the\n data of the buffer should be set"]
4347pub const pw_filter_port_flags_PW_FILTER_PORT_FLAG_ALLOC_BUFFERS: pw_filter_port_flags = 2;
4348pub type pw_filter_port_flags = ::std::os::raw::c_uint;
4349unsafe extern "C" {
4350 #[doc = " Create a new unconnected \\ref pw_filter\n \\return a newly allocated \\ref pw_filter"]
4351 pub fn pw_filter_new(
4352 core: *mut pw_core,
4353 name: *const ::std::os::raw::c_char,
4354 props: *mut pw_properties,
4355 ) -> *mut pw_filter;
4356}
4357unsafe extern "C" {
4358 pub fn pw_filter_new_simple(
4359 loop_: *mut pw_loop,
4360 name: *const ::std::os::raw::c_char,
4361 props: *mut pw_properties,
4362 events: *const pw_filter_events,
4363 data: *mut ::std::os::raw::c_void,
4364 ) -> *mut pw_filter;
4365}
4366unsafe extern "C" {
4367 #[doc = " Destroy a filter"]
4368 pub fn pw_filter_destroy(filter: *mut pw_filter);
4369}
4370unsafe extern "C" {
4371 pub fn pw_filter_add_listener(
4372 filter: *mut pw_filter,
4373 listener: *mut spa_hook,
4374 events: *const pw_filter_events,
4375 data: *mut ::std::os::raw::c_void,
4376 );
4377}
4378unsafe extern "C" {
4379 #[doc = " Get the current filter state. Since 1.4 this also sets errno when the\n state is PW_FILTER_STATE_ERROR"]
4380 pub fn pw_filter_get_state(
4381 filter: *mut pw_filter,
4382 error: *mut *const ::std::os::raw::c_char,
4383 ) -> pw_filter_state;
4384}
4385unsafe extern "C" {
4386 pub fn pw_filter_get_name(filter: *mut pw_filter) -> *const ::std::os::raw::c_char;
4387}
4388unsafe extern "C" {
4389 pub fn pw_filter_get_core(filter: *mut pw_filter) -> *mut pw_core;
4390}
4391unsafe extern "C" {
4392 #[doc = " Connect a filter for processing.\n \\return 0 on success < 0 on error.\n\n You should connect to the process event and use pw_filter_dequeue_buffer()\n to get the latest metadata and data."]
4393 pub fn pw_filter_connect(
4394 filter: *mut pw_filter,
4395 flags: pw_filter_flags,
4396 params: *mut *const spa_pod,
4397 n_params: u32,
4398 ) -> ::std::os::raw::c_int;
4399}
4400unsafe extern "C" {
4401 #[doc = " Get the node ID of the filter.\n \\return node ID."]
4402 pub fn pw_filter_get_node_id(filter: *mut pw_filter) -> u32;
4403}
4404unsafe extern "C" {
4405 #[doc = " Disconnect \\a filter"]
4406 pub fn pw_filter_disconnect(filter: *mut pw_filter) -> ::std::os::raw::c_int;
4407}
4408unsafe extern "C" {
4409 #[doc = " add a port to the filter, returns user data of port_data_size."]
4410 pub fn pw_filter_add_port(
4411 filter: *mut pw_filter,
4412 direction: spa_direction,
4413 flags: pw_filter_port_flags,
4414 port_data_size: usize,
4415 props: *mut pw_properties,
4416 params: *mut *const spa_pod,
4417 n_params: u32,
4418 ) -> *mut ::std::os::raw::c_void;
4419}
4420unsafe extern "C" {
4421 #[doc = " remove a port from the filter"]
4422 pub fn pw_filter_remove_port(port_data: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int;
4423}
4424unsafe extern "C" {
4425 #[doc = " get properties, port_data of NULL will give global properties"]
4426 pub fn pw_filter_get_properties(
4427 filter: *mut pw_filter,
4428 port_data: *mut ::std::os::raw::c_void,
4429 ) -> *const pw_properties;
4430}
4431unsafe extern "C" {
4432 #[doc = " Update properties, use NULL port_data for global filter properties"]
4433 pub fn pw_filter_update_properties(
4434 filter: *mut pw_filter,
4435 port_data: *mut ::std::os::raw::c_void,
4436 dict: *const spa_dict,
4437 ) -> ::std::os::raw::c_int;
4438}
4439unsafe extern "C" {
4440 #[doc = " Set the filter in error state"]
4441 pub fn pw_filter_set_error(
4442 filter: *mut pw_filter,
4443 res: ::std::os::raw::c_int,
4444 error: *const ::std::os::raw::c_char,
4445 ...
4446 ) -> ::std::os::raw::c_int;
4447}
4448unsafe extern "C" {
4449 #[doc = " Update params, use NULL port_data for global filter params"]
4450 pub fn pw_filter_update_params(
4451 filter: *mut pw_filter,
4452 port_data: *mut ::std::os::raw::c_void,
4453 params: *mut *const spa_pod,
4454 n_params: u32,
4455 ) -> ::std::os::raw::c_int;
4456}
4457unsafe extern "C" {
4458 #[doc = " Query the time on the filter, deprecated, use the spa_io_position in the\n process() method for timing information. RT safe."]
4459 pub fn pw_filter_get_time(filter: *mut pw_filter, time: *mut pw_time) -> ::std::os::raw::c_int;
4460}
4461unsafe extern "C" {
4462 #[doc = " Get the current time in nanoseconds. This value can be compared with\n the nsec value in the spa_io_position. RT safe. Since 1.1.0"]
4463 pub fn pw_filter_get_nsec(filter: *mut pw_filter) -> u64;
4464}
4465unsafe extern "C" {
4466 #[doc = " Get the data loop that is doing the processing of this filter. This loop\n is assigned after pw_filter_connect(). Since 1.1.0"]
4467 pub fn pw_filter_get_data_loop(filter: *mut pw_filter) -> *mut pw_loop;
4468}
4469unsafe extern "C" {
4470 #[doc = " Get a buffer that can be filled for output ports or consumed\n for input ports. RT safe."]
4471 pub fn pw_filter_dequeue_buffer(port_data: *mut ::std::os::raw::c_void) -> *mut pw_buffer;
4472}
4473unsafe extern "C" {
4474 #[doc = " Submit a buffer for playback or recycle a buffer for capture. RT safe."]
4475 pub fn pw_filter_queue_buffer(
4476 port_data: *mut ::std::os::raw::c_void,
4477 buffer: *mut pw_buffer,
4478 ) -> ::std::os::raw::c_int;
4479}
4480unsafe extern "C" {
4481 #[doc = " Get a data pointer to the buffer data. RT safe."]
4482 pub fn pw_filter_get_dsp_buffer(
4483 port_data: *mut ::std::os::raw::c_void,
4484 n_samples: u32,
4485 ) -> *mut ::std::os::raw::c_void;
4486}
4487unsafe extern "C" {
4488 #[doc = " Activate or deactivate the filter"]
4489 pub fn pw_filter_set_active(filter: *mut pw_filter, active: bool) -> ::std::os::raw::c_int;
4490}
4491unsafe extern "C" {
4492 #[doc = " Flush a filter. When \\a drain is true, the drained callback will\n be called when all data is played or recorded. The filter can be resumed\n after the drain by setting it active again with\n \\ref pw_filter_set_active(). A flush without a drain is mostly useful afer\n a state change to PAUSED, to flush any remaining data from the queues.\n RT safe."]
4493 pub fn pw_filter_flush(filter: *mut pw_filter, drain: bool) -> ::std::os::raw::c_int;
4494}
4495unsafe extern "C" {
4496 #[doc = " Check if the filter is driving. The filter needs to have the\n PW_FILTER_FLAG_DRIVER set. When the filter is driving,\n pw_filter_trigger_process() needs to be called when data is\n available (output) or needed (input). Since 0.3.66"]
4497 pub fn pw_filter_is_driving(filter: *mut pw_filter) -> bool;
4498}
4499unsafe extern "C" {
4500 #[doc = " Check if the graph is using lazy scheduling.\n Since 1.4.0"]
4501 pub fn pw_filter_is_lazy(filter: *mut pw_filter) -> bool;
4502}
4503unsafe extern "C" {
4504 #[doc = " Trigger a push/pull on the filter. One iteration of the graph will\n be scheduled and process() will be called. RT safe. Since 0.3.66"]
4505 pub fn pw_filter_trigger_process(filter: *mut pw_filter) -> ::std::os::raw::c_int;
4506}
4507unsafe extern "C" {
4508 #[doc = " Emit an event from this filter. RT safe.\n Since 1.2.6"]
4509 pub fn pw_filter_emit_event(
4510 filter: *mut pw_filter,
4511 event: *const spa_event,
4512 ) -> ::std::os::raw::c_int;
4513}
4514#[doc = " \\addtogroup pw_thread_loop\n \\{"]
4515#[repr(C)]
4516#[derive(Debug, Copy, Clone)]
4517pub struct pw_thread_loop {
4518 _unused: [u8; 0],
4519}
4520#[doc = " Thread loop events"]
4521#[repr(C)]
4522#[derive(Debug, Copy, Clone)]
4523pub struct pw_thread_loop_events {
4524 pub version: u32,
4525 #[doc = " the loop is destroyed"]
4526 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
4527}
4528#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4529const _: () = {
4530 ["Size of pw_thread_loop_events"][::std::mem::size_of::<pw_thread_loop_events>() - 16usize];
4531 ["Alignment of pw_thread_loop_events"]
4532 [::std::mem::align_of::<pw_thread_loop_events>() - 8usize];
4533 ["Offset of field: pw_thread_loop_events::version"]
4534 [::std::mem::offset_of!(pw_thread_loop_events, version) - 0usize];
4535 ["Offset of field: pw_thread_loop_events::destroy"]
4536 [::std::mem::offset_of!(pw_thread_loop_events, destroy) - 8usize];
4537};
4538unsafe extern "C" {
4539 #[doc = " Make a new thread loop with the given name and optional properties."]
4540 pub fn pw_thread_loop_new(
4541 name: *const ::std::os::raw::c_char,
4542 props: *const spa_dict,
4543 ) -> *mut pw_thread_loop;
4544}
4545unsafe extern "C" {
4546 #[doc = " Make a new thread loop with the given loop, name and optional properties.\n When \\a loop is NULL, a new loop will be created."]
4547 pub fn pw_thread_loop_new_full(
4548 loop_: *mut pw_loop,
4549 name: *const ::std::os::raw::c_char,
4550 props: *const spa_dict,
4551 ) -> *mut pw_thread_loop;
4552}
4553unsafe extern "C" {
4554 #[doc = " Destroy a thread loop"]
4555 pub fn pw_thread_loop_destroy(loop_: *mut pw_thread_loop);
4556}
4557unsafe extern "C" {
4558 #[doc = " Add an event listener"]
4559 pub fn pw_thread_loop_add_listener(
4560 loop_: *mut pw_thread_loop,
4561 listener: *mut spa_hook,
4562 events: *const pw_thread_loop_events,
4563 data: *mut ::std::os::raw::c_void,
4564 );
4565}
4566unsafe extern "C" {
4567 #[doc = " Get the loop implementation of the thread loop"]
4568 pub fn pw_thread_loop_get_loop(loop_: *mut pw_thread_loop) -> *mut pw_loop;
4569}
4570unsafe extern "C" {
4571 #[doc = " Start the thread loop"]
4572 pub fn pw_thread_loop_start(loop_: *mut pw_thread_loop) -> ::std::os::raw::c_int;
4573}
4574unsafe extern "C" {
4575 #[doc = " Stop the thread loop"]
4576 pub fn pw_thread_loop_stop(loop_: *mut pw_thread_loop);
4577}
4578unsafe extern "C" {
4579 #[doc = " Lock the loop. This ensures exclusive ownership of the loop"]
4580 pub fn pw_thread_loop_lock(loop_: *mut pw_thread_loop);
4581}
4582unsafe extern "C" {
4583 #[doc = " Unlock the loop"]
4584 pub fn pw_thread_loop_unlock(loop_: *mut pw_thread_loop);
4585}
4586unsafe extern "C" {
4587 #[doc = " Release the lock and wait until some thread calls \\ref pw_thread_loop_signal"]
4588 pub fn pw_thread_loop_wait(loop_: *mut pw_thread_loop);
4589}
4590unsafe extern "C" {
4591 #[doc = " Release the lock and wait a maximum of 'wait_max_sec' seconds\n until some thread calls \\ref pw_thread_loop_signal or time out"]
4592 pub fn pw_thread_loop_timed_wait(
4593 loop_: *mut pw_thread_loop,
4594 wait_max_sec: ::std::os::raw::c_int,
4595 ) -> ::std::os::raw::c_int;
4596}
4597unsafe extern "C" {
4598 #[doc = " Get a struct timespec suitable for \\ref pw_thread_loop_timed_wait_full.\n Since: 0.3.7"]
4599 pub fn pw_thread_loop_get_time(
4600 loop_: *mut pw_thread_loop,
4601 abstime: *mut timespec,
4602 timeout: i64,
4603 ) -> ::std::os::raw::c_int;
4604}
4605unsafe extern "C" {
4606 #[doc = " Release the lock and wait up to \\a abstime until some thread calls\n \\ref pw_thread_loop_signal. Use \\ref pw_thread_loop_get_time to make a timeout.\n Since: 0.3.7"]
4607 pub fn pw_thread_loop_timed_wait_full(
4608 loop_: *mut pw_thread_loop,
4609 abstime: *const timespec,
4610 ) -> ::std::os::raw::c_int;
4611}
4612unsafe extern "C" {
4613 #[doc = " Signal all threads waiting with \\ref pw_thread_loop_wait"]
4614 pub fn pw_thread_loop_signal(loop_: *mut pw_thread_loop, wait_for_accept: bool);
4615}
4616unsafe extern "C" {
4617 #[doc = " Signal all threads executing \\ref pw_thread_loop_signal with wait_for_accept"]
4618 pub fn pw_thread_loop_accept(loop_: *mut pw_thread_loop);
4619}
4620unsafe extern "C" {
4621 #[doc = " Check if inside the thread"]
4622 pub fn pw_thread_loop_in_thread(loop_: *mut pw_thread_loop) -> bool;
4623}
4624#[doc = " Loop events, use \\ref pw_data_loop_add_listener to add a listener"]
4625#[repr(C)]
4626#[derive(Debug, Copy, Clone)]
4627pub struct pw_data_loop_events {
4628 pub version: u32,
4629 #[doc = " The loop is destroyed"]
4630 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
4631}
4632#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4633const _: () = {
4634 ["Size of pw_data_loop_events"][::std::mem::size_of::<pw_data_loop_events>() - 16usize];
4635 ["Alignment of pw_data_loop_events"][::std::mem::align_of::<pw_data_loop_events>() - 8usize];
4636 ["Offset of field: pw_data_loop_events::version"]
4637 [::std::mem::offset_of!(pw_data_loop_events, version) - 0usize];
4638 ["Offset of field: pw_data_loop_events::destroy"]
4639 [::std::mem::offset_of!(pw_data_loop_events, destroy) - 8usize];
4640};
4641unsafe extern "C" {
4642 #[doc = " Make a new loop."]
4643 pub fn pw_data_loop_new(props: *const spa_dict) -> *mut pw_data_loop;
4644}
4645unsafe extern "C" {
4646 #[doc = " Add an event listener to loop"]
4647 pub fn pw_data_loop_add_listener(
4648 loop_: *mut pw_data_loop,
4649 listener: *mut spa_hook,
4650 events: *const pw_data_loop_events,
4651 data: *mut ::std::os::raw::c_void,
4652 );
4653}
4654unsafe extern "C" {
4655 #[doc = " wait for activity on the loop up to \\a timeout milliseconds.\n Should be called from the loop function"]
4656 pub fn pw_data_loop_wait(
4657 loop_: *mut pw_data_loop,
4658 timeout: ::std::os::raw::c_int,
4659 ) -> ::std::os::raw::c_int;
4660}
4661unsafe extern "C" {
4662 #[doc = " make sure the thread will exit. Can be called from a loop callback"]
4663 pub fn pw_data_loop_exit(loop_: *mut pw_data_loop);
4664}
4665unsafe extern "C" {
4666 #[doc = " Get the loop implementation of this data loop"]
4667 pub fn pw_data_loop_get_loop(loop_: *mut pw_data_loop) -> *mut pw_loop;
4668}
4669unsafe extern "C" {
4670 #[doc = " Get the loop name. Since 1.1.0"]
4671 pub fn pw_data_loop_get_name(loop_: *mut pw_data_loop) -> *const ::std::os::raw::c_char;
4672}
4673unsafe extern "C" {
4674 #[doc = " Get the loop class. Since 1.1.0"]
4675 pub fn pw_data_loop_get_class(loop_: *mut pw_data_loop) -> *const ::std::os::raw::c_char;
4676}
4677unsafe extern "C" {
4678 #[doc = " Destroy the loop"]
4679 pub fn pw_data_loop_destroy(loop_: *mut pw_data_loop);
4680}
4681unsafe extern "C" {
4682 #[doc = " Start the processing thread"]
4683 pub fn pw_data_loop_start(loop_: *mut pw_data_loop) -> ::std::os::raw::c_int;
4684}
4685unsafe extern "C" {
4686 #[doc = " Stop the processing thread"]
4687 pub fn pw_data_loop_stop(loop_: *mut pw_data_loop) -> ::std::os::raw::c_int;
4688}
4689unsafe extern "C" {
4690 #[doc = " Check if the current thread is the processing thread.\n May be called from any thread."]
4691 pub fn pw_data_loop_in_thread(loop_: *mut pw_data_loop) -> bool;
4692}
4693unsafe extern "C" {
4694 #[doc = " Get the thread object"]
4695 pub fn pw_data_loop_get_thread(loop_: *mut pw_data_loop) -> *mut spa_thread;
4696}
4697unsafe extern "C" {
4698 #[doc = " invoke func in the context of the thread or in the caller thread when\n the loop is not running. May be called from the loop's thread, but otherwise\n can only be called by a single thread at a time.\n If called from the loop's thread, all callbacks previously queued with\n pw_data_loop_invoke() will be run synchronously, which might cause\n unexpected reentrancy problems.\n\n \\param[in] loop The loop to invoke func on.\n \\param func The function to be invoked.\n \\param seq A sequence number, opaque to PipeWire. This will be made\n available to func.\n \\param[in] data Data that will be copied into the internal ring buffer and made\n available to func. Because this data is copied, it is okay to\n pass a pointer to a local variable, but do not pass a pointer to\n an object that has identity.\n \\param size The size of data to copy.\n \\param block If \\true, do not return until func has been called. Otherwise,\n returns immediately. Passing \\true does not risk a deadlock because\n the data thread is never allowed to wait on any other thread.\n \\param user_data An opaque pointer passed to func.\n \\return `-EPIPE` if the internal ring buffer filled up,\n if block is \\false, 0 is returned when seq is SPA_ID_INVALID or the\n sequence number with the ASYNC bit set otherwise. When block is \\true,\n the return value of func is returned.\n\n Since 0.3.3"]
4699 pub fn pw_data_loop_invoke(
4700 loop_: *mut pw_data_loop,
4701 func: spa_invoke_func_t,
4702 seq: u32,
4703 data: *const ::std::os::raw::c_void,
4704 size: usize,
4705 block: bool,
4706 user_data: *mut ::std::os::raw::c_void,
4707 ) -> ::std::os::raw::c_int;
4708}
4709unsafe extern "C" {
4710 #[doc = " Set a custom spa_thread_utils for this loop. Setting NULL restores the\n system default implementation. Since 0.3.50"]
4711 pub fn pw_data_loop_set_thread_utils(loop_: *mut pw_data_loop, impl_: *mut spa_thread_utils);
4712}
4713unsafe extern "C" {
4714 #[doc = " Return the version of the library the current application is\n linked to."]
4715 pub fn pw_get_library_version() -> *const ::std::os::raw::c_char;
4716}
4717unsafe extern "C" {
4718 #[doc = " Return TRUE if the currently linked PipeWire library version is equal\n or newer than the specified version. Since 0.3.75"]
4719 pub fn pw_check_library_version(
4720 major: ::std::os::raw::c_int,
4721 minor: ::std::os::raw::c_int,
4722 micro: ::std::os::raw::c_int,
4723 ) -> bool;
4724}
4725unsafe extern "C" {
4726 #[doc = " \\addtogroup pw_pipewire\n \\{"]
4727 pub fn pw_init(argc: *mut ::std::os::raw::c_int, argv: *mut *mut *mut ::std::os::raw::c_char);
4728}
4729unsafe extern "C" {
4730 pub fn pw_deinit();
4731}
4732unsafe extern "C" {
4733 pub fn pw_debug_is_category_enabled(name: *const ::std::os::raw::c_char) -> bool;
4734}
4735unsafe extern "C" {
4736 pub fn pw_get_application_name() -> *const ::std::os::raw::c_char;
4737}
4738unsafe extern "C" {
4739 pub fn pw_get_prgname() -> *const ::std::os::raw::c_char;
4740}
4741unsafe extern "C" {
4742 pub fn pw_get_user_name() -> *const ::std::os::raw::c_char;
4743}
4744unsafe extern "C" {
4745 pub fn pw_get_host_name() -> *const ::std::os::raw::c_char;
4746}
4747unsafe extern "C" {
4748 pub fn pw_get_client_name() -> *const ::std::os::raw::c_char;
4749}
4750unsafe extern "C" {
4751 pub fn pw_check_option(
4752 option: *const ::std::os::raw::c_char,
4753 value: *const ::std::os::raw::c_char,
4754 ) -> bool;
4755}
4756unsafe extern "C" {
4757 pub fn pw_direction_reverse(direction: spa_direction) -> spa_direction;
4758}
4759unsafe extern "C" {
4760 pub fn pw_set_domain(domain: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
4761}
4762unsafe extern "C" {
4763 pub fn pw_get_domain() -> *const ::std::os::raw::c_char;
4764}
4765unsafe extern "C" {
4766 pub fn pw_get_support(support: *mut spa_support, max_support: u32) -> u32;
4767}
4768unsafe extern "C" {
4769 pub fn pw_load_spa_handle(
4770 lib: *const ::std::os::raw::c_char,
4771 factory_name: *const ::std::os::raw::c_char,
4772 info: *const spa_dict,
4773 n_support: u32,
4774 support: *const spa_support,
4775 ) -> *mut spa_handle;
4776}
4777unsafe extern "C" {
4778 pub fn pw_unload_spa_handle(handle: *mut spa_handle) -> ::std::os::raw::c_int;
4779}
4780#[repr(C)]
4781#[derive(Debug, Copy, Clone)]
4782pub struct pw_client_node {
4783 _unused: [u8; 0],
4784}
4785#[doc = " information about a buffer"]
4786#[repr(C)]
4787#[derive(Debug, Copy, Clone)]
4788pub struct pw_client_node_buffer {
4789 #[doc = "< the memory id for the metadata"]
4790 pub mem_id: u32,
4791 #[doc = "< offset in memory"]
4792 pub offset: u32,
4793 #[doc = "< size in memory"]
4794 pub size: u32,
4795 #[doc = "< buffer describing metadata and buffer memory"]
4796 pub buffer: *mut spa_buffer,
4797}
4798#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4799const _: () = {
4800 ["Size of pw_client_node_buffer"][::std::mem::size_of::<pw_client_node_buffer>() - 24usize];
4801 ["Alignment of pw_client_node_buffer"]
4802 [::std::mem::align_of::<pw_client_node_buffer>() - 8usize];
4803 ["Offset of field: pw_client_node_buffer::mem_id"]
4804 [::std::mem::offset_of!(pw_client_node_buffer, mem_id) - 0usize];
4805 ["Offset of field: pw_client_node_buffer::offset"]
4806 [::std::mem::offset_of!(pw_client_node_buffer, offset) - 4usize];
4807 ["Offset of field: pw_client_node_buffer::size"]
4808 [::std::mem::offset_of!(pw_client_node_buffer, size) - 8usize];
4809 ["Offset of field: pw_client_node_buffer::buffer"]
4810 [::std::mem::offset_of!(pw_client_node_buffer, buffer) - 16usize];
4811};
4812#[doc = " \\ref pw_client_node events"]
4813#[repr(C)]
4814#[derive(Debug, Copy, Clone)]
4815pub struct pw_client_node_events {
4816 pub version: u32,
4817 #[doc = " Notify of a new transport area\n\n The transport area is used to signal the client and the server.\n\n \\param readfd fd for signal data can be read\n \\param writefd fd for signal data can be written\n \\param mem_id id for activation memory\n \\param offset offset of activation memory\n \\param size size of activation memory"]
4818 pub transport: ::std::option::Option<
4819 unsafe extern "C" fn(
4820 data: *mut ::std::os::raw::c_void,
4821 readfd: ::std::os::raw::c_int,
4822 writefd: ::std::os::raw::c_int,
4823 mem_id: u32,
4824 offset: u32,
4825 size: u32,
4826 ) -> ::std::os::raw::c_int,
4827 >,
4828 #[doc = " Notify of a property change\n\n When the server configures the properties on the node\n this event is sent\n\n \\param id the id of the parameter\n \\param flags parameter flags\n \\param param the param to set"]
4829 pub set_param: ::std::option::Option<
4830 unsafe extern "C" fn(
4831 data: *mut ::std::os::raw::c_void,
4832 id: u32,
4833 flags: u32,
4834 param: *const spa_pod,
4835 ) -> ::std::os::raw::c_int,
4836 >,
4837 #[doc = " Configure an IO area for the client\n\n IO areas are identified with an id and are used to\n exchange state between client and server\n\n \\param id the id of the io area\n \\param mem_id the id of the memory to use\n \\param offset offset of io area in memory\n \\param size size of the io area"]
4838 pub set_io: ::std::option::Option<
4839 unsafe extern "C" fn(
4840 data: *mut ::std::os::raw::c_void,
4841 id: u32,
4842 mem_id: u32,
4843 offset: u32,
4844 size: u32,
4845 ) -> ::std::os::raw::c_int,
4846 >,
4847 #[doc = " Receive an event from the client node\n \\param event the received event"]
4848 pub event: ::std::option::Option<
4849 unsafe extern "C" fn(
4850 data: *mut ::std::os::raw::c_void,
4851 event: *const spa_event,
4852 ) -> ::std::os::raw::c_int,
4853 >,
4854 #[doc = " Notify of a new node command\n\n \\param command the command"]
4855 pub command: ::std::option::Option<
4856 unsafe extern "C" fn(
4857 data: *mut ::std::os::raw::c_void,
4858 command: *const spa_command,
4859 ) -> ::std::os::raw::c_int,
4860 >,
4861 #[doc = " A new port was added to the node\n\n The server can at any time add a port to the node when there\n are free ports available.\n\n \\param direction the direction of the port\n \\param port_id the new port id\n \\param props extra properties"]
4862 pub add_port: ::std::option::Option<
4863 unsafe extern "C" fn(
4864 data: *mut ::std::os::raw::c_void,
4865 direction: spa_direction,
4866 port_id: u32,
4867 props: *const spa_dict,
4868 ) -> ::std::os::raw::c_int,
4869 >,
4870 #[doc = " A port was removed from the node\n\n \\param direction a port direction\n \\param port_id the remove port id"]
4871 pub remove_port: ::std::option::Option<
4872 unsafe extern "C" fn(
4873 data: *mut ::std::os::raw::c_void,
4874 direction: spa_direction,
4875 port_id: u32,
4876 ) -> ::std::os::raw::c_int,
4877 >,
4878 #[doc = " A parameter was configured on the port\n\n \\param direction a port direction\n \\param port_id the port id\n \\param id the id of the parameter\n \\param flags flags used when setting the param\n \\param param the new param"]
4879 pub port_set_param: ::std::option::Option<
4880 unsafe extern "C" fn(
4881 data: *mut ::std::os::raw::c_void,
4882 direction: spa_direction,
4883 port_id: u32,
4884 id: u32,
4885 flags: u32,
4886 param: *const spa_pod,
4887 ) -> ::std::os::raw::c_int,
4888 >,
4889 #[doc = " Notify the port of buffers\n\n \\param direction a port direction\n \\param port_id the port id\n \\param mix_id the mixer port id\n \\param n_buffer the number of buffers\n \\param buffers and array of buffer descriptions"]
4890 pub port_use_buffers: ::std::option::Option<
4891 unsafe extern "C" fn(
4892 data: *mut ::std::os::raw::c_void,
4893 direction: spa_direction,
4894 port_id: u32,
4895 mix_id: u32,
4896 flags: u32,
4897 n_buffers: u32,
4898 buffers: *mut pw_client_node_buffer,
4899 ) -> ::std::os::raw::c_int,
4900 >,
4901 #[doc = " Configure the io area with \\a id of \\a port_id.\n\n \\param direction the direction of the port\n \\param port_id the port id\n \\param mix_id the mixer port id\n \\param id the id of the io area to set\n \\param mem_id the id of the memory to use\n \\param offset offset of io area in memory\n \\param size size of the io area"]
4902 pub port_set_io: ::std::option::Option<
4903 unsafe extern "C" fn(
4904 data: *mut ::std::os::raw::c_void,
4905 direction: spa_direction,
4906 port_id: u32,
4907 mix_id: u32,
4908 id: u32,
4909 mem_id: u32,
4910 offset: u32,
4911 size: u32,
4912 ) -> ::std::os::raw::c_int,
4913 >,
4914 #[doc = " Notify the activation record of the next\n node to trigger\n\n \\param node_id the peer node id\n \\param signalfd the fd to wake up the peer\n \\param mem_id the mem id of the memory\n \\param the offset in \\a mem_id to map\n \\param the size of \\a mem_id to map"]
4915 pub set_activation: ::std::option::Option<
4916 unsafe extern "C" fn(
4917 data: *mut ::std::os::raw::c_void,
4918 node_id: u32,
4919 signalfd: ::std::os::raw::c_int,
4920 mem_id: u32,
4921 offset: u32,
4922 size: u32,
4923 ) -> ::std::os::raw::c_int,
4924 >,
4925 #[doc = " Notify about the peer of mix_id\n\n \\param direction the direction of the port\n \\param port_id the port id\n \\param mix_id the mix id\n \\param peer_id the id of the peer port\n \\param props extra properties\n\n Since version 4:1"]
4926 pub port_set_mix_info: ::std::option::Option<
4927 unsafe extern "C" fn(
4928 data: *mut ::std::os::raw::c_void,
4929 direction: spa_direction,
4930 port_id: u32,
4931 mix_id: u32,
4932 peer_id: u32,
4933 props: *const spa_dict,
4934 ) -> ::std::os::raw::c_int,
4935 >,
4936}
4937#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4938const _: () = {
4939 ["Size of pw_client_node_events"][::std::mem::size_of::<pw_client_node_events>() - 104usize];
4940 ["Alignment of pw_client_node_events"]
4941 [::std::mem::align_of::<pw_client_node_events>() - 8usize];
4942 ["Offset of field: pw_client_node_events::version"]
4943 [::std::mem::offset_of!(pw_client_node_events, version) - 0usize];
4944 ["Offset of field: pw_client_node_events::transport"]
4945 [::std::mem::offset_of!(pw_client_node_events, transport) - 8usize];
4946 ["Offset of field: pw_client_node_events::set_param"]
4947 [::std::mem::offset_of!(pw_client_node_events, set_param) - 16usize];
4948 ["Offset of field: pw_client_node_events::set_io"]
4949 [::std::mem::offset_of!(pw_client_node_events, set_io) - 24usize];
4950 ["Offset of field: pw_client_node_events::event"]
4951 [::std::mem::offset_of!(pw_client_node_events, event) - 32usize];
4952 ["Offset of field: pw_client_node_events::command"]
4953 [::std::mem::offset_of!(pw_client_node_events, command) - 40usize];
4954 ["Offset of field: pw_client_node_events::add_port"]
4955 [::std::mem::offset_of!(pw_client_node_events, add_port) - 48usize];
4956 ["Offset of field: pw_client_node_events::remove_port"]
4957 [::std::mem::offset_of!(pw_client_node_events, remove_port) - 56usize];
4958 ["Offset of field: pw_client_node_events::port_set_param"]
4959 [::std::mem::offset_of!(pw_client_node_events, port_set_param) - 64usize];
4960 ["Offset of field: pw_client_node_events::port_use_buffers"]
4961 [::std::mem::offset_of!(pw_client_node_events, port_use_buffers) - 72usize];
4962 ["Offset of field: pw_client_node_events::port_set_io"]
4963 [::std::mem::offset_of!(pw_client_node_events, port_set_io) - 80usize];
4964 ["Offset of field: pw_client_node_events::set_activation"]
4965 [::std::mem::offset_of!(pw_client_node_events, set_activation) - 88usize];
4966 ["Offset of field: pw_client_node_events::port_set_mix_info"]
4967 [::std::mem::offset_of!(pw_client_node_events, port_set_mix_info) - 96usize];
4968};
4969#[doc = " \\ref pw_client_node methods"]
4970#[repr(C)]
4971#[derive(Debug, Copy, Clone)]
4972pub struct pw_client_node_methods {
4973 pub version: u32,
4974 pub add_listener: ::std::option::Option<
4975 unsafe extern "C" fn(
4976 object: *mut ::std::os::raw::c_void,
4977 listener: *mut spa_hook,
4978 events: *const pw_client_node_events,
4979 data: *mut ::std::os::raw::c_void,
4980 ) -> ::std::os::raw::c_int,
4981 >,
4982 #[doc = " get the node object"]
4983 pub get_node: ::std::option::Option<
4984 unsafe extern "C" fn(
4985 object: *mut ::std::os::raw::c_void,
4986 version: u32,
4987 user_data_size: usize,
4988 ) -> *mut pw_node,
4989 >,
4990 #[doc = " Update the node ports and properties\n\n Update the maximum number of ports and the params of the\n client node.\n \\param change_mask bitfield with changed parameters\n \\param max_input_ports new max input ports\n \\param max_output_ports new max output ports\n \\param params new params"]
4991 pub update: ::std::option::Option<
4992 unsafe extern "C" fn(
4993 object: *mut ::std::os::raw::c_void,
4994 change_mask: u32,
4995 n_params: u32,
4996 params: *mut *const spa_pod,
4997 info: *const spa_node_info,
4998 ) -> ::std::os::raw::c_int,
4999 >,
5000 #[doc = " Update a node port\n\n Update the information of one port of a node.\n \\param direction the direction of the port\n \\param port_id the port id to update\n \\param change_mask a bitfield of changed items\n \\param n_params number of port parameters\n \\param params array of port parameters\n \\param info port information"]
5001 pub port_update: ::std::option::Option<
5002 unsafe extern "C" fn(
5003 object: *mut ::std::os::raw::c_void,
5004 direction: spa_direction,
5005 port_id: u32,
5006 change_mask: u32,
5007 n_params: u32,
5008 params: *mut *const spa_pod,
5009 info: *const spa_port_info,
5010 ) -> ::std::os::raw::c_int,
5011 >,
5012 #[doc = " Activate or deactivate the node"]
5013 pub set_active: ::std::option::Option<
5014 unsafe extern "C" fn(
5015 object: *mut ::std::os::raw::c_void,
5016 active: bool,
5017 ) -> ::std::os::raw::c_int,
5018 >,
5019 #[doc = " Send an event to the node\n \\param event the event to send"]
5020 pub event: ::std::option::Option<
5021 unsafe extern "C" fn(
5022 object: *mut ::std::os::raw::c_void,
5023 event: *const spa_event,
5024 ) -> ::std::os::raw::c_int,
5025 >,
5026 #[doc = " Send allocated buffers"]
5027 pub port_buffers: ::std::option::Option<
5028 unsafe extern "C" fn(
5029 object: *mut ::std::os::raw::c_void,
5030 direction: spa_direction,
5031 port_id: u32,
5032 mix_id: u32,
5033 n_buffers: u32,
5034 buffers: *mut *mut spa_buffer,
5035 ) -> ::std::os::raw::c_int,
5036 >,
5037}
5038#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5039const _: () = {
5040 ["Size of pw_client_node_methods"][::std::mem::size_of::<pw_client_node_methods>() - 64usize];
5041 ["Alignment of pw_client_node_methods"]
5042 [::std::mem::align_of::<pw_client_node_methods>() - 8usize];
5043 ["Offset of field: pw_client_node_methods::version"]
5044 [::std::mem::offset_of!(pw_client_node_methods, version) - 0usize];
5045 ["Offset of field: pw_client_node_methods::add_listener"]
5046 [::std::mem::offset_of!(pw_client_node_methods, add_listener) - 8usize];
5047 ["Offset of field: pw_client_node_methods::get_node"]
5048 [::std::mem::offset_of!(pw_client_node_methods, get_node) - 16usize];
5049 ["Offset of field: pw_client_node_methods::update"]
5050 [::std::mem::offset_of!(pw_client_node_methods, update) - 24usize];
5051 ["Offset of field: pw_client_node_methods::port_update"]
5052 [::std::mem::offset_of!(pw_client_node_methods, port_update) - 32usize];
5053 ["Offset of field: pw_client_node_methods::set_active"]
5054 [::std::mem::offset_of!(pw_client_node_methods, set_active) - 40usize];
5055 ["Offset of field: pw_client_node_methods::event"]
5056 [::std::mem::offset_of!(pw_client_node_methods, event) - 48usize];
5057 ["Offset of field: pw_client_node_methods::port_buffers"]
5058 [::std::mem::offset_of!(pw_client_node_methods, port_buffers) - 56usize];
5059};
5060#[repr(C)]
5061#[derive(Debug, Copy, Clone)]
5062pub struct pw_metadata {
5063 _unused: [u8; 0],
5064}
5065#[doc = " \\ref pw_metadata events"]
5066#[repr(C)]
5067#[derive(Debug, Copy, Clone)]
5068pub struct pw_metadata_events {
5069 pub version: u32,
5070 pub property: ::std::option::Option<
5071 unsafe extern "C" fn(
5072 data: *mut ::std::os::raw::c_void,
5073 subject: u32,
5074 key: *const ::std::os::raw::c_char,
5075 type_: *const ::std::os::raw::c_char,
5076 value: *const ::std::os::raw::c_char,
5077 ) -> ::std::os::raw::c_int,
5078 >,
5079}
5080#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5081const _: () = {
5082 ["Size of pw_metadata_events"][::std::mem::size_of::<pw_metadata_events>() - 16usize];
5083 ["Alignment of pw_metadata_events"][::std::mem::align_of::<pw_metadata_events>() - 8usize];
5084 ["Offset of field: pw_metadata_events::version"]
5085 [::std::mem::offset_of!(pw_metadata_events, version) - 0usize];
5086 ["Offset of field: pw_metadata_events::property"]
5087 [::std::mem::offset_of!(pw_metadata_events, property) - 8usize];
5088};
5089#[doc = " \\ref pw_metadata methods"]
5090#[repr(C)]
5091#[derive(Debug, Copy, Clone)]
5092pub struct pw_metadata_methods {
5093 pub version: u32,
5094 pub add_listener: ::std::option::Option<
5095 unsafe extern "C" fn(
5096 object: *mut ::std::os::raw::c_void,
5097 listener: *mut spa_hook,
5098 events: *const pw_metadata_events,
5099 data: *mut ::std::os::raw::c_void,
5100 ) -> ::std::os::raw::c_int,
5101 >,
5102 #[doc = " Set a metadata property\n\n Automatically emit property events for the subject and key\n when they are changed.\n\n \\param subject the id of the global to associate the metadata\n with.\n \\param key the key of the metadata, NULL clears all metadata for\n the subject.\n \\param type the type of the metadata, this can be blank\n \\param value the metadata value. NULL clears the metadata.\n\n This requires X and W permissions on the metadata. It also\n requires M permissions on the subject global."]
5103 pub set_property: ::std::option::Option<
5104 unsafe extern "C" fn(
5105 object: *mut ::std::os::raw::c_void,
5106 subject: u32,
5107 key: *const ::std::os::raw::c_char,
5108 type_: *const ::std::os::raw::c_char,
5109 value: *const ::std::os::raw::c_char,
5110 ) -> ::std::os::raw::c_int,
5111 >,
5112 #[doc = " Clear all metadata\n\n This requires X and W permissions on the metadata."]
5113 pub clear: ::std::option::Option<
5114 unsafe extern "C" fn(object: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
5115 >,
5116}
5117#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5118const _: () = {
5119 ["Size of pw_metadata_methods"][::std::mem::size_of::<pw_metadata_methods>() - 32usize];
5120 ["Alignment of pw_metadata_methods"][::std::mem::align_of::<pw_metadata_methods>() - 8usize];
5121 ["Offset of field: pw_metadata_methods::version"]
5122 [::std::mem::offset_of!(pw_metadata_methods, version) - 0usize];
5123 ["Offset of field: pw_metadata_methods::add_listener"]
5124 [::std::mem::offset_of!(pw_metadata_methods, add_listener) - 8usize];
5125 ["Offset of field: pw_metadata_methods::set_property"]
5126 [::std::mem::offset_of!(pw_metadata_methods, set_property) - 16usize];
5127 ["Offset of field: pw_metadata_methods::clear"]
5128 [::std::mem::offset_of!(pw_metadata_methods, clear) - 24usize];
5129};
5130#[repr(C)]
5131#[derive(Debug, Copy, Clone)]
5132pub struct pw_profiler {
5133 _unused: [u8; 0],
5134}
5135#[doc = " \\ref pw_profiler events"]
5136#[repr(C)]
5137#[derive(Debug, Copy, Clone)]
5138pub struct pw_profiler_events {
5139 pub version: u32,
5140 pub profile: ::std::option::Option<
5141 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, pod: *const spa_pod),
5142 >,
5143}
5144#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5145const _: () = {
5146 ["Size of pw_profiler_events"][::std::mem::size_of::<pw_profiler_events>() - 16usize];
5147 ["Alignment of pw_profiler_events"][::std::mem::align_of::<pw_profiler_events>() - 8usize];
5148 ["Offset of field: pw_profiler_events::version"]
5149 [::std::mem::offset_of!(pw_profiler_events, version) - 0usize];
5150 ["Offset of field: pw_profiler_events::profile"]
5151 [::std::mem::offset_of!(pw_profiler_events, profile) - 8usize];
5152};
5153#[doc = " \\ref pw_profiler methods"]
5154#[repr(C)]
5155#[derive(Debug, Copy, Clone)]
5156pub struct pw_profiler_methods {
5157 pub version: u32,
5158 pub add_listener: ::std::option::Option<
5159 unsafe extern "C" fn(
5160 object: *mut ::std::os::raw::c_void,
5161 listener: *mut spa_hook,
5162 events: *const pw_profiler_events,
5163 data: *mut ::std::os::raw::c_void,
5164 ) -> ::std::os::raw::c_int,
5165 >,
5166}
5167#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5168const _: () = {
5169 ["Size of pw_profiler_methods"][::std::mem::size_of::<pw_profiler_methods>() - 16usize];
5170 ["Alignment of pw_profiler_methods"][::std::mem::align_of::<pw_profiler_methods>() - 8usize];
5171 ["Offset of field: pw_profiler_methods::version"]
5172 [::std::mem::offset_of!(pw_profiler_methods, version) - 0usize];
5173 ["Offset of field: pw_profiler_methods::add_listener"]
5174 [::std::mem::offset_of!(pw_profiler_methods, add_listener) - 8usize];
5175};
5176#[doc = " \\addtogroup pw_resource\n \\{"]
5177#[repr(C)]
5178#[derive(Debug, Copy, Clone)]
5179pub struct pw_resource {
5180 _unused: [u8; 0],
5181}
5182#[doc = " \\addtogroup pw_impl_module\n \\{"]
5183#[repr(C)]
5184#[derive(Debug, Copy, Clone)]
5185pub struct pw_impl_module {
5186 _unused: [u8; 0],
5187}
5188#[doc = " \\addtogroup pw_impl_port\n \\{"]
5189#[repr(C)]
5190#[derive(Debug, Copy, Clone)]
5191pub struct pw_impl_port {
5192 _unused: [u8; 0],
5193}
5194#[doc = " \\addtogroup pw_control\n \\{"]
5195#[repr(C)]
5196#[derive(Debug, Copy, Clone)]
5197pub struct pw_control {
5198 _unused: [u8; 0],
5199}
5200#[doc = " Port events, use \\ref pw_control_add_listener"]
5201#[repr(C)]
5202#[derive(Debug, Copy, Clone)]
5203pub struct pw_control_events {
5204 pub version: u32,
5205 #[doc = " The control is destroyed"]
5206 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5207 #[doc = " The control is freed"]
5208 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5209 #[doc = " control is linked to another control"]
5210 pub linked: ::std::option::Option<
5211 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, other: *mut pw_control),
5212 >,
5213 #[doc = " control is unlinked from another control"]
5214 pub unlinked: ::std::option::Option<
5215 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, other: *mut pw_control),
5216 >,
5217}
5218#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5219const _: () = {
5220 ["Size of pw_control_events"][::std::mem::size_of::<pw_control_events>() - 40usize];
5221 ["Alignment of pw_control_events"][::std::mem::align_of::<pw_control_events>() - 8usize];
5222 ["Offset of field: pw_control_events::version"]
5223 [::std::mem::offset_of!(pw_control_events, version) - 0usize];
5224 ["Offset of field: pw_control_events::destroy"]
5225 [::std::mem::offset_of!(pw_control_events, destroy) - 8usize];
5226 ["Offset of field: pw_control_events::free"]
5227 [::std::mem::offset_of!(pw_control_events, free) - 16usize];
5228 ["Offset of field: pw_control_events::linked"]
5229 [::std::mem::offset_of!(pw_control_events, linked) - 24usize];
5230 ["Offset of field: pw_control_events::unlinked"]
5231 [::std::mem::offset_of!(pw_control_events, unlinked) - 32usize];
5232};
5233unsafe extern "C" {
5234 #[doc = " Get the control parent port or NULL when not set"]
5235 pub fn pw_control_get_port(control: *mut pw_control) -> *mut pw_impl_port;
5236}
5237unsafe extern "C" {
5238 #[doc = " Add an event listener on the control. May be called multiple times.\n Each listener must be removed, but they may be removed in any order."]
5239 pub fn pw_control_add_listener(
5240 control: *mut pw_control,
5241 listener: *mut spa_hook,
5242 events: *const pw_control_events,
5243 data: *mut ::std::os::raw::c_void,
5244 );
5245}
5246#[doc = " \\addtogroup pw_impl_core\n \\{"]
5247#[repr(C)]
5248#[derive(Debug, Copy, Clone)]
5249pub struct pw_impl_core {
5250 _unused: [u8; 0],
5251}
5252#[doc = " Factory events, listen to them with \\ref pw_impl_core_add_listener"]
5253#[repr(C)]
5254#[derive(Debug, Copy, Clone)]
5255pub struct pw_impl_core_events {
5256 pub version: u32,
5257 #[doc = " the core is destroyed"]
5258 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5259 #[doc = " the core is freed"]
5260 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5261 #[doc = " the core is initialized"]
5262 pub initialized: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5263}
5264#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5265const _: () = {
5266 ["Size of pw_impl_core_events"][::std::mem::size_of::<pw_impl_core_events>() - 32usize];
5267 ["Alignment of pw_impl_core_events"][::std::mem::align_of::<pw_impl_core_events>() - 8usize];
5268 ["Offset of field: pw_impl_core_events::version"]
5269 [::std::mem::offset_of!(pw_impl_core_events, version) - 0usize];
5270 ["Offset of field: pw_impl_core_events::destroy"]
5271 [::std::mem::offset_of!(pw_impl_core_events, destroy) - 8usize];
5272 ["Offset of field: pw_impl_core_events::free"]
5273 [::std::mem::offset_of!(pw_impl_core_events, free) - 16usize];
5274 ["Offset of field: pw_impl_core_events::initialized"]
5275 [::std::mem::offset_of!(pw_impl_core_events, initialized) - 24usize];
5276};
5277unsafe extern "C" {
5278 pub fn pw_context_create_core(
5279 context: *mut pw_context,
5280 properties: *mut pw_properties,
5281 user_data_size: usize,
5282 ) -> *mut pw_impl_core;
5283}
5284unsafe extern "C" {
5285 pub fn pw_context_get_default_core(context: *mut pw_context) -> *mut pw_impl_core;
5286}
5287unsafe extern "C" {
5288 #[doc = " Get the core properties"]
5289 pub fn pw_impl_core_get_properties(core: *mut pw_impl_core) -> *const pw_properties;
5290}
5291unsafe extern "C" {
5292 #[doc = " Get the core information"]
5293 pub fn pw_impl_core_get_info(core: *mut pw_impl_core) -> *const pw_core_info;
5294}
5295unsafe extern "C" {
5296 #[doc = " Update the core properties"]
5297 pub fn pw_impl_core_update_properties(
5298 core: *mut pw_impl_core,
5299 dict: *const spa_dict,
5300 ) -> ::std::os::raw::c_int;
5301}
5302unsafe extern "C" {
5303 pub fn pw_impl_core_register(
5304 core: *mut pw_impl_core,
5305 properties: *mut pw_properties,
5306 ) -> ::std::os::raw::c_int;
5307}
5308unsafe extern "C" {
5309 pub fn pw_impl_core_destroy(core: *mut pw_impl_core);
5310}
5311unsafe extern "C" {
5312 pub fn pw_impl_core_get_user_data(core: *mut pw_impl_core) -> *mut ::std::os::raw::c_void;
5313}
5314unsafe extern "C" {
5315 #[doc = " Get the global of this core"]
5316 pub fn pw_impl_core_get_global(core: *mut pw_impl_core) -> *mut pw_global;
5317}
5318unsafe extern "C" {
5319 #[doc = " Add an event listener"]
5320 pub fn pw_impl_core_add_listener(
5321 core: *mut pw_impl_core,
5322 listener: *mut spa_hook,
5323 events: *const pw_impl_core_events,
5324 data: *mut ::std::os::raw::c_void,
5325 );
5326}
5327#[doc = " \\addtogroup pw_impl_device\n \\{"]
5328#[repr(C)]
5329#[derive(Debug, Copy, Clone)]
5330pub struct pw_impl_device {
5331 _unused: [u8; 0],
5332}
5333#[doc = " Device events, listen to them with \\ref pw_impl_device_add_listener"]
5334#[repr(C)]
5335#[derive(Debug, Copy, Clone)]
5336pub struct pw_impl_device_events {
5337 pub version: u32,
5338 #[doc = " the device is destroyed"]
5339 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5340 #[doc = " the device is freed"]
5341 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5342 #[doc = " the device is initialized"]
5343 pub initialized: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5344 #[doc = " the device info changed"]
5345 pub info_changed: ::std::option::Option<
5346 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_device_info),
5347 >,
5348}
5349#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5350const _: () = {
5351 ["Size of pw_impl_device_events"][::std::mem::size_of::<pw_impl_device_events>() - 40usize];
5352 ["Alignment of pw_impl_device_events"]
5353 [::std::mem::align_of::<pw_impl_device_events>() - 8usize];
5354 ["Offset of field: pw_impl_device_events::version"]
5355 [::std::mem::offset_of!(pw_impl_device_events, version) - 0usize];
5356 ["Offset of field: pw_impl_device_events::destroy"]
5357 [::std::mem::offset_of!(pw_impl_device_events, destroy) - 8usize];
5358 ["Offset of field: pw_impl_device_events::free"]
5359 [::std::mem::offset_of!(pw_impl_device_events, free) - 16usize];
5360 ["Offset of field: pw_impl_device_events::initialized"]
5361 [::std::mem::offset_of!(pw_impl_device_events, initialized) - 24usize];
5362 ["Offset of field: pw_impl_device_events::info_changed"]
5363 [::std::mem::offset_of!(pw_impl_device_events, info_changed) - 32usize];
5364};
5365unsafe extern "C" {
5366 pub fn pw_context_create_device(
5367 context: *mut pw_context,
5368 properties: *mut pw_properties,
5369 user_data_size: usize,
5370 ) -> *mut pw_impl_device;
5371}
5372unsafe extern "C" {
5373 pub fn pw_impl_device_register(
5374 device: *mut pw_impl_device,
5375 properties: *mut pw_properties,
5376 ) -> ::std::os::raw::c_int;
5377}
5378unsafe extern "C" {
5379 pub fn pw_impl_device_destroy(device: *mut pw_impl_device);
5380}
5381unsafe extern "C" {
5382 pub fn pw_impl_device_get_user_data(device: *mut pw_impl_device)
5383 -> *mut ::std::os::raw::c_void;
5384}
5385unsafe extern "C" {
5386 #[doc = " Set the device implementation"]
5387 pub fn pw_impl_device_set_implementation(
5388 device: *mut pw_impl_device,
5389 spa_device: *mut spa_device,
5390 ) -> ::std::os::raw::c_int;
5391}
5392unsafe extern "C" {
5393 #[doc = " Get the device implementation"]
5394 pub fn pw_impl_device_get_implementation(device: *mut pw_impl_device) -> *mut spa_device;
5395}
5396unsafe extern "C" {
5397 #[doc = " Get the global of this device"]
5398 pub fn pw_impl_device_get_global(device: *mut pw_impl_device) -> *mut pw_global;
5399}
5400unsafe extern "C" {
5401 #[doc = " Add an event listener"]
5402 pub fn pw_impl_device_add_listener(
5403 device: *mut pw_impl_device,
5404 listener: *mut spa_hook,
5405 events: *const pw_impl_device_events,
5406 data: *mut ::std::os::raw::c_void,
5407 );
5408}
5409unsafe extern "C" {
5410 pub fn pw_impl_device_update_properties(
5411 device: *mut pw_impl_device,
5412 dict: *const spa_dict,
5413 ) -> ::std::os::raw::c_int;
5414}
5415unsafe extern "C" {
5416 pub fn pw_impl_device_get_properties(device: *mut pw_impl_device) -> *const pw_properties;
5417}
5418unsafe extern "C" {
5419 pub fn pw_impl_device_for_each_param(
5420 device: *mut pw_impl_device,
5421 seq: ::std::os::raw::c_int,
5422 param_id: u32,
5423 index: u32,
5424 max: u32,
5425 filter: *const spa_pod,
5426 callback: ::std::option::Option<
5427 unsafe extern "C" fn(
5428 data: *mut ::std::os::raw::c_void,
5429 seq: ::std::os::raw::c_int,
5430 id: u32,
5431 index: u32,
5432 next: u32,
5433 param: *mut spa_pod,
5434 ) -> ::std::os::raw::c_int,
5435 >,
5436 data: *mut ::std::os::raw::c_void,
5437 ) -> ::std::os::raw::c_int;
5438}
5439#[doc = " \\addtogroup pw_impl_factory\n \\{"]
5440#[repr(C)]
5441#[derive(Debug, Copy, Clone)]
5442pub struct pw_impl_factory {
5443 _unused: [u8; 0],
5444}
5445#[doc = " Factory events, listen to them with \\ref pw_impl_factory_add_listener"]
5446#[repr(C)]
5447#[derive(Debug, Copy, Clone)]
5448pub struct pw_impl_factory_events {
5449 pub version: u32,
5450 #[doc = " the factory is destroyed"]
5451 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5452 #[doc = " the factory is freed"]
5453 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5454 #[doc = " the factory is initialized"]
5455 pub initialized: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5456}
5457#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5458const _: () = {
5459 ["Size of pw_impl_factory_events"][::std::mem::size_of::<pw_impl_factory_events>() - 32usize];
5460 ["Alignment of pw_impl_factory_events"]
5461 [::std::mem::align_of::<pw_impl_factory_events>() - 8usize];
5462 ["Offset of field: pw_impl_factory_events::version"]
5463 [::std::mem::offset_of!(pw_impl_factory_events, version) - 0usize];
5464 ["Offset of field: pw_impl_factory_events::destroy"]
5465 [::std::mem::offset_of!(pw_impl_factory_events, destroy) - 8usize];
5466 ["Offset of field: pw_impl_factory_events::free"]
5467 [::std::mem::offset_of!(pw_impl_factory_events, free) - 16usize];
5468 ["Offset of field: pw_impl_factory_events::initialized"]
5469 [::std::mem::offset_of!(pw_impl_factory_events, initialized) - 24usize];
5470};
5471#[repr(C)]
5472#[derive(Debug, Copy, Clone)]
5473pub struct pw_impl_factory_implementation {
5474 pub version: u32,
5475 #[doc = " The function to create an object from this factory"]
5476 pub create_object: ::std::option::Option<
5477 unsafe extern "C" fn(
5478 data: *mut ::std::os::raw::c_void,
5479 resource: *mut pw_resource,
5480 type_: *const ::std::os::raw::c_char,
5481 version: u32,
5482 properties: *mut pw_properties,
5483 new_id: u32,
5484 ) -> *mut ::std::os::raw::c_void,
5485 >,
5486}
5487#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5488const _: () = {
5489 ["Size of pw_impl_factory_implementation"]
5490 [::std::mem::size_of::<pw_impl_factory_implementation>() - 16usize];
5491 ["Alignment of pw_impl_factory_implementation"]
5492 [::std::mem::align_of::<pw_impl_factory_implementation>() - 8usize];
5493 ["Offset of field: pw_impl_factory_implementation::version"]
5494 [::std::mem::offset_of!(pw_impl_factory_implementation, version) - 0usize];
5495 ["Offset of field: pw_impl_factory_implementation::create_object"]
5496 [::std::mem::offset_of!(pw_impl_factory_implementation, create_object) - 8usize];
5497};
5498unsafe extern "C" {
5499 pub fn pw_context_create_factory(
5500 context: *mut pw_context,
5501 name: *const ::std::os::raw::c_char,
5502 type_: *const ::std::os::raw::c_char,
5503 version: u32,
5504 properties: *mut pw_properties,
5505 user_data_size: usize,
5506 ) -> *mut pw_impl_factory;
5507}
5508unsafe extern "C" {
5509 #[doc = " Get the factory properties"]
5510 pub fn pw_impl_factory_get_properties(factory: *mut pw_impl_factory) -> *const pw_properties;
5511}
5512unsafe extern "C" {
5513 #[doc = " Get the factory info"]
5514 pub fn pw_impl_factory_get_info(factory: *mut pw_impl_factory) -> *const pw_factory_info;
5515}
5516unsafe extern "C" {
5517 #[doc = " Update the factory properties"]
5518 pub fn pw_impl_factory_update_properties(
5519 factory: *mut pw_impl_factory,
5520 dict: *const spa_dict,
5521 ) -> ::std::os::raw::c_int;
5522}
5523unsafe extern "C" {
5524 pub fn pw_impl_factory_register(
5525 factory: *mut pw_impl_factory,
5526 properties: *mut pw_properties,
5527 ) -> ::std::os::raw::c_int;
5528}
5529unsafe extern "C" {
5530 pub fn pw_impl_factory_destroy(factory: *mut pw_impl_factory);
5531}
5532unsafe extern "C" {
5533 pub fn pw_impl_factory_get_user_data(
5534 factory: *mut pw_impl_factory,
5535 ) -> *mut ::std::os::raw::c_void;
5536}
5537unsafe extern "C" {
5538 #[doc = " Get the global of this factory"]
5539 pub fn pw_impl_factory_get_global(factory: *mut pw_impl_factory) -> *mut pw_global;
5540}
5541unsafe extern "C" {
5542 #[doc = " Add an event listener"]
5543 pub fn pw_impl_factory_add_listener(
5544 factory: *mut pw_impl_factory,
5545 listener: *mut spa_hook,
5546 events: *const pw_impl_factory_events,
5547 data: *mut ::std::os::raw::c_void,
5548 );
5549}
5550unsafe extern "C" {
5551 pub fn pw_impl_factory_set_implementation(
5552 factory: *mut pw_impl_factory,
5553 implementation: *const pw_impl_factory_implementation,
5554 data: *mut ::std::os::raw::c_void,
5555 );
5556}
5557unsafe extern "C" {
5558 pub fn pw_impl_factory_create_object(
5559 factory: *mut pw_impl_factory,
5560 resource: *mut pw_resource,
5561 type_: *const ::std::os::raw::c_char,
5562 version: u32,
5563 properties: *mut pw_properties,
5564 new_id: u32,
5565 ) -> *mut ::std::os::raw::c_void;
5566}
5567unsafe extern "C" {
5568 #[doc = " Find a factory by name"]
5569 pub fn pw_context_find_factory(
5570 context: *mut pw_context,
5571 name: *const ::std::os::raw::c_char,
5572 ) -> *mut pw_impl_factory;
5573}
5574#[doc = " \\addtogroup pw_impl_link\n \\{"]
5575#[repr(C)]
5576#[derive(Debug, Copy, Clone)]
5577pub struct pw_impl_link {
5578 _unused: [u8; 0],
5579}
5580#[doc = " link events added with \\ref pw_impl_link_add_listener"]
5581#[repr(C)]
5582#[derive(Debug, Copy, Clone)]
5583pub struct pw_impl_link_events {
5584 pub version: u32,
5585 #[doc = " A link is destroyed"]
5586 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5587 #[doc = " A link is freed"]
5588 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5589 #[doc = " a Link is initialized"]
5590 pub initialized: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5591 #[doc = " The info changed on a link"]
5592 pub info_changed: ::std::option::Option<
5593 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_link_info),
5594 >,
5595 #[doc = " The link state changed, \\a error is only valid when the state is\n in error."]
5596 pub state_changed: ::std::option::Option<
5597 unsafe extern "C" fn(
5598 data: *mut ::std::os::raw::c_void,
5599 old: pw_link_state,
5600 state: pw_link_state,
5601 error: *const ::std::os::raw::c_char,
5602 ),
5603 >,
5604 #[doc = " A port is unlinked"]
5605 pub port_unlinked: ::std::option::Option<
5606 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, port: *mut pw_impl_port),
5607 >,
5608}
5609#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5610const _: () = {
5611 ["Size of pw_impl_link_events"][::std::mem::size_of::<pw_impl_link_events>() - 56usize];
5612 ["Alignment of pw_impl_link_events"][::std::mem::align_of::<pw_impl_link_events>() - 8usize];
5613 ["Offset of field: pw_impl_link_events::version"]
5614 [::std::mem::offset_of!(pw_impl_link_events, version) - 0usize];
5615 ["Offset of field: pw_impl_link_events::destroy"]
5616 [::std::mem::offset_of!(pw_impl_link_events, destroy) - 8usize];
5617 ["Offset of field: pw_impl_link_events::free"]
5618 [::std::mem::offset_of!(pw_impl_link_events, free) - 16usize];
5619 ["Offset of field: pw_impl_link_events::initialized"]
5620 [::std::mem::offset_of!(pw_impl_link_events, initialized) - 24usize];
5621 ["Offset of field: pw_impl_link_events::info_changed"]
5622 [::std::mem::offset_of!(pw_impl_link_events, info_changed) - 32usize];
5623 ["Offset of field: pw_impl_link_events::state_changed"]
5624 [::std::mem::offset_of!(pw_impl_link_events, state_changed) - 40usize];
5625 ["Offset of field: pw_impl_link_events::port_unlinked"]
5626 [::std::mem::offset_of!(pw_impl_link_events, port_unlinked) - 48usize];
5627};
5628unsafe extern "C" {
5629 #[doc = " Make a new link between two ports\n \\return a newly allocated link"]
5630 pub fn pw_context_create_link(
5631 context: *mut pw_context,
5632 output: *mut pw_impl_port,
5633 input: *mut pw_impl_port,
5634 format_filter: *mut spa_pod,
5635 properties: *mut pw_properties,
5636 user_data_size: usize,
5637 ) -> *mut pw_impl_link;
5638}
5639unsafe extern "C" {
5640 #[doc = " Destroy a link"]
5641 pub fn pw_impl_link_destroy(link: *mut pw_impl_link);
5642}
5643unsafe extern "C" {
5644 #[doc = " Add an event listener to \\a link"]
5645 pub fn pw_impl_link_add_listener(
5646 link: *mut pw_impl_link,
5647 listener: *mut spa_hook,
5648 events: *const pw_impl_link_events,
5649 data: *mut ::std::os::raw::c_void,
5650 );
5651}
5652unsafe extern "C" {
5653 #[doc = " Finish link configuration and register"]
5654 pub fn pw_impl_link_register(
5655 link: *mut pw_impl_link,
5656 properties: *mut pw_properties,
5657 ) -> ::std::os::raw::c_int;
5658}
5659unsafe extern "C" {
5660 #[doc = " Get the context of a link"]
5661 pub fn pw_impl_link_get_context(link: *mut pw_impl_link) -> *mut pw_context;
5662}
5663unsafe extern "C" {
5664 #[doc = " Get the user_data of a link, the size of the memory is given when\n constructing the link"]
5665 pub fn pw_impl_link_get_user_data(link: *mut pw_impl_link) -> *mut ::std::os::raw::c_void;
5666}
5667unsafe extern "C" {
5668 #[doc = " Get the link info"]
5669 pub fn pw_impl_link_get_info(link: *mut pw_impl_link) -> *const pw_link_info;
5670}
5671unsafe extern "C" {
5672 #[doc = " Get the global of the link"]
5673 pub fn pw_impl_link_get_global(link: *mut pw_impl_link) -> *mut pw_global;
5674}
5675unsafe extern "C" {
5676 #[doc = " Get the output port of the link"]
5677 pub fn pw_impl_link_get_output(link: *mut pw_impl_link) -> *mut pw_impl_port;
5678}
5679unsafe extern "C" {
5680 #[doc = " Get the input port of the link"]
5681 pub fn pw_impl_link_get_input(link: *mut pw_impl_link) -> *mut pw_impl_port;
5682}
5683unsafe extern "C" {
5684 #[doc = " Find the link between 2 ports"]
5685 pub fn pw_impl_link_find(
5686 output: *mut pw_impl_port,
5687 input: *mut pw_impl_port,
5688 ) -> *mut pw_impl_link;
5689}
5690#[doc = " \\addtogroup pw_impl_metadata\n \\{"]
5691#[repr(C)]
5692#[derive(Debug, Copy, Clone)]
5693pub struct pw_impl_metadata {
5694 _unused: [u8; 0],
5695}
5696#[doc = " Metadata events, listen to them with \\ref pw_impl_metadata_add_listener"]
5697#[repr(C)]
5698#[derive(Debug, Copy, Clone)]
5699pub struct pw_impl_metadata_events {
5700 pub version: u32,
5701 #[doc = " the metadata is destroyed"]
5702 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5703 #[doc = " the metadata is freed"]
5704 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5705 #[doc = " a property changed"]
5706 pub property: ::std::option::Option<
5707 unsafe extern "C" fn(
5708 data: *mut ::std::os::raw::c_void,
5709 subject: u32,
5710 key: *const ::std::os::raw::c_char,
5711 type_: *const ::std::os::raw::c_char,
5712 value: *const ::std::os::raw::c_char,
5713 ) -> ::std::os::raw::c_int,
5714 >,
5715}
5716#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5717const _: () = {
5718 ["Size of pw_impl_metadata_events"][::std::mem::size_of::<pw_impl_metadata_events>() - 32usize];
5719 ["Alignment of pw_impl_metadata_events"]
5720 [::std::mem::align_of::<pw_impl_metadata_events>() - 8usize];
5721 ["Offset of field: pw_impl_metadata_events::version"]
5722 [::std::mem::offset_of!(pw_impl_metadata_events, version) - 0usize];
5723 ["Offset of field: pw_impl_metadata_events::destroy"]
5724 [::std::mem::offset_of!(pw_impl_metadata_events, destroy) - 8usize];
5725 ["Offset of field: pw_impl_metadata_events::free"]
5726 [::std::mem::offset_of!(pw_impl_metadata_events, free) - 16usize];
5727 ["Offset of field: pw_impl_metadata_events::property"]
5728 [::std::mem::offset_of!(pw_impl_metadata_events, property) - 24usize];
5729};
5730unsafe extern "C" {
5731 pub fn pw_context_create_metadata(
5732 context: *mut pw_context,
5733 name: *const ::std::os::raw::c_char,
5734 properties: *mut pw_properties,
5735 user_data_size: usize,
5736 ) -> *mut pw_impl_metadata;
5737}
5738unsafe extern "C" {
5739 #[doc = " Get the metadata properties"]
5740 pub fn pw_impl_metadata_get_properties(metadata: *mut pw_impl_metadata)
5741 -> *const pw_properties;
5742}
5743unsafe extern "C" {
5744 pub fn pw_impl_metadata_register(
5745 metadata: *mut pw_impl_metadata,
5746 properties: *mut pw_properties,
5747 ) -> ::std::os::raw::c_int;
5748}
5749unsafe extern "C" {
5750 pub fn pw_impl_metadata_destroy(metadata: *mut pw_impl_metadata);
5751}
5752unsafe extern "C" {
5753 pub fn pw_impl_metadata_get_user_data(
5754 metadata: *mut pw_impl_metadata,
5755 ) -> *mut ::std::os::raw::c_void;
5756}
5757unsafe extern "C" {
5758 pub fn pw_impl_metadata_set_implementation(
5759 metadata: *mut pw_impl_metadata,
5760 impl_: *mut pw_metadata,
5761 ) -> ::std::os::raw::c_int;
5762}
5763unsafe extern "C" {
5764 pub fn pw_impl_metadata_get_implementation(metadata: *mut pw_impl_metadata)
5765 -> *mut pw_metadata;
5766}
5767unsafe extern "C" {
5768 #[doc = " Get the global of this metadata"]
5769 pub fn pw_impl_metadata_get_global(metadata: *mut pw_impl_metadata) -> *mut pw_global;
5770}
5771unsafe extern "C" {
5772 #[doc = " Add an event listener"]
5773 pub fn pw_impl_metadata_add_listener(
5774 metadata: *mut pw_impl_metadata,
5775 listener: *mut spa_hook,
5776 events: *const pw_impl_metadata_events,
5777 data: *mut ::std::os::raw::c_void,
5778 );
5779}
5780unsafe extern "C" {
5781 #[doc = " Set a property"]
5782 pub fn pw_impl_metadata_set_property(
5783 metadata: *mut pw_impl_metadata,
5784 subject: u32,
5785 key: *const ::std::os::raw::c_char,
5786 type_: *const ::std::os::raw::c_char,
5787 value: *const ::std::os::raw::c_char,
5788 ) -> ::std::os::raw::c_int;
5789}
5790unsafe extern "C" {
5791 pub fn pw_impl_metadata_set_propertyf(
5792 metadata: *mut pw_impl_metadata,
5793 subject: u32,
5794 key: *const ::std::os::raw::c_char,
5795 type_: *const ::std::os::raw::c_char,
5796 fmt: *const ::std::os::raw::c_char,
5797 ...
5798 ) -> ::std::os::raw::c_int;
5799}
5800#[doc = " Module init function signature\n\n \\param module A \\ref pw_impl_module\n \\param args Arguments to the module\n \\return 0 on success, < 0 otherwise with an errno style error\n\n A module should provide an init function with this signature. This function\n will be called when a module is loaded."]
5801pub type pw_impl_module_init_func_t = ::std::option::Option<
5802 unsafe extern "C" fn(
5803 module: *mut pw_impl_module,
5804 args: *const ::std::os::raw::c_char,
5805 ) -> ::std::os::raw::c_int,
5806>;
5807#[doc = " Module events added with \\ref pw_impl_module_add_listener"]
5808#[repr(C)]
5809#[derive(Debug, Copy, Clone)]
5810pub struct pw_impl_module_events {
5811 pub version: u32,
5812 #[doc = " The module is destroyed. This is the time to unregister and\n destroy any objects created by the module."]
5813 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5814 #[doc = " The module is freed. This will be called after destroy() returns."]
5815 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5816 #[doc = " The module is initialized"]
5817 pub initialized: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5818 #[doc = " The module is registered. This is a good time to register\n objects created from the module."]
5819 pub registered: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5820}
5821#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5822const _: () = {
5823 ["Size of pw_impl_module_events"][::std::mem::size_of::<pw_impl_module_events>() - 40usize];
5824 ["Alignment of pw_impl_module_events"]
5825 [::std::mem::align_of::<pw_impl_module_events>() - 8usize];
5826 ["Offset of field: pw_impl_module_events::version"]
5827 [::std::mem::offset_of!(pw_impl_module_events, version) - 0usize];
5828 ["Offset of field: pw_impl_module_events::destroy"]
5829 [::std::mem::offset_of!(pw_impl_module_events, destroy) - 8usize];
5830 ["Offset of field: pw_impl_module_events::free"]
5831 [::std::mem::offset_of!(pw_impl_module_events, free) - 16usize];
5832 ["Offset of field: pw_impl_module_events::initialized"]
5833 [::std::mem::offset_of!(pw_impl_module_events, initialized) - 24usize];
5834 ["Offset of field: pw_impl_module_events::registered"]
5835 [::std::mem::offset_of!(pw_impl_module_events, registered) - 32usize];
5836};
5837unsafe extern "C" {
5838 pub fn pw_context_load_module(
5839 context: *mut pw_context,
5840 name: *const ::std::os::raw::c_char,
5841 args: *const ::std::os::raw::c_char,
5842 properties: *mut pw_properties,
5843 ) -> *mut pw_impl_module;
5844}
5845unsafe extern "C" {
5846 #[doc = " Get the context of a module"]
5847 pub fn pw_impl_module_get_context(module: *mut pw_impl_module) -> *mut pw_context;
5848}
5849unsafe extern "C" {
5850 #[doc = " Get the global of a module"]
5851 pub fn pw_impl_module_get_global(module: *mut pw_impl_module) -> *mut pw_global;
5852}
5853unsafe extern "C" {
5854 #[doc = " Get the module properties"]
5855 pub fn pw_impl_module_get_properties(module: *mut pw_impl_module) -> *const pw_properties;
5856}
5857unsafe extern "C" {
5858 #[doc = " Update the module properties"]
5859 pub fn pw_impl_module_update_properties(
5860 module: *mut pw_impl_module,
5861 dict: *const spa_dict,
5862 ) -> ::std::os::raw::c_int;
5863}
5864unsafe extern "C" {
5865 #[doc = " Get the module info"]
5866 pub fn pw_impl_module_get_info(module: *mut pw_impl_module) -> *const pw_module_info;
5867}
5868unsafe extern "C" {
5869 #[doc = " Add an event listener to a module"]
5870 pub fn pw_impl_module_add_listener(
5871 module: *mut pw_impl_module,
5872 listener: *mut spa_hook,
5873 events: *const pw_impl_module_events,
5874 data: *mut ::std::os::raw::c_void,
5875 );
5876}
5877unsafe extern "C" {
5878 #[doc = " Destroy a module"]
5879 pub fn pw_impl_module_destroy(module: *mut pw_impl_module);
5880}
5881unsafe extern "C" {
5882 #[doc = " Schedule a destroy later on the main thread"]
5883 pub fn pw_impl_module_schedule_destroy(module: *mut pw_impl_module);
5884}
5885#[doc = " Node events, listen to them with \\ref pw_impl_node_add_listener"]
5886#[repr(C)]
5887#[derive(Debug, Copy, Clone)]
5888pub struct pw_impl_node_events {
5889 pub version: u32,
5890 #[doc = " the node is destroyed"]
5891 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5892 #[doc = " the node is about to be freed"]
5893 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5894 #[doc = " the node is initialized"]
5895 pub initialized: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5896 #[doc = " a port is being initialized on the node"]
5897 pub port_init: ::std::option::Option<
5898 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, port: *mut pw_impl_port),
5899 >,
5900 #[doc = " a port was added"]
5901 pub port_added: ::std::option::Option<
5902 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, port: *mut pw_impl_port),
5903 >,
5904 #[doc = " a port was removed"]
5905 pub port_removed: ::std::option::Option<
5906 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, port: *mut pw_impl_port),
5907 >,
5908 #[doc = " the node info changed"]
5909 pub info_changed: ::std::option::Option<
5910 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_node_info),
5911 >,
5912 #[doc = " a port on the node changed info"]
5913 pub port_info_changed: ::std::option::Option<
5914 unsafe extern "C" fn(
5915 data: *mut ::std::os::raw::c_void,
5916 port: *mut pw_impl_port,
5917 info: *const pw_port_info,
5918 ),
5919 >,
5920 #[doc = " the node active state changed"]
5921 pub active_changed: ::std::option::Option<
5922 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, active: bool),
5923 >,
5924 #[doc = " a new state is requested on the node"]
5925 pub state_request: ::std::option::Option<
5926 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, state: pw_node_state),
5927 >,
5928 #[doc = " the state of the node changed"]
5929 pub state_changed: ::std::option::Option<
5930 unsafe extern "C" fn(
5931 data: *mut ::std::os::raw::c_void,
5932 old: pw_node_state,
5933 state: pw_node_state,
5934 error: *const ::std::os::raw::c_char,
5935 ),
5936 >,
5937 #[doc = " a result was received"]
5938 pub result: ::std::option::Option<
5939 unsafe extern "C" fn(
5940 data: *mut ::std::os::raw::c_void,
5941 seq: ::std::os::raw::c_int,
5942 res: ::std::os::raw::c_int,
5943 type_: u32,
5944 result: *const ::std::os::raw::c_void,
5945 ),
5946 >,
5947 #[doc = " an event is emitted"]
5948 pub event: ::std::option::Option<
5949 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, event: *const spa_event),
5950 >,
5951 #[doc = " the driver of the node changed"]
5952 pub driver_changed: ::std::option::Option<
5953 unsafe extern "C" fn(
5954 data: *mut ::std::os::raw::c_void,
5955 old: *mut pw_impl_node,
5956 driver: *mut pw_impl_node,
5957 ),
5958 >,
5959 #[doc = " a peer was added"]
5960 pub peer_added: ::std::option::Option<
5961 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, peer: *mut pw_impl_node),
5962 >,
5963 #[doc = " a peer was removed"]
5964 pub peer_removed: ::std::option::Option<
5965 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, peer: *mut pw_impl_node),
5966 >,
5967}
5968#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5969const _: () = {
5970 ["Size of pw_impl_node_events"][::std::mem::size_of::<pw_impl_node_events>() - 136usize];
5971 ["Alignment of pw_impl_node_events"][::std::mem::align_of::<pw_impl_node_events>() - 8usize];
5972 ["Offset of field: pw_impl_node_events::version"]
5973 [::std::mem::offset_of!(pw_impl_node_events, version) - 0usize];
5974 ["Offset of field: pw_impl_node_events::destroy"]
5975 [::std::mem::offset_of!(pw_impl_node_events, destroy) - 8usize];
5976 ["Offset of field: pw_impl_node_events::free"]
5977 [::std::mem::offset_of!(pw_impl_node_events, free) - 16usize];
5978 ["Offset of field: pw_impl_node_events::initialized"]
5979 [::std::mem::offset_of!(pw_impl_node_events, initialized) - 24usize];
5980 ["Offset of field: pw_impl_node_events::port_init"]
5981 [::std::mem::offset_of!(pw_impl_node_events, port_init) - 32usize];
5982 ["Offset of field: pw_impl_node_events::port_added"]
5983 [::std::mem::offset_of!(pw_impl_node_events, port_added) - 40usize];
5984 ["Offset of field: pw_impl_node_events::port_removed"]
5985 [::std::mem::offset_of!(pw_impl_node_events, port_removed) - 48usize];
5986 ["Offset of field: pw_impl_node_events::info_changed"]
5987 [::std::mem::offset_of!(pw_impl_node_events, info_changed) - 56usize];
5988 ["Offset of field: pw_impl_node_events::port_info_changed"]
5989 [::std::mem::offset_of!(pw_impl_node_events, port_info_changed) - 64usize];
5990 ["Offset of field: pw_impl_node_events::active_changed"]
5991 [::std::mem::offset_of!(pw_impl_node_events, active_changed) - 72usize];
5992 ["Offset of field: pw_impl_node_events::state_request"]
5993 [::std::mem::offset_of!(pw_impl_node_events, state_request) - 80usize];
5994 ["Offset of field: pw_impl_node_events::state_changed"]
5995 [::std::mem::offset_of!(pw_impl_node_events, state_changed) - 88usize];
5996 ["Offset of field: pw_impl_node_events::result"]
5997 [::std::mem::offset_of!(pw_impl_node_events, result) - 96usize];
5998 ["Offset of field: pw_impl_node_events::event"]
5999 [::std::mem::offset_of!(pw_impl_node_events, event) - 104usize];
6000 ["Offset of field: pw_impl_node_events::driver_changed"]
6001 [::std::mem::offset_of!(pw_impl_node_events, driver_changed) - 112usize];
6002 ["Offset of field: pw_impl_node_events::peer_added"]
6003 [::std::mem::offset_of!(pw_impl_node_events, peer_added) - 120usize];
6004 ["Offset of field: pw_impl_node_events::peer_removed"]
6005 [::std::mem::offset_of!(pw_impl_node_events, peer_removed) - 128usize];
6006};
6007#[repr(C)]
6008#[derive(Debug, Copy, Clone)]
6009pub struct pw_impl_node_rt_events {
6010 pub version: u32,
6011 #[doc = " the node is drained"]
6012 pub drained: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6013 #[doc = " the node had an xrun"]
6014 pub xrun: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6015 #[doc = " the driver node starts processing"]
6016 pub start: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6017 #[doc = " the driver node completed processing"]
6018 pub complete: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6019 #[doc = " the driver node did not complete processing"]
6020 pub incomplete: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6021 #[doc = " the node had a timeout"]
6022 pub timeout: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6023}
6024#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6025const _: () = {
6026 ["Size of pw_impl_node_rt_events"][::std::mem::size_of::<pw_impl_node_rt_events>() - 56usize];
6027 ["Alignment of pw_impl_node_rt_events"]
6028 [::std::mem::align_of::<pw_impl_node_rt_events>() - 8usize];
6029 ["Offset of field: pw_impl_node_rt_events::version"]
6030 [::std::mem::offset_of!(pw_impl_node_rt_events, version) - 0usize];
6031 ["Offset of field: pw_impl_node_rt_events::drained"]
6032 [::std::mem::offset_of!(pw_impl_node_rt_events, drained) - 8usize];
6033 ["Offset of field: pw_impl_node_rt_events::xrun"]
6034 [::std::mem::offset_of!(pw_impl_node_rt_events, xrun) - 16usize];
6035 ["Offset of field: pw_impl_node_rt_events::start"]
6036 [::std::mem::offset_of!(pw_impl_node_rt_events, start) - 24usize];
6037 ["Offset of field: pw_impl_node_rt_events::complete"]
6038 [::std::mem::offset_of!(pw_impl_node_rt_events, complete) - 32usize];
6039 ["Offset of field: pw_impl_node_rt_events::incomplete"]
6040 [::std::mem::offset_of!(pw_impl_node_rt_events, incomplete) - 40usize];
6041 ["Offset of field: pw_impl_node_rt_events::timeout"]
6042 [::std::mem::offset_of!(pw_impl_node_rt_events, timeout) - 48usize];
6043};
6044unsafe extern "C" {
6045 #[doc = " Create a new node"]
6046 pub fn pw_context_create_node(
6047 context: *mut pw_context,
6048 properties: *mut pw_properties,
6049 user_data_size: usize,
6050 ) -> *mut pw_impl_node;
6051}
6052unsafe extern "C" {
6053 #[doc = " Complete initialization of the node and register"]
6054 pub fn pw_impl_node_register(
6055 node: *mut pw_impl_node,
6056 properties: *mut pw_properties,
6057 ) -> ::std::os::raw::c_int;
6058}
6059unsafe extern "C" {
6060 #[doc = " Destroy a node"]
6061 pub fn pw_impl_node_destroy(node: *mut pw_impl_node);
6062}
6063unsafe extern "C" {
6064 #[doc = " Get the node info"]
6065 pub fn pw_impl_node_get_info(node: *mut pw_impl_node) -> *const pw_node_info;
6066}
6067unsafe extern "C" {
6068 #[doc = " Get node user_data. The size of the memory was given in \\ref pw_context_create_node"]
6069 pub fn pw_impl_node_get_user_data(node: *mut pw_impl_node) -> *mut ::std::os::raw::c_void;
6070}
6071unsafe extern "C" {
6072 #[doc = " Get the context of this node"]
6073 pub fn pw_impl_node_get_context(node: *mut pw_impl_node) -> *mut pw_context;
6074}
6075unsafe extern "C" {
6076 #[doc = " Get the global of this node"]
6077 pub fn pw_impl_node_get_global(node: *mut pw_impl_node) -> *mut pw_global;
6078}
6079unsafe extern "C" {
6080 #[doc = " Get the node properties"]
6081 pub fn pw_impl_node_get_properties(node: *mut pw_impl_node) -> *const pw_properties;
6082}
6083unsafe extern "C" {
6084 #[doc = " Update the node properties"]
6085 pub fn pw_impl_node_update_properties(
6086 node: *mut pw_impl_node,
6087 dict: *const spa_dict,
6088 ) -> ::std::os::raw::c_int;
6089}
6090unsafe extern "C" {
6091 #[doc = " Set the node implementation"]
6092 pub fn pw_impl_node_set_implementation(
6093 node: *mut pw_impl_node,
6094 spa_node: *mut spa_node,
6095 ) -> ::std::os::raw::c_int;
6096}
6097unsafe extern "C" {
6098 #[doc = " Get the node implementation"]
6099 pub fn pw_impl_node_get_implementation(node: *mut pw_impl_node) -> *mut spa_node;
6100}
6101unsafe extern "C" {
6102 #[doc = " Add an event listener"]
6103 pub fn pw_impl_node_add_listener(
6104 node: *mut pw_impl_node,
6105 listener: *mut spa_hook,
6106 events: *const pw_impl_node_events,
6107 data: *mut ::std::os::raw::c_void,
6108 );
6109}
6110unsafe extern "C" {
6111 #[doc = " Add an rt_event listener"]
6112 pub fn pw_impl_node_add_rt_listener(
6113 node: *mut pw_impl_node,
6114 listener: *mut spa_hook,
6115 events: *const pw_impl_node_rt_events,
6116 data: *mut ::std::os::raw::c_void,
6117 );
6118}
6119unsafe extern "C" {
6120 pub fn pw_impl_node_remove_rt_listener(node: *mut pw_impl_node, listener: *mut spa_hook);
6121}
6122unsafe extern "C" {
6123 #[doc = " Iterate the ports in the given direction. The callback should return\n 0 to fetch the next item, any other value stops the iteration and returns\n the value. When all callbacks return 0, this function returns 0 when all\n items are iterated."]
6124 pub fn pw_impl_node_for_each_port(
6125 node: *mut pw_impl_node,
6126 direction: spa_direction,
6127 callback: ::std::option::Option<
6128 unsafe extern "C" fn(
6129 data: *mut ::std::os::raw::c_void,
6130 port: *mut pw_impl_port,
6131 ) -> ::std::os::raw::c_int,
6132 >,
6133 data: *mut ::std::os::raw::c_void,
6134 ) -> ::std::os::raw::c_int;
6135}
6136unsafe extern "C" {
6137 pub fn pw_impl_node_for_each_param(
6138 node: *mut pw_impl_node,
6139 seq: ::std::os::raw::c_int,
6140 param_id: u32,
6141 index: u32,
6142 max: u32,
6143 filter: *const spa_pod,
6144 callback: ::std::option::Option<
6145 unsafe extern "C" fn(
6146 data: *mut ::std::os::raw::c_void,
6147 seq: ::std::os::raw::c_int,
6148 id: u32,
6149 index: u32,
6150 next: u32,
6151 param: *mut spa_pod,
6152 ) -> ::std::os::raw::c_int,
6153 >,
6154 data: *mut ::std::os::raw::c_void,
6155 ) -> ::std::os::raw::c_int;
6156}
6157unsafe extern "C" {
6158 #[doc = " Find the port with direction and port_id or NULL when not found. Passing\n PW_ID_ANY for port_id will return any port, preferably an unlinked one."]
6159 pub fn pw_impl_node_find_port(
6160 node: *mut pw_impl_node,
6161 direction: spa_direction,
6162 port_id: u32,
6163 ) -> *mut pw_impl_port;
6164}
6165unsafe extern "C" {
6166 #[doc = " Get a free unused port_id from the node"]
6167 pub fn pw_impl_node_get_free_port_id(node: *mut pw_impl_node, direction: spa_direction) -> u32;
6168}
6169unsafe extern "C" {
6170 pub fn pw_impl_node_initialized(node: *mut pw_impl_node) -> ::std::os::raw::c_int;
6171}
6172unsafe extern "C" {
6173 #[doc = " Set a node active. This will start negotiation with all linked active\n nodes and start data transport"]
6174 pub fn pw_impl_node_set_active(node: *mut pw_impl_node, active: bool) -> ::std::os::raw::c_int;
6175}
6176unsafe extern "C" {
6177 #[doc = " Check if a node is active"]
6178 pub fn pw_impl_node_is_active(node: *mut pw_impl_node) -> bool;
6179}
6180unsafe extern "C" {
6181 #[doc = " Check if a node is active, Since 0.3.39"]
6182 pub fn pw_impl_node_send_command(
6183 node: *mut pw_impl_node,
6184 command: *const spa_command,
6185 ) -> ::std::os::raw::c_int;
6186}
6187unsafe extern "C" {
6188 #[doc = " Set a param on the node, Since 0.3.65"]
6189 pub fn pw_impl_node_set_param(
6190 node: *mut pw_impl_node,
6191 id: u32,
6192 flags: u32,
6193 param: *const spa_pod,
6194 ) -> ::std::os::raw::c_int;
6195}
6196#[doc = "< the port is in error"]
6197pub const pw_impl_port_state_PW_IMPL_PORT_STATE_ERROR: pw_impl_port_state = -1;
6198#[doc = "< the port is being created"]
6199pub const pw_impl_port_state_PW_IMPL_PORT_STATE_INIT: pw_impl_port_state = 0;
6200#[doc = "< the port is ready for format negotiation"]
6201pub const pw_impl_port_state_PW_IMPL_PORT_STATE_CONFIGURE: pw_impl_port_state = 1;
6202#[doc = "< the port is ready for buffer allocation"]
6203pub const pw_impl_port_state_PW_IMPL_PORT_STATE_READY: pw_impl_port_state = 2;
6204#[doc = "< the port is paused"]
6205pub const pw_impl_port_state_PW_IMPL_PORT_STATE_PAUSED: pw_impl_port_state = 3;
6206pub type pw_impl_port_state = ::std::os::raw::c_int;
6207#[doc = " Port events, use \\ref pw_impl_port_add_listener"]
6208#[repr(C)]
6209#[derive(Debug, Copy, Clone)]
6210pub struct pw_impl_port_events {
6211 pub version: u32,
6212 #[doc = " The port is destroyed"]
6213 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6214 #[doc = " The port is freed"]
6215 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6216 #[doc = " The port is initialized"]
6217 pub initialized: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6218 #[doc = " the port info changed"]
6219 pub info_changed: ::std::option::Option<
6220 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_port_info),
6221 >,
6222 #[doc = " a new link is added on this port"]
6223 pub link_added: ::std::option::Option<
6224 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, link: *mut pw_impl_link),
6225 >,
6226 #[doc = " a link is removed from this port"]
6227 pub link_removed: ::std::option::Option<
6228 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, link: *mut pw_impl_link),
6229 >,
6230 #[doc = " the state of the port changed"]
6231 pub state_changed: ::std::option::Option<
6232 unsafe extern "C" fn(
6233 data: *mut ::std::os::raw::c_void,
6234 old: pw_impl_port_state,
6235 state: pw_impl_port_state,
6236 error: *const ::std::os::raw::c_char,
6237 ),
6238 >,
6239 #[doc = " a control was added to the port"]
6240 pub control_added: ::std::option::Option<
6241 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, control: *mut pw_control),
6242 >,
6243 #[doc = " a control was removed from the port"]
6244 pub control_removed: ::std::option::Option<
6245 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, control: *mut pw_control),
6246 >,
6247 #[doc = " a parameter changed, since version 1"]
6248 pub param_changed:
6249 ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, id: u32)>,
6250 #[doc = " latency changed. Since version 2"]
6251 pub latency_changed:
6252 ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6253 #[doc = " tag changed. Since version 3"]
6254 pub tag_changed: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6255}
6256#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6257const _: () = {
6258 ["Size of pw_impl_port_events"][::std::mem::size_of::<pw_impl_port_events>() - 104usize];
6259 ["Alignment of pw_impl_port_events"][::std::mem::align_of::<pw_impl_port_events>() - 8usize];
6260 ["Offset of field: pw_impl_port_events::version"]
6261 [::std::mem::offset_of!(pw_impl_port_events, version) - 0usize];
6262 ["Offset of field: pw_impl_port_events::destroy"]
6263 [::std::mem::offset_of!(pw_impl_port_events, destroy) - 8usize];
6264 ["Offset of field: pw_impl_port_events::free"]
6265 [::std::mem::offset_of!(pw_impl_port_events, free) - 16usize];
6266 ["Offset of field: pw_impl_port_events::initialized"]
6267 [::std::mem::offset_of!(pw_impl_port_events, initialized) - 24usize];
6268 ["Offset of field: pw_impl_port_events::info_changed"]
6269 [::std::mem::offset_of!(pw_impl_port_events, info_changed) - 32usize];
6270 ["Offset of field: pw_impl_port_events::link_added"]
6271 [::std::mem::offset_of!(pw_impl_port_events, link_added) - 40usize];
6272 ["Offset of field: pw_impl_port_events::link_removed"]
6273 [::std::mem::offset_of!(pw_impl_port_events, link_removed) - 48usize];
6274 ["Offset of field: pw_impl_port_events::state_changed"]
6275 [::std::mem::offset_of!(pw_impl_port_events, state_changed) - 56usize];
6276 ["Offset of field: pw_impl_port_events::control_added"]
6277 [::std::mem::offset_of!(pw_impl_port_events, control_added) - 64usize];
6278 ["Offset of field: pw_impl_port_events::control_removed"]
6279 [::std::mem::offset_of!(pw_impl_port_events, control_removed) - 72usize];
6280 ["Offset of field: pw_impl_port_events::param_changed"]
6281 [::std::mem::offset_of!(pw_impl_port_events, param_changed) - 80usize];
6282 ["Offset of field: pw_impl_port_events::latency_changed"]
6283 [::std::mem::offset_of!(pw_impl_port_events, latency_changed) - 88usize];
6284 ["Offset of field: pw_impl_port_events::tag_changed"]
6285 [::std::mem::offset_of!(pw_impl_port_events, tag_changed) - 96usize];
6286};
6287unsafe extern "C" {
6288 #[doc = " Create a new port\n \\return a newly allocated port"]
6289 pub fn pw_context_create_port(
6290 context: *mut pw_context,
6291 direction: spa_direction,
6292 port_id: u32,
6293 info: *const spa_port_info,
6294 user_data_size: usize,
6295 ) -> *mut pw_impl_port;
6296}
6297unsafe extern "C" {
6298 #[doc = " Get the port direction"]
6299 pub fn pw_impl_port_get_direction(port: *mut pw_impl_port) -> spa_direction;
6300}
6301unsafe extern "C" {
6302 #[doc = " Get the port properties"]
6303 pub fn pw_impl_port_get_properties(port: *mut pw_impl_port) -> *const pw_properties;
6304}
6305unsafe extern "C" {
6306 #[doc = " Update the port properties"]
6307 pub fn pw_impl_port_update_properties(
6308 port: *mut pw_impl_port,
6309 dict: *const spa_dict,
6310 ) -> ::std::os::raw::c_int;
6311}
6312unsafe extern "C" {
6313 #[doc = " Get the port info"]
6314 pub fn pw_impl_port_get_info(port: *mut pw_impl_port) -> *const pw_port_info;
6315}
6316unsafe extern "C" {
6317 #[doc = " Get the port id"]
6318 pub fn pw_impl_port_get_id(port: *mut pw_impl_port) -> u32;
6319}
6320unsafe extern "C" {
6321 #[doc = " Get the port state as a string"]
6322 pub fn pw_impl_port_state_as_string(state: pw_impl_port_state)
6323 -> *const ::std::os::raw::c_char;
6324}
6325unsafe extern "C" {
6326 #[doc = " Get the port parent node or NULL when not yet set"]
6327 pub fn pw_impl_port_get_node(port: *mut pw_impl_port) -> *mut pw_impl_node;
6328}
6329unsafe extern "C" {
6330 #[doc = " check is a port has links, return 0 if not, 1 if it is linked"]
6331 pub fn pw_impl_port_is_linked(port: *mut pw_impl_port) -> ::std::os::raw::c_int;
6332}
6333unsafe extern "C" {
6334 #[doc = " Add a port to a node"]
6335 pub fn pw_impl_port_add(
6336 port: *mut pw_impl_port,
6337 node: *mut pw_impl_node,
6338 ) -> ::std::os::raw::c_int;
6339}
6340unsafe extern "C" {
6341 #[doc = " Add an event listener on the port"]
6342 pub fn pw_impl_port_add_listener(
6343 port: *mut pw_impl_port,
6344 listener: *mut spa_hook,
6345 events: *const pw_impl_port_events,
6346 data: *mut ::std::os::raw::c_void,
6347 );
6348}
6349pub type pw_work_func_t = ::std::option::Option<
6350 unsafe extern "C" fn(
6351 obj: *mut ::std::os::raw::c_void,
6352 data: *mut ::std::os::raw::c_void,
6353 res: ::std::os::raw::c_int,
6354 id: u32,
6355 ),
6356>;
6357unsafe extern "C" {
6358 pub fn pw_work_queue_new(loop_: *mut pw_loop) -> *mut pw_work_queue;
6359}
6360unsafe extern "C" {
6361 pub fn pw_work_queue_destroy(queue: *mut pw_work_queue);
6362}
6363unsafe extern "C" {
6364 pub fn pw_work_queue_add(
6365 queue: *mut pw_work_queue,
6366 obj: *mut ::std::os::raw::c_void,
6367 res: ::std::os::raw::c_int,
6368 func: pw_work_func_t,
6369 data: *mut ::std::os::raw::c_void,
6370 ) -> u32;
6371}
6372unsafe extern "C" {
6373 pub fn pw_work_queue_cancel(
6374 queue: *mut pw_work_queue,
6375 obj: *mut ::std::os::raw::c_void,
6376 id: u32,
6377 ) -> ::std::os::raw::c_int;
6378}
6379unsafe extern "C" {
6380 pub fn pw_work_queue_complete(
6381 queue: *mut pw_work_queue,
6382 obj: *mut ::std::os::raw::c_void,
6383 seq: u32,
6384 res: ::std::os::raw::c_int,
6385 ) -> ::std::os::raw::c_int;
6386}
6387pub type pw_global_bind_func_t = ::std::option::Option<
6388 unsafe extern "C" fn(
6389 object: *mut ::std::os::raw::c_void,
6390 client: *mut pw_impl_client,
6391 permissions: u32,
6392 version: u32,
6393 id: u32,
6394 ) -> ::std::os::raw::c_int,
6395>;
6396#[doc = " Global events, use \\ref pw_global_add_listener"]
6397#[repr(C)]
6398#[derive(Debug, Copy, Clone)]
6399pub struct pw_global_events {
6400 pub version: u32,
6401 #[doc = " The global is destroyed"]
6402 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6403 #[doc = " The global is freed"]
6404 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6405 #[doc = " The permissions changed for a client"]
6406 pub permissions_changed: ::std::option::Option<
6407 unsafe extern "C" fn(
6408 data: *mut ::std::os::raw::c_void,
6409 client: *mut pw_impl_client,
6410 old_permissions: u32,
6411 new_permissions: u32,
6412 ),
6413 >,
6414}
6415#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6416const _: () = {
6417 ["Size of pw_global_events"][::std::mem::size_of::<pw_global_events>() - 32usize];
6418 ["Alignment of pw_global_events"][::std::mem::align_of::<pw_global_events>() - 8usize];
6419 ["Offset of field: pw_global_events::version"]
6420 [::std::mem::offset_of!(pw_global_events, version) - 0usize];
6421 ["Offset of field: pw_global_events::destroy"]
6422 [::std::mem::offset_of!(pw_global_events, destroy) - 8usize];
6423 ["Offset of field: pw_global_events::free"]
6424 [::std::mem::offset_of!(pw_global_events, free) - 16usize];
6425 ["Offset of field: pw_global_events::permissions_changed"]
6426 [::std::mem::offset_of!(pw_global_events, permissions_changed) - 24usize];
6427};
6428unsafe extern "C" {
6429 #[doc = " Create a new global object"]
6430 pub fn pw_global_new(
6431 context: *mut pw_context,
6432 type_: *const ::std::os::raw::c_char,
6433 version: u32,
6434 permission_mask: u32,
6435 properties: *mut pw_properties,
6436 func: pw_global_bind_func_t,
6437 object: *mut ::std::os::raw::c_void,
6438 ) -> *mut pw_global;
6439}
6440unsafe extern "C" {
6441 #[doc = " Register a global object to the context registry"]
6442 pub fn pw_global_register(global: *mut pw_global) -> ::std::os::raw::c_int;
6443}
6444unsafe extern "C" {
6445 #[doc = " Add an event listener on the global"]
6446 pub fn pw_global_add_listener(
6447 global: *mut pw_global,
6448 listener: *mut spa_hook,
6449 events: *const pw_global_events,
6450 data: *mut ::std::os::raw::c_void,
6451 );
6452}
6453unsafe extern "C" {
6454 #[doc = " Get the permissions of the global for a given client"]
6455 pub fn pw_global_get_permissions(global: *mut pw_global, client: *mut pw_impl_client) -> u32;
6456}
6457unsafe extern "C" {
6458 #[doc = " Get the context object of this global"]
6459 pub fn pw_global_get_context(global: *mut pw_global) -> *mut pw_context;
6460}
6461unsafe extern "C" {
6462 #[doc = " Get the global type"]
6463 pub fn pw_global_get_type(global: *mut pw_global) -> *const ::std::os::raw::c_char;
6464}
6465unsafe extern "C" {
6466 #[doc = " Check a global type"]
6467 pub fn pw_global_is_type(global: *mut pw_global, type_: *const ::std::os::raw::c_char) -> bool;
6468}
6469unsafe extern "C" {
6470 #[doc = " Get the global version"]
6471 pub fn pw_global_get_version(global: *mut pw_global) -> u32;
6472}
6473unsafe extern "C" {
6474 #[doc = " Get the global properties"]
6475 pub fn pw_global_get_properties(global: *mut pw_global) -> *const pw_properties;
6476}
6477unsafe extern "C" {
6478 #[doc = " Update the global properties, must be done when unregistered"]
6479 pub fn pw_global_update_keys(
6480 global: *mut pw_global,
6481 dict: *const spa_dict,
6482 keys: *const *const ::std::os::raw::c_char,
6483 ) -> ::std::os::raw::c_int;
6484}
6485unsafe extern "C" {
6486 #[doc = " Get the object associated with the global. This depends on the type of the\n global"]
6487 pub fn pw_global_get_object(global: *mut pw_global) -> *mut ::std::os::raw::c_void;
6488}
6489unsafe extern "C" {
6490 #[doc = " Get the unique id of the global"]
6491 pub fn pw_global_get_id(global: *mut pw_global) -> u32;
6492}
6493unsafe extern "C" {
6494 #[doc = " Get the serial number of the global"]
6495 pub fn pw_global_get_serial(global: *mut pw_global) -> u64;
6496}
6497unsafe extern "C" {
6498 #[doc = " Add a resource to a global"]
6499 pub fn pw_global_add_resource(
6500 global: *mut pw_global,
6501 resource: *mut pw_resource,
6502 ) -> ::std::os::raw::c_int;
6503}
6504unsafe extern "C" {
6505 #[doc = " Iterate all resources added to the global The callback should return\n 0 to fetch the next item, any other value stops the iteration and returns\n the value. When all callbacks return 0, this function returns 0 when all\n items are iterated."]
6506 pub fn pw_global_for_each_resource(
6507 global: *mut pw_global,
6508 callback: ::std::option::Option<
6509 unsafe extern "C" fn(
6510 data: *mut ::std::os::raw::c_void,
6511 resource: *mut pw_resource,
6512 ) -> ::std::os::raw::c_int,
6513 >,
6514 data: *mut ::std::os::raw::c_void,
6515 ) -> ::std::os::raw::c_int;
6516}
6517unsafe extern "C" {
6518 #[doc = " Let a client bind to a global"]
6519 pub fn pw_global_bind(
6520 global: *mut pw_global,
6521 client: *mut pw_impl_client,
6522 permissions: u32,
6523 version: u32,
6524 id: u32,
6525 ) -> ::std::os::raw::c_int;
6526}
6527unsafe extern "C" {
6528 pub fn pw_global_update_permissions(
6529 global: *mut pw_global,
6530 client: *mut pw_impl_client,
6531 old_permissions: u32,
6532 new_permissions: u32,
6533 ) -> ::std::os::raw::c_int;
6534}
6535unsafe extern "C" {
6536 #[doc = " Destroy a global"]
6537 pub fn pw_global_destroy(global: *mut pw_global);
6538}
6539#[doc = " The events that a client can emit"]
6540#[repr(C)]
6541#[derive(Debug, Copy, Clone)]
6542pub struct pw_impl_client_events {
6543 pub version: u32,
6544 #[doc = " emitted when the client is destroyed"]
6545 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6546 #[doc = " emitted right before the client is freed"]
6547 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6548 #[doc = " the client is initialized"]
6549 pub initialized: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6550 #[doc = " emitted when the client info changed"]
6551 pub info_changed: ::std::option::Option<
6552 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_client_info),
6553 >,
6554 #[doc = " emitted when a new resource is added for client"]
6555 pub resource_added: ::std::option::Option<
6556 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, resource: *mut pw_resource),
6557 >,
6558 #[doc = " emitted when a resource is removed"]
6559 pub resource_removed: ::std::option::Option<
6560 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, resource: *mut pw_resource),
6561 >,
6562 #[doc = " emitted when the client becomes busy processing an asynchronous\n message. In the busy state no messages should be processed.\n Processing should resume when the client becomes not busy"]
6563 pub busy_changed:
6564 ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, busy: bool)>,
6565}
6566#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6567const _: () = {
6568 ["Size of pw_impl_client_events"][::std::mem::size_of::<pw_impl_client_events>() - 64usize];
6569 ["Alignment of pw_impl_client_events"]
6570 [::std::mem::align_of::<pw_impl_client_events>() - 8usize];
6571 ["Offset of field: pw_impl_client_events::version"]
6572 [::std::mem::offset_of!(pw_impl_client_events, version) - 0usize];
6573 ["Offset of field: pw_impl_client_events::destroy"]
6574 [::std::mem::offset_of!(pw_impl_client_events, destroy) - 8usize];
6575 ["Offset of field: pw_impl_client_events::free"]
6576 [::std::mem::offset_of!(pw_impl_client_events, free) - 16usize];
6577 ["Offset of field: pw_impl_client_events::initialized"]
6578 [::std::mem::offset_of!(pw_impl_client_events, initialized) - 24usize];
6579 ["Offset of field: pw_impl_client_events::info_changed"]
6580 [::std::mem::offset_of!(pw_impl_client_events, info_changed) - 32usize];
6581 ["Offset of field: pw_impl_client_events::resource_added"]
6582 [::std::mem::offset_of!(pw_impl_client_events, resource_added) - 40usize];
6583 ["Offset of field: pw_impl_client_events::resource_removed"]
6584 [::std::mem::offset_of!(pw_impl_client_events, resource_removed) - 48usize];
6585 ["Offset of field: pw_impl_client_events::busy_changed"]
6586 [::std::mem::offset_of!(pw_impl_client_events, busy_changed) - 56usize];
6587};
6588unsafe extern "C" {
6589 #[doc = " Create a new client. This is mainly used by protocols."]
6590 pub fn pw_context_create_client(
6591 core: *mut pw_impl_core,
6592 protocol: *mut pw_protocol,
6593 properties: *mut pw_properties,
6594 user_data_size: usize,
6595 ) -> *mut pw_impl_client;
6596}
6597unsafe extern "C" {
6598 #[doc = " Destroy a previously created client"]
6599 pub fn pw_impl_client_destroy(client: *mut pw_impl_client);
6600}
6601unsafe extern "C" {
6602 #[doc = " Finish configuration and register a client"]
6603 pub fn pw_impl_client_register(
6604 client: *mut pw_impl_client,
6605 properties: *mut pw_properties,
6606 ) -> ::std::os::raw::c_int;
6607}
6608unsafe extern "C" {
6609 #[doc = " Get the client user data"]
6610 pub fn pw_impl_client_get_user_data(client: *mut pw_impl_client)
6611 -> *mut ::std::os::raw::c_void;
6612}
6613unsafe extern "C" {
6614 #[doc = " Get the client information"]
6615 pub fn pw_impl_client_get_info(client: *mut pw_impl_client) -> *const pw_client_info;
6616}
6617unsafe extern "C" {
6618 #[doc = " Update the client properties"]
6619 pub fn pw_impl_client_update_properties(
6620 client: *mut pw_impl_client,
6621 dict: *const spa_dict,
6622 ) -> ::std::os::raw::c_int;
6623}
6624unsafe extern "C" {
6625 #[doc = " Update the client permissions"]
6626 pub fn pw_impl_client_update_permissions(
6627 client: *mut pw_impl_client,
6628 n_permissions: u32,
6629 permissions: *const pw_permission,
6630 ) -> ::std::os::raw::c_int;
6631}
6632unsafe extern "C" {
6633 #[doc = " check if a client has permissions for global_id, Since 0.3.9"]
6634 pub fn pw_impl_client_check_permissions(
6635 client: *mut pw_impl_client,
6636 global_id: u32,
6637 permissions: u32,
6638 ) -> ::std::os::raw::c_int;
6639}
6640unsafe extern "C" {
6641 #[doc = " Get the client properties"]
6642 pub fn pw_impl_client_get_properties(client: *mut pw_impl_client) -> *const pw_properties;
6643}
6644unsafe extern "C" {
6645 #[doc = " Get the context used to create this client"]
6646 pub fn pw_impl_client_get_context(client: *mut pw_impl_client) -> *mut pw_context;
6647}
6648unsafe extern "C" {
6649 #[doc = " Get the protocol used to create this client"]
6650 pub fn pw_impl_client_get_protocol(client: *mut pw_impl_client) -> *mut pw_protocol;
6651}
6652unsafe extern "C" {
6653 #[doc = " Get the client core resource"]
6654 pub fn pw_impl_client_get_core_resource(client: *mut pw_impl_client) -> *mut pw_resource;
6655}
6656unsafe extern "C" {
6657 #[doc = " Get a resource with the given id"]
6658 pub fn pw_impl_client_find_resource(client: *mut pw_impl_client, id: u32) -> *mut pw_resource;
6659}
6660unsafe extern "C" {
6661 #[doc = " Get the global associated with this client"]
6662 pub fn pw_impl_client_get_global(client: *mut pw_impl_client) -> *mut pw_global;
6663}
6664unsafe extern "C" {
6665 #[doc = " Get the mempool associated with this client, Since 0.3.74"]
6666 pub fn pw_impl_client_get_mempool(client: *mut pw_impl_client) -> *mut pw_mempool;
6667}
6668unsafe extern "C" {
6669 #[doc = " listen to events from this client"]
6670 pub fn pw_impl_client_add_listener(
6671 client: *mut pw_impl_client,
6672 listener: *mut spa_hook,
6673 events: *const pw_impl_client_events,
6674 data: *mut ::std::os::raw::c_void,
6675 );
6676}
6677unsafe extern "C" {
6678 #[doc = " Mark the client busy. This can be used when an asynchronous operation is\n started and no further processing is allowed to happen for the client"]
6679 pub fn pw_impl_client_set_busy(client: *mut pw_impl_client, busy: bool);
6680}
6681#[doc = " Resource events"]
6682#[repr(C)]
6683#[derive(Debug, Copy, Clone)]
6684pub struct pw_resource_events {
6685 pub version: u32,
6686 #[doc = " The resource is destroyed"]
6687 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6688 #[doc = " a reply to a ping event completed"]
6689 pub pong: ::std::option::Option<
6690 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, seq: ::std::os::raw::c_int),
6691 >,
6692 #[doc = " an error occurred on the resource"]
6693 pub error: ::std::option::Option<
6694 unsafe extern "C" fn(
6695 data: *mut ::std::os::raw::c_void,
6696 seq: ::std::os::raw::c_int,
6697 res: ::std::os::raw::c_int,
6698 message: *const ::std::os::raw::c_char,
6699 ),
6700 >,
6701}
6702#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6703const _: () = {
6704 ["Size of pw_resource_events"][::std::mem::size_of::<pw_resource_events>() - 32usize];
6705 ["Alignment of pw_resource_events"][::std::mem::align_of::<pw_resource_events>() - 8usize];
6706 ["Offset of field: pw_resource_events::version"]
6707 [::std::mem::offset_of!(pw_resource_events, version) - 0usize];
6708 ["Offset of field: pw_resource_events::destroy"]
6709 [::std::mem::offset_of!(pw_resource_events, destroy) - 8usize];
6710 ["Offset of field: pw_resource_events::pong"]
6711 [::std::mem::offset_of!(pw_resource_events, pong) - 16usize];
6712 ["Offset of field: pw_resource_events::error"]
6713 [::std::mem::offset_of!(pw_resource_events, error) - 24usize];
6714};
6715unsafe extern "C" {
6716 #[doc = " Make a new resource for client"]
6717 pub fn pw_resource_new(
6718 client: *mut pw_impl_client,
6719 id: u32,
6720 permissions: u32,
6721 type_: *const ::std::os::raw::c_char,
6722 version: u32,
6723 user_data_size: usize,
6724 ) -> *mut pw_resource;
6725}
6726unsafe extern "C" {
6727 #[doc = " Destroy a resource"]
6728 pub fn pw_resource_destroy(resource: *mut pw_resource);
6729}
6730unsafe extern "C" {
6731 #[doc = " Remove a resource, like pw_resource_destroy but without sending a\n remove_id message to the client"]
6732 pub fn pw_resource_remove(resource: *mut pw_resource);
6733}
6734unsafe extern "C" {
6735 #[doc = " Get the client owning this resource"]
6736 pub fn pw_resource_get_client(resource: *mut pw_resource) -> *mut pw_impl_client;
6737}
6738unsafe extern "C" {
6739 #[doc = " Get the unique id of this resource"]
6740 pub fn pw_resource_get_id(resource: *mut pw_resource) -> u32;
6741}
6742unsafe extern "C" {
6743 #[doc = " Get the permissions of this resource"]
6744 pub fn pw_resource_get_permissions(resource: *mut pw_resource) -> u32;
6745}
6746unsafe extern "C" {
6747 #[doc = " Get the type and optionally the version of this resource"]
6748 pub fn pw_resource_get_type(
6749 resource: *mut pw_resource,
6750 version: *mut u32,
6751 ) -> *const ::std::os::raw::c_char;
6752}
6753unsafe extern "C" {
6754 #[doc = " Get the protocol used for this resource"]
6755 pub fn pw_resource_get_protocol(resource: *mut pw_resource) -> *mut pw_protocol;
6756}
6757unsafe extern "C" {
6758 #[doc = " Get the user data for the resource, the size was given in \\ref pw_resource_new"]
6759 pub fn pw_resource_get_user_data(resource: *mut pw_resource) -> *mut ::std::os::raw::c_void;
6760}
6761unsafe extern "C" {
6762 #[doc = " Add an event listener"]
6763 pub fn pw_resource_add_listener(
6764 resource: *mut pw_resource,
6765 listener: *mut spa_hook,
6766 events: *const pw_resource_events,
6767 data: *mut ::std::os::raw::c_void,
6768 );
6769}
6770unsafe extern "C" {
6771 #[doc = " Set the resource implementation."]
6772 pub fn pw_resource_add_object_listener(
6773 resource: *mut pw_resource,
6774 listener: *mut spa_hook,
6775 funcs: *const ::std::os::raw::c_void,
6776 data: *mut ::std::os::raw::c_void,
6777 );
6778}
6779unsafe extern "C" {
6780 #[doc = " Generate an ping event for a resource. This will generate a pong event\n with the same \\a sequence number in the return value."]
6781 pub fn pw_resource_ping(
6782 resource: *mut pw_resource,
6783 seq: ::std::os::raw::c_int,
6784 ) -> ::std::os::raw::c_int;
6785}
6786unsafe extern "C" {
6787 #[doc = " ref/unref a resource, Since 0.3.52"]
6788 pub fn pw_resource_ref(resource: *mut pw_resource);
6789}
6790unsafe extern "C" {
6791 pub fn pw_resource_unref(resource: *mut pw_resource);
6792}
6793unsafe extern "C" {
6794 #[doc = " Notify global id this resource is bound to"]
6795 pub fn pw_resource_set_bound_id(
6796 resource: *mut pw_resource,
6797 global_id: u32,
6798 ) -> ::std::os::raw::c_int;
6799}
6800unsafe extern "C" {
6801 #[doc = " Get the global id this resource is bound to or SPA_ID_INVALID when not bound"]
6802 pub fn pw_resource_get_bound_id(resource: *mut pw_resource) -> u32;
6803}
6804unsafe extern "C" {
6805 #[doc = " Generate an error for a resource"]
6806 pub fn pw_resource_error(
6807 resource: *mut pw_resource,
6808 res: ::std::os::raw::c_int,
6809 error: *const ::std::os::raw::c_char,
6810 );
6811}
6812unsafe extern "C" {
6813 pub fn pw_resource_errorf(
6814 resource: *mut pw_resource,
6815 res: ::std::os::raw::c_int,
6816 error: *const ::std::os::raw::c_char,
6817 ...
6818 );
6819}
6820unsafe extern "C" {
6821 pub fn pw_resource_errorf_id(
6822 resource: *mut pw_resource,
6823 id: u32,
6824 res: ::std::os::raw::c_int,
6825 error: *const ::std::os::raw::c_char,
6826 ...
6827 );
6828}
6829unsafe extern "C" {
6830 #[doc = " Get the list of object listeners from a resource"]
6831 pub fn pw_resource_get_object_listeners(resource: *mut pw_resource) -> *mut spa_hook_list;
6832}
6833unsafe extern "C" {
6834 #[doc = " Get the marshal functions for the resource"]
6835 pub fn pw_resource_get_marshal(resource: *mut pw_resource) -> *const pw_protocol_marshal;
6836}
6837unsafe extern "C" {
6838 #[doc = " install a marshal function on a resource"]
6839 pub fn pw_resource_install_marshal(
6840 resource: *mut pw_resource,
6841 implementor: bool,
6842 ) -> ::std::os::raw::c_int;
6843}
6844#[repr(C)]
6845#[derive(Debug, Copy, Clone)]
6846pub struct pw_protocol_native_message {
6847 pub id: u32,
6848 pub opcode: u32,
6849 pub data: *mut ::std::os::raw::c_void,
6850 pub size: u32,
6851 pub n_fds: u32,
6852 pub fds: *mut ::std::os::raw::c_int,
6853 pub seq: ::std::os::raw::c_int,
6854}
6855#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6856const _: () = {
6857 ["Size of pw_protocol_native_message"]
6858 [::std::mem::size_of::<pw_protocol_native_message>() - 40usize];
6859 ["Alignment of pw_protocol_native_message"]
6860 [::std::mem::align_of::<pw_protocol_native_message>() - 8usize];
6861 ["Offset of field: pw_protocol_native_message::id"]
6862 [::std::mem::offset_of!(pw_protocol_native_message, id) - 0usize];
6863 ["Offset of field: pw_protocol_native_message::opcode"]
6864 [::std::mem::offset_of!(pw_protocol_native_message, opcode) - 4usize];
6865 ["Offset of field: pw_protocol_native_message::data"]
6866 [::std::mem::offset_of!(pw_protocol_native_message, data) - 8usize];
6867 ["Offset of field: pw_protocol_native_message::size"]
6868 [::std::mem::offset_of!(pw_protocol_native_message, size) - 16usize];
6869 ["Offset of field: pw_protocol_native_message::n_fds"]
6870 [::std::mem::offset_of!(pw_protocol_native_message, n_fds) - 20usize];
6871 ["Offset of field: pw_protocol_native_message::fds"]
6872 [::std::mem::offset_of!(pw_protocol_native_message, fds) - 24usize];
6873 ["Offset of field: pw_protocol_native_message::seq"]
6874 [::std::mem::offset_of!(pw_protocol_native_message, seq) - 32usize];
6875};
6876#[repr(C)]
6877#[derive(Debug, Copy, Clone)]
6878pub struct pw_protocol_native_demarshal {
6879 pub func: ::std::option::Option<
6880 unsafe extern "C" fn(
6881 object: *mut ::std::os::raw::c_void,
6882 msg: *const pw_protocol_native_message,
6883 ) -> ::std::os::raw::c_int,
6884 >,
6885 pub permissions: u32,
6886 pub flags: u32,
6887}
6888#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6889const _: () = {
6890 ["Size of pw_protocol_native_demarshal"]
6891 [::std::mem::size_of::<pw_protocol_native_demarshal>() - 16usize];
6892 ["Alignment of pw_protocol_native_demarshal"]
6893 [::std::mem::align_of::<pw_protocol_native_demarshal>() - 8usize];
6894 ["Offset of field: pw_protocol_native_demarshal::func"]
6895 [::std::mem::offset_of!(pw_protocol_native_demarshal, func) - 0usize];
6896 ["Offset of field: pw_protocol_native_demarshal::permissions"]
6897 [::std::mem::offset_of!(pw_protocol_native_demarshal, permissions) - 8usize];
6898 ["Offset of field: pw_protocol_native_demarshal::flags"]
6899 [::std::mem::offset_of!(pw_protocol_native_demarshal, flags) - 12usize];
6900};
6901#[doc = " \\ref pw_protocol_native_ext methods"]
6902#[repr(C)]
6903#[derive(Debug, Copy, Clone)]
6904pub struct pw_protocol_native_ext {
6905 pub version: u32,
6906 pub begin_proxy: ::std::option::Option<
6907 unsafe extern "C" fn(
6908 proxy: *mut pw_proxy,
6909 opcode: u8,
6910 msg: *mut *mut pw_protocol_native_message,
6911 ) -> *mut spa_pod_builder,
6912 >,
6913 pub add_proxy_fd: ::std::option::Option<
6914 unsafe extern "C" fn(proxy: *mut pw_proxy, fd: ::std::os::raw::c_int) -> u32,
6915 >,
6916 pub get_proxy_fd: ::std::option::Option<
6917 unsafe extern "C" fn(proxy: *mut pw_proxy, index: u32) -> ::std::os::raw::c_int,
6918 >,
6919 pub end_proxy: ::std::option::Option<
6920 unsafe extern "C" fn(
6921 proxy: *mut pw_proxy,
6922 builder: *mut spa_pod_builder,
6923 ) -> ::std::os::raw::c_int,
6924 >,
6925 pub begin_resource: ::std::option::Option<
6926 unsafe extern "C" fn(
6927 resource: *mut pw_resource,
6928 opcode: u8,
6929 msg: *mut *mut pw_protocol_native_message,
6930 ) -> *mut spa_pod_builder,
6931 >,
6932 pub add_resource_fd: ::std::option::Option<
6933 unsafe extern "C" fn(resource: *mut pw_resource, fd: ::std::os::raw::c_int) -> u32,
6934 >,
6935 pub get_resource_fd: ::std::option::Option<
6936 unsafe extern "C" fn(resource: *mut pw_resource, index: u32) -> ::std::os::raw::c_int,
6937 >,
6938 pub end_resource: ::std::option::Option<
6939 unsafe extern "C" fn(
6940 resource: *mut pw_resource,
6941 builder: *mut spa_pod_builder,
6942 ) -> ::std::os::raw::c_int,
6943 >,
6944}
6945#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6946const _: () = {
6947 ["Size of pw_protocol_native_ext"][::std::mem::size_of::<pw_protocol_native_ext>() - 72usize];
6948 ["Alignment of pw_protocol_native_ext"]
6949 [::std::mem::align_of::<pw_protocol_native_ext>() - 8usize];
6950 ["Offset of field: pw_protocol_native_ext::version"]
6951 [::std::mem::offset_of!(pw_protocol_native_ext, version) - 0usize];
6952 ["Offset of field: pw_protocol_native_ext::begin_proxy"]
6953 [::std::mem::offset_of!(pw_protocol_native_ext, begin_proxy) - 8usize];
6954 ["Offset of field: pw_protocol_native_ext::add_proxy_fd"]
6955 [::std::mem::offset_of!(pw_protocol_native_ext, add_proxy_fd) - 16usize];
6956 ["Offset of field: pw_protocol_native_ext::get_proxy_fd"]
6957 [::std::mem::offset_of!(pw_protocol_native_ext, get_proxy_fd) - 24usize];
6958 ["Offset of field: pw_protocol_native_ext::end_proxy"]
6959 [::std::mem::offset_of!(pw_protocol_native_ext, end_proxy) - 32usize];
6960 ["Offset of field: pw_protocol_native_ext::begin_resource"]
6961 [::std::mem::offset_of!(pw_protocol_native_ext, begin_resource) - 40usize];
6962 ["Offset of field: pw_protocol_native_ext::add_resource_fd"]
6963 [::std::mem::offset_of!(pw_protocol_native_ext, add_resource_fd) - 48usize];
6964 ["Offset of field: pw_protocol_native_ext::get_resource_fd"]
6965 [::std::mem::offset_of!(pw_protocol_native_ext, get_resource_fd) - 56usize];
6966 ["Offset of field: pw_protocol_native_ext::end_resource"]
6967 [::std::mem::offset_of!(pw_protocol_native_ext, end_resource) - 64usize];
6968};
6969pub const pw_endpoint_link_state_PW_ENDPOINT_LINK_STATE_ERROR: pw_endpoint_link_state = -1;
6970pub const pw_endpoint_link_state_PW_ENDPOINT_LINK_STATE_PREPARING: pw_endpoint_link_state = 0;
6971pub const pw_endpoint_link_state_PW_ENDPOINT_LINK_STATE_INACTIVE: pw_endpoint_link_state = 1;
6972pub const pw_endpoint_link_state_PW_ENDPOINT_LINK_STATE_ACTIVE: pw_endpoint_link_state = 2;
6973#[doc = " \\addtogroup pw_session_manager\n \\{"]
6974pub type pw_endpoint_link_state = ::std::os::raw::c_int;
6975#[repr(C)]
6976#[derive(Debug, Copy, Clone)]
6977pub struct pw_session_info {
6978 #[doc = "< version of this structure"]
6979 pub version: u32,
6980 #[doc = "< the session id (global)"]
6981 pub id: u32,
6982 #[doc = "< bitfield of changed fields since last call"]
6983 pub change_mask: u64,
6984 #[doc = "< extra properties"]
6985 pub props: *mut spa_dict,
6986 #[doc = "< parameters"]
6987 pub params: *mut spa_param_info,
6988 #[doc = "< number of items in \\a params"]
6989 pub n_params: u32,
6990}
6991#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6992const _: () = {
6993 ["Size of pw_session_info"][::std::mem::size_of::<pw_session_info>() - 40usize];
6994 ["Alignment of pw_session_info"][::std::mem::align_of::<pw_session_info>() - 8usize];
6995 ["Offset of field: pw_session_info::version"]
6996 [::std::mem::offset_of!(pw_session_info, version) - 0usize];
6997 ["Offset of field: pw_session_info::id"][::std::mem::offset_of!(pw_session_info, id) - 4usize];
6998 ["Offset of field: pw_session_info::change_mask"]
6999 [::std::mem::offset_of!(pw_session_info, change_mask) - 8usize];
7000 ["Offset of field: pw_session_info::props"]
7001 [::std::mem::offset_of!(pw_session_info, props) - 16usize];
7002 ["Offset of field: pw_session_info::params"]
7003 [::std::mem::offset_of!(pw_session_info, params) - 24usize];
7004 ["Offset of field: pw_session_info::n_params"]
7005 [::std::mem::offset_of!(pw_session_info, n_params) - 32usize];
7006};
7007#[repr(C)]
7008pub struct pw_endpoint_info {
7009 #[doc = "< version of this structure"]
7010 pub version: u32,
7011 #[doc = "< the endpoint id (global)"]
7012 pub id: u32,
7013 #[doc = "< name of the endpoint"]
7014 pub name: *mut ::std::os::raw::c_char,
7015 #[doc = "< media class of the endpoint"]
7016 pub media_class: *mut ::std::os::raw::c_char,
7017 #[doc = "< direction of the endpoint"]
7018 pub direction: spa_direction,
7019 #[doc = "< additional flags"]
7020 pub flags: u32,
7021 #[doc = "< bitfield of changed fields since last call"]
7022 pub change_mask: u64,
7023 #[doc = "< number of streams available"]
7024 pub n_streams: u32,
7025 #[doc = "< the id of the controlling session"]
7026 pub session_id: u32,
7027 #[doc = "< extra properties"]
7028 pub props: *mut spa_dict,
7029 #[doc = "< parameters"]
7030 pub params: *mut spa_param_info,
7031 #[doc = "< number of items in \\a params"]
7032 pub n_params: u32,
7033}
7034#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7035const _: () = {
7036 ["Size of pw_endpoint_info"][::std::mem::size_of::<pw_endpoint_info>() - 72usize];
7037 ["Alignment of pw_endpoint_info"][::std::mem::align_of::<pw_endpoint_info>() - 8usize];
7038 ["Offset of field: pw_endpoint_info::version"]
7039 [::std::mem::offset_of!(pw_endpoint_info, version) - 0usize];
7040 ["Offset of field: pw_endpoint_info::id"]
7041 [::std::mem::offset_of!(pw_endpoint_info, id) - 4usize];
7042 ["Offset of field: pw_endpoint_info::name"]
7043 [::std::mem::offset_of!(pw_endpoint_info, name) - 8usize];
7044 ["Offset of field: pw_endpoint_info::media_class"]
7045 [::std::mem::offset_of!(pw_endpoint_info, media_class) - 16usize];
7046 ["Offset of field: pw_endpoint_info::direction"]
7047 [::std::mem::offset_of!(pw_endpoint_info, direction) - 24usize];
7048 ["Offset of field: pw_endpoint_info::flags"]
7049 [::std::mem::offset_of!(pw_endpoint_info, flags) - 28usize];
7050 ["Offset of field: pw_endpoint_info::change_mask"]
7051 [::std::mem::offset_of!(pw_endpoint_info, change_mask) - 32usize];
7052 ["Offset of field: pw_endpoint_info::n_streams"]
7053 [::std::mem::offset_of!(pw_endpoint_info, n_streams) - 40usize];
7054 ["Offset of field: pw_endpoint_info::session_id"]
7055 [::std::mem::offset_of!(pw_endpoint_info, session_id) - 44usize];
7056 ["Offset of field: pw_endpoint_info::props"]
7057 [::std::mem::offset_of!(pw_endpoint_info, props) - 48usize];
7058 ["Offset of field: pw_endpoint_info::params"]
7059 [::std::mem::offset_of!(pw_endpoint_info, params) - 56usize];
7060 ["Offset of field: pw_endpoint_info::n_params"]
7061 [::std::mem::offset_of!(pw_endpoint_info, n_params) - 64usize];
7062};
7063#[repr(C)]
7064#[derive(Debug, Copy, Clone)]
7065pub struct pw_endpoint_stream_info {
7066 #[doc = "< version of this structure"]
7067 pub version: u32,
7068 #[doc = "< the stream id (local or global)"]
7069 pub id: u32,
7070 #[doc = "< the endpoint id (global)"]
7071 pub endpoint_id: u32,
7072 #[doc = "< name of the stream"]
7073 pub name: *mut ::std::os::raw::c_char,
7074 #[doc = "< bitfield of changed fields since last call"]
7075 pub change_mask: u64,
7076 #[doc = "< information for linking this stream"]
7077 pub link_params: *mut spa_pod,
7078 #[doc = "< extra properties"]
7079 pub props: *mut spa_dict,
7080 #[doc = "< parameters"]
7081 pub params: *mut spa_param_info,
7082 #[doc = "< number of items in \\a params"]
7083 pub n_params: u32,
7084}
7085#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7086const _: () = {
7087 ["Size of pw_endpoint_stream_info"][::std::mem::size_of::<pw_endpoint_stream_info>() - 64usize];
7088 ["Alignment of pw_endpoint_stream_info"]
7089 [::std::mem::align_of::<pw_endpoint_stream_info>() - 8usize];
7090 ["Offset of field: pw_endpoint_stream_info::version"]
7091 [::std::mem::offset_of!(pw_endpoint_stream_info, version) - 0usize];
7092 ["Offset of field: pw_endpoint_stream_info::id"]
7093 [::std::mem::offset_of!(pw_endpoint_stream_info, id) - 4usize];
7094 ["Offset of field: pw_endpoint_stream_info::endpoint_id"]
7095 [::std::mem::offset_of!(pw_endpoint_stream_info, endpoint_id) - 8usize];
7096 ["Offset of field: pw_endpoint_stream_info::name"]
7097 [::std::mem::offset_of!(pw_endpoint_stream_info, name) - 16usize];
7098 ["Offset of field: pw_endpoint_stream_info::change_mask"]
7099 [::std::mem::offset_of!(pw_endpoint_stream_info, change_mask) - 24usize];
7100 ["Offset of field: pw_endpoint_stream_info::link_params"]
7101 [::std::mem::offset_of!(pw_endpoint_stream_info, link_params) - 32usize];
7102 ["Offset of field: pw_endpoint_stream_info::props"]
7103 [::std::mem::offset_of!(pw_endpoint_stream_info, props) - 40usize];
7104 ["Offset of field: pw_endpoint_stream_info::params"]
7105 [::std::mem::offset_of!(pw_endpoint_stream_info, params) - 48usize];
7106 ["Offset of field: pw_endpoint_stream_info::n_params"]
7107 [::std::mem::offset_of!(pw_endpoint_stream_info, n_params) - 56usize];
7108};
7109#[repr(C)]
7110#[derive(Debug, Copy, Clone)]
7111pub struct pw_endpoint_link_info {
7112 #[doc = "< version of this structure"]
7113 pub version: u32,
7114 #[doc = "< the link id (global)"]
7115 pub id: u32,
7116 #[doc = "< the session id (global)"]
7117 pub session_id: u32,
7118 #[doc = "< the output endpoint id (global)"]
7119 pub output_endpoint_id: u32,
7120 #[doc = "< the output stream id (local or global)"]
7121 pub output_stream_id: u32,
7122 #[doc = "< the input endpoint id (global)"]
7123 pub input_endpoint_id: u32,
7124 #[doc = "< the input stream id (local or global)"]
7125 pub input_stream_id: u32,
7126 #[doc = "< bitfield of changed fields since last call"]
7127 pub change_mask: u64,
7128 #[doc = "< the state of the link"]
7129 pub state: pw_endpoint_link_state,
7130 #[doc = "< error string if state == ERROR"]
7131 pub error: *mut ::std::os::raw::c_char,
7132 #[doc = "< extra properties"]
7133 pub props: *mut spa_dict,
7134 #[doc = "< parameters"]
7135 pub params: *mut spa_param_info,
7136 #[doc = "< number of items in \\a params"]
7137 pub n_params: u32,
7138}
7139#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7140const _: () = {
7141 ["Size of pw_endpoint_link_info"][::std::mem::size_of::<pw_endpoint_link_info>() - 80usize];
7142 ["Alignment of pw_endpoint_link_info"]
7143 [::std::mem::align_of::<pw_endpoint_link_info>() - 8usize];
7144 ["Offset of field: pw_endpoint_link_info::version"]
7145 [::std::mem::offset_of!(pw_endpoint_link_info, version) - 0usize];
7146 ["Offset of field: pw_endpoint_link_info::id"]
7147 [::std::mem::offset_of!(pw_endpoint_link_info, id) - 4usize];
7148 ["Offset of field: pw_endpoint_link_info::session_id"]
7149 [::std::mem::offset_of!(pw_endpoint_link_info, session_id) - 8usize];
7150 ["Offset of field: pw_endpoint_link_info::output_endpoint_id"]
7151 [::std::mem::offset_of!(pw_endpoint_link_info, output_endpoint_id) - 12usize];
7152 ["Offset of field: pw_endpoint_link_info::output_stream_id"]
7153 [::std::mem::offset_of!(pw_endpoint_link_info, output_stream_id) - 16usize];
7154 ["Offset of field: pw_endpoint_link_info::input_endpoint_id"]
7155 [::std::mem::offset_of!(pw_endpoint_link_info, input_endpoint_id) - 20usize];
7156 ["Offset of field: pw_endpoint_link_info::input_stream_id"]
7157 [::std::mem::offset_of!(pw_endpoint_link_info, input_stream_id) - 24usize];
7158 ["Offset of field: pw_endpoint_link_info::change_mask"]
7159 [::std::mem::offset_of!(pw_endpoint_link_info, change_mask) - 32usize];
7160 ["Offset of field: pw_endpoint_link_info::state"]
7161 [::std::mem::offset_of!(pw_endpoint_link_info, state) - 40usize];
7162 ["Offset of field: pw_endpoint_link_info::error"]
7163 [::std::mem::offset_of!(pw_endpoint_link_info, error) - 48usize];
7164 ["Offset of field: pw_endpoint_link_info::props"]
7165 [::std::mem::offset_of!(pw_endpoint_link_info, props) - 56usize];
7166 ["Offset of field: pw_endpoint_link_info::params"]
7167 [::std::mem::offset_of!(pw_endpoint_link_info, params) - 64usize];
7168 ["Offset of field: pw_endpoint_link_info::n_params"]
7169 [::std::mem::offset_of!(pw_endpoint_link_info, n_params) - 72usize];
7170};
7171#[repr(C)]
7172#[derive(Debug, Copy, Clone)]
7173pub struct pw_session {
7174 _unused: [u8; 0],
7175}
7176#[repr(C)]
7177#[derive(Debug, Copy, Clone)]
7178pub struct pw_endpoint {
7179 _unused: [u8; 0],
7180}
7181#[repr(C)]
7182#[derive(Debug, Copy, Clone)]
7183pub struct pw_endpoint_stream {
7184 _unused: [u8; 0],
7185}
7186#[repr(C)]
7187#[derive(Debug, Copy, Clone)]
7188pub struct pw_endpoint_link {
7189 _unused: [u8; 0],
7190}
7191#[repr(C)]
7192#[derive(Debug, Copy, Clone)]
7193pub struct pw_session_events {
7194 #[doc = "< version of this structure"]
7195 pub version: u32,
7196 #[doc = " Notify session info\n\n \\param info info about the session"]
7197 pub info: ::std::option::Option<
7198 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_session_info),
7199 >,
7200 #[doc = " Notify a session param\n\n Event emitted as a result of the enum_params method.\n\n \\param seq the sequence number of the request\n \\param id the param id\n \\param index the param index\n \\param next the param index of the next param\n \\param param the parameter"]
7201 pub param: ::std::option::Option<
7202 unsafe extern "C" fn(
7203 data: *mut ::std::os::raw::c_void,
7204 seq: ::std::os::raw::c_int,
7205 id: u32,
7206 index: u32,
7207 next: u32,
7208 param: *const spa_pod,
7209 ),
7210 >,
7211}
7212#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7213const _: () = {
7214 ["Size of pw_session_events"][::std::mem::size_of::<pw_session_events>() - 24usize];
7215 ["Alignment of pw_session_events"][::std::mem::align_of::<pw_session_events>() - 8usize];
7216 ["Offset of field: pw_session_events::version"]
7217 [::std::mem::offset_of!(pw_session_events, version) - 0usize];
7218 ["Offset of field: pw_session_events::info"]
7219 [::std::mem::offset_of!(pw_session_events, info) - 8usize];
7220 ["Offset of field: pw_session_events::param"]
7221 [::std::mem::offset_of!(pw_session_events, param) - 16usize];
7222};
7223#[repr(C)]
7224#[derive(Debug, Copy, Clone)]
7225pub struct pw_session_methods {
7226 #[doc = "< version of this structure"]
7227 pub version: u32,
7228 pub add_listener: ::std::option::Option<
7229 unsafe extern "C" fn(
7230 object: *mut ::std::os::raw::c_void,
7231 listener: *mut spa_hook,
7232 events: *const pw_session_events,
7233 data: *mut ::std::os::raw::c_void,
7234 ) -> ::std::os::raw::c_int,
7235 >,
7236 #[doc = " Subscribe to parameter changes\n\n Automatically emit param events for the given ids when\n they are changed.\n\n \\param ids an array of param ids\n \\param n_ids the number of ids in \\a ids\n\n This requires X permissions."]
7237 pub subscribe_params: ::std::option::Option<
7238 unsafe extern "C" fn(
7239 object: *mut ::std::os::raw::c_void,
7240 ids: *mut u32,
7241 n_ids: u32,
7242 ) -> ::std::os::raw::c_int,
7243 >,
7244 #[doc = " Enumerate session parameters\n\n Start enumeration of session parameters. For each param, a\n param event will be emitted.\n\n \\param seq a sequence number returned in the reply\n \\param id the parameter id to enumerate\n \\param start the start index or 0 for the first param\n \\param num the maximum number of params to retrieve\n \\param filter a param filter or NULL\n\n This requires X permissions."]
7245 pub enum_params: ::std::option::Option<
7246 unsafe extern "C" fn(
7247 object: *mut ::std::os::raw::c_void,
7248 seq: ::std::os::raw::c_int,
7249 id: u32,
7250 start: u32,
7251 num: u32,
7252 filter: *const spa_pod,
7253 ) -> ::std::os::raw::c_int,
7254 >,
7255 #[doc = " Set a parameter on the session\n\n \\param id the parameter id to set\n \\param flags extra parameter flags\n \\param param the parameter to set\n\n This requires X and W permissions."]
7256 pub set_param: ::std::option::Option<
7257 unsafe extern "C" fn(
7258 object: *mut ::std::os::raw::c_void,
7259 id: u32,
7260 flags: u32,
7261 param: *const spa_pod,
7262 ) -> ::std::os::raw::c_int,
7263 >,
7264}
7265#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7266const _: () = {
7267 ["Size of pw_session_methods"][::std::mem::size_of::<pw_session_methods>() - 40usize];
7268 ["Alignment of pw_session_methods"][::std::mem::align_of::<pw_session_methods>() - 8usize];
7269 ["Offset of field: pw_session_methods::version"]
7270 [::std::mem::offset_of!(pw_session_methods, version) - 0usize];
7271 ["Offset of field: pw_session_methods::add_listener"]
7272 [::std::mem::offset_of!(pw_session_methods, add_listener) - 8usize];
7273 ["Offset of field: pw_session_methods::subscribe_params"]
7274 [::std::mem::offset_of!(pw_session_methods, subscribe_params) - 16usize];
7275 ["Offset of field: pw_session_methods::enum_params"]
7276 [::std::mem::offset_of!(pw_session_methods, enum_params) - 24usize];
7277 ["Offset of field: pw_session_methods::set_param"]
7278 [::std::mem::offset_of!(pw_session_methods, set_param) - 32usize];
7279};
7280#[repr(C)]
7281#[derive(Debug, Copy, Clone)]
7282pub struct pw_endpoint_events {
7283 #[doc = "< version of this structure"]
7284 pub version: u32,
7285 #[doc = " Notify endpoint info\n\n \\param info info about the endpoint"]
7286 pub info: ::std::option::Option<
7287 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_endpoint_info),
7288 >,
7289 #[doc = " Notify a endpoint param\n\n Event emitted as a result of the enum_params method.\n\n \\param seq the sequence number of the request\n \\param id the param id\n \\param index the param index\n \\param next the param index of the next param\n \\param param the parameter"]
7290 pub param: ::std::option::Option<
7291 unsafe extern "C" fn(
7292 data: *mut ::std::os::raw::c_void,
7293 seq: ::std::os::raw::c_int,
7294 id: u32,
7295 index: u32,
7296 next: u32,
7297 param: *const spa_pod,
7298 ),
7299 >,
7300}
7301#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7302const _: () = {
7303 ["Size of pw_endpoint_events"][::std::mem::size_of::<pw_endpoint_events>() - 24usize];
7304 ["Alignment of pw_endpoint_events"][::std::mem::align_of::<pw_endpoint_events>() - 8usize];
7305 ["Offset of field: pw_endpoint_events::version"]
7306 [::std::mem::offset_of!(pw_endpoint_events, version) - 0usize];
7307 ["Offset of field: pw_endpoint_events::info"]
7308 [::std::mem::offset_of!(pw_endpoint_events, info) - 8usize];
7309 ["Offset of field: pw_endpoint_events::param"]
7310 [::std::mem::offset_of!(pw_endpoint_events, param) - 16usize];
7311};
7312#[repr(C)]
7313#[derive(Debug, Copy, Clone)]
7314pub struct pw_endpoint_methods {
7315 #[doc = "< version of this structure"]
7316 pub version: u32,
7317 pub add_listener: ::std::option::Option<
7318 unsafe extern "C" fn(
7319 object: *mut ::std::os::raw::c_void,
7320 listener: *mut spa_hook,
7321 events: *const pw_endpoint_events,
7322 data: *mut ::std::os::raw::c_void,
7323 ) -> ::std::os::raw::c_int,
7324 >,
7325 #[doc = " Subscribe to parameter changes\n\n Automatically emit param events for the given ids when\n they are changed.\n\n \\param ids an array of param ids\n \\param n_ids the number of ids in \\a ids\n\n This requires X permissions."]
7326 pub subscribe_params: ::std::option::Option<
7327 unsafe extern "C" fn(
7328 object: *mut ::std::os::raw::c_void,
7329 ids: *mut u32,
7330 n_ids: u32,
7331 ) -> ::std::os::raw::c_int,
7332 >,
7333 #[doc = " Enumerate endpoint parameters\n\n Start enumeration of endpoint parameters. For each param, a\n param event will be emitted.\n\n \\param seq a sequence number returned in the reply\n \\param id the parameter id to enumerate\n \\param start the start index or 0 for the first param\n \\param num the maximum number of params to retrieve\n \\param filter a param filter or NULL\n\n This requires X permissions."]
7334 pub enum_params: ::std::option::Option<
7335 unsafe extern "C" fn(
7336 object: *mut ::std::os::raw::c_void,
7337 seq: ::std::os::raw::c_int,
7338 id: u32,
7339 start: u32,
7340 num: u32,
7341 filter: *const spa_pod,
7342 ) -> ::std::os::raw::c_int,
7343 >,
7344 #[doc = " Set a parameter on the endpoint\n\n \\param id the parameter id to set\n \\param flags extra parameter flags\n \\param param the parameter to set\n\n This requires X and W permissions."]
7345 pub set_param: ::std::option::Option<
7346 unsafe extern "C" fn(
7347 object: *mut ::std::os::raw::c_void,
7348 id: u32,
7349 flags: u32,
7350 param: *const spa_pod,
7351 ) -> ::std::os::raw::c_int,
7352 >,
7353 #[doc = " Create a link\n\n This requires X permissions."]
7354 pub create_link: ::std::option::Option<
7355 unsafe extern "C" fn(
7356 object: *mut ::std::os::raw::c_void,
7357 props: *const spa_dict,
7358 ) -> ::std::os::raw::c_int,
7359 >,
7360}
7361#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7362const _: () = {
7363 ["Size of pw_endpoint_methods"][::std::mem::size_of::<pw_endpoint_methods>() - 48usize];
7364 ["Alignment of pw_endpoint_methods"][::std::mem::align_of::<pw_endpoint_methods>() - 8usize];
7365 ["Offset of field: pw_endpoint_methods::version"]
7366 [::std::mem::offset_of!(pw_endpoint_methods, version) - 0usize];
7367 ["Offset of field: pw_endpoint_methods::add_listener"]
7368 [::std::mem::offset_of!(pw_endpoint_methods, add_listener) - 8usize];
7369 ["Offset of field: pw_endpoint_methods::subscribe_params"]
7370 [::std::mem::offset_of!(pw_endpoint_methods, subscribe_params) - 16usize];
7371 ["Offset of field: pw_endpoint_methods::enum_params"]
7372 [::std::mem::offset_of!(pw_endpoint_methods, enum_params) - 24usize];
7373 ["Offset of field: pw_endpoint_methods::set_param"]
7374 [::std::mem::offset_of!(pw_endpoint_methods, set_param) - 32usize];
7375 ["Offset of field: pw_endpoint_methods::create_link"]
7376 [::std::mem::offset_of!(pw_endpoint_methods, create_link) - 40usize];
7377};
7378#[repr(C)]
7379#[derive(Debug, Copy, Clone)]
7380pub struct pw_endpoint_stream_events {
7381 #[doc = "< version of this structure"]
7382 pub version: u32,
7383 #[doc = " Notify endpoint stream info\n\n \\param info info about the endpoint stream"]
7384 pub info: ::std::option::Option<
7385 unsafe extern "C" fn(
7386 data: *mut ::std::os::raw::c_void,
7387 info: *const pw_endpoint_stream_info,
7388 ),
7389 >,
7390 #[doc = " Notify a endpoint stream param\n\n Event emitted as a result of the enum_params method.\n\n \\param seq the sequence number of the request\n \\param id the param id\n \\param index the param index\n \\param next the param index of the next param\n \\param param the parameter"]
7391 pub param: ::std::option::Option<
7392 unsafe extern "C" fn(
7393 data: *mut ::std::os::raw::c_void,
7394 seq: ::std::os::raw::c_int,
7395 id: u32,
7396 index: u32,
7397 next: u32,
7398 param: *const spa_pod,
7399 ),
7400 >,
7401}
7402#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7403const _: () = {
7404 ["Size of pw_endpoint_stream_events"]
7405 [::std::mem::size_of::<pw_endpoint_stream_events>() - 24usize];
7406 ["Alignment of pw_endpoint_stream_events"]
7407 [::std::mem::align_of::<pw_endpoint_stream_events>() - 8usize];
7408 ["Offset of field: pw_endpoint_stream_events::version"]
7409 [::std::mem::offset_of!(pw_endpoint_stream_events, version) - 0usize];
7410 ["Offset of field: pw_endpoint_stream_events::info"]
7411 [::std::mem::offset_of!(pw_endpoint_stream_events, info) - 8usize];
7412 ["Offset of field: pw_endpoint_stream_events::param"]
7413 [::std::mem::offset_of!(pw_endpoint_stream_events, param) - 16usize];
7414};
7415#[repr(C)]
7416#[derive(Debug, Copy, Clone)]
7417pub struct pw_endpoint_stream_methods {
7418 #[doc = "< version of this structure"]
7419 pub version: u32,
7420 pub add_listener: ::std::option::Option<
7421 unsafe extern "C" fn(
7422 object: *mut ::std::os::raw::c_void,
7423 listener: *mut spa_hook,
7424 events: *const pw_endpoint_stream_events,
7425 data: *mut ::std::os::raw::c_void,
7426 ) -> ::std::os::raw::c_int,
7427 >,
7428 #[doc = " Subscribe to parameter changes\n\n Automatically emit param events for the given ids when\n they are changed.\n\n \\param ids an array of param ids\n \\param n_ids the number of ids in \\a ids\n\n This requires X permissions."]
7429 pub subscribe_params: ::std::option::Option<
7430 unsafe extern "C" fn(
7431 object: *mut ::std::os::raw::c_void,
7432 ids: *mut u32,
7433 n_ids: u32,
7434 ) -> ::std::os::raw::c_int,
7435 >,
7436 #[doc = " Enumerate stream parameters\n\n Start enumeration of stream parameters. For each param, a\n param event will be emitted.\n\n \\param seq a sequence number returned in the reply\n \\param id the parameter id to enumerate\n \\param start the start index or 0 for the first param\n \\param num the maximum number of params to retrieve\n \\param filter a param filter or NULL\n\n This requires X permissions."]
7437 pub enum_params: ::std::option::Option<
7438 unsafe extern "C" fn(
7439 object: *mut ::std::os::raw::c_void,
7440 seq: ::std::os::raw::c_int,
7441 id: u32,
7442 start: u32,
7443 num: u32,
7444 filter: *const spa_pod,
7445 ) -> ::std::os::raw::c_int,
7446 >,
7447 #[doc = " Set a parameter on the stream\n\n \\param id the parameter id to set\n \\param flags extra parameter flags\n \\param param the parameter to set\n\n This requires X and W permissions."]
7448 pub set_param: ::std::option::Option<
7449 unsafe extern "C" fn(
7450 object: *mut ::std::os::raw::c_void,
7451 id: u32,
7452 flags: u32,
7453 param: *const spa_pod,
7454 ) -> ::std::os::raw::c_int,
7455 >,
7456}
7457#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7458const _: () = {
7459 ["Size of pw_endpoint_stream_methods"]
7460 [::std::mem::size_of::<pw_endpoint_stream_methods>() - 40usize];
7461 ["Alignment of pw_endpoint_stream_methods"]
7462 [::std::mem::align_of::<pw_endpoint_stream_methods>() - 8usize];
7463 ["Offset of field: pw_endpoint_stream_methods::version"]
7464 [::std::mem::offset_of!(pw_endpoint_stream_methods, version) - 0usize];
7465 ["Offset of field: pw_endpoint_stream_methods::add_listener"]
7466 [::std::mem::offset_of!(pw_endpoint_stream_methods, add_listener) - 8usize];
7467 ["Offset of field: pw_endpoint_stream_methods::subscribe_params"]
7468 [::std::mem::offset_of!(pw_endpoint_stream_methods, subscribe_params) - 16usize];
7469 ["Offset of field: pw_endpoint_stream_methods::enum_params"]
7470 [::std::mem::offset_of!(pw_endpoint_stream_methods, enum_params) - 24usize];
7471 ["Offset of field: pw_endpoint_stream_methods::set_param"]
7472 [::std::mem::offset_of!(pw_endpoint_stream_methods, set_param) - 32usize];
7473};
7474#[repr(C)]
7475#[derive(Debug, Copy, Clone)]
7476pub struct pw_endpoint_link_events {
7477 #[doc = "< version of this structure"]
7478 pub version: u32,
7479 #[doc = " Notify endpoint link info\n\n \\param info info about the endpoint link"]
7480 pub info: ::std::option::Option<
7481 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_endpoint_link_info),
7482 >,
7483 #[doc = " Notify a endpoint link param\n\n Event emitted as a result of the enum_params method.\n\n \\param seq the sequence number of the request\n \\param id the param id\n \\param index the param index\n \\param next the param index of the next param\n \\param param the parameter"]
7484 pub param: ::std::option::Option<
7485 unsafe extern "C" fn(
7486 data: *mut ::std::os::raw::c_void,
7487 seq: ::std::os::raw::c_int,
7488 id: u32,
7489 index: u32,
7490 next: u32,
7491 param: *const spa_pod,
7492 ),
7493 >,
7494}
7495#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7496const _: () = {
7497 ["Size of pw_endpoint_link_events"][::std::mem::size_of::<pw_endpoint_link_events>() - 24usize];
7498 ["Alignment of pw_endpoint_link_events"]
7499 [::std::mem::align_of::<pw_endpoint_link_events>() - 8usize];
7500 ["Offset of field: pw_endpoint_link_events::version"]
7501 [::std::mem::offset_of!(pw_endpoint_link_events, version) - 0usize];
7502 ["Offset of field: pw_endpoint_link_events::info"]
7503 [::std::mem::offset_of!(pw_endpoint_link_events, info) - 8usize];
7504 ["Offset of field: pw_endpoint_link_events::param"]
7505 [::std::mem::offset_of!(pw_endpoint_link_events, param) - 16usize];
7506};
7507#[repr(C)]
7508#[derive(Debug, Copy, Clone)]
7509pub struct pw_endpoint_link_methods {
7510 #[doc = "< version of this structure"]
7511 pub version: u32,
7512 pub add_listener: ::std::option::Option<
7513 unsafe extern "C" fn(
7514 object: *mut ::std::os::raw::c_void,
7515 listener: *mut spa_hook,
7516 events: *const pw_endpoint_link_events,
7517 data: *mut ::std::os::raw::c_void,
7518 ) -> ::std::os::raw::c_int,
7519 >,
7520 #[doc = " Subscribe to parameter changes\n\n Automatically emit param events for the given ids when\n they are changed.\n\n \\param ids an array of param ids\n \\param n_ids the number of ids in \\a ids\n\n This requires X permissions."]
7521 pub subscribe_params: ::std::option::Option<
7522 unsafe extern "C" fn(
7523 object: *mut ::std::os::raw::c_void,
7524 ids: *mut u32,
7525 n_ids: u32,
7526 ) -> ::std::os::raw::c_int,
7527 >,
7528 #[doc = " Enumerate link parameters\n\n Start enumeration of link parameters. For each param, a\n param event will be emitted.\n\n \\param seq a sequence number returned in the reply\n \\param id the parameter id to enumerate\n \\param start the start index or 0 for the first param\n \\param num the maximum number of params to retrieve\n \\param filter a param filter or NULL\n\n This requires X permissions."]
7529 pub enum_params: ::std::option::Option<
7530 unsafe extern "C" fn(
7531 object: *mut ::std::os::raw::c_void,
7532 seq: ::std::os::raw::c_int,
7533 id: u32,
7534 start: u32,
7535 num: u32,
7536 filter: *const spa_pod,
7537 ) -> ::std::os::raw::c_int,
7538 >,
7539 #[doc = " Set a parameter on the link\n\n \\param id the parameter id to set\n \\param flags extra parameter flags\n \\param param the parameter to set\n\n This requires X and W permissions."]
7540 pub set_param: ::std::option::Option<
7541 unsafe extern "C" fn(
7542 object: *mut ::std::os::raw::c_void,
7543 id: u32,
7544 flags: u32,
7545 param: *const spa_pod,
7546 ) -> ::std::os::raw::c_int,
7547 >,
7548 #[doc = " Request a state on the link.\n\n This requires X and W permissions."]
7549 pub request_state: ::std::option::Option<
7550 unsafe extern "C" fn(
7551 object: *mut ::std::os::raw::c_void,
7552 state: pw_endpoint_link_state,
7553 ) -> ::std::os::raw::c_int,
7554 >,
7555}
7556#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7557const _: () = {
7558 ["Size of pw_endpoint_link_methods"]
7559 [::std::mem::size_of::<pw_endpoint_link_methods>() - 48usize];
7560 ["Alignment of pw_endpoint_link_methods"]
7561 [::std::mem::align_of::<pw_endpoint_link_methods>() - 8usize];
7562 ["Offset of field: pw_endpoint_link_methods::version"]
7563 [::std::mem::offset_of!(pw_endpoint_link_methods, version) - 0usize];
7564 ["Offset of field: pw_endpoint_link_methods::add_listener"]
7565 [::std::mem::offset_of!(pw_endpoint_link_methods, add_listener) - 8usize];
7566 ["Offset of field: pw_endpoint_link_methods::subscribe_params"]
7567 [::std::mem::offset_of!(pw_endpoint_link_methods, subscribe_params) - 16usize];
7568 ["Offset of field: pw_endpoint_link_methods::enum_params"]
7569 [::std::mem::offset_of!(pw_endpoint_link_methods, enum_params) - 24usize];
7570 ["Offset of field: pw_endpoint_link_methods::set_param"]
7571 [::std::mem::offset_of!(pw_endpoint_link_methods, set_param) - 32usize];
7572 ["Offset of field: pw_endpoint_link_methods::request_state"]
7573 [::std::mem::offset_of!(pw_endpoint_link_methods, request_state) - 40usize];
7574};
7575#[repr(C)]
7576#[derive(Debug, Copy, Clone)]
7577pub struct pw_client_endpoint {
7578 _unused: [u8; 0],
7579}
7580#[repr(C)]
7581#[derive(Debug, Copy, Clone)]
7582pub struct pw_client_endpoint_events {
7583 #[doc = "< version of this structure"]
7584 pub version: u32,
7585 #[doc = " Sets the session id of the \\a endpoint.\n\n On endpoints that are not session masters, this method notifies\n the implementation that it has been associated with a session.\n The implementation is obliged to set this id in the\n #struct pw_endpoint_info \\a session_id field.\n\n \\param endpoint a #pw_endpoint\n \\param id the session id associated with this endpoint\n\n \\return 0 on success\n -EINVAL when the session id has already been set\n -ENOTSUP when the endpoint is a session master"]
7586 pub set_session_id: ::std::option::Option<
7587 unsafe extern "C" fn(
7588 data: *mut ::std::os::raw::c_void,
7589 session_id: u32,
7590 ) -> ::std::os::raw::c_int,
7591 >,
7592 #[doc = " Set the configurable parameter in \\a endpoint.\n\n Usually, \\a param will be obtained from enum_params and then\n modified but it is also possible to set another spa_pod\n as long as its keys and types match a supported object.\n\n Objects with property keys that are not known are ignored.\n\n This function must be called from the main thread.\n\n \\param endpoint a #struct pw_endpoint\n \\param id the parameter id to configure\n \\param flags additional flags\n \\param param the parameter to configure\n\n \\return 0 on success\n -EINVAL when \\a endpoint is NULL\n -ENOTSUP when there are no parameters implemented on \\a endpoint\n -ENOENT the parameter is unknown"]
7593 pub set_param: ::std::option::Option<
7594 unsafe extern "C" fn(
7595 data: *mut ::std::os::raw::c_void,
7596 id: u32,
7597 flags: u32,
7598 param: *const spa_pod,
7599 ) -> ::std::os::raw::c_int,
7600 >,
7601 #[doc = " Set a parameter on \\a stream_id of \\a endpoint.\n\n When \\a param is NULL, the parameter will be unset.\n\n This function must be called from the main thread.\n\n \\param endpoint a #struct pw_endpoint\n \\param stream_id the stream to configure\n \\param id the parameter id to set\n \\param flags optional flags\n \\param param a #struct spa_pod with the parameter to set\n \\return 0 on success\n 1 on success, the value of \\a param might have been\n changed depending on \\a flags and the final value can\n be found by doing stream_enum_params.\n -EINVAL when \\a endpoint is NULL or invalid arguments are given\n -ESRCH when the type or size of a property is not correct.\n -ENOENT when the param id is not found"]
7602 pub stream_set_param: ::std::option::Option<
7603 unsafe extern "C" fn(
7604 data: *mut ::std::os::raw::c_void,
7605 stream_id: u32,
7606 id: u32,
7607 flags: u32,
7608 param: *const spa_pod,
7609 ) -> ::std::os::raw::c_int,
7610 >,
7611 pub create_link: ::std::option::Option<
7612 unsafe extern "C" fn(
7613 data: *mut ::std::os::raw::c_void,
7614 props: *const spa_dict,
7615 ) -> ::std::os::raw::c_int,
7616 >,
7617}
7618#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7619const _: () = {
7620 ["Size of pw_client_endpoint_events"]
7621 [::std::mem::size_of::<pw_client_endpoint_events>() - 40usize];
7622 ["Alignment of pw_client_endpoint_events"]
7623 [::std::mem::align_of::<pw_client_endpoint_events>() - 8usize];
7624 ["Offset of field: pw_client_endpoint_events::version"]
7625 [::std::mem::offset_of!(pw_client_endpoint_events, version) - 0usize];
7626 ["Offset of field: pw_client_endpoint_events::set_session_id"]
7627 [::std::mem::offset_of!(pw_client_endpoint_events, set_session_id) - 8usize];
7628 ["Offset of field: pw_client_endpoint_events::set_param"]
7629 [::std::mem::offset_of!(pw_client_endpoint_events, set_param) - 16usize];
7630 ["Offset of field: pw_client_endpoint_events::stream_set_param"]
7631 [::std::mem::offset_of!(pw_client_endpoint_events, stream_set_param) - 24usize];
7632 ["Offset of field: pw_client_endpoint_events::create_link"]
7633 [::std::mem::offset_of!(pw_client_endpoint_events, create_link) - 32usize];
7634};
7635#[repr(C)]
7636#[derive(Debug, Copy, Clone)]
7637pub struct pw_client_endpoint_methods {
7638 #[doc = "< version of this structure"]
7639 pub version: u32,
7640 pub add_listener: ::std::option::Option<
7641 unsafe extern "C" fn(
7642 object: *mut ::std::os::raw::c_void,
7643 listener: *mut spa_hook,
7644 events: *const pw_client_endpoint_events,
7645 data: *mut ::std::os::raw::c_void,
7646 ) -> ::std::os::raw::c_int,
7647 >,
7648 #[doc = " Update endpoint information"]
7649 pub update: ::std::option::Option<
7650 unsafe extern "C" fn(
7651 object: *mut ::std::os::raw::c_void,
7652 change_mask: u32,
7653 n_params: u32,
7654 params: *mut *const spa_pod,
7655 info: *const pw_endpoint_info,
7656 ) -> ::std::os::raw::c_int,
7657 >,
7658 #[doc = " Update stream information"]
7659 pub stream_update: ::std::option::Option<
7660 unsafe extern "C" fn(
7661 object: *mut ::std::os::raw::c_void,
7662 stream_id: u32,
7663 change_mask: u32,
7664 n_params: u32,
7665 params: *mut *const spa_pod,
7666 info: *const pw_endpoint_stream_info,
7667 ) -> ::std::os::raw::c_int,
7668 >,
7669}
7670#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7671const _: () = {
7672 ["Size of pw_client_endpoint_methods"]
7673 [::std::mem::size_of::<pw_client_endpoint_methods>() - 32usize];
7674 ["Alignment of pw_client_endpoint_methods"]
7675 [::std::mem::align_of::<pw_client_endpoint_methods>() - 8usize];
7676 ["Offset of field: pw_client_endpoint_methods::version"]
7677 [::std::mem::offset_of!(pw_client_endpoint_methods, version) - 0usize];
7678 ["Offset of field: pw_client_endpoint_methods::add_listener"]
7679 [::std::mem::offset_of!(pw_client_endpoint_methods, add_listener) - 8usize];
7680 ["Offset of field: pw_client_endpoint_methods::update"]
7681 [::std::mem::offset_of!(pw_client_endpoint_methods, update) - 16usize];
7682 ["Offset of field: pw_client_endpoint_methods::stream_update"]
7683 [::std::mem::offset_of!(pw_client_endpoint_methods, stream_update) - 24usize];
7684};
7685#[repr(C)]
7686#[derive(Debug, Copy, Clone)]
7687pub struct pw_client_session {
7688 _unused: [u8; 0],
7689}
7690#[repr(C)]
7691#[derive(Debug, Copy, Clone)]
7692pub struct pw_client_session_events {
7693 #[doc = "< version of this structure"]
7694 pub version: u32,
7695 #[doc = " Set the configurable parameter in \\a session.\n\n Usually, \\a param will be obtained from enum_params and then\n modified but it is also possible to set another spa_pod\n as long as its keys and types match a supported object.\n\n Objects with property keys that are not known are ignored.\n\n This function must be called from the main thread.\n\n \\param session a #struct pw_session\n \\param id the parameter id to configure\n \\param flags additional flags\n \\param param the parameter to configure\n\n \\return 0 on success\n -EINVAL when \\a session is NULL\n -ENOTSUP when there are no parameters implemented on \\a session\n -ENOENT the parameter is unknown"]
7696 pub set_param: ::std::option::Option<
7697 unsafe extern "C" fn(
7698 data: *mut ::std::os::raw::c_void,
7699 id: u32,
7700 flags: u32,
7701 param: *const spa_pod,
7702 ) -> ::std::os::raw::c_int,
7703 >,
7704 #[doc = " Set a parameter on \\a link_id of \\a session.\n\n When \\a param is NULL, the parameter will be unset.\n\n This function must be called from the main thread.\n\n \\param session a #struct pw_session\n \\param link_id the link to configure\n \\param id the parameter id to set\n \\param flags optional flags\n \\param param a #struct spa_pod with the parameter to set\n \\return 0 on success\n 1 on success, the value of \\a param might have been\n changed depending on \\a flags and the final value can\n be found by doing link_enum_params.\n -EINVAL when \\a session is NULL or invalid arguments are given\n -ESRCH when the type or size of a property is not correct.\n -ENOENT when the param id is not found"]
7705 pub link_set_param: ::std::option::Option<
7706 unsafe extern "C" fn(
7707 data: *mut ::std::os::raw::c_void,
7708 link_id: u32,
7709 id: u32,
7710 flags: u32,
7711 param: *const spa_pod,
7712 ) -> ::std::os::raw::c_int,
7713 >,
7714 pub link_request_state: ::std::option::Option<
7715 unsafe extern "C" fn(
7716 data: *mut ::std::os::raw::c_void,
7717 link_id: u32,
7718 state: u32,
7719 ) -> ::std::os::raw::c_int,
7720 >,
7721}
7722#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7723const _: () = {
7724 ["Size of pw_client_session_events"]
7725 [::std::mem::size_of::<pw_client_session_events>() - 32usize];
7726 ["Alignment of pw_client_session_events"]
7727 [::std::mem::align_of::<pw_client_session_events>() - 8usize];
7728 ["Offset of field: pw_client_session_events::version"]
7729 [::std::mem::offset_of!(pw_client_session_events, version) - 0usize];
7730 ["Offset of field: pw_client_session_events::set_param"]
7731 [::std::mem::offset_of!(pw_client_session_events, set_param) - 8usize];
7732 ["Offset of field: pw_client_session_events::link_set_param"]
7733 [::std::mem::offset_of!(pw_client_session_events, link_set_param) - 16usize];
7734 ["Offset of field: pw_client_session_events::link_request_state"]
7735 [::std::mem::offset_of!(pw_client_session_events, link_request_state) - 24usize];
7736};
7737#[repr(C)]
7738#[derive(Debug, Copy, Clone)]
7739pub struct pw_client_session_methods {
7740 #[doc = "< version of this structure"]
7741 pub version: u32,
7742 pub add_listener: ::std::option::Option<
7743 unsafe extern "C" fn(
7744 object: *mut ::std::os::raw::c_void,
7745 listener: *mut spa_hook,
7746 events: *const pw_client_session_events,
7747 data: *mut ::std::os::raw::c_void,
7748 ) -> ::std::os::raw::c_int,
7749 >,
7750 #[doc = " Update session information"]
7751 pub update: ::std::option::Option<
7752 unsafe extern "C" fn(
7753 object: *mut ::std::os::raw::c_void,
7754 change_mask: u32,
7755 n_params: u32,
7756 params: *mut *const spa_pod,
7757 info: *const pw_session_info,
7758 ) -> ::std::os::raw::c_int,
7759 >,
7760 #[doc = " Update link information"]
7761 pub link_update: ::std::option::Option<
7762 unsafe extern "C" fn(
7763 object: *mut ::std::os::raw::c_void,
7764 link_id: u32,
7765 change_mask: u32,
7766 n_params: u32,
7767 params: *mut *const spa_pod,
7768 info: *const pw_endpoint_link_info,
7769 ) -> ::std::os::raw::c_int,
7770 >,
7771}
7772#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7773const _: () = {
7774 ["Size of pw_client_session_methods"]
7775 [::std::mem::size_of::<pw_client_session_methods>() - 32usize];
7776 ["Alignment of pw_client_session_methods"]
7777 [::std::mem::align_of::<pw_client_session_methods>() - 8usize];
7778 ["Offset of field: pw_client_session_methods::version"]
7779 [::std::mem::offset_of!(pw_client_session_methods, version) - 0usize];
7780 ["Offset of field: pw_client_session_methods::add_listener"]
7781 [::std::mem::offset_of!(pw_client_session_methods, add_listener) - 8usize];
7782 ["Offset of field: pw_client_session_methods::update"]
7783 [::std::mem::offset_of!(pw_client_session_methods, update) - 16usize];
7784 ["Offset of field: pw_client_session_methods::link_update"]
7785 [::std::mem::offset_of!(pw_client_session_methods, link_update) - 24usize];
7786};
7787pub type __builtin_va_list = [__va_list_tag; 1usize];
7788#[repr(C)]
7789#[derive(Debug, Copy, Clone)]
7790pub struct __va_list_tag {
7791 pub gp_offset: ::std::os::raw::c_uint,
7792 pub fp_offset: ::std::os::raw::c_uint,
7793 pub overflow_arg_area: *mut ::std::os::raw::c_void,
7794 pub reg_save_area: *mut ::std::os::raw::c_void,
7795}
7796#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7797const _: () = {
7798 ["Size of __va_list_tag"][::std::mem::size_of::<__va_list_tag>() - 24usize];
7799 ["Alignment of __va_list_tag"][::std::mem::align_of::<__va_list_tag>() - 8usize];
7800 ["Offset of field: __va_list_tag::gp_offset"]
7801 [::std::mem::offset_of!(__va_list_tag, gp_offset) - 0usize];
7802 ["Offset of field: __va_list_tag::fp_offset"]
7803 [::std::mem::offset_of!(__va_list_tag, fp_offset) - 4usize];
7804 ["Offset of field: __va_list_tag::overflow_arg_area"]
7805 [::std::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize];
7806 ["Offset of field: __va_list_tag::reg_save_area"]
7807 [::std::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize];
7808};