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_VERSION_CORE: u32 = 4;
149pub const PW_VERSION_REGISTRY: u32 = 3;
150pub const PW_DEFAULT_REMOTE: &[u8; 11] = b"pipewire-0\0";
151pub const PW_ID_CORE: u32 = 0;
152pub const PW_CORE_CHANGE_MASK_PROPS: u32 = 1;
153pub const PW_CORE_CHANGE_MASK_ALL: u32 = 1;
154pub const PW_PROPERTIES_FLAG_NL: u32 = 1;
155pub const PW_PROPERTIES_FLAG_RECURSE: u32 = 2;
156pub const PW_PROPERTIES_FLAG_ENCLOSE: u32 = 4;
157pub const PW_PROPERTIES_FLAG_ARRAY: u32 = 8;
158pub const PW_PROPERTIES_FLAG_COLORS: u32 = 16;
159pub const PW_CORE_EVENT_INFO: u32 = 0;
160pub const PW_CORE_EVENT_DONE: u32 = 1;
161pub const PW_CORE_EVENT_PING: u32 = 2;
162pub const PW_CORE_EVENT_ERROR: u32 = 3;
163pub const PW_CORE_EVENT_REMOVE_ID: u32 = 4;
164pub const PW_CORE_EVENT_BOUND_ID: u32 = 5;
165pub const PW_CORE_EVENT_ADD_MEM: u32 = 6;
166pub const PW_CORE_EVENT_REMOVE_MEM: u32 = 7;
167pub const PW_CORE_EVENT_BOUND_PROPS: u32 = 8;
168pub const PW_CORE_EVENT_NUM: u32 = 9;
169pub const PW_VERSION_CORE_EVENTS: u32 = 1;
170pub const PW_CORE_METHOD_ADD_LISTENER: u32 = 0;
171pub const PW_CORE_METHOD_HELLO: u32 = 1;
172pub const PW_CORE_METHOD_SYNC: u32 = 2;
173pub const PW_CORE_METHOD_PONG: u32 = 3;
174pub const PW_CORE_METHOD_ERROR: u32 = 4;
175pub const PW_CORE_METHOD_GET_REGISTRY: u32 = 5;
176pub const PW_CORE_METHOD_CREATE_OBJECT: u32 = 6;
177pub const PW_CORE_METHOD_DESTROY: u32 = 7;
178pub const PW_CORE_METHOD_NUM: u32 = 8;
179pub const PW_VERSION_CORE_METHODS: u32 = 0;
180pub const PW_REGISTRY_EVENT_GLOBAL: u32 = 0;
181pub const PW_REGISTRY_EVENT_GLOBAL_REMOVE: u32 = 1;
182pub const PW_REGISTRY_EVENT_NUM: u32 = 2;
183pub const PW_VERSION_REGISTRY_EVENTS: u32 = 0;
184pub const PW_REGISTRY_METHOD_ADD_LISTENER: u32 = 0;
185pub const PW_REGISTRY_METHOD_BIND: u32 = 1;
186pub const PW_REGISTRY_METHOD_DESTROY: u32 = 2;
187pub const PW_REGISTRY_METHOD_NUM: u32 = 3;
188pub const PW_VERSION_REGISTRY_METHODS: u32 = 0;
189pub const PW_VERSION_CONTEXT_EVENTS: u32 = 1;
190pub const PW_TYPE_INFO_Protocol: &[u8; 18] = b"PipeWire:Protocol\0";
191pub const PW_TYPE_INFO_PROTOCOL_BASE: &[u8; 19] = b"PipeWire:Protocol:\0";
192pub const PW_PROTOCOL_MARSHAL_FLAG_IMPL: u32 = 1;
193pub const PW_VERSION_PROTOCOL_IMPLEMENTATION: u32 = 1;
194pub const PW_VERSION_PROTOCOL_EVENTS: u32 = 0;
195pub const PW_VERSION_PROXY_EVENTS: u32 = 1;
196pub const PW_PERM_R: u32 = 256;
197pub const PW_PERM_W: u32 = 128;
198pub const PW_PERM_X: u32 = 64;
199pub const PW_PERM_M: u32 = 8;
200pub const PW_PERM_L: u32 = 16;
201pub const PW_PERM_RW: u32 = 384;
202pub const PW_PERM_RWX: u32 = 448;
203pub const PW_PERM_RWXM: u32 = 456;
204pub const PW_PERM_RWXML: u32 = 472;
205pub const PW_PERM_ALL: u32 = 456;
206pub const PW_PERMISSION_FORMAT: &[u8; 11] = b"%c%c%c%c%c\0";
207pub const PW_TYPE_INTERFACE_Client: &[u8; 26] = b"PipeWire:Interface:Client\0";
208pub const PW_CLIENT_PERM_MASK: u32 = 456;
209pub const PW_VERSION_CLIENT: u32 = 3;
210pub const PW_ID_CLIENT: u32 = 1;
211pub const PW_CLIENT_CHANGE_MASK_PROPS: u32 = 1;
212pub const PW_CLIENT_CHANGE_MASK_ALL: u32 = 1;
213pub const PW_CLIENT_EVENT_INFO: u32 = 0;
214pub const PW_CLIENT_EVENT_PERMISSIONS: u32 = 1;
215pub const PW_CLIENT_EVENT_NUM: u32 = 2;
216pub const PW_VERSION_CLIENT_EVENTS: u32 = 0;
217pub const PW_CLIENT_METHOD_ADD_LISTENER: u32 = 0;
218pub const PW_CLIENT_METHOD_ERROR: u32 = 1;
219pub const PW_CLIENT_METHOD_UPDATE_PROPERTIES: u32 = 2;
220pub const PW_CLIENT_METHOD_GET_PERMISSIONS: u32 = 3;
221pub const PW_CLIENT_METHOD_UPDATE_PERMISSIONS: u32 = 4;
222pub const PW_CLIENT_METHOD_NUM: u32 = 5;
223pub const PW_VERSION_CLIENT_METHODS: u32 = 0;
224pub const PW_TYPE_INTERFACE_Device: &[u8; 26] = b"PipeWire:Interface:Device\0";
225pub const PW_DEVICE_PERM_MASK: u32 = 456;
226pub const PW_VERSION_DEVICE: u32 = 3;
227pub const PW_DEVICE_CHANGE_MASK_PROPS: u32 = 1;
228pub const PW_DEVICE_CHANGE_MASK_PARAMS: u32 = 2;
229pub const PW_DEVICE_CHANGE_MASK_ALL: u32 = 3;
230pub const PW_DEVICE_EVENT_INFO: u32 = 0;
231pub const PW_DEVICE_EVENT_PARAM: u32 = 1;
232pub const PW_DEVICE_EVENT_NUM: u32 = 2;
233pub const PW_VERSION_DEVICE_EVENTS: u32 = 0;
234pub const PW_DEVICE_METHOD_ADD_LISTENER: u32 = 0;
235pub const PW_DEVICE_METHOD_SUBSCRIBE_PARAMS: u32 = 1;
236pub const PW_DEVICE_METHOD_ENUM_PARAMS: u32 = 2;
237pub const PW_DEVICE_METHOD_SET_PARAM: u32 = 3;
238pub const PW_DEVICE_METHOD_NUM: u32 = 4;
239pub const PW_VERSION_DEVICE_METHODS: u32 = 0;
240pub const PW_VERSION_MEMPOOL_EVENTS: u32 = 0;
241pub const PW_BUFFERS_FLAG_NONE: u32 = 0;
242pub const PW_BUFFERS_FLAG_NO_MEM: u32 = 1;
243pub const PW_BUFFERS_FLAG_SHARED: u32 = 2;
244pub const PW_BUFFERS_FLAG_DYNAMIC: u32 = 4;
245pub const PW_BUFFERS_FLAG_SHARED_MEM: u32 = 8;
246pub const PW_BUFFERS_FLAG_IN_PRIORITY: u32 = 16;
247pub const PW_BUFFERS_FLAG_ASYNC: u32 = 32;
248pub const PW_TYPE_INTERFACE_Factory: &[u8; 27] = b"PipeWire:Interface:Factory\0";
249pub const PW_FACTORY_PERM_MASK: u32 = 264;
250pub const PW_VERSION_FACTORY: u32 = 3;
251pub const PW_FACTORY_CHANGE_MASK_PROPS: u32 = 1;
252pub const PW_FACTORY_CHANGE_MASK_ALL: u32 = 1;
253pub const PW_FACTORY_EVENT_INFO: u32 = 0;
254pub const PW_FACTORY_EVENT_NUM: u32 = 1;
255pub const PW_VERSION_FACTORY_EVENTS: u32 = 0;
256pub const PW_FACTORY_METHOD_ADD_LISTENER: u32 = 0;
257pub const PW_FACTORY_METHOD_NUM: u32 = 1;
258pub const PW_VERSION_FACTORY_METHODS: u32 = 0;
259pub const PW_KEY_PROTOCOL: &[u8; 18] = b"pipewire.protocol\0";
260pub const PW_KEY_ACCESS: &[u8; 16] = b"pipewire.access\0";
261pub const PW_KEY_CLIENT_ACCESS: &[u8; 23] = b"pipewire.client.access\0";
262pub const PW_KEY_SEC_PID: &[u8; 17] = b"pipewire.sec.pid\0";
263pub const PW_KEY_SEC_UID: &[u8; 17] = b"pipewire.sec.uid\0";
264pub const PW_KEY_SEC_GID: &[u8; 17] = b"pipewire.sec.gid\0";
265pub const PW_KEY_SEC_LABEL: &[u8; 19] = b"pipewire.sec.label\0";
266pub const PW_KEY_SEC_SOCKET: &[u8; 20] = b"pipewire.sec.socket\0";
267pub const PW_KEY_SEC_ENGINE: &[u8; 20] = b"pipewire.sec.engine\0";
268pub const PW_KEY_SEC_APP_ID: &[u8; 20] = b"pipewire.sec.app-id\0";
269pub const PW_KEY_SEC_INSTANCE_ID: &[u8; 25] = b"pipewire.sec.instance-id\0";
270pub const PW_KEY_LIBRARY_NAME_SYSTEM: &[u8; 20] = b"library.name.system\0";
271pub const PW_KEY_LIBRARY_NAME_LOOP: &[u8; 18] = b"library.name.loop\0";
272pub const PW_KEY_LIBRARY_NAME_DBUS: &[u8; 18] = b"library.name.dbus\0";
273pub const PW_KEY_OBJECT_PATH: &[u8; 12] = b"object.path\0";
274pub const PW_KEY_OBJECT_ID: &[u8; 10] = b"object.id\0";
275pub const PW_KEY_OBJECT_SERIAL: &[u8; 14] = b"object.serial\0";
276pub const PW_KEY_OBJECT_LINGER: &[u8; 14] = b"object.linger\0";
277pub const PW_KEY_OBJECT_REGISTER: &[u8; 16] = b"object.register\0";
278pub const PW_KEY_OBJECT_EXPORT: &[u8; 14] = b"object.export\0";
279pub const PW_KEY_CONFIG_PREFIX: &[u8; 14] = b"config.prefix\0";
280pub const PW_KEY_CONFIG_NAME: &[u8; 12] = b"config.name\0";
281pub const PW_KEY_CONFIG_OVERRIDE_PREFIX: &[u8; 23] = b"config.override.prefix\0";
282pub const PW_KEY_CONFIG_OVERRIDE_NAME: &[u8; 21] = b"config.override.name\0";
283pub const PW_KEY_LOOP_NAME: &[u8; 10] = b"loop.name\0";
284pub const PW_KEY_LOOP_CLASS: &[u8; 11] = b"loop.class\0";
285pub const PW_KEY_LOOP_RT_PRIO: &[u8; 13] = b"loop.rt-prio\0";
286pub const PW_KEY_LOOP_CANCEL: &[u8; 12] = b"loop.cancel\0";
287pub const PW_KEY_CONTEXT_PROFILE_MODULES: &[u8; 24] = b"context.profile.modules\0";
288pub const PW_KEY_USER_NAME: &[u8; 18] = b"context.user-name\0";
289pub const PW_KEY_HOST_NAME: &[u8; 18] = b"context.host-name\0";
290pub const PW_KEY_CORE_NAME: &[u8; 10] = b"core.name\0";
291pub const PW_KEY_CORE_VERSION: &[u8; 13] = b"core.version\0";
292pub const PW_KEY_CORE_DAEMON: &[u8; 12] = b"core.daemon\0";
293pub const PW_KEY_CORE_ID: &[u8; 8] = b"core.id\0";
294pub const PW_KEY_CORE_MONITORS: &[u8; 14] = b"core.monitors\0";
295pub const PW_KEY_CPU_MAX_ALIGN: &[u8; 14] = b"cpu.max-align\0";
296pub const PW_KEY_CPU_CORES: &[u8; 10] = b"cpu.cores\0";
297pub const PW_KEY_PRIORITY_SESSION: &[u8; 17] = b"priority.session\0";
298pub const PW_KEY_PRIORITY_DRIVER: &[u8; 16] = b"priority.driver\0";
299pub const PW_KEY_REMOTE_NAME: &[u8; 12] = b"remote.name\0";
300pub const PW_KEY_REMOTE_INTENTION: &[u8; 17] = b"remote.intention\0";
301pub const PW_KEY_APP_NAME: &[u8; 17] = b"application.name\0";
302pub const PW_KEY_APP_ID: &[u8; 15] = b"application.id\0";
303pub const PW_KEY_APP_VERSION: &[u8; 20] = b"application.version\0";
304pub const PW_KEY_APP_ICON: &[u8; 17] = b"application.icon\0";
305pub const PW_KEY_APP_ICON_NAME: &[u8; 22] = b"application.icon-name\0";
306pub const PW_KEY_APP_LANGUAGE: &[u8; 21] = b"application.language\0";
307pub const PW_KEY_APP_PROCESS_ID: &[u8; 23] = b"application.process.id\0";
308pub const PW_KEY_APP_PROCESS_BINARY: &[u8; 27] = b"application.process.binary\0";
309pub const PW_KEY_APP_PROCESS_USER: &[u8; 25] = b"application.process.user\0";
310pub const PW_KEY_APP_PROCESS_HOST: &[u8; 25] = b"application.process.host\0";
311pub const PW_KEY_APP_PROCESS_MACHINE_ID: &[u8; 31] = b"application.process.machine-id\0";
312pub const PW_KEY_APP_PROCESS_SESSION_ID: &[u8; 31] = b"application.process.session-id\0";
313pub const PW_KEY_WINDOW_X11_DISPLAY: &[u8; 19] = b"window.x11.display\0";
314pub const PW_KEY_CLIENT_ID: &[u8; 10] = b"client.id\0";
315pub const PW_KEY_CLIENT_NAME: &[u8; 12] = b"client.name\0";
316pub const PW_KEY_CLIENT_API: &[u8; 11] = b"client.api\0";
317pub const PW_KEY_NODE_ID: &[u8; 8] = b"node.id\0";
318pub const PW_KEY_NODE_NAME: &[u8; 10] = b"node.name\0";
319pub const PW_KEY_NODE_NICK: &[u8; 10] = b"node.nick\0";
320pub const PW_KEY_NODE_DESCRIPTION: &[u8; 17] = b"node.description\0";
321pub const PW_KEY_NODE_PLUGGED: &[u8; 13] = b"node.plugged\0";
322pub const PW_KEY_NODE_SESSION: &[u8; 13] = b"node.session\0";
323pub const PW_KEY_NODE_GROUP: &[u8; 11] = b"node.group\0";
324pub const PW_KEY_NODE_SYNC_GROUP: &[u8; 16] = b"node.sync-group\0";
325pub const PW_KEY_NODE_SYNC: &[u8; 10] = b"node.sync\0";
326pub const PW_KEY_NODE_TRANSPORT: &[u8; 15] = b"node.transport\0";
327pub const PW_KEY_NODE_EXCLUSIVE: &[u8; 15] = b"node.exclusive\0";
328pub const PW_KEY_NODE_AUTOCONNECT: &[u8; 17] = b"node.autoconnect\0";
329pub const PW_KEY_NODE_LATENCY: &[u8; 13] = b"node.latency\0";
330pub const PW_KEY_NODE_MAX_LATENCY: &[u8; 17] = b"node.max-latency\0";
331pub const PW_KEY_NODE_LOCK_QUANTUM: &[u8; 18] = b"node.lock-quantum\0";
332pub const PW_KEY_NODE_FORCE_QUANTUM: &[u8; 19] = b"node.force-quantum\0";
333pub const PW_KEY_NODE_RATE: &[u8; 10] = b"node.rate\0";
334pub const PW_KEY_NODE_LOCK_RATE: &[u8; 15] = b"node.lock-rate\0";
335pub const PW_KEY_NODE_FORCE_RATE: &[u8; 16] = b"node.force-rate\0";
336pub const PW_KEY_NODE_DONT_RECONNECT: &[u8; 20] = b"node.dont-reconnect\0";
337pub const PW_KEY_NODE_ALWAYS_PROCESS: &[u8; 20] = b"node.always-process\0";
338pub const PW_KEY_NODE_WANT_DRIVER: &[u8; 17] = b"node.want-driver\0";
339pub const PW_KEY_NODE_PAUSE_ON_IDLE: &[u8; 19] = b"node.pause-on-idle\0";
340pub const PW_KEY_NODE_SUSPEND_ON_IDLE: &[u8; 21] = b"node.suspend-on-idle\0";
341pub const PW_KEY_NODE_CACHE_PARAMS: &[u8; 18] = b"node.cache-params\0";
342pub const PW_KEY_NODE_TRANSPORT_SYNC: &[u8; 20] = b"node.transport.sync\0";
343pub const PW_KEY_NODE_DRIVER: &[u8; 12] = b"node.driver\0";
344pub const PW_KEY_NODE_SUPPORTS_LAZY: &[u8; 19] = b"node.supports-lazy\0";
345pub const PW_KEY_NODE_SUPPORTS_REQUEST: &[u8; 22] = b"node.supports-request\0";
346pub const PW_KEY_NODE_DRIVER_ID: &[u8; 15] = b"node.driver-id\0";
347pub const PW_KEY_NODE_ASYNC: &[u8; 11] = b"node.async\0";
348pub const PW_KEY_NODE_LOOP_NAME: &[u8; 15] = b"node.loop.name\0";
349pub const PW_KEY_NODE_LOOP_CLASS: &[u8; 16] = b"node.loop.class\0";
350pub const PW_KEY_NODE_STREAM: &[u8; 12] = b"node.stream\0";
351pub const PW_KEY_NODE_VIRTUAL: &[u8; 13] = b"node.virtual\0";
352pub const PW_KEY_NODE_PASSIVE: &[u8; 13] = b"node.passive\0";
353pub const PW_KEY_NODE_LINK_GROUP: &[u8; 16] = b"node.link-group\0";
354pub const PW_KEY_NODE_NETWORK: &[u8; 13] = b"node.network\0";
355pub const PW_KEY_NODE_TRIGGER: &[u8; 13] = b"node.trigger\0";
356pub const PW_KEY_NODE_CHANNELNAMES: &[u8; 19] = b"node.channel-names\0";
357pub const PW_KEY_NODE_DEVICE_PORT_NAME_PREFIX: &[u8; 29] = b"node.device-port-name-prefix\0";
358pub const PW_KEY_PORT_ID: &[u8; 8] = b"port.id\0";
359pub const PW_KEY_PORT_NAME: &[u8; 10] = b"port.name\0";
360pub const PW_KEY_PORT_DIRECTION: &[u8; 15] = b"port.direction\0";
361pub const PW_KEY_PORT_ALIAS: &[u8; 11] = b"port.alias\0";
362pub const PW_KEY_PORT_PHYSICAL: &[u8; 14] = b"port.physical\0";
363pub const PW_KEY_PORT_TERMINAL: &[u8; 14] = b"port.terminal\0";
364pub const PW_KEY_PORT_CONTROL: &[u8; 13] = b"port.control\0";
365pub const PW_KEY_PORT_MONITOR: &[u8; 13] = b"port.monitor\0";
366pub const PW_KEY_PORT_CACHE_PARAMS: &[u8; 18] = b"port.cache-params\0";
367pub const PW_KEY_PORT_EXTRA: &[u8; 11] = b"port.extra\0";
368pub const PW_KEY_PORT_PASSIVE: &[u8; 13] = b"port.passive\0";
369pub const PW_KEY_PORT_IGNORE_LATENCY: &[u8; 20] = b"port.ignore-latency\0";
370pub const PW_KEY_PORT_GROUP: &[u8; 11] = b"port.group\0";
371pub const PW_KEY_LINK_ID: &[u8; 8] = b"link.id\0";
372pub const PW_KEY_LINK_INPUT_NODE: &[u8; 16] = b"link.input.node\0";
373pub const PW_KEY_LINK_INPUT_PORT: &[u8; 16] = b"link.input.port\0";
374pub const PW_KEY_LINK_OUTPUT_NODE: &[u8; 17] = b"link.output.node\0";
375pub const PW_KEY_LINK_OUTPUT_PORT: &[u8; 17] = b"link.output.port\0";
376pub const PW_KEY_LINK_PASSIVE: &[u8; 13] = b"link.passive\0";
377pub const PW_KEY_LINK_FEEDBACK: &[u8; 14] = b"link.feedback\0";
378pub const PW_KEY_LINK_ASYNC: &[u8; 11] = b"link.async\0";
379pub const PW_KEY_DEVICE_ID: &[u8; 10] = b"device.id\0";
380pub const PW_KEY_DEVICE_NAME: &[u8; 12] = b"device.name\0";
381pub const PW_KEY_DEVICE_PLUGGED: &[u8; 15] = b"device.plugged\0";
382pub const PW_KEY_DEVICE_NICK: &[u8; 12] = b"device.nick\0";
383pub const PW_KEY_DEVICE_STRING: &[u8; 14] = b"device.string\0";
384pub const PW_KEY_DEVICE_API: &[u8; 11] = b"device.api\0";
385pub const PW_KEY_DEVICE_DESCRIPTION: &[u8; 19] = b"device.description\0";
386pub const PW_KEY_DEVICE_BUS_PATH: &[u8; 16] = b"device.bus-path\0";
387pub const PW_KEY_DEVICE_SERIAL: &[u8; 14] = b"device.serial\0";
388pub const PW_KEY_DEVICE_VENDOR_ID: &[u8; 17] = b"device.vendor.id\0";
389pub const PW_KEY_DEVICE_VENDOR_NAME: &[u8; 19] = b"device.vendor.name\0";
390pub const PW_KEY_DEVICE_PRODUCT_ID: &[u8; 18] = b"device.product.id\0";
391pub const PW_KEY_DEVICE_PRODUCT_NAME: &[u8; 20] = b"device.product.name\0";
392pub const PW_KEY_DEVICE_CLASS: &[u8; 13] = b"device.class\0";
393pub const PW_KEY_DEVICE_FORM_FACTOR: &[u8; 19] = b"device.form-factor\0";
394pub const PW_KEY_DEVICE_BUS: &[u8; 11] = b"device.bus\0";
395pub const PW_KEY_DEVICE_SUBSYSTEM: &[u8; 17] = b"device.subsystem\0";
396pub const PW_KEY_DEVICE_SYSFS_PATH: &[u8; 18] = b"device.sysfs.path\0";
397pub const PW_KEY_DEVICE_ICON: &[u8; 12] = b"device.icon\0";
398pub const PW_KEY_DEVICE_ICON_NAME: &[u8; 17] = b"device.icon-name\0";
399pub const PW_KEY_DEVICE_INTENDED_ROLES: &[u8; 22] = b"device.intended-roles\0";
400pub const PW_KEY_DEVICE_CACHE_PARAMS: &[u8; 20] = b"device.cache-params\0";
401pub const PW_KEY_MODULE_ID: &[u8; 10] = b"module.id\0";
402pub const PW_KEY_MODULE_NAME: &[u8; 12] = b"module.name\0";
403pub const PW_KEY_MODULE_AUTHOR: &[u8; 14] = b"module.author\0";
404pub const PW_KEY_MODULE_DESCRIPTION: &[u8; 19] = b"module.description\0";
405pub const PW_KEY_MODULE_USAGE: &[u8; 13] = b"module.usage\0";
406pub const PW_KEY_MODULE_VERSION: &[u8; 15] = b"module.version\0";
407pub const PW_KEY_MODULE_DEPRECATED: &[u8; 18] = b"module.deprecated\0";
408pub const PW_KEY_FACTORY_ID: &[u8; 11] = b"factory.id\0";
409pub const PW_KEY_FACTORY_NAME: &[u8; 13] = b"factory.name\0";
410pub const PW_KEY_FACTORY_USAGE: &[u8; 14] = b"factory.usage\0";
411pub const PW_KEY_FACTORY_TYPE_NAME: &[u8; 18] = b"factory.type.name\0";
412pub const PW_KEY_FACTORY_TYPE_VERSION: &[u8; 21] = b"factory.type.version\0";
413pub const PW_KEY_STREAM_IS_LIVE: &[u8; 15] = b"stream.is-live\0";
414pub const PW_KEY_STREAM_LATENCY_MIN: &[u8; 19] = b"stream.latency.min\0";
415pub const PW_KEY_STREAM_LATENCY_MAX: &[u8; 19] = b"stream.latency.max\0";
416pub const PW_KEY_STREAM_MONITOR: &[u8; 15] = b"stream.monitor\0";
417pub const PW_KEY_STREAM_DONT_REMIX: &[u8; 18] = b"stream.dont-remix\0";
418pub const PW_KEY_STREAM_CAPTURE_SINK: &[u8; 20] = b"stream.capture.sink\0";
419pub const PW_KEY_MEDIA_TYPE: &[u8; 11] = b"media.type\0";
420pub const PW_KEY_MEDIA_CATEGORY: &[u8; 15] = b"media.category\0";
421pub const PW_KEY_MEDIA_ROLE: &[u8; 11] = b"media.role\0";
422pub const PW_KEY_MEDIA_CLASS: &[u8; 12] = b"media.class\0";
423pub const PW_KEY_MEDIA_NAME: &[u8; 11] = b"media.name\0";
424pub const PW_KEY_MEDIA_TITLE: &[u8; 12] = b"media.title\0";
425pub const PW_KEY_MEDIA_ARTIST: &[u8; 13] = b"media.artist\0";
426pub const PW_KEY_MEDIA_ALBUM: &[u8; 12] = b"media.album\0";
427pub const PW_KEY_MEDIA_COPYRIGHT: &[u8; 16] = b"media.copyright\0";
428pub const PW_KEY_MEDIA_SOFTWARE: &[u8; 15] = b"media.software\0";
429pub const PW_KEY_MEDIA_LANGUAGE: &[u8; 15] = b"media.language\0";
430pub const PW_KEY_MEDIA_FILENAME: &[u8; 15] = b"media.filename\0";
431pub const PW_KEY_MEDIA_ICON: &[u8; 11] = b"media.icon\0";
432pub const PW_KEY_MEDIA_ICON_NAME: &[u8; 16] = b"media.icon-name\0";
433pub const PW_KEY_MEDIA_COMMENT: &[u8; 14] = b"media.comment\0";
434pub const PW_KEY_MEDIA_DATE: &[u8; 11] = b"media.date\0";
435pub const PW_KEY_MEDIA_FORMAT: &[u8; 13] = b"media.format\0";
436pub const PW_KEY_FORMAT_DSP: &[u8; 11] = b"format.dsp\0";
437pub const PW_KEY_AUDIO_CHANNEL: &[u8; 14] = b"audio.channel\0";
438pub const PW_KEY_AUDIO_RATE: &[u8; 11] = b"audio.rate\0";
439pub const PW_KEY_AUDIO_CHANNELS: &[u8; 15] = b"audio.channels\0";
440pub const PW_KEY_AUDIO_FORMAT: &[u8; 13] = b"audio.format\0";
441pub const PW_KEY_AUDIO_ALLOWED_RATES: &[u8; 20] = b"audio.allowed-rates\0";
442pub const PW_KEY_VIDEO_RATE: &[u8; 16] = b"video.framerate\0";
443pub const PW_KEY_VIDEO_FORMAT: &[u8; 13] = b"video.format\0";
444pub const PW_KEY_VIDEO_SIZE: &[u8; 11] = b"video.size\0";
445pub const PW_KEY_TARGET_OBJECT: &[u8; 14] = b"target.object\0";
446pub const PW_TYPE_INTERFACE_Link: &[u8; 24] = b"PipeWire:Interface:Link\0";
447pub const PW_LINK_PERM_MASK: u32 = 320;
448pub const PW_VERSION_LINK: u32 = 3;
449pub const PW_LINK_CHANGE_MASK_STATE: u32 = 1;
450pub const PW_LINK_CHANGE_MASK_FORMAT: u32 = 2;
451pub const PW_LINK_CHANGE_MASK_PROPS: u32 = 4;
452pub const PW_LINK_CHANGE_MASK_ALL: u32 = 7;
453pub const PW_LINK_EVENT_INFO: u32 = 0;
454pub const PW_LINK_EVENT_NUM: u32 = 1;
455pub const PW_VERSION_LINK_EVENTS: u32 = 0;
456pub const PW_LINK_METHOD_ADD_LISTENER: u32 = 0;
457pub const PW_LINK_METHOD_NUM: u32 = 1;
458pub const PW_VERSION_LINK_METHODS: u32 = 0;
459pub const PW_VERSION_MAIN_LOOP_EVENTS: u32 = 0;
460pub const PW_TYPE_INTERFACE_Module: &[u8; 26] = b"PipeWire:Interface:Module\0";
461pub const PW_MODULE_PERM_MASK: u32 = 264;
462pub const PW_VERSION_MODULE: u32 = 3;
463pub const PW_MODULE_CHANGE_MASK_PROPS: u32 = 1;
464pub const PW_MODULE_CHANGE_MASK_ALL: u32 = 1;
465pub const PW_MODULE_EVENT_INFO: u32 = 0;
466pub const PW_MODULE_EVENT_NUM: u32 = 1;
467pub const PW_VERSION_MODULE_EVENTS: u32 = 0;
468pub const PW_MODULE_METHOD_ADD_LISTENER: u32 = 0;
469pub const PW_MODULE_METHOD_NUM: u32 = 1;
470pub const PW_VERSION_MODULE_METHODS: u32 = 0;
471pub const PW_TYPE_INTERFACE_Node: &[u8; 24] = b"PipeWire:Interface:Node\0";
472pub const PW_NODE_PERM_MASK: u32 = 472;
473pub const PW_VERSION_NODE: u32 = 3;
474pub const PW_NODE_CHANGE_MASK_INPUT_PORTS: u32 = 1;
475pub const PW_NODE_CHANGE_MASK_OUTPUT_PORTS: u32 = 2;
476pub const PW_NODE_CHANGE_MASK_STATE: u32 = 4;
477pub const PW_NODE_CHANGE_MASK_PROPS: u32 = 8;
478pub const PW_NODE_CHANGE_MASK_PARAMS: u32 = 16;
479pub const PW_NODE_CHANGE_MASK_ALL: u32 = 31;
480pub const PW_NODE_EVENT_INFO: u32 = 0;
481pub const PW_NODE_EVENT_PARAM: u32 = 1;
482pub const PW_NODE_EVENT_NUM: u32 = 2;
483pub const PW_VERSION_NODE_EVENTS: u32 = 0;
484pub const PW_NODE_METHOD_ADD_LISTENER: u32 = 0;
485pub const PW_NODE_METHOD_SUBSCRIBE_PARAMS: u32 = 1;
486pub const PW_NODE_METHOD_ENUM_PARAMS: u32 = 2;
487pub const PW_NODE_METHOD_SET_PARAM: u32 = 3;
488pub const PW_NODE_METHOD_SEND_COMMAND: u32 = 4;
489pub const PW_NODE_METHOD_NUM: u32 = 5;
490pub const PW_VERSION_NODE_METHODS: u32 = 0;
491pub const PW_TYPE_INTERFACE_Port: &[u8; 24] = b"PipeWire:Interface:Port\0";
492pub const PW_PORT_PERM_MASK: u32 = 328;
493pub const PW_VERSION_PORT: u32 = 3;
494pub const PW_PORT_CHANGE_MASK_PROPS: u32 = 1;
495pub const PW_PORT_CHANGE_MASK_PARAMS: u32 = 2;
496pub const PW_PORT_CHANGE_MASK_ALL: u32 = 3;
497pub const PW_PORT_EVENT_INFO: u32 = 0;
498pub const PW_PORT_EVENT_PARAM: u32 = 1;
499pub const PW_PORT_EVENT_NUM: u32 = 2;
500pub const PW_VERSION_PORT_EVENTS: u32 = 0;
501pub const PW_PORT_METHOD_ADD_LISTENER: u32 = 0;
502pub const PW_PORT_METHOD_SUBSCRIBE_PARAMS: u32 = 1;
503pub const PW_PORT_METHOD_ENUM_PARAMS: u32 = 2;
504pub const PW_PORT_METHOD_NUM: u32 = 3;
505pub const PW_VERSION_PORT_METHODS: u32 = 0;
506pub const PW_VERSION_STREAM_EVENTS: u32 = 2;
507pub const PW_VERSION_FILTER_EVENTS: u32 = 1;
508pub const PW_VERSION_THREAD_LOOP_EVENTS: u32 = 0;
509pub const PW_VERSION_DATA_LOOP_EVENTS: u32 = 0;
510pub const PW_API_VERSION: &[u8; 4] = b"0.3\0";
511pub const PW_MAJOR: u32 = 1;
512pub const PW_MINOR: u32 = 4;
513pub const PW_MICRO: u32 = 9;
514pub const PW_TYPE_INTERFACE_ClientNode: &[u8; 30] = b"PipeWire:Interface:ClientNode\0";
515pub const PW_VERSION_CLIENT_NODE: u32 = 6;
516pub const PW_CLIENT_NODE_EVENT_TRANSPORT: u32 = 0;
517pub const PW_CLIENT_NODE_EVENT_SET_PARAM: u32 = 1;
518pub const PW_CLIENT_NODE_EVENT_SET_IO: u32 = 2;
519pub const PW_CLIENT_NODE_EVENT_EVENT: u32 = 3;
520pub const PW_CLIENT_NODE_EVENT_COMMAND: u32 = 4;
521pub const PW_CLIENT_NODE_EVENT_ADD_PORT: u32 = 5;
522pub const PW_CLIENT_NODE_EVENT_REMOVE_PORT: u32 = 6;
523pub const PW_CLIENT_NODE_EVENT_PORT_SET_PARAM: u32 = 7;
524pub const PW_CLIENT_NODE_EVENT_PORT_USE_BUFFERS: u32 = 8;
525pub const PW_CLIENT_NODE_EVENT_PORT_SET_IO: u32 = 9;
526pub const PW_CLIENT_NODE_EVENT_SET_ACTIVATION: u32 = 10;
527pub const PW_CLIENT_NODE_EVENT_PORT_SET_MIX_INFO: u32 = 11;
528pub const PW_CLIENT_NODE_EVENT_NUM: u32 = 12;
529pub const PW_VERSION_CLIENT_NODE_EVENTS: u32 = 1;
530pub const PW_CLIENT_NODE_METHOD_ADD_LISTENER: u32 = 0;
531pub const PW_CLIENT_NODE_METHOD_GET_NODE: u32 = 1;
532pub const PW_CLIENT_NODE_METHOD_UPDATE: u32 = 2;
533pub const PW_CLIENT_NODE_METHOD_PORT_UPDATE: u32 = 3;
534pub const PW_CLIENT_NODE_METHOD_SET_ACTIVE: u32 = 4;
535pub const PW_CLIENT_NODE_METHOD_EVENT: u32 = 5;
536pub const PW_CLIENT_NODE_METHOD_PORT_BUFFERS: u32 = 6;
537pub const PW_CLIENT_NODE_METHOD_NUM: u32 = 7;
538pub const PW_VERSION_CLIENT_NODE_METHODS: u32 = 0;
539pub const PW_CLIENT_NODE_UPDATE_PARAMS: u32 = 1;
540pub const PW_CLIENT_NODE_UPDATE_INFO: u32 = 2;
541pub const PW_CLIENT_NODE_PORT_UPDATE_PARAMS: u32 = 1;
542pub const PW_CLIENT_NODE_PORT_UPDATE_INFO: u32 = 2;
543pub const PW_TYPE_INTERFACE_Metadata: &[u8; 28] = b"PipeWire:Interface:Metadata\0";
544pub const PW_METADATA_PERM_MASK: u32 = 448;
545pub const PW_VERSION_METADATA: u32 = 3;
546pub const PW_METADATA_EVENT_PROPERTY: u32 = 0;
547pub const PW_METADATA_EVENT_NUM: u32 = 1;
548pub const PW_VERSION_METADATA_EVENTS: u32 = 0;
549pub const PW_METADATA_METHOD_ADD_LISTENER: u32 = 0;
550pub const PW_METADATA_METHOD_SET_PROPERTY: u32 = 1;
551pub const PW_METADATA_METHOD_CLEAR: u32 = 2;
552pub const PW_METADATA_METHOD_NUM: u32 = 3;
553pub const PW_VERSION_METADATA_METHODS: u32 = 0;
554pub const PW_KEY_METADATA_NAME: &[u8; 14] = b"metadata.name\0";
555pub const PW_KEY_METADATA_VALUES: &[u8; 16] = b"metadata.values\0";
556pub const PW_TYPE_INTERFACE_Profiler: &[u8; 28] = b"PipeWire:Interface:Profiler\0";
557pub const PW_VERSION_PROFILER: u32 = 3;
558pub const PW_PROFILER_PERM_MASK: u32 = 256;
559pub const PW_PROFILER_EVENT_PROFILE: u32 = 0;
560pub const PW_PROFILER_EVENT_NUM: u32 = 1;
561pub const PW_VERSION_PROFILER_EVENTS: u32 = 0;
562pub const PW_PROFILER_METHOD_ADD_LISTENER: u32 = 0;
563pub const PW_PROFILER_METHOD_NUM: u32 = 1;
564pub const PW_VERSION_PROFILER_METHODS: u32 = 0;
565pub const PW_KEY_PROFILER_NAME: &[u8; 14] = b"profiler.name\0";
566pub const PW_VERSION_CONTROL_EVENTS: u32 = 0;
567pub const PW_VERSION_IMPL_CORE_EVENTS: u32 = 0;
568pub const PW_VERSION_IMPL_DEVICE_EVENTS: u32 = 0;
569pub const PW_VERSION_IMPL_FACTORY_EVENTS: u32 = 0;
570pub const PW_VERSION_IMPL_FACTORY_IMPLEMENTATION: u32 = 0;
571pub const PW_VERSION_IMPL_LINK_EVENTS: u32 = 0;
572pub const PW_VERSION_IMPL_METADATA_EVENTS: u32 = 0;
573pub const PW_VERSION_IMPL_MODULE_EVENTS: u32 = 0;
574pub const PW_VERSION_IMPL_NODE_EVENTS: u32 = 0;
575pub const PW_VERSION_IMPL_NODE_RT_EVENTS: u32 = 0;
576pub const PW_VERSION_IMPL_PORT_EVENTS: u32 = 3;
577pub const PW_VERSION_GLOBAL_EVENTS: u32 = 0;
578pub const PW_VERSION_IMPL_CLIENT_EVENTS: u32 = 0;
579pub const PW_VERSION_RESOURCE_EVENTS: u32 = 0;
580pub const PW_TYPE_INFO_PROTOCOL_Native: &[u8; 25] = b"PipeWire:Protocol:Native\0";
581pub const PW_VERSION_PROTOCOL_NATIVE_EXT: u32 = 0;
582pub const PW_VERSION_SESSION_INFO: u32 = 0;
583pub const PW_SESSION_CHANGE_MASK_PROPS: u32 = 1;
584pub const PW_SESSION_CHANGE_MASK_PARAMS: u32 = 2;
585pub const PW_SESSION_CHANGE_MASK_ALL: u32 = 3;
586pub const PW_VERSION_ENDPOINT_INFO: u32 = 0;
587pub const PW_ENDPOINT_FLAG_PROVIDES_SESSION: u32 = 1;
588pub const PW_ENDPOINT_CHANGE_MASK_STREAMS: u32 = 1;
589pub const PW_ENDPOINT_CHANGE_MASK_SESSION: u32 = 2;
590pub const PW_ENDPOINT_CHANGE_MASK_PROPS: u32 = 4;
591pub const PW_ENDPOINT_CHANGE_MASK_PARAMS: u32 = 8;
592pub const PW_ENDPOINT_CHANGE_MASK_ALL: u32 = 15;
593pub const PW_VERSION_ENDPOINT_STREAM_INFO: u32 = 0;
594pub const PW_ENDPOINT_STREAM_CHANGE_MASK_LINK_PARAMS: u32 = 1;
595pub const PW_ENDPOINT_STREAM_CHANGE_MASK_PROPS: u32 = 2;
596pub const PW_ENDPOINT_STREAM_CHANGE_MASK_PARAMS: u32 = 4;
597pub const PW_ENDPOINT_STREAM_CHANGE_MASK_ALL: u32 = 7;
598pub const PW_VERSION_ENDPOINT_LINK_INFO: u32 = 0;
599pub const PW_ENDPOINT_LINK_CHANGE_MASK_STATE: u32 = 1;
600pub const PW_ENDPOINT_LINK_CHANGE_MASK_PROPS: u32 = 2;
601pub const PW_ENDPOINT_LINK_CHANGE_MASK_PARAMS: u32 = 4;
602pub const PW_ENDPOINT_LINK_CHANGE_MASK_ALL: u32 = 7;
603pub const PW_TYPE_INTERFACE_Session: &[u8; 27] = b"PipeWire:Interface:Session\0";
604pub const PW_SESSION_PERM_MASK: u32 = 448;
605pub const PW_VERSION_SESSION: u32 = 0;
606pub const PW_TYPE_INTERFACE_Endpoint: &[u8; 28] = b"PipeWire:Interface:Endpoint\0";
607pub const PW_ENDPOINT_PERM_MASK: u32 = 448;
608pub const PW_VERSION_ENDPOINT: u32 = 0;
609pub const PW_TYPE_INTERFACE_EndpointStream: &[u8; 34] = b"PipeWire:Interface:EndpointStream\0";
610pub const PW_ENDPOINT_STREAM_PERM_MASK: u32 = 448;
611pub const PW_VERSION_ENDPOINT_STREAM: u32 = 0;
612pub const PW_TYPE_INTERFACE_EndpointLink: &[u8; 32] = b"PipeWire:Interface:EndpointLink\0";
613pub const PW_ENDPOINT_LINK_PERM_MASK: u32 = 448;
614pub const PW_VERSION_ENDPOINT_LINK: u32 = 0;
615pub const PW_SESSION_EVENT_INFO: u32 = 0;
616pub const PW_SESSION_EVENT_PARAM: u32 = 1;
617pub const PW_SESSION_EVENT_NUM: u32 = 2;
618pub const PW_VERSION_SESSION_EVENTS: u32 = 0;
619pub const PW_SESSION_METHOD_ADD_LISTENER: u32 = 0;
620pub const PW_SESSION_METHOD_SUBSCRIBE_PARAMS: u32 = 1;
621pub const PW_SESSION_METHOD_ENUM_PARAMS: u32 = 2;
622pub const PW_SESSION_METHOD_SET_PARAM: u32 = 3;
623pub const PW_SESSION_METHOD_CREATE_LINK: u32 = 4;
624pub const PW_SESSION_METHOD_NUM: u32 = 5;
625pub const PW_VERSION_SESSION_METHODS: u32 = 0;
626pub const PW_ENDPOINT_EVENT_INFO: u32 = 0;
627pub const PW_ENDPOINT_EVENT_PARAM: u32 = 1;
628pub const PW_ENDPOINT_EVENT_NUM: u32 = 2;
629pub const PW_VERSION_ENDPOINT_EVENTS: u32 = 0;
630pub const PW_ENDPOINT_METHOD_ADD_LISTENER: u32 = 0;
631pub const PW_ENDPOINT_METHOD_SUBSCRIBE_PARAMS: u32 = 1;
632pub const PW_ENDPOINT_METHOD_ENUM_PARAMS: u32 = 2;
633pub const PW_ENDPOINT_METHOD_SET_PARAM: u32 = 3;
634pub const PW_ENDPOINT_METHOD_CREATE_LINK: u32 = 4;
635pub const PW_ENDPOINT_METHOD_NUM: u32 = 5;
636pub const PW_VERSION_ENDPOINT_METHODS: u32 = 0;
637pub const PW_ENDPOINT_STREAM_EVENT_INFO: u32 = 0;
638pub const PW_ENDPOINT_STREAM_EVENT_PARAM: u32 = 1;
639pub const PW_ENDPOINT_STREAM_EVENT_NUM: u32 = 2;
640pub const PW_VERSION_ENDPOINT_STREAM_EVENTS: u32 = 0;
641pub const PW_ENDPOINT_STREAM_METHOD_ADD_LISTENER: u32 = 0;
642pub const PW_ENDPOINT_STREAM_METHOD_SUBSCRIBE_PARAMS: u32 = 1;
643pub const PW_ENDPOINT_STREAM_METHOD_ENUM_PARAMS: u32 = 2;
644pub const PW_ENDPOINT_STREAM_METHOD_SET_PARAM: u32 = 3;
645pub const PW_ENDPOINT_STREAM_METHOD_NUM: u32 = 4;
646pub const PW_VERSION_ENDPOINT_STREAM_METHODS: u32 = 0;
647pub const PW_ENDPOINT_LINK_EVENT_INFO: u32 = 0;
648pub const PW_ENDPOINT_LINK_EVENT_PARAM: u32 = 1;
649pub const PW_ENDPOINT_LINK_EVENT_NUM: u32 = 2;
650pub const PW_VERSION_ENDPOINT_LINK_EVENTS: u32 = 0;
651pub const PW_ENDPOINT_LINK_METHOD_ADD_LISTENER: u32 = 0;
652pub const PW_ENDPOINT_LINK_METHOD_SUBSCRIBE_PARAMS: u32 = 1;
653pub const PW_ENDPOINT_LINK_METHOD_ENUM_PARAMS: u32 = 2;
654pub const PW_ENDPOINT_LINK_METHOD_SET_PARAM: u32 = 3;
655pub const PW_ENDPOINT_LINK_METHOD_REQUEST_STATE: u32 = 4;
656pub const PW_ENDPOINT_LINK_METHOD_DESTROY: u32 = 5;
657pub const PW_ENDPOINT_LINK_METHOD_NUM: u32 = 6;
658pub const PW_VERSION_ENDPOINT_LINK_METHODS: u32 = 0;
659pub const PW_TYPE_INTERFACE_ClientEndpoint: &[u8; 34] = b"PipeWire:Interface:ClientEndpoint\0";
660pub const PW_VERSION_CLIENT_ENDPOINT: u32 = 0;
661pub const PW_CLIENT_ENDPOINT_EVENT_SET_SESSION_ID: u32 = 0;
662pub const PW_CLIENT_ENDPOINT_EVENT_SET_PARAM: u32 = 1;
663pub const PW_CLIENT_ENDPOINT_EVENT_STREAM_SET_PARAM: u32 = 2;
664pub const PW_CLIENT_ENDPOINT_EVENT_CREATE_LINK: u32 = 3;
665pub const PW_CLIENT_ENDPOINT_EVENT_NUM: u32 = 4;
666pub const PW_VERSION_CLIENT_ENDPOINT_EVENTS: u32 = 0;
667pub const PW_CLIENT_ENDPOINT_METHOD_ADD_LISTENER: u32 = 0;
668pub const PW_CLIENT_ENDPOINT_METHOD_UPDATE: u32 = 1;
669pub const PW_CLIENT_ENDPOINT_METHOD_STREAM_UPDATE: u32 = 2;
670pub const PW_CLIENT_ENDPOINT_METHOD_NUM: u32 = 3;
671pub const PW_VERSION_CLIENT_ENDPOINT_METHODS: u32 = 0;
672pub const PW_CLIENT_ENDPOINT_UPDATE_PARAMS: u32 = 1;
673pub const PW_CLIENT_ENDPOINT_UPDATE_INFO: u32 = 2;
674pub const PW_CLIENT_ENDPOINT_STREAM_UPDATE_PARAMS: u32 = 1;
675pub const PW_CLIENT_ENDPOINT_STREAM_UPDATE_INFO: u32 = 2;
676pub const PW_CLIENT_ENDPOINT_STREAM_UPDATE_DESTROYED: u32 = 4;
677pub const PW_TYPE_INTERFACE_ClientSession: &[u8; 33] = b"PipeWire:Interface:ClientSession\0";
678pub const PW_VERSION_CLIENT_SESSION: u32 = 0;
679pub const PW_CLIENT_SESSION_EVENT_SET_PARAM: u32 = 0;
680pub const PW_CLIENT_SESSION_EVENT_LINK_SET_PARAM: u32 = 1;
681pub const PW_CLIENT_SESSION_EVENT_LINK_REQUEST_STATE: u32 = 2;
682pub const PW_CLIENT_SESSION_EVENT_NUM: u32 = 3;
683pub const PW_VERSION_CLIENT_SESSION_EVENTS: u32 = 0;
684pub const PW_CLIENT_SESSION_METHOD_ADD_LISTENER: u32 = 0;
685pub const PW_CLIENT_SESSION_METHOD_UPDATE: u32 = 1;
686pub const PW_CLIENT_SESSION_METHOD_LINK_UPDATE: u32 = 2;
687pub const PW_CLIENT_SESSION_METHOD_NUM: u32 = 3;
688pub const PW_VERSION_CLIENT_SESSION_METHODS: u32 = 0;
689pub const PW_CLIENT_SESSION_UPDATE_PARAMS: u32 = 1;
690pub const PW_CLIENT_SESSION_UPDATE_INFO: u32 = 2;
691pub const PW_CLIENT_SESSION_LINK_UPDATE_PARAMS: u32 = 1;
692pub const PW_CLIENT_SESSION_LINK_UPDATE_INFO: u32 = 2;
693pub const PW_CLIENT_SESSION_LINK_UPDATE_DESTROYED: u32 = 4;
694pub const PW_KEY_SESSION_ID: &[u8; 11] = b"session.id\0";
695pub const PW_KEY_ENDPOINT_ID: &[u8; 12] = b"endpoint.id\0";
696pub const PW_KEY_ENDPOINT_NAME: &[u8; 14] = b"endpoint.name\0";
697pub const PW_KEY_ENDPOINT_MONITOR: &[u8; 17] = b"endpoint.monitor\0";
698pub const PW_KEY_ENDPOINT_CLIENT_ID: &[u8; 19] = b"endpoint.client.id\0";
699pub const PW_KEY_ENDPOINT_ICON_NAME: &[u8; 19] = b"endpoint.icon-name\0";
700pub const PW_KEY_ENDPOINT_AUTOCONNECT: &[u8; 21] = b"endpoint.autoconnect\0";
701pub const PW_KEY_ENDPOINT_TARGET: &[u8; 16] = b"endpoint.target\0";
702pub const PW_KEY_ENDPOINT_STREAM_ID: &[u8; 19] = b"endpoint-stream.id\0";
703pub const PW_KEY_ENDPOINT_STREAM_NAME: &[u8; 21] = b"endpoint-stream.name\0";
704pub const PW_KEY_ENDPOINT_STREAM_DESCRIPTION: &[u8; 28] = b"endpoint-stream.description\0";
705pub const PW_KEY_ENDPOINT_LINK_OUTPUT_ENDPOINT: &[u8; 30] = b"endpoint-link.output.endpoint\0";
706pub const PW_KEY_ENDPOINT_LINK_OUTPUT_STREAM: &[u8; 28] = b"endpoint-link.output.stream\0";
707pub const PW_KEY_ENDPOINT_LINK_INPUT_ENDPOINT: &[u8; 29] = b"endpoint-link.input.endpoint\0";
708pub const PW_KEY_ENDPOINT_LINK_INPUT_STREAM: &[u8; 27] = b"endpoint-link.input.stream\0";
709pub type __off_t = ::std::os::raw::c_long;
710pub type __off64_t = ::std::os::raw::c_long;
711pub type __time_t = ::std::os::raw::c_long;
712pub type __syscall_slong_t = ::std::os::raw::c_long;
713#[repr(C)]
714#[derive(Debug, Copy, Clone)]
715pub struct timespec {
716 pub tv_sec: __time_t,
717 pub tv_nsec: __syscall_slong_t,
718}
719#[allow(clippy::unnecessary_operation, clippy::identity_op)]
720const _: () = {
721 ["Size of timespec"][::std::mem::size_of::<timespec>() - 16usize];
722 ["Alignment of timespec"][::std::mem::align_of::<timespec>() - 8usize];
723 ["Offset of field: timespec::tv_sec"][::std::mem::offset_of!(timespec, tv_sec) - 0usize];
724 ["Offset of field: timespec::tv_nsec"][::std::mem::offset_of!(timespec, tv_nsec) - 8usize];
725};
726pub type __gnuc_va_list = __builtin_va_list;
727pub type FILE = _IO_FILE;
728#[repr(C)]
729#[derive(Debug, Copy, Clone)]
730pub struct _IO_marker {
731 _unused: [u8; 0],
732}
733#[repr(C)]
734#[derive(Debug, Copy, Clone)]
735pub struct _IO_codecvt {
736 _unused: [u8; 0],
737}
738#[repr(C)]
739#[derive(Debug, Copy, Clone)]
740pub struct _IO_wide_data {
741 _unused: [u8; 0],
742}
743pub type _IO_lock_t = ::std::os::raw::c_void;
744#[repr(C)]
745#[derive(Debug, Copy, Clone)]
746pub struct _IO_FILE {
747 pub _flags: ::std::os::raw::c_int,
748 pub _IO_read_ptr: *mut ::std::os::raw::c_char,
749 pub _IO_read_end: *mut ::std::os::raw::c_char,
750 pub _IO_read_base: *mut ::std::os::raw::c_char,
751 pub _IO_write_base: *mut ::std::os::raw::c_char,
752 pub _IO_write_ptr: *mut ::std::os::raw::c_char,
753 pub _IO_write_end: *mut ::std::os::raw::c_char,
754 pub _IO_buf_base: *mut ::std::os::raw::c_char,
755 pub _IO_buf_end: *mut ::std::os::raw::c_char,
756 pub _IO_save_base: *mut ::std::os::raw::c_char,
757 pub _IO_backup_base: *mut ::std::os::raw::c_char,
758 pub _IO_save_end: *mut ::std::os::raw::c_char,
759 pub _markers: *mut _IO_marker,
760 pub _chain: *mut _IO_FILE,
761 pub _fileno: ::std::os::raw::c_int,
762 pub _bitfield_align_1: [u32; 0],
763 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
764 pub _short_backupbuf: [::std::os::raw::c_char; 1usize],
765 pub _old_offset: __off_t,
766 pub _cur_column: ::std::os::raw::c_ushort,
767 pub _vtable_offset: ::std::os::raw::c_schar,
768 pub _shortbuf: [::std::os::raw::c_char; 1usize],
769 pub _lock: *mut _IO_lock_t,
770 pub _offset: __off64_t,
771 pub _codecvt: *mut _IO_codecvt,
772 pub _wide_data: *mut _IO_wide_data,
773 pub _freeres_list: *mut _IO_FILE,
774 pub _freeres_buf: *mut ::std::os::raw::c_void,
775 pub _prevchain: *mut *mut _IO_FILE,
776 pub _mode: ::std::os::raw::c_int,
777 pub _unused2: [::std::os::raw::c_char; 20usize],
778}
779#[allow(clippy::unnecessary_operation, clippy::identity_op)]
780const _: () = {
781 ["Size of _IO_FILE"][::std::mem::size_of::<_IO_FILE>() - 216usize];
782 ["Alignment of _IO_FILE"][::std::mem::align_of::<_IO_FILE>() - 8usize];
783 ["Offset of field: _IO_FILE::_flags"][::std::mem::offset_of!(_IO_FILE, _flags) - 0usize];
784 ["Offset of field: _IO_FILE::_IO_read_ptr"]
785 [::std::mem::offset_of!(_IO_FILE, _IO_read_ptr) - 8usize];
786 ["Offset of field: _IO_FILE::_IO_read_end"]
787 [::std::mem::offset_of!(_IO_FILE, _IO_read_end) - 16usize];
788 ["Offset of field: _IO_FILE::_IO_read_base"]
789 [::std::mem::offset_of!(_IO_FILE, _IO_read_base) - 24usize];
790 ["Offset of field: _IO_FILE::_IO_write_base"]
791 [::std::mem::offset_of!(_IO_FILE, _IO_write_base) - 32usize];
792 ["Offset of field: _IO_FILE::_IO_write_ptr"]
793 [::std::mem::offset_of!(_IO_FILE, _IO_write_ptr) - 40usize];
794 ["Offset of field: _IO_FILE::_IO_write_end"]
795 [::std::mem::offset_of!(_IO_FILE, _IO_write_end) - 48usize];
796 ["Offset of field: _IO_FILE::_IO_buf_base"]
797 [::std::mem::offset_of!(_IO_FILE, _IO_buf_base) - 56usize];
798 ["Offset of field: _IO_FILE::_IO_buf_end"]
799 [::std::mem::offset_of!(_IO_FILE, _IO_buf_end) - 64usize];
800 ["Offset of field: _IO_FILE::_IO_save_base"]
801 [::std::mem::offset_of!(_IO_FILE, _IO_save_base) - 72usize];
802 ["Offset of field: _IO_FILE::_IO_backup_base"]
803 [::std::mem::offset_of!(_IO_FILE, _IO_backup_base) - 80usize];
804 ["Offset of field: _IO_FILE::_IO_save_end"]
805 [::std::mem::offset_of!(_IO_FILE, _IO_save_end) - 88usize];
806 ["Offset of field: _IO_FILE::_markers"][::std::mem::offset_of!(_IO_FILE, _markers) - 96usize];
807 ["Offset of field: _IO_FILE::_chain"][::std::mem::offset_of!(_IO_FILE, _chain) - 104usize];
808 ["Offset of field: _IO_FILE::_fileno"][::std::mem::offset_of!(_IO_FILE, _fileno) - 112usize];
809 ["Offset of field: _IO_FILE::_short_backupbuf"]
810 [::std::mem::offset_of!(_IO_FILE, _short_backupbuf) - 119usize];
811 ["Offset of field: _IO_FILE::_old_offset"]
812 [::std::mem::offset_of!(_IO_FILE, _old_offset) - 120usize];
813 ["Offset of field: _IO_FILE::_cur_column"]
814 [::std::mem::offset_of!(_IO_FILE, _cur_column) - 128usize];
815 ["Offset of field: _IO_FILE::_vtable_offset"]
816 [::std::mem::offset_of!(_IO_FILE, _vtable_offset) - 130usize];
817 ["Offset of field: _IO_FILE::_shortbuf"]
818 [::std::mem::offset_of!(_IO_FILE, _shortbuf) - 131usize];
819 ["Offset of field: _IO_FILE::_lock"][::std::mem::offset_of!(_IO_FILE, _lock) - 136usize];
820 ["Offset of field: _IO_FILE::_offset"][::std::mem::offset_of!(_IO_FILE, _offset) - 144usize];
821 ["Offset of field: _IO_FILE::_codecvt"][::std::mem::offset_of!(_IO_FILE, _codecvt) - 152usize];
822 ["Offset of field: _IO_FILE::_wide_data"]
823 [::std::mem::offset_of!(_IO_FILE, _wide_data) - 160usize];
824 ["Offset of field: _IO_FILE::_freeres_list"]
825 [::std::mem::offset_of!(_IO_FILE, _freeres_list) - 168usize];
826 ["Offset of field: _IO_FILE::_freeres_buf"]
827 [::std::mem::offset_of!(_IO_FILE, _freeres_buf) - 176usize];
828 ["Offset of field: _IO_FILE::_prevchain"]
829 [::std::mem::offset_of!(_IO_FILE, _prevchain) - 184usize];
830 ["Offset of field: _IO_FILE::_mode"][::std::mem::offset_of!(_IO_FILE, _mode) - 192usize];
831 ["Offset of field: _IO_FILE::_unused2"][::std::mem::offset_of!(_IO_FILE, _unused2) - 196usize];
832};
833impl _IO_FILE {
834 #[inline]
835 pub fn _flags2(&self) -> ::std::os::raw::c_int {
836 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) }
837 }
838 #[inline]
839 pub fn set__flags2(&mut self, val: ::std::os::raw::c_int) {
840 unsafe {
841 let val: u32 = ::std::mem::transmute(val);
842 self._bitfield_1.set(0usize, 24u8, val as u64)
843 }
844 }
845 #[inline]
846 pub unsafe fn _flags2_raw(this: *const Self) -> ::std::os::raw::c_int {
847 unsafe {
848 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
849 ::std::ptr::addr_of!((*this)._bitfield_1),
850 0usize,
851 24u8,
852 ) as u32)
853 }
854 }
855 #[inline]
856 pub unsafe fn set__flags2_raw(this: *mut Self, val: ::std::os::raw::c_int) {
857 unsafe {
858 let val: u32 = ::std::mem::transmute(val);
859 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
860 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
861 0usize,
862 24u8,
863 val as u64,
864 )
865 }
866 }
867 #[inline]
868 pub fn new_bitfield_1(_flags2: ::std::os::raw::c_int) -> __BindgenBitfieldUnit<[u8; 3usize]> {
869 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
870 __bindgen_bitfield_unit.set(0usize, 24u8, {
871 let _flags2: u32 = unsafe { ::std::mem::transmute(_flags2) };
872 _flags2 as u64
873 });
874 __bindgen_bitfield_unit
875 }
876}
877pub type va_list = __gnuc_va_list;
878#[doc = " \\addtogroup pw_array\n \\{"]
879#[repr(C)]
880#[derive(Debug, Copy, Clone)]
881pub struct pw_array {
882 #[doc = "< pointer to array data"]
883 pub data: *mut ::std::os::raw::c_void,
884 #[doc = "< length of array in bytes"]
885 pub size: usize,
886 #[doc = "< number of allocated memory in \\a data"]
887 pub alloc: usize,
888 #[doc = "< number of bytes to extend with, 0 when the\n data should not expand"]
889 pub extend: usize,
890}
891#[allow(clippy::unnecessary_operation, clippy::identity_op)]
892const _: () = {
893 ["Size of pw_array"][::std::mem::size_of::<pw_array>() - 32usize];
894 ["Alignment of pw_array"][::std::mem::align_of::<pw_array>() - 8usize];
895 ["Offset of field: pw_array::data"][::std::mem::offset_of!(pw_array, data) - 0usize];
896 ["Offset of field: pw_array::size"][::std::mem::offset_of!(pw_array, size) - 8usize];
897 ["Offset of field: pw_array::alloc"][::std::mem::offset_of!(pw_array, alloc) - 16usize];
898 ["Offset of field: pw_array::extend"][::std::mem::offset_of!(pw_array, extend) - 24usize];
899};
900pub const PW_TYPE_FIRST: _bindgen_ty_11 = 33554432;
901#[doc = " \\addtogroup pw_type\n \\{"]
902pub type _bindgen_ty_11 = ::std::os::raw::c_uint;
903unsafe extern "C" {
904 pub fn pw_type_info() -> *const spa_type_info;
905}
906#[doc = " \\addtogroup pw_proxy\n \\{"]
907#[repr(C)]
908#[derive(Debug, Copy, Clone)]
909pub struct pw_proxy {
910 _unused: [u8; 0],
911}
912#[doc = " \\addtogroup pw_protocol\n \\{"]
913#[repr(C)]
914#[derive(Debug, Copy, Clone)]
915pub struct pw_protocol {
916 _unused: [u8; 0],
917}
918#[doc = " \\addtogroup pw_context\n @{"]
919#[repr(C)]
920#[derive(Debug, Copy, Clone)]
921pub struct pw_context {
922 _unused: [u8; 0],
923}
924#[doc = " \\addtogroup pw_global\n \\{"]
925#[repr(C)]
926#[derive(Debug, Copy, Clone)]
927pub struct pw_global {
928 _unused: [u8; 0],
929}
930#[doc = " \\addtogroup api_pw_impl"]
931#[repr(C)]
932#[derive(Debug, Copy, Clone)]
933pub struct pw_impl_client {
934 _unused: [u8; 0],
935}
936#[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 \\{"]
937#[repr(C)]
938#[derive(Debug, Copy, Clone)]
939pub struct pw_impl_node {
940 _unused: [u8; 0],
941}
942#[repr(C)]
943#[derive(Debug, Copy, Clone)]
944pub struct pw_core {
945 _unused: [u8; 0],
946}
947#[repr(C)]
948#[derive(Debug, Copy, Clone)]
949pub struct pw_registry {
950 _unused: [u8; 0],
951}
952#[doc = " The core information. Extra information may be added in later versions,\n clients must not assume a constant struct size"]
953#[repr(C)]
954#[derive(Debug, Copy, Clone)]
955pub struct pw_core_info {
956 #[doc = "< id of the global"]
957 pub id: u32,
958 #[doc = "< a random cookie for identifying this instance of PipeWire"]
959 pub cookie: u32,
960 #[doc = "< name of the user that started the core"]
961 pub user_name: *const ::std::os::raw::c_char,
962 #[doc = "< name of the machine the core is running on"]
963 pub host_name: *const ::std::os::raw::c_char,
964 #[doc = "< version of the core"]
965 pub version: *const ::std::os::raw::c_char,
966 #[doc = "< name of the core"]
967 pub name: *const ::std::os::raw::c_char,
968 #[doc = "< bitfield of changed fields since last call"]
969 pub change_mask: u64,
970 #[doc = "< extra properties"]
971 pub props: *mut spa_dict,
972}
973#[allow(clippy::unnecessary_operation, clippy::identity_op)]
974const _: () = {
975 ["Size of pw_core_info"][::std::mem::size_of::<pw_core_info>() - 56usize];
976 ["Alignment of pw_core_info"][::std::mem::align_of::<pw_core_info>() - 8usize];
977 ["Offset of field: pw_core_info::id"][::std::mem::offset_of!(pw_core_info, id) - 0usize];
978 ["Offset of field: pw_core_info::cookie"]
979 [::std::mem::offset_of!(pw_core_info, cookie) - 4usize];
980 ["Offset of field: pw_core_info::user_name"]
981 [::std::mem::offset_of!(pw_core_info, user_name) - 8usize];
982 ["Offset of field: pw_core_info::host_name"]
983 [::std::mem::offset_of!(pw_core_info, host_name) - 16usize];
984 ["Offset of field: pw_core_info::version"]
985 [::std::mem::offset_of!(pw_core_info, version) - 24usize];
986 ["Offset of field: pw_core_info::name"][::std::mem::offset_of!(pw_core_info, name) - 32usize];
987 ["Offset of field: pw_core_info::change_mask"]
988 [::std::mem::offset_of!(pw_core_info, change_mask) - 40usize];
989 ["Offset of field: pw_core_info::props"][::std::mem::offset_of!(pw_core_info, props) - 48usize];
990};
991#[doc = " \\addtogroup pw_properties\n \\{"]
992#[repr(C)]
993pub struct pw_properties {
994 #[doc = "< dictionary of key/values"]
995 pub dict: spa_dict,
996 #[doc = "< extra flags"]
997 pub flags: u32,
998}
999#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1000const _: () = {
1001 ["Size of pw_properties"][::std::mem::size_of::<pw_properties>() - 24usize];
1002 ["Alignment of pw_properties"][::std::mem::align_of::<pw_properties>() - 8usize];
1003 ["Offset of field: pw_properties::dict"][::std::mem::offset_of!(pw_properties, dict) - 0usize];
1004 ["Offset of field: pw_properties::flags"]
1005 [::std::mem::offset_of!(pw_properties, flags) - 16usize];
1006};
1007unsafe extern "C" {
1008 pub fn pw_properties_new(key: *const ::std::os::raw::c_char, ...) -> *mut pw_properties;
1009}
1010unsafe extern "C" {
1011 pub fn pw_properties_new_dict(dict: *const spa_dict) -> *mut pw_properties;
1012}
1013unsafe extern "C" {
1014 pub fn pw_properties_new_string(args: *const ::std::os::raw::c_char) -> *mut pw_properties;
1015}
1016unsafe extern "C" {
1017 pub fn pw_properties_new_string_checked(
1018 args: *const ::std::os::raw::c_char,
1019 size: usize,
1020 loc: *mut spa_error_location,
1021 ) -> *mut pw_properties;
1022}
1023unsafe extern "C" {
1024 pub fn pw_properties_copy(properties: *const pw_properties) -> *mut pw_properties;
1025}
1026unsafe extern "C" {
1027 pub fn pw_properties_update_keys(
1028 props: *mut pw_properties,
1029 dict: *const spa_dict,
1030 keys: *const *const ::std::os::raw::c_char,
1031 ) -> ::std::os::raw::c_int;
1032}
1033unsafe extern "C" {
1034 pub fn pw_properties_update_ignore(
1035 props: *mut pw_properties,
1036 dict: *const spa_dict,
1037 ignore: *const *const ::std::os::raw::c_char,
1038 ) -> ::std::os::raw::c_int;
1039}
1040unsafe extern "C" {
1041 pub fn pw_properties_update(
1042 props: *mut pw_properties,
1043 dict: *const spa_dict,
1044 ) -> ::std::os::raw::c_int;
1045}
1046unsafe extern "C" {
1047 pub fn pw_properties_update_string(
1048 props: *mut pw_properties,
1049 str_: *const ::std::os::raw::c_char,
1050 size: usize,
1051 ) -> ::std::os::raw::c_int;
1052}
1053unsafe extern "C" {
1054 pub fn pw_properties_update_string_checked(
1055 props: *mut pw_properties,
1056 str_: *const ::std::os::raw::c_char,
1057 size: usize,
1058 loc: *mut spa_error_location,
1059 ) -> ::std::os::raw::c_int;
1060}
1061unsafe extern "C" {
1062 pub fn pw_properties_add(
1063 oldprops: *mut pw_properties,
1064 dict: *const spa_dict,
1065 ) -> ::std::os::raw::c_int;
1066}
1067unsafe extern "C" {
1068 pub fn pw_properties_add_keys(
1069 oldprops: *mut pw_properties,
1070 dict: *const spa_dict,
1071 keys: *const *const ::std::os::raw::c_char,
1072 ) -> ::std::os::raw::c_int;
1073}
1074unsafe extern "C" {
1075 pub fn pw_properties_clear(properties: *mut pw_properties);
1076}
1077unsafe extern "C" {
1078 pub fn pw_properties_free(properties: *mut pw_properties);
1079}
1080unsafe extern "C" {
1081 pub fn pw_properties_set(
1082 properties: *mut pw_properties,
1083 key: *const ::std::os::raw::c_char,
1084 value: *const ::std::os::raw::c_char,
1085 ) -> ::std::os::raw::c_int;
1086}
1087unsafe extern "C" {
1088 pub fn pw_properties_setf(
1089 properties: *mut pw_properties,
1090 key: *const ::std::os::raw::c_char,
1091 format: *const ::std::os::raw::c_char,
1092 ...
1093 ) -> ::std::os::raw::c_int;
1094}
1095unsafe extern "C" {
1096 pub fn pw_properties_setva(
1097 properties: *mut pw_properties,
1098 key: *const ::std::os::raw::c_char,
1099 format: *const ::std::os::raw::c_char,
1100 args: *mut __va_list_tag,
1101 ) -> ::std::os::raw::c_int;
1102}
1103unsafe extern "C" {
1104 pub fn pw_properties_get(
1105 properties: *const pw_properties,
1106 key: *const ::std::os::raw::c_char,
1107 ) -> *const ::std::os::raw::c_char;
1108}
1109unsafe extern "C" {
1110 pub fn pw_properties_fetch_uint32(
1111 properties: *const pw_properties,
1112 key: *const ::std::os::raw::c_char,
1113 value: *mut u32,
1114 ) -> ::std::os::raw::c_int;
1115}
1116unsafe extern "C" {
1117 pub fn pw_properties_fetch_int32(
1118 properties: *const pw_properties,
1119 key: *const ::std::os::raw::c_char,
1120 value: *mut i32,
1121 ) -> ::std::os::raw::c_int;
1122}
1123unsafe extern "C" {
1124 pub fn pw_properties_fetch_uint64(
1125 properties: *const pw_properties,
1126 key: *const ::std::os::raw::c_char,
1127 value: *mut u64,
1128 ) -> ::std::os::raw::c_int;
1129}
1130unsafe extern "C" {
1131 pub fn pw_properties_fetch_int64(
1132 properties: *const pw_properties,
1133 key: *const ::std::os::raw::c_char,
1134 value: *mut i64,
1135 ) -> ::std::os::raw::c_int;
1136}
1137unsafe extern "C" {
1138 pub fn pw_properties_fetch_bool(
1139 properties: *const pw_properties,
1140 key: *const ::std::os::raw::c_char,
1141 value: *mut bool,
1142 ) -> ::std::os::raw::c_int;
1143}
1144unsafe extern "C" {
1145 pub fn pw_properties_iterate(
1146 properties: *const pw_properties,
1147 state: *mut *mut ::std::os::raw::c_void,
1148 ) -> *const ::std::os::raw::c_char;
1149}
1150unsafe extern "C" {
1151 pub fn pw_properties_serialize_dict(
1152 f: *mut FILE,
1153 dict: *const spa_dict,
1154 flags: u32,
1155 ) -> ::std::os::raw::c_int;
1156}
1157unsafe extern "C" {
1158 #[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."]
1159 pub fn pw_core_info_update(
1160 info: *mut pw_core_info,
1161 update: *const pw_core_info,
1162 ) -> *mut pw_core_info;
1163}
1164unsafe extern "C" {
1165 #[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"]
1166 pub fn pw_core_info_merge(
1167 info: *mut pw_core_info,
1168 update: *const pw_core_info,
1169 reset: bool,
1170 ) -> *mut pw_core_info;
1171}
1172unsafe extern "C" {
1173 #[doc = " Free a \\ref pw_core_info"]
1174 pub fn pw_core_info_free(info: *mut pw_core_info);
1175}
1176#[doc = " \\struct pw_core_events\n \\brief Core events"]
1177#[repr(C)]
1178#[derive(Debug, Copy, Clone)]
1179pub struct pw_core_events {
1180 pub version: u32,
1181 #[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"]
1182 pub info: ::std::option::Option<
1183 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_core_info),
1184 >,
1185 #[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"]
1186 pub done: ::std::option::Option<
1187 unsafe extern "C" fn(
1188 data: *mut ::std::os::raw::c_void,
1189 id: u32,
1190 seq: ::std::os::raw::c_int,
1191 ),
1192 >,
1193 #[doc = " Emit a ping event\n\n The client should reply with a pong reply with the same seq\n number."]
1194 pub ping: ::std::option::Option<
1195 unsafe extern "C" fn(
1196 data: *mut ::std::os::raw::c_void,
1197 id: u32,
1198 seq: ::std::os::raw::c_int,
1199 ),
1200 >,
1201 #[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"]
1202 pub error: ::std::option::Option<
1203 unsafe extern "C" fn(
1204 data: *mut ::std::os::raw::c_void,
1205 id: u32,
1206 seq: ::std::os::raw::c_int,
1207 res: ::std::os::raw::c_int,
1208 message: *const ::std::os::raw::c_char,
1209 ),
1210 >,
1211 #[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"]
1212 pub remove_id:
1213 ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, id: u32)>,
1214 #[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"]
1215 pub bound_id: ::std::option::Option<
1216 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, id: u32, global_id: u32),
1217 >,
1218 #[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"]
1219 pub add_mem: ::std::option::Option<
1220 unsafe extern "C" fn(
1221 data: *mut ::std::os::raw::c_void,
1222 id: u32,
1223 type_: u32,
1224 fd: ::std::os::raw::c_int,
1225 flags: u32,
1226 ),
1227 >,
1228 #[doc = " Remove memory for a client\n\n \\param id the memory id to remove"]
1229 pub remove_mem:
1230 ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, id: u32)>,
1231 #[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"]
1232 pub bound_props: ::std::option::Option<
1233 unsafe extern "C" fn(
1234 data: *mut ::std::os::raw::c_void,
1235 id: u32,
1236 global_id: u32,
1237 props: *const spa_dict,
1238 ),
1239 >,
1240}
1241#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1242const _: () = {
1243 ["Size of pw_core_events"][::std::mem::size_of::<pw_core_events>() - 80usize];
1244 ["Alignment of pw_core_events"][::std::mem::align_of::<pw_core_events>() - 8usize];
1245 ["Offset of field: pw_core_events::version"]
1246 [::std::mem::offset_of!(pw_core_events, version) - 0usize];
1247 ["Offset of field: pw_core_events::info"]
1248 [::std::mem::offset_of!(pw_core_events, info) - 8usize];
1249 ["Offset of field: pw_core_events::done"]
1250 [::std::mem::offset_of!(pw_core_events, done) - 16usize];
1251 ["Offset of field: pw_core_events::ping"]
1252 [::std::mem::offset_of!(pw_core_events, ping) - 24usize];
1253 ["Offset of field: pw_core_events::error"]
1254 [::std::mem::offset_of!(pw_core_events, error) - 32usize];
1255 ["Offset of field: pw_core_events::remove_id"]
1256 [::std::mem::offset_of!(pw_core_events, remove_id) - 40usize];
1257 ["Offset of field: pw_core_events::bound_id"]
1258 [::std::mem::offset_of!(pw_core_events, bound_id) - 48usize];
1259 ["Offset of field: pw_core_events::add_mem"]
1260 [::std::mem::offset_of!(pw_core_events, add_mem) - 56usize];
1261 ["Offset of field: pw_core_events::remove_mem"]
1262 [::std::mem::offset_of!(pw_core_events, remove_mem) - 64usize];
1263 ["Offset of field: pw_core_events::bound_props"]
1264 [::std::mem::offset_of!(pw_core_events, bound_props) - 72usize];
1265};
1266#[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."]
1267#[repr(C)]
1268#[derive(Debug, Copy, Clone)]
1269pub struct pw_core_methods {
1270 pub version: u32,
1271 pub add_listener: ::std::option::Option<
1272 unsafe extern "C" fn(
1273 object: *mut ::std::os::raw::c_void,
1274 listener: *mut spa_hook,
1275 events: *const pw_core_events,
1276 data: *mut ::std::os::raw::c_void,
1277 ) -> ::std::os::raw::c_int,
1278 >,
1279 #[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."]
1280 pub hello: ::std::option::Option<
1281 unsafe extern "C" fn(
1282 object: *mut ::std::os::raw::c_void,
1283 version: u32,
1284 ) -> ::std::os::raw::c_int,
1285 >,
1286 #[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."]
1287 pub sync: ::std::option::Option<
1288 unsafe extern "C" fn(
1289 object: *mut ::std::os::raw::c_void,
1290 id: u32,
1291 seq: ::std::os::raw::c_int,
1292 ) -> ::std::os::raw::c_int,
1293 >,
1294 #[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."]
1295 pub pong: ::std::option::Option<
1296 unsafe extern "C" fn(
1297 object: *mut ::std::os::raw::c_void,
1298 id: u32,
1299 seq: ::std::os::raw::c_int,
1300 ) -> ::std::os::raw::c_int,
1301 >,
1302 #[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."]
1303 pub error: ::std::option::Option<
1304 unsafe extern "C" fn(
1305 object: *mut ::std::os::raw::c_void,
1306 id: u32,
1307 seq: ::std::os::raw::c_int,
1308 res: ::std::os::raw::c_int,
1309 message: *const ::std::os::raw::c_char,
1310 ) -> ::std::os::raw::c_int,
1311 >,
1312 #[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."]
1313 pub get_registry: ::std::option::Option<
1314 unsafe extern "C" fn(
1315 object: *mut ::std::os::raw::c_void,
1316 version: u32,
1317 user_data_size: usize,
1318 ) -> *mut pw_registry,
1319 >,
1320 #[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."]
1321 pub create_object: ::std::option::Option<
1322 unsafe extern "C" fn(
1323 object: *mut ::std::os::raw::c_void,
1324 factory_name: *const ::std::os::raw::c_char,
1325 type_: *const ::std::os::raw::c_char,
1326 version: u32,
1327 props: *const spa_dict,
1328 user_data_size: usize,
1329 ) -> *mut ::std::os::raw::c_void,
1330 >,
1331 #[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."]
1332 pub destroy: ::std::option::Option<
1333 unsafe extern "C" fn(
1334 object: *mut ::std::os::raw::c_void,
1335 proxy: *mut ::std::os::raw::c_void,
1336 ) -> ::std::os::raw::c_int,
1337 >,
1338}
1339#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1340const _: () = {
1341 ["Size of pw_core_methods"][::std::mem::size_of::<pw_core_methods>() - 72usize];
1342 ["Alignment of pw_core_methods"][::std::mem::align_of::<pw_core_methods>() - 8usize];
1343 ["Offset of field: pw_core_methods::version"]
1344 [::std::mem::offset_of!(pw_core_methods, version) - 0usize];
1345 ["Offset of field: pw_core_methods::add_listener"]
1346 [::std::mem::offset_of!(pw_core_methods, add_listener) - 8usize];
1347 ["Offset of field: pw_core_methods::hello"]
1348 [::std::mem::offset_of!(pw_core_methods, hello) - 16usize];
1349 ["Offset of field: pw_core_methods::sync"]
1350 [::std::mem::offset_of!(pw_core_methods, sync) - 24usize];
1351 ["Offset of field: pw_core_methods::pong"]
1352 [::std::mem::offset_of!(pw_core_methods, pong) - 32usize];
1353 ["Offset of field: pw_core_methods::error"]
1354 [::std::mem::offset_of!(pw_core_methods, error) - 40usize];
1355 ["Offset of field: pw_core_methods::get_registry"]
1356 [::std::mem::offset_of!(pw_core_methods, get_registry) - 48usize];
1357 ["Offset of field: pw_core_methods::create_object"]
1358 [::std::mem::offset_of!(pw_core_methods, create_object) - 56usize];
1359 ["Offset of field: pw_core_methods::destroy"]
1360 [::std::mem::offset_of!(pw_core_methods, destroy) - 64usize];
1361};
1362#[doc = " Registry events"]
1363#[repr(C)]
1364#[derive(Debug, Copy, Clone)]
1365pub struct pw_registry_events {
1366 pub version: u32,
1367 #[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"]
1368 pub global: ::std::option::Option<
1369 unsafe extern "C" fn(
1370 data: *mut ::std::os::raw::c_void,
1371 id: u32,
1372 permissions: u32,
1373 type_: *const ::std::os::raw::c_char,
1374 version: u32,
1375 props: *const spa_dict,
1376 ),
1377 >,
1378 #[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"]
1379 pub global_remove:
1380 ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, id: u32)>,
1381}
1382#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1383const _: () = {
1384 ["Size of pw_registry_events"][::std::mem::size_of::<pw_registry_events>() - 24usize];
1385 ["Alignment of pw_registry_events"][::std::mem::align_of::<pw_registry_events>() - 8usize];
1386 ["Offset of field: pw_registry_events::version"]
1387 [::std::mem::offset_of!(pw_registry_events, version) - 0usize];
1388 ["Offset of field: pw_registry_events::global"]
1389 [::std::mem::offset_of!(pw_registry_events, global) - 8usize];
1390 ["Offset of field: pw_registry_events::global_remove"]
1391 [::std::mem::offset_of!(pw_registry_events, global_remove) - 16usize];
1392};
1393#[doc = " Registry methods"]
1394#[repr(C)]
1395#[derive(Debug, Copy, Clone)]
1396pub struct pw_registry_methods {
1397 pub version: u32,
1398 pub add_listener: ::std::option::Option<
1399 unsafe extern "C" fn(
1400 object: *mut ::std::os::raw::c_void,
1401 listener: *mut spa_hook,
1402 events: *const pw_registry_events,
1403 data: *mut ::std::os::raw::c_void,
1404 ) -> ::std::os::raw::c_int,
1405 >,
1406 #[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"]
1407 pub bind: ::std::option::Option<
1408 unsafe extern "C" fn(
1409 object: *mut ::std::os::raw::c_void,
1410 id: u32,
1411 type_: *const ::std::os::raw::c_char,
1412 version: u32,
1413 use_data_size: usize,
1414 ) -> *mut ::std::os::raw::c_void,
1415 >,
1416 #[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."]
1417 pub destroy: ::std::option::Option<
1418 unsafe extern "C" fn(object: *mut ::std::os::raw::c_void, id: u32) -> ::std::os::raw::c_int,
1419 >,
1420}
1421#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1422const _: () = {
1423 ["Size of pw_registry_methods"][::std::mem::size_of::<pw_registry_methods>() - 32usize];
1424 ["Alignment of pw_registry_methods"][::std::mem::align_of::<pw_registry_methods>() - 8usize];
1425 ["Offset of field: pw_registry_methods::version"]
1426 [::std::mem::offset_of!(pw_registry_methods, version) - 0usize];
1427 ["Offset of field: pw_registry_methods::add_listener"]
1428 [::std::mem::offset_of!(pw_registry_methods, add_listener) - 8usize];
1429 ["Offset of field: pw_registry_methods::bind"]
1430 [::std::mem::offset_of!(pw_registry_methods, bind) - 16usize];
1431 ["Offset of field: pw_registry_methods::destroy"]
1432 [::std::mem::offset_of!(pw_registry_methods, destroy) - 24usize];
1433};
1434unsafe extern "C" {
1435 #[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)"]
1436 pub fn pw_context_connect(
1437 context: *mut pw_context,
1438 properties: *mut pw_properties,
1439 user_data_size: usize,
1440 ) -> *mut pw_core;
1441}
1442unsafe extern "C" {
1443 #[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"]
1444 pub fn pw_context_connect_fd(
1445 context: *mut pw_context,
1446 fd: ::std::os::raw::c_int,
1447 properties: *mut pw_properties,
1448 user_data_size: usize,
1449 ) -> *mut pw_core;
1450}
1451unsafe extern "C" {
1452 #[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"]
1453 pub fn pw_context_connect_self(
1454 context: *mut pw_context,
1455 properties: *mut pw_properties,
1456 user_data_size: usize,
1457 ) -> *mut pw_core;
1458}
1459unsafe extern "C" {
1460 #[doc = " Steal the fd of the core connection or < 0 on error. The core\n will be disconnected after this call."]
1461 pub fn pw_core_steal_fd(core: *mut pw_core) -> ::std::os::raw::c_int;
1462}
1463unsafe extern "C" {
1464 #[doc = " Pause or resume the core. When the core is paused, no new events\n will be dispatched until the core is resumed again."]
1465 pub fn pw_core_set_paused(core: *mut pw_core, paused: bool) -> ::std::os::raw::c_int;
1466}
1467unsafe extern "C" {
1468 #[doc = " disconnect and destroy a core"]
1469 pub fn pw_core_disconnect(core: *mut pw_core) -> ::std::os::raw::c_int;
1470}
1471unsafe extern "C" {
1472 #[doc = " Get the user_data. It is of the size specified when this object was\n constructed"]
1473 pub fn pw_core_get_user_data(core: *mut pw_core) -> *mut ::std::os::raw::c_void;
1474}
1475#[repr(C)]
1476#[derive(Debug, Copy, Clone)]
1477pub struct pw_client {
1478 _unused: [u8; 0],
1479}
1480unsafe extern "C" {
1481 #[doc = " Get the client proxy of the connected core. This will have the id\n of PW_ID_CLIENT (1)"]
1482 pub fn pw_core_get_client(core: *mut pw_core) -> *mut pw_client;
1483}
1484unsafe extern "C" {
1485 #[doc = " Get the context object used to created this core"]
1486 pub fn pw_core_get_context(core: *mut pw_core) -> *mut pw_context;
1487}
1488unsafe extern "C" {
1489 #[doc = " Get properties from the core"]
1490 pub fn pw_core_get_properties(core: *mut pw_core) -> *const pw_properties;
1491}
1492unsafe extern "C" {
1493 #[doc = " Update the core properties. This updates the properties\n of the associated client.\n \\return the number of properties that were updated"]
1494 pub fn pw_core_update_properties(
1495 core: *mut pw_core,
1496 dict: *const spa_dict,
1497 ) -> ::std::os::raw::c_int;
1498}
1499unsafe extern "C" {
1500 #[doc = " Get the core mempool object"]
1501 pub fn pw_core_get_mempool(core: *mut pw_core) -> *mut pw_mempool;
1502}
1503unsafe extern "C" {
1504 #[doc = " Get the proxy with the given id"]
1505 pub fn pw_core_find_proxy(core: *mut pw_core, id: u32) -> *mut pw_proxy;
1506}
1507unsafe extern "C" {
1508 #[doc = " Export an object into the PipeWire instance associated with core"]
1509 pub fn pw_core_export(
1510 core: *mut pw_core,
1511 type_: *const ::std::os::raw::c_char,
1512 props: *const spa_dict,
1513 object: *mut ::std::os::raw::c_void,
1514 user_data_size: usize,
1515 ) -> *mut pw_proxy;
1516}
1517#[doc = " \\addtogroup pw_loop\n \\{"]
1518#[repr(C)]
1519#[derive(Debug, Copy, Clone)]
1520pub struct pw_loop {
1521 #[doc = "< system utils"]
1522 pub system: *mut spa_system,
1523 #[doc = "< wrapped loop"]
1524 pub loop_: *mut spa_loop,
1525 #[doc = "< loop control"]
1526 pub control: *mut spa_loop_control,
1527 #[doc = "< loop utils"]
1528 pub utils: *mut spa_loop_utils,
1529 pub name: *const ::std::os::raw::c_char,
1530}
1531#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1532const _: () = {
1533 ["Size of pw_loop"][::std::mem::size_of::<pw_loop>() - 40usize];
1534 ["Alignment of pw_loop"][::std::mem::align_of::<pw_loop>() - 8usize];
1535 ["Offset of field: pw_loop::system"][::std::mem::offset_of!(pw_loop, system) - 0usize];
1536 ["Offset of field: pw_loop::loop_"][::std::mem::offset_of!(pw_loop, loop_) - 8usize];
1537 ["Offset of field: pw_loop::control"][::std::mem::offset_of!(pw_loop, control) - 16usize];
1538 ["Offset of field: pw_loop::utils"][::std::mem::offset_of!(pw_loop, utils) - 24usize];
1539 ["Offset of field: pw_loop::name"][::std::mem::offset_of!(pw_loop, name) - 32usize];
1540};
1541unsafe extern "C" {
1542 pub fn pw_loop_new(props: *const spa_dict) -> *mut pw_loop;
1543}
1544unsafe extern "C" {
1545 pub fn pw_loop_destroy(loop_: *mut pw_loop);
1546}
1547unsafe extern "C" {
1548 pub fn pw_loop_set_name(
1549 loop_: *mut pw_loop,
1550 name: *const ::std::os::raw::c_char,
1551 ) -> ::std::os::raw::c_int;
1552}
1553#[doc = " context events emitted by the context object added with \\ref pw_context_add_listener"]
1554#[repr(C)]
1555#[derive(Debug, Copy, Clone)]
1556pub struct pw_context_events {
1557 pub version: u32,
1558 #[doc = " The context is being destroyed"]
1559 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
1560 #[doc = " The context is being freed"]
1561 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
1562 #[doc = " a new client object is added"]
1563 pub check_access: ::std::option::Option<
1564 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, client: *mut pw_impl_client),
1565 >,
1566 #[doc = " a new global object was added"]
1567 pub global_added: ::std::option::Option<
1568 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, global: *mut pw_global),
1569 >,
1570 #[doc = " a global object was removed"]
1571 pub global_removed: ::std::option::Option<
1572 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, global: *mut pw_global),
1573 >,
1574 #[doc = " a driver was added, since 0.3.75 version:1"]
1575 pub driver_added: ::std::option::Option<
1576 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, node: *mut pw_impl_node),
1577 >,
1578 #[doc = " a driver was removed, since 0.3.75 version:1"]
1579 pub driver_removed: ::std::option::Option<
1580 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, node: *mut pw_impl_node),
1581 >,
1582}
1583#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1584const _: () = {
1585 ["Size of pw_context_events"][::std::mem::size_of::<pw_context_events>() - 64usize];
1586 ["Alignment of pw_context_events"][::std::mem::align_of::<pw_context_events>() - 8usize];
1587 ["Offset of field: pw_context_events::version"]
1588 [::std::mem::offset_of!(pw_context_events, version) - 0usize];
1589 ["Offset of field: pw_context_events::destroy"]
1590 [::std::mem::offset_of!(pw_context_events, destroy) - 8usize];
1591 ["Offset of field: pw_context_events::free"]
1592 [::std::mem::offset_of!(pw_context_events, free) - 16usize];
1593 ["Offset of field: pw_context_events::check_access"]
1594 [::std::mem::offset_of!(pw_context_events, check_access) - 24usize];
1595 ["Offset of field: pw_context_events::global_added"]
1596 [::std::mem::offset_of!(pw_context_events, global_added) - 32usize];
1597 ["Offset of field: pw_context_events::global_removed"]
1598 [::std::mem::offset_of!(pw_context_events, global_removed) - 40usize];
1599 ["Offset of field: pw_context_events::driver_added"]
1600 [::std::mem::offset_of!(pw_context_events, driver_added) - 48usize];
1601 ["Offset of field: pw_context_events::driver_removed"]
1602 [::std::mem::offset_of!(pw_context_events, driver_removed) - 56usize];
1603};
1604unsafe extern "C" {
1605 #[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."]
1606 pub fn pw_context_new(
1607 main_loop: *mut pw_loop,
1608 props: *mut pw_properties,
1609 user_data_size: usize,
1610 ) -> *mut pw_context;
1611}
1612unsafe extern "C" {
1613 #[doc = " destroy a context object, all resources except the main_loop will be destroyed"]
1614 pub fn pw_context_destroy(context: *mut pw_context);
1615}
1616unsafe extern "C" {
1617 #[doc = " Get the context user data"]
1618 pub fn pw_context_get_user_data(context: *mut pw_context) -> *mut ::std::os::raw::c_void;
1619}
1620unsafe extern "C" {
1621 #[doc = " Add a new event listener to a context"]
1622 pub fn pw_context_add_listener(
1623 context: *mut pw_context,
1624 listener: *mut spa_hook,
1625 events: *const pw_context_events,
1626 data: *mut ::std::os::raw::c_void,
1627 );
1628}
1629unsafe extern "C" {
1630 #[doc = " Get the context properties"]
1631 pub fn pw_context_get_properties(context: *mut pw_context) -> *const pw_properties;
1632}
1633unsafe extern "C" {
1634 #[doc = " Update the context properties"]
1635 pub fn pw_context_update_properties(
1636 context: *mut pw_context,
1637 dict: *const spa_dict,
1638 ) -> ::std::os::raw::c_int;
1639}
1640unsafe extern "C" {
1641 #[doc = " Get a config section for this context. Since 0.3.22, deprecated,\n use pw_context_conf_section_for_each()."]
1642 pub fn pw_context_get_conf_section(
1643 context: *mut pw_context,
1644 section: *const ::std::os::raw::c_char,
1645 ) -> *const ::std::os::raw::c_char;
1646}
1647unsafe extern "C" {
1648 #[doc = " Parse a standard config section for this context. Since 0.3.22"]
1649 pub fn pw_context_parse_conf_section(
1650 context: *mut pw_context,
1651 conf: *mut pw_properties,
1652 section: *const ::std::os::raw::c_char,
1653 ) -> ::std::os::raw::c_int;
1654}
1655unsafe extern "C" {
1656 #[doc = " update properties from a section into props. Since 0.3.45"]
1657 pub fn pw_context_conf_update_props(
1658 context: *mut pw_context,
1659 section: *const ::std::os::raw::c_char,
1660 props: *mut pw_properties,
1661 ) -> ::std::os::raw::c_int;
1662}
1663unsafe extern "C" {
1664 #[doc = " emit callback for all config sections. Since 0.3.45"]
1665 pub fn pw_context_conf_section_for_each(
1666 context: *mut pw_context,
1667 section: *const ::std::os::raw::c_char,
1668 callback: ::std::option::Option<
1669 unsafe extern "C" fn(
1670 data: *mut ::std::os::raw::c_void,
1671 location: *const ::std::os::raw::c_char,
1672 section: *const ::std::os::raw::c_char,
1673 str_: *const ::std::os::raw::c_char,
1674 len: usize,
1675 ) -> ::std::os::raw::c_int,
1676 >,
1677 data: *mut ::std::os::raw::c_void,
1678 ) -> ::std::os::raw::c_int;
1679}
1680unsafe extern "C" {
1681 #[doc = " emit callback for all matched properties. Since 0.3.46"]
1682 pub fn pw_context_conf_section_match_rules(
1683 context: *mut pw_context,
1684 section: *const ::std::os::raw::c_char,
1685 props: *const spa_dict,
1686 callback: ::std::option::Option<
1687 unsafe extern "C" fn(
1688 data: *mut ::std::os::raw::c_void,
1689 location: *const ::std::os::raw::c_char,
1690 action: *const ::std::os::raw::c_char,
1691 str_: *const ::std::os::raw::c_char,
1692 len: usize,
1693 ) -> ::std::os::raw::c_int,
1694 >,
1695 data: *mut ::std::os::raw::c_void,
1696 ) -> ::std::os::raw::c_int;
1697}
1698unsafe extern "C" {
1699 #[doc = " Get the context support objects"]
1700 pub fn pw_context_get_support(
1701 context: *mut pw_context,
1702 n_support: *mut u32,
1703 ) -> *const spa_support;
1704}
1705unsafe extern "C" {
1706 #[doc = " Get the context main loop. Returns the value passed to pw_context_new()."]
1707 pub fn pw_context_get_main_loop(context: *mut pw_context) -> *mut pw_loop;
1708}
1709#[doc = " \\addtogroup pw_data_loop\n \\{"]
1710#[repr(C)]
1711#[derive(Debug, Copy, Clone)]
1712pub struct pw_data_loop {
1713 _unused: [u8; 0],
1714}
1715unsafe extern "C" {
1716 #[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"]
1717 pub fn pw_context_get_data_loop(context: *mut pw_context) -> *mut pw_data_loop;
1718}
1719unsafe extern "C" {
1720 #[doc = " Get a data-loop.\n Since 1.1.0"]
1721 pub fn pw_context_acquire_loop(
1722 context: *mut pw_context,
1723 props: *const spa_dict,
1724 ) -> *mut pw_loop;
1725}
1726unsafe extern "C" {
1727 #[doc = " Release a data-loop.\n Since 1.1.0"]
1728 pub fn pw_context_release_loop(context: *mut pw_context, loop_: *mut pw_loop);
1729}
1730#[doc = " \\addtogroup pw_work_queue\n \\{"]
1731#[repr(C)]
1732#[derive(Debug, Copy, Clone)]
1733pub struct pw_work_queue {
1734 _unused: [u8; 0],
1735}
1736unsafe extern "C" {
1737 #[doc = " Get the work queue from the context: Since 0.3.26"]
1738 pub fn pw_context_get_work_queue(context: *mut pw_context) -> *mut pw_work_queue;
1739}
1740unsafe extern "C" {
1741 #[doc = " Get the memory pool from the context: Since 0.3.74"]
1742 pub fn pw_context_get_mempool(context: *mut pw_context) -> *mut pw_mempool;
1743}
1744unsafe extern "C" {
1745 #[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."]
1746 pub fn pw_context_for_each_global(
1747 context: *mut pw_context,
1748 callback: ::std::option::Option<
1749 unsafe extern "C" fn(
1750 data: *mut ::std::os::raw::c_void,
1751 global: *mut pw_global,
1752 ) -> ::std::os::raw::c_int,
1753 >,
1754 data: *mut ::std::os::raw::c_void,
1755 ) -> ::std::os::raw::c_int;
1756}
1757unsafe extern "C" {
1758 #[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."]
1759 pub fn pw_context_find_global(context: *mut pw_context, id: u32) -> *mut pw_global;
1760}
1761unsafe extern "C" {
1762 #[doc = " add a spa library for the given factory_name regex"]
1763 pub fn pw_context_add_spa_lib(
1764 context: *mut pw_context,
1765 factory_regex: *const ::std::os::raw::c_char,
1766 lib: *const ::std::os::raw::c_char,
1767 ) -> ::std::os::raw::c_int;
1768}
1769unsafe extern "C" {
1770 #[doc = " find the library name for a spa factory"]
1771 pub fn pw_context_find_spa_lib(
1772 context: *mut pw_context,
1773 factory_name: *const ::std::os::raw::c_char,
1774 ) -> *const ::std::os::raw::c_char;
1775}
1776unsafe extern "C" {
1777 #[doc = " Load a SPA handle from a context. On failure returns NULL and sets errno."]
1778 pub fn pw_context_load_spa_handle(
1779 context: *mut pw_context,
1780 factory_name: *const ::std::os::raw::c_char,
1781 info: *const spa_dict,
1782 ) -> *mut spa_handle;
1783}
1784#[doc = " data for registering export functions"]
1785#[repr(C)]
1786pub struct pw_export_type {
1787 pub link: spa_list,
1788 pub type_: *const ::std::os::raw::c_char,
1789 pub func: ::std::option::Option<
1790 unsafe extern "C" fn(
1791 core: *mut pw_core,
1792 type_: *const ::std::os::raw::c_char,
1793 props: *const spa_dict,
1794 object: *mut ::std::os::raw::c_void,
1795 user_data_size: usize,
1796 ) -> *mut pw_proxy,
1797 >,
1798}
1799#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1800const _: () = {
1801 ["Size of pw_export_type"][::std::mem::size_of::<pw_export_type>() - 32usize];
1802 ["Alignment of pw_export_type"][::std::mem::align_of::<pw_export_type>() - 8usize];
1803 ["Offset of field: pw_export_type::link"]
1804 [::std::mem::offset_of!(pw_export_type, link) - 0usize];
1805 ["Offset of field: pw_export_type::type_"]
1806 [::std::mem::offset_of!(pw_export_type, type_) - 16usize];
1807 ["Offset of field: pw_export_type::func"]
1808 [::std::mem::offset_of!(pw_export_type, func) - 24usize];
1809};
1810unsafe extern "C" {
1811 #[doc = " register a type that can be exported on a context_proxy. This is usually used by\n extension modules"]
1812 pub fn pw_context_register_export_type(
1813 context: *mut pw_context,
1814 type_: *mut pw_export_type,
1815 ) -> ::std::os::raw::c_int;
1816}
1817unsafe extern "C" {
1818 #[doc = " find information about registered export type"]
1819 pub fn pw_context_find_export_type(
1820 context: *mut pw_context,
1821 type_: *const ::std::os::raw::c_char,
1822 ) -> *const pw_export_type;
1823}
1824unsafe extern "C" {
1825 #[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)."]
1826 pub fn pw_context_set_object(
1827 context: *mut pw_context,
1828 type_: *const ::std::os::raw::c_char,
1829 value: *mut ::std::os::raw::c_void,
1830 ) -> ::std::os::raw::c_int;
1831}
1832unsafe extern "C" {
1833 #[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."]
1834 pub fn pw_context_get_object(
1835 context: *mut pw_context,
1836 type_: *const ::std::os::raw::c_char,
1837 ) -> *mut ::std::os::raw::c_void;
1838}
1839#[doc = " a function to destroy an item"]
1840pub type pw_destroy_t =
1841 ::std::option::Option<unsafe extern "C" fn(object: *mut ::std::os::raw::c_void)>;
1842unsafe extern "C" {
1843 pub fn pw_split_walk(
1844 str_: *const ::std::os::raw::c_char,
1845 delimiter: *const ::std::os::raw::c_char,
1846 len: *mut usize,
1847 state: *mut *const ::std::os::raw::c_char,
1848 ) -> *const ::std::os::raw::c_char;
1849}
1850unsafe extern "C" {
1851 pub fn pw_split_strv(
1852 str_: *const ::std::os::raw::c_char,
1853 delimiter: *const ::std::os::raw::c_char,
1854 max_tokens: ::std::os::raw::c_int,
1855 n_tokens: *mut ::std::os::raw::c_int,
1856 ) -> *mut *mut ::std::os::raw::c_char;
1857}
1858unsafe extern "C" {
1859 pub fn pw_split_ip(
1860 str_: *mut ::std::os::raw::c_char,
1861 delimiter: *const ::std::os::raw::c_char,
1862 max_tokens: ::std::os::raw::c_int,
1863 tokens: *mut *mut ::std::os::raw::c_char,
1864 ) -> ::std::os::raw::c_int;
1865}
1866unsafe extern "C" {
1867 pub fn pw_strv_parse(
1868 val: *const ::std::os::raw::c_char,
1869 len: usize,
1870 max_tokens: ::std::os::raw::c_int,
1871 n_tokens: *mut ::std::os::raw::c_int,
1872 ) -> *mut *mut ::std::os::raw::c_char;
1873}
1874unsafe extern "C" {
1875 pub fn pw_strv_find(
1876 a: *mut *mut ::std::os::raw::c_char,
1877 b: *const ::std::os::raw::c_char,
1878 ) -> ::std::os::raw::c_int;
1879}
1880unsafe extern "C" {
1881 pub fn pw_strv_find_common(
1882 a: *mut *mut ::std::os::raw::c_char,
1883 b: *mut *mut ::std::os::raw::c_char,
1884 ) -> ::std::os::raw::c_int;
1885}
1886unsafe extern "C" {
1887 pub fn pw_free_strv(str_: *mut *mut ::std::os::raw::c_char);
1888}
1889unsafe extern "C" {
1890 pub fn pw_strip(
1891 str_: *mut ::std::os::raw::c_char,
1892 whitespace: *const ::std::os::raw::c_char,
1893 ) -> *mut ::std::os::raw::c_char;
1894}
1895unsafe extern "C" {
1896 pub fn pw_getrandom(
1897 buf: *mut ::std::os::raw::c_void,
1898 buflen: usize,
1899 flags: ::std::os::raw::c_uint,
1900 ) -> isize;
1901}
1902unsafe extern "C" {
1903 pub fn pw_random(buf: *mut ::std::os::raw::c_void, buflen: usize);
1904}
1905unsafe extern "C" {
1906 pub fn pw_reallocarray(
1907 ptr: *mut ::std::os::raw::c_void,
1908 nmemb: usize,
1909 size: usize,
1910 ) -> *mut ::std::os::raw::c_void;
1911}
1912#[repr(C)]
1913pub struct pw_protocol_client {
1914 #[doc = "< link in protocol client_list"]
1915 pub link: spa_list,
1916 #[doc = "< the owner protocol"]
1917 pub protocol: *mut pw_protocol,
1918 pub core: *mut pw_core,
1919 pub connect: ::std::option::Option<
1920 unsafe extern "C" fn(
1921 client: *mut pw_protocol_client,
1922 props: *const spa_dict,
1923 done_callback: ::std::option::Option<
1924 unsafe extern "C" fn(
1925 data: *mut ::std::os::raw::c_void,
1926 result: ::std::os::raw::c_int,
1927 ),
1928 >,
1929 data: *mut ::std::os::raw::c_void,
1930 ) -> ::std::os::raw::c_int,
1931 >,
1932 pub connect_fd: ::std::option::Option<
1933 unsafe extern "C" fn(
1934 client: *mut pw_protocol_client,
1935 fd: ::std::os::raw::c_int,
1936 close: bool,
1937 ) -> ::std::os::raw::c_int,
1938 >,
1939 pub steal_fd: ::std::option::Option<
1940 unsafe extern "C" fn(client: *mut pw_protocol_client) -> ::std::os::raw::c_int,
1941 >,
1942 pub disconnect: ::std::option::Option<unsafe extern "C" fn(client: *mut pw_protocol_client)>,
1943 pub destroy: ::std::option::Option<unsafe extern "C" fn(client: *mut pw_protocol_client)>,
1944 pub set_paused: ::std::option::Option<
1945 unsafe extern "C" fn(
1946 client: *mut pw_protocol_client,
1947 paused: bool,
1948 ) -> ::std::os::raw::c_int,
1949 >,
1950}
1951#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1952const _: () = {
1953 ["Size of pw_protocol_client"][::std::mem::size_of::<pw_protocol_client>() - 80usize];
1954 ["Alignment of pw_protocol_client"][::std::mem::align_of::<pw_protocol_client>() - 8usize];
1955 ["Offset of field: pw_protocol_client::link"]
1956 [::std::mem::offset_of!(pw_protocol_client, link) - 0usize];
1957 ["Offset of field: pw_protocol_client::protocol"]
1958 [::std::mem::offset_of!(pw_protocol_client, protocol) - 16usize];
1959 ["Offset of field: pw_protocol_client::core"]
1960 [::std::mem::offset_of!(pw_protocol_client, core) - 24usize];
1961 ["Offset of field: pw_protocol_client::connect"]
1962 [::std::mem::offset_of!(pw_protocol_client, connect) - 32usize];
1963 ["Offset of field: pw_protocol_client::connect_fd"]
1964 [::std::mem::offset_of!(pw_protocol_client, connect_fd) - 40usize];
1965 ["Offset of field: pw_protocol_client::steal_fd"]
1966 [::std::mem::offset_of!(pw_protocol_client, steal_fd) - 48usize];
1967 ["Offset of field: pw_protocol_client::disconnect"]
1968 [::std::mem::offset_of!(pw_protocol_client, disconnect) - 56usize];
1969 ["Offset of field: pw_protocol_client::destroy"]
1970 [::std::mem::offset_of!(pw_protocol_client, destroy) - 64usize];
1971 ["Offset of field: pw_protocol_client::set_paused"]
1972 [::std::mem::offset_of!(pw_protocol_client, set_paused) - 72usize];
1973};
1974#[repr(C)]
1975pub struct pw_protocol_server {
1976 #[doc = "< link in protocol server_list"]
1977 pub link: spa_list,
1978 #[doc = "< the owner protocol"]
1979 pub protocol: *mut pw_protocol,
1980 pub core: *mut pw_impl_core,
1981 #[doc = "< list of clients of this protocol"]
1982 pub client_list: spa_list,
1983 pub destroy: ::std::option::Option<unsafe extern "C" fn(listen: *mut pw_protocol_server)>,
1984}
1985#[allow(clippy::unnecessary_operation, clippy::identity_op)]
1986const _: () = {
1987 ["Size of pw_protocol_server"][::std::mem::size_of::<pw_protocol_server>() - 56usize];
1988 ["Alignment of pw_protocol_server"][::std::mem::align_of::<pw_protocol_server>() - 8usize];
1989 ["Offset of field: pw_protocol_server::link"]
1990 [::std::mem::offset_of!(pw_protocol_server, link) - 0usize];
1991 ["Offset of field: pw_protocol_server::protocol"]
1992 [::std::mem::offset_of!(pw_protocol_server, protocol) - 16usize];
1993 ["Offset of field: pw_protocol_server::core"]
1994 [::std::mem::offset_of!(pw_protocol_server, core) - 24usize];
1995 ["Offset of field: pw_protocol_server::client_list"]
1996 [::std::mem::offset_of!(pw_protocol_server, client_list) - 32usize];
1997 ["Offset of field: pw_protocol_server::destroy"]
1998 [::std::mem::offset_of!(pw_protocol_server, destroy) - 48usize];
1999};
2000#[repr(C)]
2001#[derive(Debug, Copy, Clone)]
2002pub struct pw_protocol_marshal {
2003 #[doc = "< interface type"]
2004 pub type_: *const ::std::os::raw::c_char,
2005 #[doc = "< version"]
2006 pub version: u32,
2007 #[doc = "< version"]
2008 pub flags: u32,
2009 #[doc = "< number of client methods"]
2010 pub n_client_methods: u32,
2011 #[doc = "< number of server methods"]
2012 pub n_server_methods: u32,
2013 pub client_marshal: *const ::std::os::raw::c_void,
2014 pub server_demarshal: *const ::std::os::raw::c_void,
2015 pub server_marshal: *const ::std::os::raw::c_void,
2016 pub client_demarshal: *const ::std::os::raw::c_void,
2017}
2018#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2019const _: () = {
2020 ["Size of pw_protocol_marshal"][::std::mem::size_of::<pw_protocol_marshal>() - 56usize];
2021 ["Alignment of pw_protocol_marshal"][::std::mem::align_of::<pw_protocol_marshal>() - 8usize];
2022 ["Offset of field: pw_protocol_marshal::type_"]
2023 [::std::mem::offset_of!(pw_protocol_marshal, type_) - 0usize];
2024 ["Offset of field: pw_protocol_marshal::version"]
2025 [::std::mem::offset_of!(pw_protocol_marshal, version) - 8usize];
2026 ["Offset of field: pw_protocol_marshal::flags"]
2027 [::std::mem::offset_of!(pw_protocol_marshal, flags) - 12usize];
2028 ["Offset of field: pw_protocol_marshal::n_client_methods"]
2029 [::std::mem::offset_of!(pw_protocol_marshal, n_client_methods) - 16usize];
2030 ["Offset of field: pw_protocol_marshal::n_server_methods"]
2031 [::std::mem::offset_of!(pw_protocol_marshal, n_server_methods) - 20usize];
2032 ["Offset of field: pw_protocol_marshal::client_marshal"]
2033 [::std::mem::offset_of!(pw_protocol_marshal, client_marshal) - 24usize];
2034 ["Offset of field: pw_protocol_marshal::server_demarshal"]
2035 [::std::mem::offset_of!(pw_protocol_marshal, server_demarshal) - 32usize];
2036 ["Offset of field: pw_protocol_marshal::server_marshal"]
2037 [::std::mem::offset_of!(pw_protocol_marshal, server_marshal) - 40usize];
2038 ["Offset of field: pw_protocol_marshal::client_demarshal"]
2039 [::std::mem::offset_of!(pw_protocol_marshal, client_demarshal) - 48usize];
2040};
2041#[repr(C)]
2042#[derive(Debug, Copy, Clone)]
2043pub struct pw_protocol_implementation {
2044 pub version: u32,
2045 pub new_client: ::std::option::Option<
2046 unsafe extern "C" fn(
2047 protocol: *mut pw_protocol,
2048 core: *mut pw_core,
2049 props: *const spa_dict,
2050 ) -> *mut pw_protocol_client,
2051 >,
2052 pub add_server: ::std::option::Option<
2053 unsafe extern "C" fn(
2054 protocol: *mut pw_protocol,
2055 core: *mut pw_impl_core,
2056 props: *const spa_dict,
2057 ) -> *mut pw_protocol_server,
2058 >,
2059 pub add_fd_server: ::std::option::Option<
2060 unsafe extern "C" fn(
2061 protocol: *mut pw_protocol,
2062 core: *mut pw_impl_core,
2063 listen_fd: ::std::os::raw::c_int,
2064 close_fd: ::std::os::raw::c_int,
2065 props: *const spa_dict,
2066 ) -> *mut pw_protocol_server,
2067 >,
2068}
2069#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2070const _: () = {
2071 ["Size of pw_protocol_implementation"]
2072 [::std::mem::size_of::<pw_protocol_implementation>() - 32usize];
2073 ["Alignment of pw_protocol_implementation"]
2074 [::std::mem::align_of::<pw_protocol_implementation>() - 8usize];
2075 ["Offset of field: pw_protocol_implementation::version"]
2076 [::std::mem::offset_of!(pw_protocol_implementation, version) - 0usize];
2077 ["Offset of field: pw_protocol_implementation::new_client"]
2078 [::std::mem::offset_of!(pw_protocol_implementation, new_client) - 8usize];
2079 ["Offset of field: pw_protocol_implementation::add_server"]
2080 [::std::mem::offset_of!(pw_protocol_implementation, add_server) - 16usize];
2081 ["Offset of field: pw_protocol_implementation::add_fd_server"]
2082 [::std::mem::offset_of!(pw_protocol_implementation, add_fd_server) - 24usize];
2083};
2084#[repr(C)]
2085#[derive(Debug, Copy, Clone)]
2086pub struct pw_protocol_events {
2087 pub version: u32,
2088 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
2089}
2090#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2091const _: () = {
2092 ["Size of pw_protocol_events"][::std::mem::size_of::<pw_protocol_events>() - 16usize];
2093 ["Alignment of pw_protocol_events"][::std::mem::align_of::<pw_protocol_events>() - 8usize];
2094 ["Offset of field: pw_protocol_events::version"]
2095 [::std::mem::offset_of!(pw_protocol_events, version) - 0usize];
2096 ["Offset of field: pw_protocol_events::destroy"]
2097 [::std::mem::offset_of!(pw_protocol_events, destroy) - 8usize];
2098};
2099unsafe extern "C" {
2100 pub fn pw_protocol_new(
2101 context: *mut pw_context,
2102 name: *const ::std::os::raw::c_char,
2103 user_data_size: usize,
2104 ) -> *mut pw_protocol;
2105}
2106unsafe extern "C" {
2107 pub fn pw_protocol_destroy(protocol: *mut pw_protocol);
2108}
2109unsafe extern "C" {
2110 pub fn pw_protocol_get_context(protocol: *mut pw_protocol) -> *mut pw_context;
2111}
2112unsafe extern "C" {
2113 pub fn pw_protocol_get_user_data(protocol: *mut pw_protocol) -> *mut ::std::os::raw::c_void;
2114}
2115unsafe extern "C" {
2116 pub fn pw_protocol_get_implementation(
2117 protocol: *mut pw_protocol,
2118 ) -> *const pw_protocol_implementation;
2119}
2120unsafe extern "C" {
2121 pub fn pw_protocol_get_extension(protocol: *mut pw_protocol) -> *const ::std::os::raw::c_void;
2122}
2123unsafe extern "C" {
2124 pub fn pw_protocol_add_listener(
2125 protocol: *mut pw_protocol,
2126 listener: *mut spa_hook,
2127 events: *const pw_protocol_events,
2128 data: *mut ::std::os::raw::c_void,
2129 );
2130}
2131unsafe extern "C" {
2132 pub fn pw_protocol_add_marshal(
2133 protocol: *mut pw_protocol,
2134 marshal: *const pw_protocol_marshal,
2135 ) -> ::std::os::raw::c_int;
2136}
2137unsafe extern "C" {
2138 pub fn pw_protocol_get_marshal(
2139 protocol: *mut pw_protocol,
2140 type_: *const ::std::os::raw::c_char,
2141 version: u32,
2142 flags: u32,
2143 ) -> *const pw_protocol_marshal;
2144}
2145unsafe extern "C" {
2146 pub fn pw_context_find_protocol(
2147 context: *mut pw_context,
2148 name: *const ::std::os::raw::c_char,
2149 ) -> *mut pw_protocol;
2150}
2151#[doc = " Proxy events, use \\ref pw_proxy_add_listener"]
2152#[repr(C)]
2153#[derive(Debug, Copy, Clone)]
2154pub struct pw_proxy_events {
2155 pub version: u32,
2156 #[doc = " The proxy is destroyed"]
2157 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
2158 #[doc = " a proxy is bound to a global id"]
2159 pub bound: ::std::option::Option<
2160 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, global_id: u32),
2161 >,
2162 #[doc = " a proxy is removed from the server. Use pw_proxy_destroy to\n free the proxy."]
2163 pub removed: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
2164 #[doc = " a reply to a sync method completed"]
2165 pub done: ::std::option::Option<
2166 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, seq: ::std::os::raw::c_int),
2167 >,
2168 #[doc = " an error occurred on the proxy"]
2169 pub error: ::std::option::Option<
2170 unsafe extern "C" fn(
2171 data: *mut ::std::os::raw::c_void,
2172 seq: ::std::os::raw::c_int,
2173 res: ::std::os::raw::c_int,
2174 message: *const ::std::os::raw::c_char,
2175 ),
2176 >,
2177 pub bound_props: ::std::option::Option<
2178 unsafe extern "C" fn(
2179 data: *mut ::std::os::raw::c_void,
2180 global_id: u32,
2181 props: *const spa_dict,
2182 ),
2183 >,
2184}
2185#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2186const _: () = {
2187 ["Size of pw_proxy_events"][::std::mem::size_of::<pw_proxy_events>() - 56usize];
2188 ["Alignment of pw_proxy_events"][::std::mem::align_of::<pw_proxy_events>() - 8usize];
2189 ["Offset of field: pw_proxy_events::version"]
2190 [::std::mem::offset_of!(pw_proxy_events, version) - 0usize];
2191 ["Offset of field: pw_proxy_events::destroy"]
2192 [::std::mem::offset_of!(pw_proxy_events, destroy) - 8usize];
2193 ["Offset of field: pw_proxy_events::bound"]
2194 [::std::mem::offset_of!(pw_proxy_events, bound) - 16usize];
2195 ["Offset of field: pw_proxy_events::removed"]
2196 [::std::mem::offset_of!(pw_proxy_events, removed) - 24usize];
2197 ["Offset of field: pw_proxy_events::done"]
2198 [::std::mem::offset_of!(pw_proxy_events, done) - 32usize];
2199 ["Offset of field: pw_proxy_events::error"]
2200 [::std::mem::offset_of!(pw_proxy_events, error) - 40usize];
2201 ["Offset of field: pw_proxy_events::bound_props"]
2202 [::std::mem::offset_of!(pw_proxy_events, bound_props) - 48usize];
2203};
2204unsafe extern "C" {
2205 pub fn pw_proxy_new(
2206 factory: *mut pw_proxy,
2207 type_: *const ::std::os::raw::c_char,
2208 version: u32,
2209 user_data_size: usize,
2210 ) -> *mut pw_proxy;
2211}
2212unsafe extern "C" {
2213 #[doc = " Add an event listener to proxy"]
2214 pub fn pw_proxy_add_listener(
2215 proxy: *mut pw_proxy,
2216 listener: *mut spa_hook,
2217 events: *const pw_proxy_events,
2218 data: *mut ::std::os::raw::c_void,
2219 );
2220}
2221unsafe extern "C" {
2222 #[doc = " Add a listener for the events received from the remote object. The\n events depend on the type of the remote object type."]
2223 pub fn pw_proxy_add_object_listener(
2224 proxy: *mut pw_proxy,
2225 listener: *mut spa_hook,
2226 funcs: *const ::std::os::raw::c_void,
2227 data: *mut ::std::os::raw::c_void,
2228 );
2229}
2230unsafe extern "C" {
2231 #[doc = " destroy a proxy"]
2232 pub fn pw_proxy_destroy(proxy: *mut pw_proxy);
2233}
2234unsafe extern "C" {
2235 pub fn pw_proxy_ref(proxy: *mut pw_proxy);
2236}
2237unsafe extern "C" {
2238 pub fn pw_proxy_unref(proxy: *mut pw_proxy);
2239}
2240unsafe extern "C" {
2241 #[doc = " Get the user_data. The size was given in \\ref pw_proxy_new"]
2242 pub fn pw_proxy_get_user_data(proxy: *mut pw_proxy) -> *mut ::std::os::raw::c_void;
2243}
2244unsafe extern "C" {
2245 #[doc = " Get the local id of the proxy"]
2246 pub fn pw_proxy_get_id(proxy: *mut pw_proxy) -> u32;
2247}
2248unsafe extern "C" {
2249 #[doc = " Get the type and version of the proxy"]
2250 pub fn pw_proxy_get_type(
2251 proxy: *mut pw_proxy,
2252 version: *mut u32,
2253 ) -> *const ::std::os::raw::c_char;
2254}
2255unsafe extern "C" {
2256 #[doc = " Get the protocol used for the proxy"]
2257 pub fn pw_proxy_get_protocol(proxy: *mut pw_proxy) -> *mut pw_protocol;
2258}
2259unsafe extern "C" {
2260 #[doc = " Generate an sync method for a proxy. This will generate a done event\n with the same seq number of the reply."]
2261 pub fn pw_proxy_sync(proxy: *mut pw_proxy, seq: ::std::os::raw::c_int)
2262 -> ::std::os::raw::c_int;
2263}
2264unsafe extern "C" {
2265 #[doc = " Set the global id this proxy is bound to. This is usually used internally\n and will also emit the bound event"]
2266 pub fn pw_proxy_set_bound_id(proxy: *mut pw_proxy, global_id: u32) -> ::std::os::raw::c_int;
2267}
2268unsafe extern "C" {
2269 #[doc = " Get the global id bound to this proxy of SPA_ID_INVALID when not bound\n to a global"]
2270 pub fn pw_proxy_get_bound_id(proxy: *mut pw_proxy) -> u32;
2271}
2272unsafe extern "C" {
2273 #[doc = " Generate an error for a proxy"]
2274 pub fn pw_proxy_error(
2275 proxy: *mut pw_proxy,
2276 res: ::std::os::raw::c_int,
2277 error: *const ::std::os::raw::c_char,
2278 ) -> ::std::os::raw::c_int;
2279}
2280unsafe extern "C" {
2281 pub fn pw_proxy_errorf(
2282 proxy: *mut pw_proxy,
2283 res: ::std::os::raw::c_int,
2284 error: *const ::std::os::raw::c_char,
2285 ...
2286 ) -> ::std::os::raw::c_int;
2287}
2288unsafe extern "C" {
2289 #[doc = " Get the listener of proxy"]
2290 pub fn pw_proxy_get_object_listeners(proxy: *mut pw_proxy) -> *mut spa_hook_list;
2291}
2292unsafe extern "C" {
2293 #[doc = " Get the marshal functions for the proxy"]
2294 pub fn pw_proxy_get_marshal(proxy: *mut pw_proxy) -> *const pw_protocol_marshal;
2295}
2296unsafe extern "C" {
2297 #[doc = " Install a marshal function on a proxy"]
2298 pub fn pw_proxy_install_marshal(
2299 proxy: *mut pw_proxy,
2300 implementor: bool,
2301 ) -> ::std::os::raw::c_int;
2302}
2303#[repr(C)]
2304#[derive(Debug, Copy, Clone)]
2305pub struct pw_permission {
2306 #[doc = "< id of object, PW_ID_ANY for default permission"]
2307 pub id: u32,
2308 #[doc = "< bitmask of above permissions"]
2309 pub permissions: u32,
2310}
2311#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2312const _: () = {
2313 ["Size of pw_permission"][::std::mem::size_of::<pw_permission>() - 8usize];
2314 ["Alignment of pw_permission"][::std::mem::align_of::<pw_permission>() - 4usize];
2315 ["Offset of field: pw_permission::id"][::std::mem::offset_of!(pw_permission, id) - 0usize];
2316 ["Offset of field: pw_permission::permissions"]
2317 [::std::mem::offset_of!(pw_permission, permissions) - 4usize];
2318};
2319#[doc = " The client information. Extra information can be added in later versions"]
2320#[repr(C)]
2321#[derive(Debug, Copy, Clone)]
2322pub struct pw_client_info {
2323 #[doc = "< id of the global"]
2324 pub id: u32,
2325 #[doc = "< bitfield of changed fields since last call"]
2326 pub change_mask: u64,
2327 #[doc = "< extra properties"]
2328 pub props: *mut spa_dict,
2329}
2330#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2331const _: () = {
2332 ["Size of pw_client_info"][::std::mem::size_of::<pw_client_info>() - 24usize];
2333 ["Alignment of pw_client_info"][::std::mem::align_of::<pw_client_info>() - 8usize];
2334 ["Offset of field: pw_client_info::id"][::std::mem::offset_of!(pw_client_info, id) - 0usize];
2335 ["Offset of field: pw_client_info::change_mask"]
2336 [::std::mem::offset_of!(pw_client_info, change_mask) - 8usize];
2337 ["Offset of field: pw_client_info::props"]
2338 [::std::mem::offset_of!(pw_client_info, props) - 16usize];
2339};
2340unsafe extern "C" {
2341 #[doc = " Update an existing \\ref pw_client_info with \\a update with reset"]
2342 pub fn pw_client_info_update(
2343 info: *mut pw_client_info,
2344 update: *const pw_client_info,
2345 ) -> *mut pw_client_info;
2346}
2347unsafe extern "C" {
2348 #[doc = " Merge an existing \\ref pw_client_info with \\a update"]
2349 pub fn pw_client_info_merge(
2350 info: *mut pw_client_info,
2351 update: *const pw_client_info,
2352 reset: bool,
2353 ) -> *mut pw_client_info;
2354}
2355unsafe extern "C" {
2356 #[doc = " Free a \\ref pw_client_info"]
2357 pub fn pw_client_info_free(info: *mut pw_client_info);
2358}
2359#[doc = " Client events"]
2360#[repr(C)]
2361#[derive(Debug, Copy, Clone)]
2362pub struct pw_client_events {
2363 pub version: u32,
2364 #[doc = " Notify client info\n\n \\param info info about the client"]
2365 pub info: ::std::option::Option<
2366 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_client_info),
2367 >,
2368 #[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"]
2369 pub permissions: ::std::option::Option<
2370 unsafe extern "C" fn(
2371 data: *mut ::std::os::raw::c_void,
2372 index: u32,
2373 n_permissions: u32,
2374 permissions: *const pw_permission,
2375 ),
2376 >,
2377}
2378#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2379const _: () = {
2380 ["Size of pw_client_events"][::std::mem::size_of::<pw_client_events>() - 24usize];
2381 ["Alignment of pw_client_events"][::std::mem::align_of::<pw_client_events>() - 8usize];
2382 ["Offset of field: pw_client_events::version"]
2383 [::std::mem::offset_of!(pw_client_events, version) - 0usize];
2384 ["Offset of field: pw_client_events::info"]
2385 [::std::mem::offset_of!(pw_client_events, info) - 8usize];
2386 ["Offset of field: pw_client_events::permissions"]
2387 [::std::mem::offset_of!(pw_client_events, permissions) - 16usize];
2388};
2389#[doc = " Client methods"]
2390#[repr(C)]
2391#[derive(Debug, Copy, Clone)]
2392pub struct pw_client_methods {
2393 pub version: u32,
2394 pub add_listener: ::std::option::Option<
2395 unsafe extern "C" fn(
2396 object: *mut ::std::os::raw::c_void,
2397 listener: *mut spa_hook,
2398 events: *const pw_client_events,
2399 data: *mut ::std::os::raw::c_void,
2400 ) -> ::std::os::raw::c_int,
2401 >,
2402 #[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."]
2403 pub error: ::std::option::Option<
2404 unsafe extern "C" fn(
2405 object: *mut ::std::os::raw::c_void,
2406 id: u32,
2407 res: ::std::os::raw::c_int,
2408 message: *const ::std::os::raw::c_char,
2409 ) -> ::std::os::raw::c_int,
2410 >,
2411 #[doc = " Update client properties\n\n \\param props new properties\n\n This requires W and X permissions on the client."]
2412 pub update_properties: ::std::option::Option<
2413 unsafe extern "C" fn(
2414 object: *mut ::std::os::raw::c_void,
2415 props: *const spa_dict,
2416 ) -> ::std::os::raw::c_int,
2417 >,
2418 #[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."]
2419 pub get_permissions: ::std::option::Option<
2420 unsafe extern "C" fn(
2421 object: *mut ::std::os::raw::c_void,
2422 index: u32,
2423 num: u32,
2424 ) -> ::std::os::raw::c_int,
2425 >,
2426 #[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."]
2427 pub update_permissions: ::std::option::Option<
2428 unsafe extern "C" fn(
2429 object: *mut ::std::os::raw::c_void,
2430 n_permissions: u32,
2431 permissions: *const pw_permission,
2432 ) -> ::std::os::raw::c_int,
2433 >,
2434}
2435#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2436const _: () = {
2437 ["Size of pw_client_methods"][::std::mem::size_of::<pw_client_methods>() - 48usize];
2438 ["Alignment of pw_client_methods"][::std::mem::align_of::<pw_client_methods>() - 8usize];
2439 ["Offset of field: pw_client_methods::version"]
2440 [::std::mem::offset_of!(pw_client_methods, version) - 0usize];
2441 ["Offset of field: pw_client_methods::add_listener"]
2442 [::std::mem::offset_of!(pw_client_methods, add_listener) - 8usize];
2443 ["Offset of field: pw_client_methods::error"]
2444 [::std::mem::offset_of!(pw_client_methods, error) - 16usize];
2445 ["Offset of field: pw_client_methods::update_properties"]
2446 [::std::mem::offset_of!(pw_client_methods, update_properties) - 24usize];
2447 ["Offset of field: pw_client_methods::get_permissions"]
2448 [::std::mem::offset_of!(pw_client_methods, get_permissions) - 32usize];
2449 ["Offset of field: pw_client_methods::update_permissions"]
2450 [::std::mem::offset_of!(pw_client_methods, update_permissions) - 40usize];
2451};
2452unsafe extern "C" {
2453 #[doc = " \\addtogroup pw_conf\n \\{"]
2454 pub fn pw_conf_load_conf_for_context(
2455 props: *mut pw_properties,
2456 conf: *mut pw_properties,
2457 ) -> ::std::os::raw::c_int;
2458}
2459unsafe extern "C" {
2460 pub fn pw_conf_load_conf(
2461 prefix: *const ::std::os::raw::c_char,
2462 name: *const ::std::os::raw::c_char,
2463 conf: *mut pw_properties,
2464 ) -> ::std::os::raw::c_int;
2465}
2466unsafe extern "C" {
2467 pub fn pw_conf_load_state(
2468 prefix: *const ::std::os::raw::c_char,
2469 name: *const ::std::os::raw::c_char,
2470 conf: *mut pw_properties,
2471 ) -> ::std::os::raw::c_int;
2472}
2473unsafe extern "C" {
2474 pub fn pw_conf_save_state(
2475 prefix: *const ::std::os::raw::c_char,
2476 name: *const ::std::os::raw::c_char,
2477 conf: *const pw_properties,
2478 ) -> ::std::os::raw::c_int;
2479}
2480unsafe extern "C" {
2481 pub fn pw_conf_find_match(arr: *mut spa_json, props: *const spa_dict, condition: bool) -> bool;
2482}
2483unsafe extern "C" {
2484 pub fn pw_conf_section_update_props(
2485 conf: *const spa_dict,
2486 section: *const ::std::os::raw::c_char,
2487 props: *mut pw_properties,
2488 ) -> ::std::os::raw::c_int;
2489}
2490unsafe extern "C" {
2491 pub fn pw_conf_section_update_props_rules(
2492 conf: *const spa_dict,
2493 context: *const spa_dict,
2494 section: *const ::std::os::raw::c_char,
2495 props: *mut pw_properties,
2496 ) -> ::std::os::raw::c_int;
2497}
2498unsafe extern "C" {
2499 pub fn pw_conf_section_for_each(
2500 conf: *const spa_dict,
2501 section: *const ::std::os::raw::c_char,
2502 callback: ::std::option::Option<
2503 unsafe extern "C" fn(
2504 data: *mut ::std::os::raw::c_void,
2505 location: *const ::std::os::raw::c_char,
2506 section: *const ::std::os::raw::c_char,
2507 str_: *const ::std::os::raw::c_char,
2508 len: usize,
2509 ) -> ::std::os::raw::c_int,
2510 >,
2511 data: *mut ::std::os::raw::c_void,
2512 ) -> ::std::os::raw::c_int;
2513}
2514unsafe extern "C" {
2515 pub fn pw_conf_match_rules(
2516 str_: *const ::std::os::raw::c_char,
2517 len: usize,
2518 location: *const ::std::os::raw::c_char,
2519 props: *const spa_dict,
2520 callback: ::std::option::Option<
2521 unsafe extern "C" fn(
2522 data: *mut ::std::os::raw::c_void,
2523 location: *const ::std::os::raw::c_char,
2524 action: *const ::std::os::raw::c_char,
2525 str_: *const ::std::os::raw::c_char,
2526 len: usize,
2527 ) -> ::std::os::raw::c_int,
2528 >,
2529 data: *mut ::std::os::raw::c_void,
2530 ) -> ::std::os::raw::c_int;
2531}
2532unsafe extern "C" {
2533 pub fn pw_conf_section_match_rules(
2534 conf: *const spa_dict,
2535 section: *const ::std::os::raw::c_char,
2536 props: *const spa_dict,
2537 callback: ::std::option::Option<
2538 unsafe extern "C" fn(
2539 data: *mut ::std::os::raw::c_void,
2540 location: *const ::std::os::raw::c_char,
2541 action: *const ::std::os::raw::c_char,
2542 str_: *const ::std::os::raw::c_char,
2543 len: usize,
2544 ) -> ::std::os::raw::c_int,
2545 >,
2546 data: *mut ::std::os::raw::c_void,
2547 ) -> ::std::os::raw::c_int;
2548}
2549#[repr(C)]
2550#[derive(Debug, Copy, Clone)]
2551pub struct pw_device {
2552 _unused: [u8; 0],
2553}
2554#[doc = " The device information. Extra information can be added in later versions"]
2555#[repr(C)]
2556#[derive(Debug, Copy, Clone)]
2557pub struct pw_device_info {
2558 #[doc = "< id of the global"]
2559 pub id: u32,
2560 #[doc = "< bitfield of changed fields since last call"]
2561 pub change_mask: u64,
2562 #[doc = "< extra properties"]
2563 pub props: *mut spa_dict,
2564 #[doc = "< parameters"]
2565 pub params: *mut spa_param_info,
2566 #[doc = "< number of items in \\a params"]
2567 pub n_params: u32,
2568}
2569#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2570const _: () = {
2571 ["Size of pw_device_info"][::std::mem::size_of::<pw_device_info>() - 40usize];
2572 ["Alignment of pw_device_info"][::std::mem::align_of::<pw_device_info>() - 8usize];
2573 ["Offset of field: pw_device_info::id"][::std::mem::offset_of!(pw_device_info, id) - 0usize];
2574 ["Offset of field: pw_device_info::change_mask"]
2575 [::std::mem::offset_of!(pw_device_info, change_mask) - 8usize];
2576 ["Offset of field: pw_device_info::props"]
2577 [::std::mem::offset_of!(pw_device_info, props) - 16usize];
2578 ["Offset of field: pw_device_info::params"]
2579 [::std::mem::offset_of!(pw_device_info, params) - 24usize];
2580 ["Offset of field: pw_device_info::n_params"]
2581 [::std::mem::offset_of!(pw_device_info, n_params) - 32usize];
2582};
2583unsafe extern "C" {
2584 #[doc = " Update and existing \\ref pw_device_info with \\a update and reset"]
2585 pub fn pw_device_info_update(
2586 info: *mut pw_device_info,
2587 update: *const pw_device_info,
2588 ) -> *mut pw_device_info;
2589}
2590unsafe extern "C" {
2591 #[doc = " Merge and existing \\ref pw_device_info with \\a update"]
2592 pub fn pw_device_info_merge(
2593 info: *mut pw_device_info,
2594 update: *const pw_device_info,
2595 reset: bool,
2596 ) -> *mut pw_device_info;
2597}
2598unsafe extern "C" {
2599 #[doc = " Free a \\ref pw_device_info"]
2600 pub fn pw_device_info_free(info: *mut pw_device_info);
2601}
2602#[doc = " Device events"]
2603#[repr(C)]
2604#[derive(Debug, Copy, Clone)]
2605pub struct pw_device_events {
2606 pub version: u32,
2607 #[doc = " Notify device info\n\n \\param info info about the device"]
2608 pub info: ::std::option::Option<
2609 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_device_info),
2610 >,
2611 #[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"]
2612 pub param: ::std::option::Option<
2613 unsafe extern "C" fn(
2614 data: *mut ::std::os::raw::c_void,
2615 seq: ::std::os::raw::c_int,
2616 id: u32,
2617 index: u32,
2618 next: u32,
2619 param: *const spa_pod,
2620 ),
2621 >,
2622}
2623#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2624const _: () = {
2625 ["Size of pw_device_events"][::std::mem::size_of::<pw_device_events>() - 24usize];
2626 ["Alignment of pw_device_events"][::std::mem::align_of::<pw_device_events>() - 8usize];
2627 ["Offset of field: pw_device_events::version"]
2628 [::std::mem::offset_of!(pw_device_events, version) - 0usize];
2629 ["Offset of field: pw_device_events::info"]
2630 [::std::mem::offset_of!(pw_device_events, info) - 8usize];
2631 ["Offset of field: pw_device_events::param"]
2632 [::std::mem::offset_of!(pw_device_events, param) - 16usize];
2633};
2634#[doc = " Device methods"]
2635#[repr(C)]
2636#[derive(Debug, Copy, Clone)]
2637pub struct pw_device_methods {
2638 pub version: u32,
2639 pub add_listener: ::std::option::Option<
2640 unsafe extern "C" fn(
2641 object: *mut ::std::os::raw::c_void,
2642 listener: *mut spa_hook,
2643 events: *const pw_device_events,
2644 data: *mut ::std::os::raw::c_void,
2645 ) -> ::std::os::raw::c_int,
2646 >,
2647 #[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."]
2648 pub subscribe_params: ::std::option::Option<
2649 unsafe extern "C" fn(
2650 object: *mut ::std::os::raw::c_void,
2651 ids: *mut u32,
2652 n_ids: u32,
2653 ) -> ::std::os::raw::c_int,
2654 >,
2655 #[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."]
2656 pub enum_params: ::std::option::Option<
2657 unsafe extern "C" fn(
2658 object: *mut ::std::os::raw::c_void,
2659 seq: ::std::os::raw::c_int,
2660 id: u32,
2661 start: u32,
2662 num: u32,
2663 filter: *const spa_pod,
2664 ) -> ::std::os::raw::c_int,
2665 >,
2666 #[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."]
2667 pub set_param: ::std::option::Option<
2668 unsafe extern "C" fn(
2669 object: *mut ::std::os::raw::c_void,
2670 id: u32,
2671 flags: u32,
2672 param: *const spa_pod,
2673 ) -> ::std::os::raw::c_int,
2674 >,
2675}
2676#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2677const _: () = {
2678 ["Size of pw_device_methods"][::std::mem::size_of::<pw_device_methods>() - 40usize];
2679 ["Alignment of pw_device_methods"][::std::mem::align_of::<pw_device_methods>() - 8usize];
2680 ["Offset of field: pw_device_methods::version"]
2681 [::std::mem::offset_of!(pw_device_methods, version) - 0usize];
2682 ["Offset of field: pw_device_methods::add_listener"]
2683 [::std::mem::offset_of!(pw_device_methods, add_listener) - 8usize];
2684 ["Offset of field: pw_device_methods::subscribe_params"]
2685 [::std::mem::offset_of!(pw_device_methods, subscribe_params) - 16usize];
2686 ["Offset of field: pw_device_methods::enum_params"]
2687 [::std::mem::offset_of!(pw_device_methods, enum_params) - 24usize];
2688 ["Offset of field: pw_device_methods::set_param"]
2689 [::std::mem::offset_of!(pw_device_methods, set_param) - 32usize];
2690};
2691pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_NONE: pw_memblock_flags = 0;
2692#[doc = "< memory is readable"]
2693pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_READABLE: pw_memblock_flags = 1;
2694#[doc = "< memory is writable"]
2695pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_WRITABLE: pw_memblock_flags = 2;
2696#[doc = "< seal the fd"]
2697pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_SEAL: pw_memblock_flags = 4;
2698#[doc = "< mmap the fd"]
2699pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_MAP: pw_memblock_flags = 8;
2700#[doc = "< don't close fd"]
2701pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_DONT_CLOSE: pw_memblock_flags = 16;
2702#[doc = "< don't notify events"]
2703pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_DONT_NOTIFY: pw_memblock_flags = 32;
2704#[doc = "< the fd can not be mmapped"]
2705pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_UNMAPPABLE: pw_memblock_flags = 64;
2706pub const pw_memblock_flags_PW_MEMBLOCK_FLAG_READWRITE: pw_memblock_flags = 3;
2707#[doc = " Flags passed to \\ref pw_mempool_alloc()"]
2708pub type pw_memblock_flags = ::std::os::raw::c_uint;
2709pub const pw_memmap_flags_PW_MEMMAP_FLAG_NONE: pw_memmap_flags = 0;
2710#[doc = "< map in read mode"]
2711pub const pw_memmap_flags_PW_MEMMAP_FLAG_READ: pw_memmap_flags = 1;
2712#[doc = "< map in write mode"]
2713pub const pw_memmap_flags_PW_MEMMAP_FLAG_WRITE: pw_memmap_flags = 2;
2714#[doc = "< map the same area twice after each other,\n creating a circular ringbuffer"]
2715pub const pw_memmap_flags_PW_MEMMAP_FLAG_TWICE: pw_memmap_flags = 4;
2716#[doc = "< writes will be private"]
2717pub const pw_memmap_flags_PW_MEMMAP_FLAG_PRIVATE: pw_memmap_flags = 8;
2718#[doc = "< lock the memory into RAM"]
2719pub const pw_memmap_flags_PW_MEMMAP_FLAG_LOCKED: pw_memmap_flags = 16;
2720pub const pw_memmap_flags_PW_MEMMAP_FLAG_READWRITE: pw_memmap_flags = 3;
2721pub type pw_memmap_flags = ::std::os::raw::c_uint;
2722#[repr(C)]
2723#[derive(Debug, Copy, Clone)]
2724pub struct pw_memchunk {
2725 _unused: [u8; 0],
2726}
2727#[doc = " A memory pool is a collection of pw_memblocks"]
2728#[repr(C)]
2729#[derive(Debug, Copy, Clone)]
2730pub struct pw_mempool {
2731 pub props: *mut pw_properties,
2732}
2733#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2734const _: () = {
2735 ["Size of pw_mempool"][::std::mem::size_of::<pw_mempool>() - 8usize];
2736 ["Alignment of pw_mempool"][::std::mem::align_of::<pw_mempool>() - 8usize];
2737 ["Offset of field: pw_mempool::props"][::std::mem::offset_of!(pw_mempool, props) - 0usize];
2738};
2739#[doc = " Memory block structure"]
2740#[repr(C)]
2741#[derive(Debug, Copy, Clone)]
2742pub struct pw_memblock {
2743 #[doc = "< owner pool"]
2744 pub pool: *mut pw_mempool,
2745 #[doc = "< unique id"]
2746 pub id: u32,
2747 #[doc = "< refcount"]
2748 pub ref_: ::std::os::raw::c_int,
2749 #[doc = "< flags for the memory block on of enum pw_memblock_flags"]
2750 pub flags: u32,
2751 #[doc = "< type of the fd, one of enum spa_data_type"]
2752 pub type_: u32,
2753 #[doc = "< fd"]
2754 pub fd: ::std::os::raw::c_int,
2755 #[doc = "< size of memory"]
2756 pub size: u32,
2757 #[doc = "< optional map when PW_MEMBLOCK_FLAG_MAP was given"]
2758 pub map: *mut pw_memmap,
2759}
2760#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2761const _: () = {
2762 ["Size of pw_memblock"][::std::mem::size_of::<pw_memblock>() - 40usize];
2763 ["Alignment of pw_memblock"][::std::mem::align_of::<pw_memblock>() - 8usize];
2764 ["Offset of field: pw_memblock::pool"][::std::mem::offset_of!(pw_memblock, pool) - 0usize];
2765 ["Offset of field: pw_memblock::id"][::std::mem::offset_of!(pw_memblock, id) - 8usize];
2766 ["Offset of field: pw_memblock::ref_"][::std::mem::offset_of!(pw_memblock, ref_) - 12usize];
2767 ["Offset of field: pw_memblock::flags"][::std::mem::offset_of!(pw_memblock, flags) - 16usize];
2768 ["Offset of field: pw_memblock::type_"][::std::mem::offset_of!(pw_memblock, type_) - 20usize];
2769 ["Offset of field: pw_memblock::fd"][::std::mem::offset_of!(pw_memblock, fd) - 24usize];
2770 ["Offset of field: pw_memblock::size"][::std::mem::offset_of!(pw_memblock, size) - 28usize];
2771 ["Offset of field: pw_memblock::map"][::std::mem::offset_of!(pw_memblock, map) - 32usize];
2772};
2773#[doc = " a mapped region of a pw_memblock"]
2774#[repr(C)]
2775#[derive(Debug, Copy, Clone)]
2776pub struct pw_memmap {
2777 #[doc = "< owner memblock"]
2778 pub block: *mut pw_memblock,
2779 #[doc = "< mapped pointer"]
2780 pub ptr: *mut ::std::os::raw::c_void,
2781 #[doc = "< flags for the mapping on of enum pw_memmap_flags"]
2782 pub flags: u32,
2783 #[doc = "< offset in memblock"]
2784 pub offset: u32,
2785 #[doc = "< size in memblock"]
2786 pub size: u32,
2787 #[doc = "< user tag"]
2788 pub tag: [u32; 5usize],
2789}
2790#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2791const _: () = {
2792 ["Size of pw_memmap"][::std::mem::size_of::<pw_memmap>() - 48usize];
2793 ["Alignment of pw_memmap"][::std::mem::align_of::<pw_memmap>() - 8usize];
2794 ["Offset of field: pw_memmap::block"][::std::mem::offset_of!(pw_memmap, block) - 0usize];
2795 ["Offset of field: pw_memmap::ptr"][::std::mem::offset_of!(pw_memmap, ptr) - 8usize];
2796 ["Offset of field: pw_memmap::flags"][::std::mem::offset_of!(pw_memmap, flags) - 16usize];
2797 ["Offset of field: pw_memmap::offset"][::std::mem::offset_of!(pw_memmap, offset) - 20usize];
2798 ["Offset of field: pw_memmap::size"][::std::mem::offset_of!(pw_memmap, size) - 24usize];
2799 ["Offset of field: pw_memmap::tag"][::std::mem::offset_of!(pw_memmap, tag) - 28usize];
2800};
2801#[repr(C)]
2802#[derive(Debug, Copy, Clone)]
2803pub struct pw_mempool_events {
2804 pub version: u32,
2805 #[doc = " the pool is destroyed"]
2806 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
2807 #[doc = " a new memory block is added to the pool"]
2808 pub added: ::std::option::Option<
2809 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, block: *mut pw_memblock),
2810 >,
2811 #[doc = " a memory block is removed from the pool"]
2812 pub removed: ::std::option::Option<
2813 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, block: *mut pw_memblock),
2814 >,
2815}
2816#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2817const _: () = {
2818 ["Size of pw_mempool_events"][::std::mem::size_of::<pw_mempool_events>() - 32usize];
2819 ["Alignment of pw_mempool_events"][::std::mem::align_of::<pw_mempool_events>() - 8usize];
2820 ["Offset of field: pw_mempool_events::version"]
2821 [::std::mem::offset_of!(pw_mempool_events, version) - 0usize];
2822 ["Offset of field: pw_mempool_events::destroy"]
2823 [::std::mem::offset_of!(pw_mempool_events, destroy) - 8usize];
2824 ["Offset of field: pw_mempool_events::added"]
2825 [::std::mem::offset_of!(pw_mempool_events, added) - 16usize];
2826 ["Offset of field: pw_mempool_events::removed"]
2827 [::std::mem::offset_of!(pw_mempool_events, removed) - 24usize];
2828};
2829unsafe extern "C" {
2830 #[doc = " Create a new memory pool"]
2831 pub fn pw_mempool_new(props: *mut pw_properties) -> *mut pw_mempool;
2832}
2833unsafe extern "C" {
2834 #[doc = " Listen for events"]
2835 pub fn pw_mempool_add_listener(
2836 pool: *mut pw_mempool,
2837 listener: *mut spa_hook,
2838 events: *const pw_mempool_events,
2839 data: *mut ::std::os::raw::c_void,
2840 );
2841}
2842unsafe extern "C" {
2843 #[doc = " Clear a pool"]
2844 pub fn pw_mempool_clear(pool: *mut pw_mempool);
2845}
2846unsafe extern "C" {
2847 #[doc = " Clear and destroy a pool"]
2848 pub fn pw_mempool_destroy(pool: *mut pw_mempool);
2849}
2850unsafe extern "C" {
2851 #[doc = " Allocate a memory block from the pool"]
2852 pub fn pw_mempool_alloc(
2853 pool: *mut pw_mempool,
2854 flags: pw_memblock_flags,
2855 type_: u32,
2856 size: usize,
2857 ) -> *mut pw_memblock;
2858}
2859unsafe extern "C" {
2860 #[doc = " Import a block from another pool"]
2861 pub fn pw_mempool_import_block(
2862 pool: *mut pw_mempool,
2863 mem: *mut pw_memblock,
2864 ) -> *mut pw_memblock;
2865}
2866unsafe extern "C" {
2867 #[doc = " Import an fd into the pool"]
2868 pub fn pw_mempool_import(
2869 pool: *mut pw_mempool,
2870 flags: pw_memblock_flags,
2871 type_: u32,
2872 fd: ::std::os::raw::c_int,
2873 ) -> *mut pw_memblock;
2874}
2875unsafe extern "C" {
2876 #[doc = " Free a memblock regardless of the refcount and destroy all mappings"]
2877 pub fn pw_memblock_free(mem: *mut pw_memblock);
2878}
2879unsafe extern "C" {
2880 #[doc = " Remove a memblock for given \\a id"]
2881 pub fn pw_mempool_remove_id(pool: *mut pw_mempool, id: u32) -> ::std::os::raw::c_int;
2882}
2883unsafe extern "C" {
2884 #[doc = " Find memblock for given \\a ptr"]
2885 pub fn pw_mempool_find_ptr(
2886 pool: *mut pw_mempool,
2887 ptr: *const ::std::os::raw::c_void,
2888 ) -> *mut pw_memblock;
2889}
2890unsafe extern "C" {
2891 #[doc = " Find memblock for given \\a id"]
2892 pub fn pw_mempool_find_id(pool: *mut pw_mempool, id: u32) -> *mut pw_memblock;
2893}
2894unsafe extern "C" {
2895 #[doc = " Find memblock for given \\a fd"]
2896 pub fn pw_mempool_find_fd(pool: *mut pw_mempool, fd: ::std::os::raw::c_int)
2897 -> *mut pw_memblock;
2898}
2899unsafe extern "C" {
2900 #[doc = " Map a region of a memory block"]
2901 pub fn pw_memblock_map(
2902 block: *mut pw_memblock,
2903 flags: pw_memmap_flags,
2904 offset: u32,
2905 size: u32,
2906 tag: *mut u32,
2907 ) -> *mut pw_memmap;
2908}
2909unsafe extern "C" {
2910 #[doc = " Map a region of a memory block with \\a id"]
2911 pub fn pw_mempool_map_id(
2912 pool: *mut pw_mempool,
2913 id: u32,
2914 flags: pw_memmap_flags,
2915 offset: u32,
2916 size: u32,
2917 tag: *mut u32,
2918 ) -> *mut pw_memmap;
2919}
2920unsafe extern "C" {
2921 pub fn pw_mempool_import_map(
2922 pool: *mut pw_mempool,
2923 other: *mut pw_mempool,
2924 data: *mut ::std::os::raw::c_void,
2925 size: u32,
2926 tag: *mut u32,
2927 ) -> *mut pw_memmap;
2928}
2929unsafe extern "C" {
2930 #[doc = " find a map with the given tag"]
2931 pub fn pw_mempool_find_tag(pool: *mut pw_mempool, tag: *mut u32, size: usize)
2932 -> *mut pw_memmap;
2933}
2934unsafe extern "C" {
2935 #[doc = " Unmap a region"]
2936 pub fn pw_memmap_free(map: *mut pw_memmap) -> ::std::os::raw::c_int;
2937}
2938#[doc = " parameters to map a memory range"]
2939#[repr(C)]
2940#[derive(Debug, Copy, Clone)]
2941pub struct pw_map_range {
2942 pub start: u32,
2943 #[doc = " offset in first page with start of data"]
2944 pub offset: u32,
2945 #[doc = " page aligned offset to map"]
2946 pub size: u32,
2947}
2948#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2949const _: () = {
2950 ["Size of pw_map_range"][::std::mem::size_of::<pw_map_range>() - 12usize];
2951 ["Alignment of pw_map_range"][::std::mem::align_of::<pw_map_range>() - 4usize];
2952 ["Offset of field: pw_map_range::start"][::std::mem::offset_of!(pw_map_range, start) - 0usize];
2953 ["Offset of field: pw_map_range::offset"]
2954 [::std::mem::offset_of!(pw_map_range, offset) - 4usize];
2955 ["Offset of field: pw_map_range::size"][::std::mem::offset_of!(pw_map_range, size) - 8usize];
2956};
2957#[repr(C)]
2958#[derive(Debug, Copy, Clone)]
2959pub struct pw_buffers {
2960 #[doc = "< allocated buffer memory"]
2961 pub mem: *mut pw_memblock,
2962 #[doc = "< port buffers"]
2963 pub buffers: *mut *mut spa_buffer,
2964 #[doc = "< number of port buffers"]
2965 pub n_buffers: u32,
2966 #[doc = "< flags"]
2967 pub flags: u32,
2968}
2969#[allow(clippy::unnecessary_operation, clippy::identity_op)]
2970const _: () = {
2971 ["Size of pw_buffers"][::std::mem::size_of::<pw_buffers>() - 24usize];
2972 ["Alignment of pw_buffers"][::std::mem::align_of::<pw_buffers>() - 8usize];
2973 ["Offset of field: pw_buffers::mem"][::std::mem::offset_of!(pw_buffers, mem) - 0usize];
2974 ["Offset of field: pw_buffers::buffers"][::std::mem::offset_of!(pw_buffers, buffers) - 8usize];
2975 ["Offset of field: pw_buffers::n_buffers"]
2976 [::std::mem::offset_of!(pw_buffers, n_buffers) - 16usize];
2977 ["Offset of field: pw_buffers::flags"][::std::mem::offset_of!(pw_buffers, flags) - 20usize];
2978};
2979unsafe extern "C" {
2980 pub fn pw_buffers_negotiate(
2981 context: *mut pw_context,
2982 flags: u32,
2983 outnode: *mut spa_node,
2984 out_port_id: u32,
2985 innode: *mut spa_node,
2986 in_port_id: u32,
2987 result: *mut pw_buffers,
2988 ) -> ::std::os::raw::c_int;
2989}
2990unsafe extern "C" {
2991 pub fn pw_buffers_clear(buffers: *mut pw_buffers);
2992}
2993#[repr(C)]
2994#[derive(Debug, Copy, Clone)]
2995pub struct pw_factory {
2996 _unused: [u8; 0],
2997}
2998#[doc = " The factory information. Extra information can be added in later versions"]
2999#[repr(C)]
3000#[derive(Debug, Copy, Clone)]
3001pub struct pw_factory_info {
3002 #[doc = "< id of the global"]
3003 pub id: u32,
3004 #[doc = "< name the factory"]
3005 pub name: *const ::std::os::raw::c_char,
3006 #[doc = "< type of the objects created by this factory"]
3007 pub type_: *const ::std::os::raw::c_char,
3008 #[doc = "< version of the objects"]
3009 pub version: u32,
3010 #[doc = "< bitfield of changed fields since last call"]
3011 pub change_mask: u64,
3012 #[doc = "< the properties of the factory"]
3013 pub props: *mut spa_dict,
3014}
3015#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3016const _: () = {
3017 ["Size of pw_factory_info"][::std::mem::size_of::<pw_factory_info>() - 48usize];
3018 ["Alignment of pw_factory_info"][::std::mem::align_of::<pw_factory_info>() - 8usize];
3019 ["Offset of field: pw_factory_info::id"][::std::mem::offset_of!(pw_factory_info, id) - 0usize];
3020 ["Offset of field: pw_factory_info::name"]
3021 [::std::mem::offset_of!(pw_factory_info, name) - 8usize];
3022 ["Offset of field: pw_factory_info::type_"]
3023 [::std::mem::offset_of!(pw_factory_info, type_) - 16usize];
3024 ["Offset of field: pw_factory_info::version"]
3025 [::std::mem::offset_of!(pw_factory_info, version) - 24usize];
3026 ["Offset of field: pw_factory_info::change_mask"]
3027 [::std::mem::offset_of!(pw_factory_info, change_mask) - 32usize];
3028 ["Offset of field: pw_factory_info::props"]
3029 [::std::mem::offset_of!(pw_factory_info, props) - 40usize];
3030};
3031unsafe extern "C" {
3032 pub fn pw_factory_info_update(
3033 info: *mut pw_factory_info,
3034 update: *const pw_factory_info,
3035 ) -> *mut pw_factory_info;
3036}
3037unsafe extern "C" {
3038 pub fn pw_factory_info_merge(
3039 info: *mut pw_factory_info,
3040 update: *const pw_factory_info,
3041 reset: bool,
3042 ) -> *mut pw_factory_info;
3043}
3044unsafe extern "C" {
3045 pub fn pw_factory_info_free(info: *mut pw_factory_info);
3046}
3047#[doc = " Factory events"]
3048#[repr(C)]
3049#[derive(Debug, Copy, Clone)]
3050pub struct pw_factory_events {
3051 pub version: u32,
3052 #[doc = " Notify factory info\n\n \\param info info about the factory"]
3053 pub info: ::std::option::Option<
3054 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_factory_info),
3055 >,
3056}
3057#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3058const _: () = {
3059 ["Size of pw_factory_events"][::std::mem::size_of::<pw_factory_events>() - 16usize];
3060 ["Alignment of pw_factory_events"][::std::mem::align_of::<pw_factory_events>() - 8usize];
3061 ["Offset of field: pw_factory_events::version"]
3062 [::std::mem::offset_of!(pw_factory_events, version) - 0usize];
3063 ["Offset of field: pw_factory_events::info"]
3064 [::std::mem::offset_of!(pw_factory_events, info) - 8usize];
3065};
3066#[doc = " Factory methods"]
3067#[repr(C)]
3068#[derive(Debug, Copy, Clone)]
3069pub struct pw_factory_methods {
3070 pub version: u32,
3071 pub add_listener: ::std::option::Option<
3072 unsafe extern "C" fn(
3073 object: *mut ::std::os::raw::c_void,
3074 listener: *mut spa_hook,
3075 events: *const pw_factory_events,
3076 data: *mut ::std::os::raw::c_void,
3077 ) -> ::std::os::raw::c_int,
3078 >,
3079}
3080#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3081const _: () = {
3082 ["Size of pw_factory_methods"][::std::mem::size_of::<pw_factory_methods>() - 16usize];
3083 ["Alignment of pw_factory_methods"][::std::mem::align_of::<pw_factory_methods>() - 8usize];
3084 ["Offset of field: pw_factory_methods::version"]
3085 [::std::mem::offset_of!(pw_factory_methods, version) - 0usize];
3086 ["Offset of field: pw_factory_methods::add_listener"]
3087 [::std::mem::offset_of!(pw_factory_methods, add_listener) - 8usize];
3088};
3089unsafe extern "C" {
3090 #[doc = " \\addtogroup pw_log\n \\{\n/\n/** The global log level"]
3091 pub static mut pw_log_level: spa_log_level;
3092}
3093unsafe extern "C" {
3094 pub static PW_LOG_TOPIC_DEFAULT: *mut spa_log_topic;
3095}
3096unsafe extern "C" {
3097 #[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()."]
3098 pub fn pw_log_set(log: *mut spa_log);
3099}
3100unsafe extern "C" {
3101 #[doc = " Get the log interface"]
3102 pub fn pw_log_get() -> *mut spa_log;
3103}
3104unsafe extern "C" {
3105 #[doc = " Configure the logging level"]
3106 pub fn pw_log_set_level(level: spa_log_level);
3107}
3108unsafe extern "C" {
3109 #[doc = " Configure the logging level using a string\n in PIPEWIRE_DEBUG format.\n\n \\since 1.1.0"]
3110 pub fn pw_log_set_level_string(str_: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
3111}
3112unsafe extern "C" {
3113 #[doc = " Log a message for a topic"]
3114 pub fn pw_log_logt(
3115 level: spa_log_level,
3116 topic: *const spa_log_topic,
3117 file: *const ::std::os::raw::c_char,
3118 line: ::std::os::raw::c_int,
3119 func: *const ::std::os::raw::c_char,
3120 fmt: *const ::std::os::raw::c_char,
3121 ...
3122 );
3123}
3124unsafe extern "C" {
3125 #[doc = " Log a message for a topic"]
3126 pub fn pw_log_logtv(
3127 level: spa_log_level,
3128 topic: *const spa_log_topic,
3129 file: *const ::std::os::raw::c_char,
3130 line: ::std::os::raw::c_int,
3131 func: *const ::std::os::raw::c_char,
3132 fmt: *const ::std::os::raw::c_char,
3133 args: *mut __va_list_tag,
3134 );
3135}
3136unsafe extern "C" {
3137 #[doc = " Log a message for the default topic"]
3138 pub fn pw_log_log(
3139 level: spa_log_level,
3140 file: *const ::std::os::raw::c_char,
3141 line: ::std::os::raw::c_int,
3142 func: *const ::std::os::raw::c_char,
3143 fmt: *const ::std::os::raw::c_char,
3144 ...
3145 );
3146}
3147unsafe extern "C" {
3148 #[doc = " Log a message for the default topic"]
3149 pub fn pw_log_logv(
3150 level: spa_log_level,
3151 file: *const ::std::os::raw::c_char,
3152 line: ::std::os::raw::c_int,
3153 func: *const ::std::os::raw::c_char,
3154 fmt: *const ::std::os::raw::c_char,
3155 args: *mut __va_list_tag,
3156 );
3157}
3158unsafe extern "C" {
3159 #[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"]
3160 pub fn pw_log_topic_register(t: *mut spa_log_topic);
3161}
3162unsafe extern "C" {
3163 #[doc = " Unregister log topic. This function is threadsafe.\n\n \\since 1.1.0"]
3164 pub fn pw_log_topic_unregister(t: *mut spa_log_topic);
3165}
3166#[repr(C)]
3167#[derive(Debug, Copy, Clone)]
3168pub struct pw_link {
3169 _unused: [u8; 0],
3170}
3171#[doc = "< the link is in error"]
3172pub const pw_link_state_PW_LINK_STATE_ERROR: pw_link_state = -2;
3173#[doc = "< the link is unlinked"]
3174pub const pw_link_state_PW_LINK_STATE_UNLINKED: pw_link_state = -1;
3175#[doc = "< the link is initialized"]
3176pub const pw_link_state_PW_LINK_STATE_INIT: pw_link_state = 0;
3177#[doc = "< the link is negotiating formats"]
3178pub const pw_link_state_PW_LINK_STATE_NEGOTIATING: pw_link_state = 1;
3179#[doc = "< the link is allocating buffers"]
3180pub const pw_link_state_PW_LINK_STATE_ALLOCATING: pw_link_state = 2;
3181#[doc = "< the link is paused"]
3182pub const pw_link_state_PW_LINK_STATE_PAUSED: pw_link_state = 3;
3183#[doc = "< the link is active"]
3184pub const pw_link_state_PW_LINK_STATE_ACTIVE: pw_link_state = 4;
3185#[doc = " \\enum pw_link_state The different link states"]
3186pub type pw_link_state = ::std::os::raw::c_int;
3187unsafe extern "C" {
3188 #[doc = " Convert a \\ref pw_link_state to a readable string"]
3189 pub fn pw_link_state_as_string(state: pw_link_state) -> *const ::std::os::raw::c_char;
3190}
3191#[doc = " The link information. Extra information can be added in later versions"]
3192#[repr(C)]
3193#[derive(Debug, Copy, Clone)]
3194pub struct pw_link_info {
3195 #[doc = "< id of the global"]
3196 pub id: u32,
3197 #[doc = "< server side output node id"]
3198 pub output_node_id: u32,
3199 #[doc = "< output port id"]
3200 pub output_port_id: u32,
3201 #[doc = "< server side input node id"]
3202 pub input_node_id: u32,
3203 #[doc = "< input port id"]
3204 pub input_port_id: u32,
3205 #[doc = "< bitfield of changed fields since last call"]
3206 pub change_mask: u64,
3207 #[doc = "< the current state of the link"]
3208 pub state: pw_link_state,
3209 #[doc = "< an error reason if \\a state is error"]
3210 pub error: *const ::std::os::raw::c_char,
3211 #[doc = "< format over link"]
3212 pub format: *mut spa_pod,
3213 #[doc = "< the properties of the link"]
3214 pub props: *mut spa_dict,
3215}
3216#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3217const _: () = {
3218 ["Size of pw_link_info"][::std::mem::size_of::<pw_link_info>() - 64usize];
3219 ["Alignment of pw_link_info"][::std::mem::align_of::<pw_link_info>() - 8usize];
3220 ["Offset of field: pw_link_info::id"][::std::mem::offset_of!(pw_link_info, id) - 0usize];
3221 ["Offset of field: pw_link_info::output_node_id"]
3222 [::std::mem::offset_of!(pw_link_info, output_node_id) - 4usize];
3223 ["Offset of field: pw_link_info::output_port_id"]
3224 [::std::mem::offset_of!(pw_link_info, output_port_id) - 8usize];
3225 ["Offset of field: pw_link_info::input_node_id"]
3226 [::std::mem::offset_of!(pw_link_info, input_node_id) - 12usize];
3227 ["Offset of field: pw_link_info::input_port_id"]
3228 [::std::mem::offset_of!(pw_link_info, input_port_id) - 16usize];
3229 ["Offset of field: pw_link_info::change_mask"]
3230 [::std::mem::offset_of!(pw_link_info, change_mask) - 24usize];
3231 ["Offset of field: pw_link_info::state"][::std::mem::offset_of!(pw_link_info, state) - 32usize];
3232 ["Offset of field: pw_link_info::error"][::std::mem::offset_of!(pw_link_info, error) - 40usize];
3233 ["Offset of field: pw_link_info::format"]
3234 [::std::mem::offset_of!(pw_link_info, format) - 48usize];
3235 ["Offset of field: pw_link_info::props"][::std::mem::offset_of!(pw_link_info, props) - 56usize];
3236};
3237unsafe extern "C" {
3238 pub fn pw_link_info_update(
3239 info: *mut pw_link_info,
3240 update: *const pw_link_info,
3241 ) -> *mut pw_link_info;
3242}
3243unsafe extern "C" {
3244 pub fn pw_link_info_merge(
3245 info: *mut pw_link_info,
3246 update: *const pw_link_info,
3247 reset: bool,
3248 ) -> *mut pw_link_info;
3249}
3250unsafe extern "C" {
3251 pub fn pw_link_info_free(info: *mut pw_link_info);
3252}
3253#[doc = " Link events"]
3254#[repr(C)]
3255#[derive(Debug, Copy, Clone)]
3256pub struct pw_link_events {
3257 pub version: u32,
3258 #[doc = " Notify link info\n\n \\param info info about the link"]
3259 pub info: ::std::option::Option<
3260 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_link_info),
3261 >,
3262}
3263#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3264const _: () = {
3265 ["Size of pw_link_events"][::std::mem::size_of::<pw_link_events>() - 16usize];
3266 ["Alignment of pw_link_events"][::std::mem::align_of::<pw_link_events>() - 8usize];
3267 ["Offset of field: pw_link_events::version"]
3268 [::std::mem::offset_of!(pw_link_events, version) - 0usize];
3269 ["Offset of field: pw_link_events::info"]
3270 [::std::mem::offset_of!(pw_link_events, info) - 8usize];
3271};
3272#[doc = " Link methods"]
3273#[repr(C)]
3274#[derive(Debug, Copy, Clone)]
3275pub struct pw_link_methods {
3276 pub version: u32,
3277 pub add_listener: ::std::option::Option<
3278 unsafe extern "C" fn(
3279 object: *mut ::std::os::raw::c_void,
3280 listener: *mut spa_hook,
3281 events: *const pw_link_events,
3282 data: *mut ::std::os::raw::c_void,
3283 ) -> ::std::os::raw::c_int,
3284 >,
3285}
3286#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3287const _: () = {
3288 ["Size of pw_link_methods"][::std::mem::size_of::<pw_link_methods>() - 16usize];
3289 ["Alignment of pw_link_methods"][::std::mem::align_of::<pw_link_methods>() - 8usize];
3290 ["Offset of field: pw_link_methods::version"]
3291 [::std::mem::offset_of!(pw_link_methods, version) - 0usize];
3292 ["Offset of field: pw_link_methods::add_listener"]
3293 [::std::mem::offset_of!(pw_link_methods, add_listener) - 8usize];
3294};
3295#[doc = " A main loop object"]
3296#[repr(C)]
3297#[derive(Debug, Copy, Clone)]
3298pub struct pw_main_loop {
3299 _unused: [u8; 0],
3300}
3301#[doc = " Events of the main loop"]
3302#[repr(C)]
3303#[derive(Debug, Copy, Clone)]
3304pub struct pw_main_loop_events {
3305 pub version: u32,
3306 #[doc = " Emitted when the main loop is destroyed"]
3307 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
3308}
3309#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3310const _: () = {
3311 ["Size of pw_main_loop_events"][::std::mem::size_of::<pw_main_loop_events>() - 16usize];
3312 ["Alignment of pw_main_loop_events"][::std::mem::align_of::<pw_main_loop_events>() - 8usize];
3313 ["Offset of field: pw_main_loop_events::version"]
3314 [::std::mem::offset_of!(pw_main_loop_events, version) - 0usize];
3315 ["Offset of field: pw_main_loop_events::destroy"]
3316 [::std::mem::offset_of!(pw_main_loop_events, destroy) - 8usize];
3317};
3318unsafe extern "C" {
3319 #[doc = " Create a new main loop."]
3320 pub fn pw_main_loop_new(props: *const spa_dict) -> *mut pw_main_loop;
3321}
3322unsafe extern "C" {
3323 #[doc = " Add an event listener"]
3324 pub fn pw_main_loop_add_listener(
3325 loop_: *mut pw_main_loop,
3326 listener: *mut spa_hook,
3327 events: *const pw_main_loop_events,
3328 data: *mut ::std::os::raw::c_void,
3329 );
3330}
3331unsafe extern "C" {
3332 #[doc = " Get the loop implementation"]
3333 pub fn pw_main_loop_get_loop(loop_: *mut pw_main_loop) -> *mut pw_loop;
3334}
3335unsafe extern "C" {
3336 #[doc = " Destroy a loop"]
3337 pub fn pw_main_loop_destroy(loop_: *mut pw_main_loop);
3338}
3339unsafe extern "C" {
3340 #[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."]
3341 pub fn pw_main_loop_run(loop_: *mut pw_main_loop) -> ::std::os::raw::c_int;
3342}
3343unsafe extern "C" {
3344 #[doc = " Quit a main loop"]
3345 pub fn pw_main_loop_quit(loop_: *mut pw_main_loop) -> ::std::os::raw::c_int;
3346}
3347#[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."]
3348#[repr(C)]
3349#[derive(Copy, Clone)]
3350pub union pw_map_item {
3351 pub next: usize,
3352 pub data: *mut ::std::os::raw::c_void,
3353}
3354#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3355const _: () = {
3356 ["Size of pw_map_item"][::std::mem::size_of::<pw_map_item>() - 8usize];
3357 ["Alignment of pw_map_item"][::std::mem::align_of::<pw_map_item>() - 8usize];
3358 ["Offset of field: pw_map_item::next"][::std::mem::offset_of!(pw_map_item, next) - 0usize];
3359 ["Offset of field: pw_map_item::data"][::std::mem::offset_of!(pw_map_item, data) - 0usize];
3360};
3361#[doc = " A map. This struct should be treated as opaque by the caller."]
3362#[repr(C)]
3363#[derive(Debug, Copy, Clone)]
3364pub struct pw_map {
3365 pub items: pw_array,
3366 pub free_list: u32,
3367}
3368#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3369const _: () = {
3370 ["Size of pw_map"][::std::mem::size_of::<pw_map>() - 40usize];
3371 ["Alignment of pw_map"][::std::mem::align_of::<pw_map>() - 8usize];
3372 ["Offset of field: pw_map::items"][::std::mem::offset_of!(pw_map, items) - 0usize];
3373 ["Offset of field: pw_map::free_list"][::std::mem::offset_of!(pw_map, free_list) - 32usize];
3374};
3375#[repr(C)]
3376#[derive(Debug, Copy, Clone)]
3377pub struct pw_module {
3378 _unused: [u8; 0],
3379}
3380#[doc = " The module information. Extra information can be added in later versions"]
3381#[repr(C)]
3382#[derive(Debug, Copy, Clone)]
3383pub struct pw_module_info {
3384 #[doc = "< id of the global"]
3385 pub id: u32,
3386 #[doc = "< name of the module"]
3387 pub name: *const ::std::os::raw::c_char,
3388 #[doc = "< filename of the module"]
3389 pub filename: *const ::std::os::raw::c_char,
3390 #[doc = "< arguments passed to the module"]
3391 pub args: *const ::std::os::raw::c_char,
3392 #[doc = "< bitfield of changed fields since last call"]
3393 pub change_mask: u64,
3394 #[doc = "< extra properties"]
3395 pub props: *mut spa_dict,
3396}
3397#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3398const _: () = {
3399 ["Size of pw_module_info"][::std::mem::size_of::<pw_module_info>() - 48usize];
3400 ["Alignment of pw_module_info"][::std::mem::align_of::<pw_module_info>() - 8usize];
3401 ["Offset of field: pw_module_info::id"][::std::mem::offset_of!(pw_module_info, id) - 0usize];
3402 ["Offset of field: pw_module_info::name"]
3403 [::std::mem::offset_of!(pw_module_info, name) - 8usize];
3404 ["Offset of field: pw_module_info::filename"]
3405 [::std::mem::offset_of!(pw_module_info, filename) - 16usize];
3406 ["Offset of field: pw_module_info::args"]
3407 [::std::mem::offset_of!(pw_module_info, args) - 24usize];
3408 ["Offset of field: pw_module_info::change_mask"]
3409 [::std::mem::offset_of!(pw_module_info, change_mask) - 32usize];
3410 ["Offset of field: pw_module_info::props"]
3411 [::std::mem::offset_of!(pw_module_info, props) - 40usize];
3412};
3413unsafe extern "C" {
3414 #[doc = " Update and existing \\ref pw_module_info with \\a update with reset"]
3415 pub fn pw_module_info_update(
3416 info: *mut pw_module_info,
3417 update: *const pw_module_info,
3418 ) -> *mut pw_module_info;
3419}
3420unsafe extern "C" {
3421 #[doc = " Merge and existing \\ref pw_module_info with \\a update"]
3422 pub fn pw_module_info_merge(
3423 info: *mut pw_module_info,
3424 update: *const pw_module_info,
3425 reset: bool,
3426 ) -> *mut pw_module_info;
3427}
3428unsafe extern "C" {
3429 #[doc = " Free a \\ref pw_module_info"]
3430 pub fn pw_module_info_free(info: *mut pw_module_info);
3431}
3432#[doc = " Module events"]
3433#[repr(C)]
3434#[derive(Debug, Copy, Clone)]
3435pub struct pw_module_events {
3436 pub version: u32,
3437 #[doc = " Notify module info\n\n \\param info info about the module"]
3438 pub info: ::std::option::Option<
3439 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_module_info),
3440 >,
3441}
3442#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3443const _: () = {
3444 ["Size of pw_module_events"][::std::mem::size_of::<pw_module_events>() - 16usize];
3445 ["Alignment of pw_module_events"][::std::mem::align_of::<pw_module_events>() - 8usize];
3446 ["Offset of field: pw_module_events::version"]
3447 [::std::mem::offset_of!(pw_module_events, version) - 0usize];
3448 ["Offset of field: pw_module_events::info"]
3449 [::std::mem::offset_of!(pw_module_events, info) - 8usize];
3450};
3451#[doc = " Module methods"]
3452#[repr(C)]
3453#[derive(Debug, Copy, Clone)]
3454pub struct pw_module_methods {
3455 pub version: u32,
3456 pub add_listener: ::std::option::Option<
3457 unsafe extern "C" fn(
3458 object: *mut ::std::os::raw::c_void,
3459 listener: *mut spa_hook,
3460 events: *const pw_module_events,
3461 data: *mut ::std::os::raw::c_void,
3462 ) -> ::std::os::raw::c_int,
3463 >,
3464}
3465#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3466const _: () = {
3467 ["Size of pw_module_methods"][::std::mem::size_of::<pw_module_methods>() - 16usize];
3468 ["Alignment of pw_module_methods"][::std::mem::align_of::<pw_module_methods>() - 8usize];
3469 ["Offset of field: pw_module_methods::version"]
3470 [::std::mem::offset_of!(pw_module_methods, version) - 0usize];
3471 ["Offset of field: pw_module_methods::add_listener"]
3472 [::std::mem::offset_of!(pw_module_methods, add_listener) - 8usize];
3473};
3474#[repr(C)]
3475#[derive(Debug, Copy, Clone)]
3476pub struct pw_node {
3477 _unused: [u8; 0],
3478}
3479#[doc = "< error state"]
3480pub const pw_node_state_PW_NODE_STATE_ERROR: pw_node_state = -1;
3481#[doc = "< the node is being created"]
3482pub const pw_node_state_PW_NODE_STATE_CREATING: pw_node_state = 0;
3483#[doc = "< the node is suspended, the device might\n be closed"]
3484pub const pw_node_state_PW_NODE_STATE_SUSPENDED: pw_node_state = 1;
3485#[doc = "< the node is running but there is no active\n port"]
3486pub const pw_node_state_PW_NODE_STATE_IDLE: pw_node_state = 2;
3487#[doc = "< the node is running"]
3488pub const pw_node_state_PW_NODE_STATE_RUNNING: pw_node_state = 3;
3489#[doc = " \\enum pw_node_state The different node states"]
3490pub type pw_node_state = ::std::os::raw::c_int;
3491unsafe extern "C" {
3492 #[doc = " Convert a \\ref pw_node_state to a readable string"]
3493 pub fn pw_node_state_as_string(state: pw_node_state) -> *const ::std::os::raw::c_char;
3494}
3495#[doc = " The node information. Extra information can be added in later versions"]
3496#[repr(C)]
3497#[derive(Debug, Copy, Clone)]
3498pub struct pw_node_info {
3499 #[doc = "< id of the global"]
3500 pub id: u32,
3501 #[doc = "< maximum number of inputs"]
3502 pub max_input_ports: u32,
3503 #[doc = "< maximum number of outputs"]
3504 pub max_output_ports: u32,
3505 #[doc = "< bitfield of changed fields since last call"]
3506 pub change_mask: u64,
3507 #[doc = "< number of inputs"]
3508 pub n_input_ports: u32,
3509 #[doc = "< number of outputs"]
3510 pub n_output_ports: u32,
3511 #[doc = "< the current state of the node"]
3512 pub state: pw_node_state,
3513 #[doc = "< an error reason if \\a state is error"]
3514 pub error: *const ::std::os::raw::c_char,
3515 #[doc = "< the properties of the node"]
3516 pub props: *mut spa_dict,
3517 #[doc = "< parameters"]
3518 pub params: *mut spa_param_info,
3519 #[doc = "< number of items in \\a params"]
3520 pub n_params: u32,
3521}
3522#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3523const _: () = {
3524 ["Size of pw_node_info"][::std::mem::size_of::<pw_node_info>() - 72usize];
3525 ["Alignment of pw_node_info"][::std::mem::align_of::<pw_node_info>() - 8usize];
3526 ["Offset of field: pw_node_info::id"][::std::mem::offset_of!(pw_node_info, id) - 0usize];
3527 ["Offset of field: pw_node_info::max_input_ports"]
3528 [::std::mem::offset_of!(pw_node_info, max_input_ports) - 4usize];
3529 ["Offset of field: pw_node_info::max_output_ports"]
3530 [::std::mem::offset_of!(pw_node_info, max_output_ports) - 8usize];
3531 ["Offset of field: pw_node_info::change_mask"]
3532 [::std::mem::offset_of!(pw_node_info, change_mask) - 16usize];
3533 ["Offset of field: pw_node_info::n_input_ports"]
3534 [::std::mem::offset_of!(pw_node_info, n_input_ports) - 24usize];
3535 ["Offset of field: pw_node_info::n_output_ports"]
3536 [::std::mem::offset_of!(pw_node_info, n_output_ports) - 28usize];
3537 ["Offset of field: pw_node_info::state"][::std::mem::offset_of!(pw_node_info, state) - 32usize];
3538 ["Offset of field: pw_node_info::error"][::std::mem::offset_of!(pw_node_info, error) - 40usize];
3539 ["Offset of field: pw_node_info::props"][::std::mem::offset_of!(pw_node_info, props) - 48usize];
3540 ["Offset of field: pw_node_info::params"]
3541 [::std::mem::offset_of!(pw_node_info, params) - 56usize];
3542 ["Offset of field: pw_node_info::n_params"]
3543 [::std::mem::offset_of!(pw_node_info, n_params) - 64usize];
3544};
3545unsafe extern "C" {
3546 pub fn pw_node_info_update(
3547 info: *mut pw_node_info,
3548 update: *const pw_node_info,
3549 ) -> *mut pw_node_info;
3550}
3551unsafe extern "C" {
3552 pub fn pw_node_info_merge(
3553 info: *mut pw_node_info,
3554 update: *const pw_node_info,
3555 reset: bool,
3556 ) -> *mut pw_node_info;
3557}
3558unsafe extern "C" {
3559 pub fn pw_node_info_free(info: *mut pw_node_info);
3560}
3561#[doc = " Node events"]
3562#[repr(C)]
3563#[derive(Debug, Copy, Clone)]
3564pub struct pw_node_events {
3565 pub version: u32,
3566 #[doc = " Notify node info\n\n \\param info info about the node"]
3567 pub info: ::std::option::Option<
3568 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_node_info),
3569 >,
3570 #[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"]
3571 pub param: ::std::option::Option<
3572 unsafe extern "C" fn(
3573 data: *mut ::std::os::raw::c_void,
3574 seq: ::std::os::raw::c_int,
3575 id: u32,
3576 index: u32,
3577 next: u32,
3578 param: *const spa_pod,
3579 ),
3580 >,
3581}
3582#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3583const _: () = {
3584 ["Size of pw_node_events"][::std::mem::size_of::<pw_node_events>() - 24usize];
3585 ["Alignment of pw_node_events"][::std::mem::align_of::<pw_node_events>() - 8usize];
3586 ["Offset of field: pw_node_events::version"]
3587 [::std::mem::offset_of!(pw_node_events, version) - 0usize];
3588 ["Offset of field: pw_node_events::info"]
3589 [::std::mem::offset_of!(pw_node_events, info) - 8usize];
3590 ["Offset of field: pw_node_events::param"]
3591 [::std::mem::offset_of!(pw_node_events, param) - 16usize];
3592};
3593#[doc = " Node methods"]
3594#[repr(C)]
3595#[derive(Debug, Copy, Clone)]
3596pub struct pw_node_methods {
3597 pub version: u32,
3598 pub add_listener: ::std::option::Option<
3599 unsafe extern "C" fn(
3600 object: *mut ::std::os::raw::c_void,
3601 listener: *mut spa_hook,
3602 events: *const pw_node_events,
3603 data: *mut ::std::os::raw::c_void,
3604 ) -> ::std::os::raw::c_int,
3605 >,
3606 #[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."]
3607 pub subscribe_params: ::std::option::Option<
3608 unsafe extern "C" fn(
3609 object: *mut ::std::os::raw::c_void,
3610 ids: *mut u32,
3611 n_ids: u32,
3612 ) -> ::std::os::raw::c_int,
3613 >,
3614 #[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."]
3615 pub enum_params: ::std::option::Option<
3616 unsafe extern "C" fn(
3617 object: *mut ::std::os::raw::c_void,
3618 seq: ::std::os::raw::c_int,
3619 id: u32,
3620 start: u32,
3621 num: u32,
3622 filter: *const spa_pod,
3623 ) -> ::std::os::raw::c_int,
3624 >,
3625 #[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."]
3626 pub set_param: ::std::option::Option<
3627 unsafe extern "C" fn(
3628 object: *mut ::std::os::raw::c_void,
3629 id: u32,
3630 flags: u32,
3631 param: *const spa_pod,
3632 ) -> ::std::os::raw::c_int,
3633 >,
3634 #[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."]
3635 pub send_command: ::std::option::Option<
3636 unsafe extern "C" fn(
3637 object: *mut ::std::os::raw::c_void,
3638 command: *const spa_command,
3639 ) -> ::std::os::raw::c_int,
3640 >,
3641}
3642#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3643const _: () = {
3644 ["Size of pw_node_methods"][::std::mem::size_of::<pw_node_methods>() - 48usize];
3645 ["Alignment of pw_node_methods"][::std::mem::align_of::<pw_node_methods>() - 8usize];
3646 ["Offset of field: pw_node_methods::version"]
3647 [::std::mem::offset_of!(pw_node_methods, version) - 0usize];
3648 ["Offset of field: pw_node_methods::add_listener"]
3649 [::std::mem::offset_of!(pw_node_methods, add_listener) - 8usize];
3650 ["Offset of field: pw_node_methods::subscribe_params"]
3651 [::std::mem::offset_of!(pw_node_methods, subscribe_params) - 16usize];
3652 ["Offset of field: pw_node_methods::enum_params"]
3653 [::std::mem::offset_of!(pw_node_methods, enum_params) - 24usize];
3654 ["Offset of field: pw_node_methods::set_param"]
3655 [::std::mem::offset_of!(pw_node_methods, set_param) - 32usize];
3656 ["Offset of field: pw_node_methods::send_command"]
3657 [::std::mem::offset_of!(pw_node_methods, send_command) - 40usize];
3658};
3659#[repr(C)]
3660#[derive(Debug, Copy, Clone)]
3661pub struct pw_port {
3662 _unused: [u8; 0],
3663}
3664unsafe extern "C" {
3665 #[doc = " Convert a \\ref pw_direction to a readable string"]
3666 pub fn pw_direction_as_string(direction: spa_direction) -> *const ::std::os::raw::c_char;
3667}
3668#[repr(C)]
3669pub struct pw_port_info {
3670 #[doc = "< id of the global"]
3671 pub id: u32,
3672 #[doc = "< port direction"]
3673 pub direction: spa_direction,
3674 #[doc = "< bitfield of changed fields since last call"]
3675 pub change_mask: u64,
3676 #[doc = "< the properties of the port"]
3677 pub props: *mut spa_dict,
3678 #[doc = "< parameters"]
3679 pub params: *mut spa_param_info,
3680 #[doc = "< number of items in \\a params"]
3681 pub n_params: u32,
3682}
3683#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3684const _: () = {
3685 ["Size of pw_port_info"][::std::mem::size_of::<pw_port_info>() - 40usize];
3686 ["Alignment of pw_port_info"][::std::mem::align_of::<pw_port_info>() - 8usize];
3687 ["Offset of field: pw_port_info::id"][::std::mem::offset_of!(pw_port_info, id) - 0usize];
3688 ["Offset of field: pw_port_info::direction"]
3689 [::std::mem::offset_of!(pw_port_info, direction) - 4usize];
3690 ["Offset of field: pw_port_info::change_mask"]
3691 [::std::mem::offset_of!(pw_port_info, change_mask) - 8usize];
3692 ["Offset of field: pw_port_info::props"][::std::mem::offset_of!(pw_port_info, props) - 16usize];
3693 ["Offset of field: pw_port_info::params"]
3694 [::std::mem::offset_of!(pw_port_info, params) - 24usize];
3695 ["Offset of field: pw_port_info::n_params"]
3696 [::std::mem::offset_of!(pw_port_info, n_params) - 32usize];
3697};
3698unsafe extern "C" {
3699 pub fn pw_port_info_update(
3700 info: *mut pw_port_info,
3701 update: *const pw_port_info,
3702 ) -> *mut pw_port_info;
3703}
3704unsafe extern "C" {
3705 pub fn pw_port_info_merge(
3706 info: *mut pw_port_info,
3707 update: *const pw_port_info,
3708 reset: bool,
3709 ) -> *mut pw_port_info;
3710}
3711unsafe extern "C" {
3712 pub fn pw_port_info_free(info: *mut pw_port_info);
3713}
3714#[doc = " Port events"]
3715#[repr(C)]
3716#[derive(Debug, Copy, Clone)]
3717pub struct pw_port_events {
3718 pub version: u32,
3719 #[doc = " Notify port info\n\n \\param info info about the port"]
3720 pub info: ::std::option::Option<
3721 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_port_info),
3722 >,
3723 #[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"]
3724 pub param: ::std::option::Option<
3725 unsafe extern "C" fn(
3726 data: *mut ::std::os::raw::c_void,
3727 seq: ::std::os::raw::c_int,
3728 id: u32,
3729 index: u32,
3730 next: u32,
3731 param: *const spa_pod,
3732 ),
3733 >,
3734}
3735#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3736const _: () = {
3737 ["Size of pw_port_events"][::std::mem::size_of::<pw_port_events>() - 24usize];
3738 ["Alignment of pw_port_events"][::std::mem::align_of::<pw_port_events>() - 8usize];
3739 ["Offset of field: pw_port_events::version"]
3740 [::std::mem::offset_of!(pw_port_events, version) - 0usize];
3741 ["Offset of field: pw_port_events::info"]
3742 [::std::mem::offset_of!(pw_port_events, info) - 8usize];
3743 ["Offset of field: pw_port_events::param"]
3744 [::std::mem::offset_of!(pw_port_events, param) - 16usize];
3745};
3746#[doc = " Port methods"]
3747#[repr(C)]
3748#[derive(Debug, Copy, Clone)]
3749pub struct pw_port_methods {
3750 pub version: u32,
3751 pub add_listener: ::std::option::Option<
3752 unsafe extern "C" fn(
3753 object: *mut ::std::os::raw::c_void,
3754 listener: *mut spa_hook,
3755 events: *const pw_port_events,
3756 data: *mut ::std::os::raw::c_void,
3757 ) -> ::std::os::raw::c_int,
3758 >,
3759 #[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."]
3760 pub subscribe_params: ::std::option::Option<
3761 unsafe extern "C" fn(
3762 object: *mut ::std::os::raw::c_void,
3763 ids: *mut u32,
3764 n_ids: u32,
3765 ) -> ::std::os::raw::c_int,
3766 >,
3767 #[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."]
3768 pub enum_params: ::std::option::Option<
3769 unsafe extern "C" fn(
3770 object: *mut ::std::os::raw::c_void,
3771 seq: ::std::os::raw::c_int,
3772 id: u32,
3773 start: u32,
3774 num: u32,
3775 filter: *const spa_pod,
3776 ) -> ::std::os::raw::c_int,
3777 >,
3778}
3779#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3780const _: () = {
3781 ["Size of pw_port_methods"][::std::mem::size_of::<pw_port_methods>() - 32usize];
3782 ["Alignment of pw_port_methods"][::std::mem::align_of::<pw_port_methods>() - 8usize];
3783 ["Offset of field: pw_port_methods::version"]
3784 [::std::mem::offset_of!(pw_port_methods, version) - 0usize];
3785 ["Offset of field: pw_port_methods::add_listener"]
3786 [::std::mem::offset_of!(pw_port_methods, add_listener) - 8usize];
3787 ["Offset of field: pw_port_methods::subscribe_params"]
3788 [::std::mem::offset_of!(pw_port_methods, subscribe_params) - 16usize];
3789 ["Offset of field: pw_port_methods::enum_params"]
3790 [::std::mem::offset_of!(pw_port_methods, enum_params) - 24usize];
3791};
3792#[doc = " \\addtogroup pw_stream\n \\{"]
3793#[repr(C)]
3794#[derive(Debug, Copy, Clone)]
3795pub struct pw_stream {
3796 _unused: [u8; 0],
3797}
3798#[doc = "< the stream is in error"]
3799pub const pw_stream_state_PW_STREAM_STATE_ERROR: pw_stream_state = -1;
3800#[doc = "< unconnected"]
3801pub const pw_stream_state_PW_STREAM_STATE_UNCONNECTED: pw_stream_state = 0;
3802#[doc = "< connection is in progress"]
3803pub const pw_stream_state_PW_STREAM_STATE_CONNECTING: pw_stream_state = 1;
3804#[doc = "< paused"]
3805pub const pw_stream_state_PW_STREAM_STATE_PAUSED: pw_stream_state = 2;
3806#[doc = "< streaming"]
3807pub const pw_stream_state_PW_STREAM_STATE_STREAMING: pw_stream_state = 3;
3808#[doc = " \\enum pw_stream_state The state of a stream"]
3809pub type pw_stream_state = ::std::os::raw::c_int;
3810#[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"]
3811#[repr(C)]
3812#[derive(Debug, Copy, Clone)]
3813pub struct pw_buffer {
3814 #[doc = "< the spa buffer"]
3815 pub buffer: *mut spa_buffer,
3816 #[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."]
3817 pub user_data: *mut ::std::os::raw::c_void,
3818 #[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."]
3819 pub size: u64,
3820 #[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"]
3821 pub requested: u64,
3822 #[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"]
3823 pub time: u64,
3824}
3825#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3826const _: () = {
3827 ["Size of pw_buffer"][::std::mem::size_of::<pw_buffer>() - 40usize];
3828 ["Alignment of pw_buffer"][::std::mem::align_of::<pw_buffer>() - 8usize];
3829 ["Offset of field: pw_buffer::buffer"][::std::mem::offset_of!(pw_buffer, buffer) - 0usize];
3830 ["Offset of field: pw_buffer::user_data"]
3831 [::std::mem::offset_of!(pw_buffer, user_data) - 8usize];
3832 ["Offset of field: pw_buffer::size"][::std::mem::offset_of!(pw_buffer, size) - 16usize];
3833 ["Offset of field: pw_buffer::requested"]
3834 [::std::mem::offset_of!(pw_buffer, requested) - 24usize];
3835 ["Offset of field: pw_buffer::time"][::std::mem::offset_of!(pw_buffer, time) - 32usize];
3836};
3837#[repr(C)]
3838#[derive(Debug, Copy, Clone)]
3839pub struct pw_stream_control {
3840 #[doc = "< name of the control"]
3841 pub name: *const ::std::os::raw::c_char,
3842 #[doc = "< extra flags (unused)"]
3843 pub flags: u32,
3844 #[doc = "< default value"]
3845 pub def: f32,
3846 #[doc = "< min value"]
3847 pub min: f32,
3848 #[doc = "< max value"]
3849 pub max: f32,
3850 #[doc = "< array of values"]
3851 pub values: *mut f32,
3852 #[doc = "< number of values in array"]
3853 pub n_values: u32,
3854 #[doc = "< max values that can be set on this control"]
3855 pub max_values: u32,
3856}
3857#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3858const _: () = {
3859 ["Size of pw_stream_control"][::std::mem::size_of::<pw_stream_control>() - 40usize];
3860 ["Alignment of pw_stream_control"][::std::mem::align_of::<pw_stream_control>() - 8usize];
3861 ["Offset of field: pw_stream_control::name"]
3862 [::std::mem::offset_of!(pw_stream_control, name) - 0usize];
3863 ["Offset of field: pw_stream_control::flags"]
3864 [::std::mem::offset_of!(pw_stream_control, flags) - 8usize];
3865 ["Offset of field: pw_stream_control::def"]
3866 [::std::mem::offset_of!(pw_stream_control, def) - 12usize];
3867 ["Offset of field: pw_stream_control::min"]
3868 [::std::mem::offset_of!(pw_stream_control, min) - 16usize];
3869 ["Offset of field: pw_stream_control::max"]
3870 [::std::mem::offset_of!(pw_stream_control, max) - 20usize];
3871 ["Offset of field: pw_stream_control::values"]
3872 [::std::mem::offset_of!(pw_stream_control, values) - 24usize];
3873 ["Offset of field: pw_stream_control::n_values"]
3874 [::std::mem::offset_of!(pw_stream_control, n_values) - 32usize];
3875 ["Offset of field: pw_stream_control::max_values"]
3876 [::std::mem::offset_of!(pw_stream_control, max_values) - 36usize];
3877};
3878#[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"]
3879#[repr(C)]
3880pub struct pw_time {
3881 #[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."]
3882 pub now: i64,
3883 #[doc = "< the rate of \\a ticks and delay. This is usually\n expressed in 1/<samplerate>."]
3884 pub rate: spa_fraction,
3885 #[doc = "< the ticks at \\a now. This is the current time that\n the remote end is reading/writing. This is monotonicaly\n increasing."]
3886 pub ticks: u64,
3887 #[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."]
3888 pub delay: i64,
3889 #[doc = "< data queued in the stream, this is the sum\n of the size fields in the pw_buffer that are\n currently queued"]
3890 pub queued: u64,
3891 #[doc = "< for audio/raw streams, this contains the extra\n number of frames buffered in the resampler.\n Since 0.3.50."]
3892 pub buffered: u64,
3893 #[doc = "< the number of buffers that are queued. Since 0.3.50"]
3894 pub queued_buffers: u32,
3895 #[doc = "< the number of buffers that can be dequeued. Since 0.3.50"]
3896 pub avail_buffers: u32,
3897 #[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"]
3898 pub size: u64,
3899}
3900#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3901const _: () = {
3902 ["Size of pw_time"][::std::mem::size_of::<pw_time>() - 64usize];
3903 ["Alignment of pw_time"][::std::mem::align_of::<pw_time>() - 8usize];
3904 ["Offset of field: pw_time::now"][::std::mem::offset_of!(pw_time, now) - 0usize];
3905 ["Offset of field: pw_time::rate"][::std::mem::offset_of!(pw_time, rate) - 8usize];
3906 ["Offset of field: pw_time::ticks"][::std::mem::offset_of!(pw_time, ticks) - 16usize];
3907 ["Offset of field: pw_time::delay"][::std::mem::offset_of!(pw_time, delay) - 24usize];
3908 ["Offset of field: pw_time::queued"][::std::mem::offset_of!(pw_time, queued) - 32usize];
3909 ["Offset of field: pw_time::buffered"][::std::mem::offset_of!(pw_time, buffered) - 40usize];
3910 ["Offset of field: pw_time::queued_buffers"]
3911 [::std::mem::offset_of!(pw_time, queued_buffers) - 48usize];
3912 ["Offset of field: pw_time::avail_buffers"]
3913 [::std::mem::offset_of!(pw_time, avail_buffers) - 52usize];
3914 ["Offset of field: pw_time::size"][::std::mem::offset_of!(pw_time, size) - 56usize];
3915};
3916#[doc = " Events for a stream. These events are always called from the mainloop\n unless explicitly documented otherwise."]
3917#[repr(C)]
3918#[derive(Debug, Copy, Clone)]
3919pub struct pw_stream_events {
3920 pub version: u32,
3921 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
3922 #[doc = " when the stream state changes. Since 1.4 this also sets errno when the\n new state is PW_STREAM_STATE_ERROR"]
3923 pub state_changed: ::std::option::Option<
3924 unsafe extern "C" fn(
3925 data: *mut ::std::os::raw::c_void,
3926 old: pw_stream_state,
3927 state: pw_stream_state,
3928 error: *const ::std::os::raw::c_char,
3929 ),
3930 >,
3931 #[doc = " Notify information about a control."]
3932 pub control_info: ::std::option::Option<
3933 unsafe extern "C" fn(
3934 data: *mut ::std::os::raw::c_void,
3935 id: u32,
3936 control: *const pw_stream_control,
3937 ),
3938 >,
3939 #[doc = " when io changed on the stream."]
3940 pub io_changed: ::std::option::Option<
3941 unsafe extern "C" fn(
3942 data: *mut ::std::os::raw::c_void,
3943 id: u32,
3944 area: *mut ::std::os::raw::c_void,
3945 size: u32,
3946 ),
3947 >,
3948 #[doc = " when a parameter changed"]
3949 pub param_changed: ::std::option::Option<
3950 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, id: u32, param: *const spa_pod),
3951 >,
3952 #[doc = " when a new buffer was created for this stream"]
3953 pub add_buffer: ::std::option::Option<
3954 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, buffer: *mut pw_buffer),
3955 >,
3956 #[doc = " when a buffer was destroyed for this stream"]
3957 pub remove_buffer: ::std::option::Option<
3958 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, buffer: *mut pw_buffer),
3959 >,
3960 #[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."]
3961 pub process: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
3962 #[doc = " The stream is drained"]
3963 pub drained: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
3964 #[doc = " A command notify, Since 0.3.39:1"]
3965 pub command: ::std::option::Option<
3966 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, command: *const spa_command),
3967 >,
3968 #[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."]
3969 pub trigger_done:
3970 ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
3971}
3972#[allow(clippy::unnecessary_operation, clippy::identity_op)]
3973const _: () = {
3974 ["Size of pw_stream_events"][::std::mem::size_of::<pw_stream_events>() - 96usize];
3975 ["Alignment of pw_stream_events"][::std::mem::align_of::<pw_stream_events>() - 8usize];
3976 ["Offset of field: pw_stream_events::version"]
3977 [::std::mem::offset_of!(pw_stream_events, version) - 0usize];
3978 ["Offset of field: pw_stream_events::destroy"]
3979 [::std::mem::offset_of!(pw_stream_events, destroy) - 8usize];
3980 ["Offset of field: pw_stream_events::state_changed"]
3981 [::std::mem::offset_of!(pw_stream_events, state_changed) - 16usize];
3982 ["Offset of field: pw_stream_events::control_info"]
3983 [::std::mem::offset_of!(pw_stream_events, control_info) - 24usize];
3984 ["Offset of field: pw_stream_events::io_changed"]
3985 [::std::mem::offset_of!(pw_stream_events, io_changed) - 32usize];
3986 ["Offset of field: pw_stream_events::param_changed"]
3987 [::std::mem::offset_of!(pw_stream_events, param_changed) - 40usize];
3988 ["Offset of field: pw_stream_events::add_buffer"]
3989 [::std::mem::offset_of!(pw_stream_events, add_buffer) - 48usize];
3990 ["Offset of field: pw_stream_events::remove_buffer"]
3991 [::std::mem::offset_of!(pw_stream_events, remove_buffer) - 56usize];
3992 ["Offset of field: pw_stream_events::process"]
3993 [::std::mem::offset_of!(pw_stream_events, process) - 64usize];
3994 ["Offset of field: pw_stream_events::drained"]
3995 [::std::mem::offset_of!(pw_stream_events, drained) - 72usize];
3996 ["Offset of field: pw_stream_events::command"]
3997 [::std::mem::offset_of!(pw_stream_events, command) - 80usize];
3998 ["Offset of field: pw_stream_events::trigger_done"]
3999 [::std::mem::offset_of!(pw_stream_events, trigger_done) - 88usize];
4000};
4001unsafe extern "C" {
4002 #[doc = " Convert a stream state to a readable string"]
4003 pub fn pw_stream_state_as_string(state: pw_stream_state) -> *const ::std::os::raw::c_char;
4004}
4005#[doc = "< no flags"]
4006pub const pw_stream_flags_PW_STREAM_FLAG_NONE: pw_stream_flags = 0;
4007#[doc = "< try to automatically connect\n this stream"]
4008pub const pw_stream_flags_PW_STREAM_FLAG_AUTOCONNECT: pw_stream_flags = 1;
4009#[doc = "< start the stream inactive,\n pw_stream_set_active() needs to be\n called explicitly"]
4010pub const pw_stream_flags_PW_STREAM_FLAG_INACTIVE: pw_stream_flags = 2;
4011#[doc = "< mmap the buffers except DmaBuf that is not\n explicitly marked as mappable."]
4012pub const pw_stream_flags_PW_STREAM_FLAG_MAP_BUFFERS: pw_stream_flags = 4;
4013#[doc = "< be a driver"]
4014pub const pw_stream_flags_PW_STREAM_FLAG_DRIVER: pw_stream_flags = 8;
4015#[doc = "< call process from the realtime\n thread. You MUST use RT safe functions\n in the process callback."]
4016pub const pw_stream_flags_PW_STREAM_FLAG_RT_PROCESS: pw_stream_flags = 16;
4017#[doc = "< don't convert format"]
4018pub const pw_stream_flags_PW_STREAM_FLAG_NO_CONVERT: pw_stream_flags = 32;
4019#[doc = "< require exclusive access to the\n device"]
4020pub const pw_stream_flags_PW_STREAM_FLAG_EXCLUSIVE: pw_stream_flags = 64;
4021#[doc = "< don't try to reconnect this stream\n when the sink/source is removed"]
4022pub const pw_stream_flags_PW_STREAM_FLAG_DONT_RECONNECT: pw_stream_flags = 128;
4023#[doc = "< the application will allocate buffer\n memory. In the add_buffer event, the\n data of the buffer should be set"]
4024pub const pw_stream_flags_PW_STREAM_FLAG_ALLOC_BUFFERS: pw_stream_flags = 256;
4025#[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."]
4026pub const pw_stream_flags_PW_STREAM_FLAG_TRIGGER: pw_stream_flags = 512;
4027#[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"]
4028pub const pw_stream_flags_PW_STREAM_FLAG_ASYNC: pw_stream_flags = 1024;
4029#[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"]
4030pub const pw_stream_flags_PW_STREAM_FLAG_EARLY_PROCESS: pw_stream_flags = 2048;
4031#[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"]
4032pub const pw_stream_flags_PW_STREAM_FLAG_RT_TRIGGER_DONE: pw_stream_flags = 4096;
4033#[doc = " \\enum pw_stream_flags Extra flags that can be used in \\ref pw_stream_connect()"]
4034pub type pw_stream_flags = ::std::os::raw::c_uint;
4035unsafe extern "C" {
4036 #[doc = " Create a new unconnected \\ref pw_stream\n \\return a newly allocated \\ref pw_stream"]
4037 pub fn pw_stream_new(
4038 core: *mut pw_core,
4039 name: *const ::std::os::raw::c_char,
4040 props: *mut pw_properties,
4041 ) -> *mut pw_stream;
4042}
4043unsafe extern "C" {
4044 pub fn pw_stream_new_simple(
4045 loop_: *mut pw_loop,
4046 name: *const ::std::os::raw::c_char,
4047 props: *mut pw_properties,
4048 events: *const pw_stream_events,
4049 data: *mut ::std::os::raw::c_void,
4050 ) -> *mut pw_stream;
4051}
4052unsafe extern "C" {
4053 #[doc = " Destroy a stream"]
4054 pub fn pw_stream_destroy(stream: *mut pw_stream);
4055}
4056unsafe extern "C" {
4057 pub fn pw_stream_add_listener(
4058 stream: *mut pw_stream,
4059 listener: *mut spa_hook,
4060 events: *const pw_stream_events,
4061 data: *mut ::std::os::raw::c_void,
4062 );
4063}
4064unsafe extern "C" {
4065 #[doc = " Get the current stream state. Since 1.4 this also sets errno when the\n state is PW_STREAM_STATE_ERROR"]
4066 pub fn pw_stream_get_state(
4067 stream: *mut pw_stream,
4068 error: *mut *const ::std::os::raw::c_char,
4069 ) -> pw_stream_state;
4070}
4071unsafe extern "C" {
4072 pub fn pw_stream_get_name(stream: *mut pw_stream) -> *const ::std::os::raw::c_char;
4073}
4074unsafe extern "C" {
4075 pub fn pw_stream_get_core(stream: *mut pw_stream) -> *mut pw_core;
4076}
4077unsafe extern "C" {
4078 pub fn pw_stream_get_properties(stream: *mut pw_stream) -> *const pw_properties;
4079}
4080unsafe extern "C" {
4081 pub fn pw_stream_update_properties(
4082 stream: *mut pw_stream,
4083 dict: *const spa_dict,
4084 ) -> ::std::os::raw::c_int;
4085}
4086unsafe extern "C" {
4087 #[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."]
4088 pub fn pw_stream_connect(
4089 stream: *mut pw_stream,
4090 direction: spa_direction,
4091 target_id: u32,
4092 flags: pw_stream_flags,
4093 params: *mut *const spa_pod,
4094 n_params: u32,
4095 ) -> ::std::os::raw::c_int;
4096}
4097unsafe extern "C" {
4098 #[doc = " Get the node ID of the stream.\n \\return node ID."]
4099 pub fn pw_stream_get_node_id(stream: *mut pw_stream) -> u32;
4100}
4101unsafe extern "C" {
4102 #[doc = " Disconnect \\a stream"]
4103 pub fn pw_stream_disconnect(stream: *mut pw_stream) -> ::std::os::raw::c_int;
4104}
4105unsafe extern "C" {
4106 #[doc = " Set the stream in error state"]
4107 pub fn pw_stream_set_error(
4108 stream: *mut pw_stream,
4109 res: ::std::os::raw::c_int,
4110 error: *const ::std::os::raw::c_char,
4111 ...
4112 ) -> ::std::os::raw::c_int;
4113}
4114unsafe extern "C" {
4115 #[doc = " Update the param exposed on the stream."]
4116 pub fn pw_stream_update_params(
4117 stream: *mut pw_stream,
4118 params: *mut *const spa_pod,
4119 n_params: u32,
4120 ) -> ::std::os::raw::c_int;
4121}
4122unsafe extern "C" {
4123 #[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"]
4124 pub fn pw_stream_set_param(
4125 stream: *mut pw_stream,
4126 id: u32,
4127 param: *const spa_pod,
4128 ) -> ::std::os::raw::c_int;
4129}
4130unsafe extern "C" {
4131 #[doc = " Get control values"]
4132 pub fn pw_stream_get_control(stream: *mut pw_stream, id: u32) -> *const pw_stream_control;
4133}
4134unsafe extern "C" {
4135 #[doc = " Set control values"]
4136 pub fn pw_stream_set_control(
4137 stream: *mut pw_stream,
4138 id: u32,
4139 n_values: u32,
4140 values: *mut f32,
4141 ...
4142 ) -> ::std::os::raw::c_int;
4143}
4144unsafe extern "C" {
4145 #[doc = " Query the time on the stream, RT safe"]
4146 pub fn pw_stream_get_time_n(
4147 stream: *mut pw_stream,
4148 time: *mut pw_time,
4149 size: usize,
4150 ) -> ::std::os::raw::c_int;
4151}
4152unsafe extern "C" {
4153 #[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"]
4154 pub fn pw_stream_get_nsec(stream: *mut pw_stream) -> u64;
4155}
4156unsafe extern "C" {
4157 #[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"]
4158 pub fn pw_stream_get_data_loop(stream: *mut pw_stream) -> *mut pw_loop;
4159}
4160unsafe extern "C" {
4161 #[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."]
4162 pub fn pw_stream_get_time(stream: *mut pw_stream, time: *mut pw_time) -> ::std::os::raw::c_int;
4163}
4164unsafe extern "C" {
4165 #[doc = " Get a buffer that can be filled for playback streams or consumed\n for capture streams. RT safe."]
4166 pub fn pw_stream_dequeue_buffer(stream: *mut pw_stream) -> *mut pw_buffer;
4167}
4168unsafe extern "C" {
4169 #[doc = " Submit a buffer for playback or recycle a buffer for capture. RT safe."]
4170 pub fn pw_stream_queue_buffer(
4171 stream: *mut pw_stream,
4172 buffer: *mut pw_buffer,
4173 ) -> ::std::os::raw::c_int;
4174}
4175unsafe extern "C" {
4176 #[doc = " Return a buffer to the queue without using it. This makes the buffer\n immediately available to dequeue again. RT safe."]
4177 pub fn pw_stream_return_buffer(
4178 stream: *mut pw_stream,
4179 buffer: *mut pw_buffer,
4180 ) -> ::std::os::raw::c_int;
4181}
4182unsafe extern "C" {
4183 #[doc = " Activate or deactivate the stream"]
4184 pub fn pw_stream_set_active(stream: *mut pw_stream, active: bool) -> ::std::os::raw::c_int;
4185}
4186unsafe extern "C" {
4187 #[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."]
4188 pub fn pw_stream_flush(stream: *mut pw_stream, drain: bool) -> ::std::os::raw::c_int;
4189}
4190unsafe extern "C" {
4191 #[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"]
4192 pub fn pw_stream_is_driving(stream: *mut pw_stream) -> bool;
4193}
4194unsafe extern "C" {
4195 #[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"]
4196 pub fn pw_stream_is_lazy(stream: *mut pw_stream) -> bool;
4197}
4198unsafe extern "C" {
4199 #[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"]
4200 pub fn pw_stream_trigger_process(stream: *mut pw_stream) -> ::std::os::raw::c_int;
4201}
4202unsafe extern "C" {
4203 #[doc = " Emit an event from this stream. RT safe.\n Since 1.2.6"]
4204 pub fn pw_stream_emit_event(
4205 stream: *mut pw_stream,
4206 event: *const spa_event,
4207 ) -> ::std::os::raw::c_int;
4208}
4209unsafe extern "C" {
4210 #[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"]
4211 pub fn pw_stream_set_rate(stream: *mut pw_stream, rate: f64) -> ::std::os::raw::c_int;
4212}
4213#[doc = " \\addtogroup pw_filter\n \\{"]
4214#[repr(C)]
4215#[derive(Debug, Copy, Clone)]
4216pub struct pw_filter {
4217 _unused: [u8; 0],
4218}
4219#[doc = "< the stream is in error"]
4220pub const pw_filter_state_PW_FILTER_STATE_ERROR: pw_filter_state = -1;
4221#[doc = "< unconnected"]
4222pub const pw_filter_state_PW_FILTER_STATE_UNCONNECTED: pw_filter_state = 0;
4223#[doc = "< connection is in progress"]
4224pub const pw_filter_state_PW_FILTER_STATE_CONNECTING: pw_filter_state = 1;
4225#[doc = "< filter is connected and paused"]
4226pub const pw_filter_state_PW_FILTER_STATE_PAUSED: pw_filter_state = 2;
4227#[doc = "< filter is streaming"]
4228pub const pw_filter_state_PW_FILTER_STATE_STREAMING: pw_filter_state = 3;
4229#[doc = " \\enum pw_filter_state The state of a filter"]
4230pub type pw_filter_state = ::std::os::raw::c_int;
4231#[doc = " Events for a filter. These events are always called from the mainloop\n unless explicitly documented otherwise."]
4232#[repr(C)]
4233#[derive(Debug, Copy, Clone)]
4234pub struct pw_filter_events {
4235 pub version: u32,
4236 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
4237 #[doc = " when the filter state changes. Since 1.4 this also sets errno when the\n new state is PW_FILTER_STATE_ERROR"]
4238 pub state_changed: ::std::option::Option<
4239 unsafe extern "C" fn(
4240 data: *mut ::std::os::raw::c_void,
4241 old: pw_filter_state,
4242 state: pw_filter_state,
4243 error: *const ::std::os::raw::c_char,
4244 ),
4245 >,
4246 #[doc = " when io changed on a port of the filter (when port_data is NULL)."]
4247 pub io_changed: ::std::option::Option<
4248 unsafe extern "C" fn(
4249 data: *mut ::std::os::raw::c_void,
4250 port_data: *mut ::std::os::raw::c_void,
4251 id: u32,
4252 area: *mut ::std::os::raw::c_void,
4253 size: u32,
4254 ),
4255 >,
4256 #[doc = " when a parameter changed on a port of the filter (when port_data is NULL)."]
4257 pub param_changed: ::std::option::Option<
4258 unsafe extern "C" fn(
4259 data: *mut ::std::os::raw::c_void,
4260 port_data: *mut ::std::os::raw::c_void,
4261 id: u32,
4262 param: *const spa_pod,
4263 ),
4264 >,
4265 #[doc = " when a new buffer was created for a port"]
4266 pub add_buffer: ::std::option::Option<
4267 unsafe extern "C" fn(
4268 data: *mut ::std::os::raw::c_void,
4269 port_data: *mut ::std::os::raw::c_void,
4270 buffer: *mut pw_buffer,
4271 ),
4272 >,
4273 #[doc = " when a buffer was destroyed for a port"]
4274 pub remove_buffer: ::std::option::Option<
4275 unsafe extern "C" fn(
4276 data: *mut ::std::os::raw::c_void,
4277 port_data: *mut ::std::os::raw::c_void,
4278 buffer: *mut pw_buffer,
4279 ),
4280 >,
4281 #[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."]
4282 pub process: ::std::option::Option<
4283 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, position: *mut spa_io_position),
4284 >,
4285 #[doc = " The filter is drained"]
4286 pub drained: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
4287 #[doc = " A command notify, Since 0.3.39:1"]
4288 pub command: ::std::option::Option<
4289 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, command: *const spa_command),
4290 >,
4291}
4292#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4293const _: () = {
4294 ["Size of pw_filter_events"][::std::mem::size_of::<pw_filter_events>() - 80usize];
4295 ["Alignment of pw_filter_events"][::std::mem::align_of::<pw_filter_events>() - 8usize];
4296 ["Offset of field: pw_filter_events::version"]
4297 [::std::mem::offset_of!(pw_filter_events, version) - 0usize];
4298 ["Offset of field: pw_filter_events::destroy"]
4299 [::std::mem::offset_of!(pw_filter_events, destroy) - 8usize];
4300 ["Offset of field: pw_filter_events::state_changed"]
4301 [::std::mem::offset_of!(pw_filter_events, state_changed) - 16usize];
4302 ["Offset of field: pw_filter_events::io_changed"]
4303 [::std::mem::offset_of!(pw_filter_events, io_changed) - 24usize];
4304 ["Offset of field: pw_filter_events::param_changed"]
4305 [::std::mem::offset_of!(pw_filter_events, param_changed) - 32usize];
4306 ["Offset of field: pw_filter_events::add_buffer"]
4307 [::std::mem::offset_of!(pw_filter_events, add_buffer) - 40usize];
4308 ["Offset of field: pw_filter_events::remove_buffer"]
4309 [::std::mem::offset_of!(pw_filter_events, remove_buffer) - 48usize];
4310 ["Offset of field: pw_filter_events::process"]
4311 [::std::mem::offset_of!(pw_filter_events, process) - 56usize];
4312 ["Offset of field: pw_filter_events::drained"]
4313 [::std::mem::offset_of!(pw_filter_events, drained) - 64usize];
4314 ["Offset of field: pw_filter_events::command"]
4315 [::std::mem::offset_of!(pw_filter_events, command) - 72usize];
4316};
4317unsafe extern "C" {
4318 #[doc = " Convert a filter state to a readable string"]
4319 pub fn pw_filter_state_as_string(state: pw_filter_state) -> *const ::std::os::raw::c_char;
4320}
4321#[doc = "< no flags"]
4322pub const pw_filter_flags_PW_FILTER_FLAG_NONE: pw_filter_flags = 0;
4323#[doc = "< start the filter inactive,\n pw_filter_set_active() needs to be\n called explicitly"]
4324pub const pw_filter_flags_PW_FILTER_FLAG_INACTIVE: pw_filter_flags = 1;
4325#[doc = "< be a driver"]
4326pub const pw_filter_flags_PW_FILTER_FLAG_DRIVER: pw_filter_flags = 2;
4327#[doc = "< call process from the realtime\n thread. Only call methods marked as\n RT safe."]
4328pub const pw_filter_flags_PW_FILTER_FLAG_RT_PROCESS: pw_filter_flags = 4;
4329#[doc = "< don't call the default latency algorithm\n but emit the param_changed event for the\n ports when Latency params are received."]
4330pub const pw_filter_flags_PW_FILTER_FLAG_CUSTOM_LATENCY: pw_filter_flags = 8;
4331#[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."]
4332pub const pw_filter_flags_PW_FILTER_FLAG_TRIGGER: pw_filter_flags = 16;
4333#[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"]
4334pub const pw_filter_flags_PW_FILTER_FLAG_ASYNC: pw_filter_flags = 32;
4335#[doc = " \\enum pw_filter_flags Extra flags that can be used in \\ref pw_filter_connect()"]
4336pub type pw_filter_flags = ::std::os::raw::c_uint;
4337#[doc = "< no flags"]
4338pub const pw_filter_port_flags_PW_FILTER_PORT_FLAG_NONE: pw_filter_port_flags = 0;
4339#[doc = "< mmap the buffers except DmaBuf that is not\n explicitly marked as mappable."]
4340pub const pw_filter_port_flags_PW_FILTER_PORT_FLAG_MAP_BUFFERS: pw_filter_port_flags = 1;
4341#[doc = "< the application will allocate buffer\n memory. In the add_buffer event, the\n data of the buffer should be set"]
4342pub const pw_filter_port_flags_PW_FILTER_PORT_FLAG_ALLOC_BUFFERS: pw_filter_port_flags = 2;
4343pub type pw_filter_port_flags = ::std::os::raw::c_uint;
4344unsafe extern "C" {
4345 #[doc = " Create a new unconnected \\ref pw_filter\n \\return a newly allocated \\ref pw_filter"]
4346 pub fn pw_filter_new(
4347 core: *mut pw_core,
4348 name: *const ::std::os::raw::c_char,
4349 props: *mut pw_properties,
4350 ) -> *mut pw_filter;
4351}
4352unsafe extern "C" {
4353 pub fn pw_filter_new_simple(
4354 loop_: *mut pw_loop,
4355 name: *const ::std::os::raw::c_char,
4356 props: *mut pw_properties,
4357 events: *const pw_filter_events,
4358 data: *mut ::std::os::raw::c_void,
4359 ) -> *mut pw_filter;
4360}
4361unsafe extern "C" {
4362 #[doc = " Destroy a filter"]
4363 pub fn pw_filter_destroy(filter: *mut pw_filter);
4364}
4365unsafe extern "C" {
4366 pub fn pw_filter_add_listener(
4367 filter: *mut pw_filter,
4368 listener: *mut spa_hook,
4369 events: *const pw_filter_events,
4370 data: *mut ::std::os::raw::c_void,
4371 );
4372}
4373unsafe extern "C" {
4374 #[doc = " Get the current filter state. Since 1.4 this also sets errno when the\n state is PW_FILTER_STATE_ERROR"]
4375 pub fn pw_filter_get_state(
4376 filter: *mut pw_filter,
4377 error: *mut *const ::std::os::raw::c_char,
4378 ) -> pw_filter_state;
4379}
4380unsafe extern "C" {
4381 pub fn pw_filter_get_name(filter: *mut pw_filter) -> *const ::std::os::raw::c_char;
4382}
4383unsafe extern "C" {
4384 pub fn pw_filter_get_core(filter: *mut pw_filter) -> *mut pw_core;
4385}
4386unsafe extern "C" {
4387 #[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."]
4388 pub fn pw_filter_connect(
4389 filter: *mut pw_filter,
4390 flags: pw_filter_flags,
4391 params: *mut *const spa_pod,
4392 n_params: u32,
4393 ) -> ::std::os::raw::c_int;
4394}
4395unsafe extern "C" {
4396 #[doc = " Get the node ID of the filter.\n \\return node ID."]
4397 pub fn pw_filter_get_node_id(filter: *mut pw_filter) -> u32;
4398}
4399unsafe extern "C" {
4400 #[doc = " Disconnect \\a filter"]
4401 pub fn pw_filter_disconnect(filter: *mut pw_filter) -> ::std::os::raw::c_int;
4402}
4403unsafe extern "C" {
4404 #[doc = " add a port to the filter, returns user data of port_data_size."]
4405 pub fn pw_filter_add_port(
4406 filter: *mut pw_filter,
4407 direction: spa_direction,
4408 flags: pw_filter_port_flags,
4409 port_data_size: usize,
4410 props: *mut pw_properties,
4411 params: *mut *const spa_pod,
4412 n_params: u32,
4413 ) -> *mut ::std::os::raw::c_void;
4414}
4415unsafe extern "C" {
4416 #[doc = " remove a port from the filter"]
4417 pub fn pw_filter_remove_port(port_data: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int;
4418}
4419unsafe extern "C" {
4420 #[doc = " get properties, port_data of NULL will give global properties"]
4421 pub fn pw_filter_get_properties(
4422 filter: *mut pw_filter,
4423 port_data: *mut ::std::os::raw::c_void,
4424 ) -> *const pw_properties;
4425}
4426unsafe extern "C" {
4427 #[doc = " Update properties, use NULL port_data for global filter properties"]
4428 pub fn pw_filter_update_properties(
4429 filter: *mut pw_filter,
4430 port_data: *mut ::std::os::raw::c_void,
4431 dict: *const spa_dict,
4432 ) -> ::std::os::raw::c_int;
4433}
4434unsafe extern "C" {
4435 #[doc = " Set the filter in error state"]
4436 pub fn pw_filter_set_error(
4437 filter: *mut pw_filter,
4438 res: ::std::os::raw::c_int,
4439 error: *const ::std::os::raw::c_char,
4440 ...
4441 ) -> ::std::os::raw::c_int;
4442}
4443unsafe extern "C" {
4444 #[doc = " Update params, use NULL port_data for global filter params"]
4445 pub fn pw_filter_update_params(
4446 filter: *mut pw_filter,
4447 port_data: *mut ::std::os::raw::c_void,
4448 params: *mut *const spa_pod,
4449 n_params: u32,
4450 ) -> ::std::os::raw::c_int;
4451}
4452unsafe extern "C" {
4453 #[doc = " Query the time on the filter, deprecated, use the spa_io_position in the\n process() method for timing information. RT safe."]
4454 pub fn pw_filter_get_time(filter: *mut pw_filter, time: *mut pw_time) -> ::std::os::raw::c_int;
4455}
4456unsafe extern "C" {
4457 #[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"]
4458 pub fn pw_filter_get_nsec(filter: *mut pw_filter) -> u64;
4459}
4460unsafe extern "C" {
4461 #[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"]
4462 pub fn pw_filter_get_data_loop(filter: *mut pw_filter) -> *mut pw_loop;
4463}
4464unsafe extern "C" {
4465 #[doc = " Get a buffer that can be filled for output ports or consumed\n for input ports. RT safe."]
4466 pub fn pw_filter_dequeue_buffer(port_data: *mut ::std::os::raw::c_void) -> *mut pw_buffer;
4467}
4468unsafe extern "C" {
4469 #[doc = " Submit a buffer for playback or recycle a buffer for capture. RT safe."]
4470 pub fn pw_filter_queue_buffer(
4471 port_data: *mut ::std::os::raw::c_void,
4472 buffer: *mut pw_buffer,
4473 ) -> ::std::os::raw::c_int;
4474}
4475unsafe extern "C" {
4476 #[doc = " Get a data pointer to the buffer data. RT safe."]
4477 pub fn pw_filter_get_dsp_buffer(
4478 port_data: *mut ::std::os::raw::c_void,
4479 n_samples: u32,
4480 ) -> *mut ::std::os::raw::c_void;
4481}
4482unsafe extern "C" {
4483 #[doc = " Activate or deactivate the filter"]
4484 pub fn pw_filter_set_active(filter: *mut pw_filter, active: bool) -> ::std::os::raw::c_int;
4485}
4486unsafe extern "C" {
4487 #[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."]
4488 pub fn pw_filter_flush(filter: *mut pw_filter, drain: bool) -> ::std::os::raw::c_int;
4489}
4490unsafe extern "C" {
4491 #[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"]
4492 pub fn pw_filter_is_driving(filter: *mut pw_filter) -> bool;
4493}
4494unsafe extern "C" {
4495 #[doc = " Check if the graph is using lazy scheduling.\n Since 1.4.0"]
4496 pub fn pw_filter_is_lazy(filter: *mut pw_filter) -> bool;
4497}
4498unsafe extern "C" {
4499 #[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"]
4500 pub fn pw_filter_trigger_process(filter: *mut pw_filter) -> ::std::os::raw::c_int;
4501}
4502unsafe extern "C" {
4503 #[doc = " Emit an event from this filter. RT safe.\n Since 1.2.6"]
4504 pub fn pw_filter_emit_event(
4505 filter: *mut pw_filter,
4506 event: *const spa_event,
4507 ) -> ::std::os::raw::c_int;
4508}
4509#[doc = " \\addtogroup pw_thread_loop\n \\{"]
4510#[repr(C)]
4511#[derive(Debug, Copy, Clone)]
4512pub struct pw_thread_loop {
4513 _unused: [u8; 0],
4514}
4515#[doc = " Thread loop events"]
4516#[repr(C)]
4517#[derive(Debug, Copy, Clone)]
4518pub struct pw_thread_loop_events {
4519 pub version: u32,
4520 #[doc = " the loop is destroyed"]
4521 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
4522}
4523#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4524const _: () = {
4525 ["Size of pw_thread_loop_events"][::std::mem::size_of::<pw_thread_loop_events>() - 16usize];
4526 ["Alignment of pw_thread_loop_events"]
4527 [::std::mem::align_of::<pw_thread_loop_events>() - 8usize];
4528 ["Offset of field: pw_thread_loop_events::version"]
4529 [::std::mem::offset_of!(pw_thread_loop_events, version) - 0usize];
4530 ["Offset of field: pw_thread_loop_events::destroy"]
4531 [::std::mem::offset_of!(pw_thread_loop_events, destroy) - 8usize];
4532};
4533unsafe extern "C" {
4534 #[doc = " Make a new thread loop with the given name and optional properties."]
4535 pub fn pw_thread_loop_new(
4536 name: *const ::std::os::raw::c_char,
4537 props: *const spa_dict,
4538 ) -> *mut pw_thread_loop;
4539}
4540unsafe extern "C" {
4541 #[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."]
4542 pub fn pw_thread_loop_new_full(
4543 loop_: *mut pw_loop,
4544 name: *const ::std::os::raw::c_char,
4545 props: *const spa_dict,
4546 ) -> *mut pw_thread_loop;
4547}
4548unsafe extern "C" {
4549 #[doc = " Destroy a thread loop"]
4550 pub fn pw_thread_loop_destroy(loop_: *mut pw_thread_loop);
4551}
4552unsafe extern "C" {
4553 #[doc = " Add an event listener"]
4554 pub fn pw_thread_loop_add_listener(
4555 loop_: *mut pw_thread_loop,
4556 listener: *mut spa_hook,
4557 events: *const pw_thread_loop_events,
4558 data: *mut ::std::os::raw::c_void,
4559 );
4560}
4561unsafe extern "C" {
4562 #[doc = " Get the loop implementation of the thread loop"]
4563 pub fn pw_thread_loop_get_loop(loop_: *mut pw_thread_loop) -> *mut pw_loop;
4564}
4565unsafe extern "C" {
4566 #[doc = " Start the thread loop"]
4567 pub fn pw_thread_loop_start(loop_: *mut pw_thread_loop) -> ::std::os::raw::c_int;
4568}
4569unsafe extern "C" {
4570 #[doc = " Stop the thread loop"]
4571 pub fn pw_thread_loop_stop(loop_: *mut pw_thread_loop);
4572}
4573unsafe extern "C" {
4574 #[doc = " Lock the loop. This ensures exclusive ownership of the loop"]
4575 pub fn pw_thread_loop_lock(loop_: *mut pw_thread_loop);
4576}
4577unsafe extern "C" {
4578 #[doc = " Unlock the loop"]
4579 pub fn pw_thread_loop_unlock(loop_: *mut pw_thread_loop);
4580}
4581unsafe extern "C" {
4582 #[doc = " Release the lock and wait until some thread calls \\ref pw_thread_loop_signal"]
4583 pub fn pw_thread_loop_wait(loop_: *mut pw_thread_loop);
4584}
4585unsafe extern "C" {
4586 #[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"]
4587 pub fn pw_thread_loop_timed_wait(
4588 loop_: *mut pw_thread_loop,
4589 wait_max_sec: ::std::os::raw::c_int,
4590 ) -> ::std::os::raw::c_int;
4591}
4592unsafe extern "C" {
4593 #[doc = " Get a struct timespec suitable for \\ref pw_thread_loop_timed_wait_full.\n Since: 0.3.7"]
4594 pub fn pw_thread_loop_get_time(
4595 loop_: *mut pw_thread_loop,
4596 abstime: *mut timespec,
4597 timeout: i64,
4598 ) -> ::std::os::raw::c_int;
4599}
4600unsafe extern "C" {
4601 #[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"]
4602 pub fn pw_thread_loop_timed_wait_full(
4603 loop_: *mut pw_thread_loop,
4604 abstime: *const timespec,
4605 ) -> ::std::os::raw::c_int;
4606}
4607unsafe extern "C" {
4608 #[doc = " Signal all threads waiting with \\ref pw_thread_loop_wait"]
4609 pub fn pw_thread_loop_signal(loop_: *mut pw_thread_loop, wait_for_accept: bool);
4610}
4611unsafe extern "C" {
4612 #[doc = " Signal all threads executing \\ref pw_thread_loop_signal with wait_for_accept"]
4613 pub fn pw_thread_loop_accept(loop_: *mut pw_thread_loop);
4614}
4615unsafe extern "C" {
4616 #[doc = " Check if inside the thread"]
4617 pub fn pw_thread_loop_in_thread(loop_: *mut pw_thread_loop) -> bool;
4618}
4619#[doc = " Loop events, use \\ref pw_data_loop_add_listener to add a listener"]
4620#[repr(C)]
4621#[derive(Debug, Copy, Clone)]
4622pub struct pw_data_loop_events {
4623 pub version: u32,
4624 #[doc = " The loop is destroyed"]
4625 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
4626}
4627#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4628const _: () = {
4629 ["Size of pw_data_loop_events"][::std::mem::size_of::<pw_data_loop_events>() - 16usize];
4630 ["Alignment of pw_data_loop_events"][::std::mem::align_of::<pw_data_loop_events>() - 8usize];
4631 ["Offset of field: pw_data_loop_events::version"]
4632 [::std::mem::offset_of!(pw_data_loop_events, version) - 0usize];
4633 ["Offset of field: pw_data_loop_events::destroy"]
4634 [::std::mem::offset_of!(pw_data_loop_events, destroy) - 8usize];
4635};
4636unsafe extern "C" {
4637 #[doc = " Make a new loop."]
4638 pub fn pw_data_loop_new(props: *const spa_dict) -> *mut pw_data_loop;
4639}
4640unsafe extern "C" {
4641 #[doc = " Add an event listener to loop"]
4642 pub fn pw_data_loop_add_listener(
4643 loop_: *mut pw_data_loop,
4644 listener: *mut spa_hook,
4645 events: *const pw_data_loop_events,
4646 data: *mut ::std::os::raw::c_void,
4647 );
4648}
4649unsafe extern "C" {
4650 #[doc = " wait for activity on the loop up to \\a timeout milliseconds.\n Should be called from the loop function"]
4651 pub fn pw_data_loop_wait(
4652 loop_: *mut pw_data_loop,
4653 timeout: ::std::os::raw::c_int,
4654 ) -> ::std::os::raw::c_int;
4655}
4656unsafe extern "C" {
4657 #[doc = " make sure the thread will exit. Can be called from a loop callback"]
4658 pub fn pw_data_loop_exit(loop_: *mut pw_data_loop);
4659}
4660unsafe extern "C" {
4661 #[doc = " Get the loop implementation of this data loop"]
4662 pub fn pw_data_loop_get_loop(loop_: *mut pw_data_loop) -> *mut pw_loop;
4663}
4664unsafe extern "C" {
4665 #[doc = " Get the loop name. Since 1.1.0"]
4666 pub fn pw_data_loop_get_name(loop_: *mut pw_data_loop) -> *const ::std::os::raw::c_char;
4667}
4668unsafe extern "C" {
4669 #[doc = " Get the loop class. Since 1.1.0"]
4670 pub fn pw_data_loop_get_class(loop_: *mut pw_data_loop) -> *const ::std::os::raw::c_char;
4671}
4672unsafe extern "C" {
4673 #[doc = " Destroy the loop"]
4674 pub fn pw_data_loop_destroy(loop_: *mut pw_data_loop);
4675}
4676unsafe extern "C" {
4677 #[doc = " Start the processing thread"]
4678 pub fn pw_data_loop_start(loop_: *mut pw_data_loop) -> ::std::os::raw::c_int;
4679}
4680unsafe extern "C" {
4681 #[doc = " Stop the processing thread"]
4682 pub fn pw_data_loop_stop(loop_: *mut pw_data_loop) -> ::std::os::raw::c_int;
4683}
4684unsafe extern "C" {
4685 #[doc = " Check if the current thread is the processing thread.\n May be called from any thread."]
4686 pub fn pw_data_loop_in_thread(loop_: *mut pw_data_loop) -> bool;
4687}
4688unsafe extern "C" {
4689 #[doc = " Get the thread object"]
4690 pub fn pw_data_loop_get_thread(loop_: *mut pw_data_loop) -> *mut spa_thread;
4691}
4692unsafe extern "C" {
4693 #[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"]
4694 pub fn pw_data_loop_invoke(
4695 loop_: *mut pw_data_loop,
4696 func: spa_invoke_func_t,
4697 seq: u32,
4698 data: *const ::std::os::raw::c_void,
4699 size: usize,
4700 block: bool,
4701 user_data: *mut ::std::os::raw::c_void,
4702 ) -> ::std::os::raw::c_int;
4703}
4704unsafe extern "C" {
4705 #[doc = " Set a custom spa_thread_utils for this loop. Setting NULL restores the\n system default implementation. Since 0.3.50"]
4706 pub fn pw_data_loop_set_thread_utils(loop_: *mut pw_data_loop, impl_: *mut spa_thread_utils);
4707}
4708unsafe extern "C" {
4709 #[doc = " Return the version of the library the current application is\n linked to."]
4710 pub fn pw_get_library_version() -> *const ::std::os::raw::c_char;
4711}
4712unsafe extern "C" {
4713 #[doc = " Return TRUE if the currently linked PipeWire library version is equal\n or newer than the specified version. Since 0.3.75"]
4714 pub fn pw_check_library_version(
4715 major: ::std::os::raw::c_int,
4716 minor: ::std::os::raw::c_int,
4717 micro: ::std::os::raw::c_int,
4718 ) -> bool;
4719}
4720unsafe extern "C" {
4721 #[doc = " \\addtogroup pw_pipewire\n \\{"]
4722 pub fn pw_init(argc: *mut ::std::os::raw::c_int, argv: *mut *mut *mut ::std::os::raw::c_char);
4723}
4724unsafe extern "C" {
4725 pub fn pw_deinit();
4726}
4727unsafe extern "C" {
4728 pub fn pw_debug_is_category_enabled(name: *const ::std::os::raw::c_char) -> bool;
4729}
4730unsafe extern "C" {
4731 pub fn pw_get_application_name() -> *const ::std::os::raw::c_char;
4732}
4733unsafe extern "C" {
4734 pub fn pw_get_prgname() -> *const ::std::os::raw::c_char;
4735}
4736unsafe extern "C" {
4737 pub fn pw_get_user_name() -> *const ::std::os::raw::c_char;
4738}
4739unsafe extern "C" {
4740 pub fn pw_get_host_name() -> *const ::std::os::raw::c_char;
4741}
4742unsafe extern "C" {
4743 pub fn pw_get_client_name() -> *const ::std::os::raw::c_char;
4744}
4745unsafe extern "C" {
4746 pub fn pw_check_option(
4747 option: *const ::std::os::raw::c_char,
4748 value: *const ::std::os::raw::c_char,
4749 ) -> bool;
4750}
4751unsafe extern "C" {
4752 pub fn pw_direction_reverse(direction: spa_direction) -> spa_direction;
4753}
4754unsafe extern "C" {
4755 pub fn pw_set_domain(domain: *const ::std::os::raw::c_char) -> ::std::os::raw::c_int;
4756}
4757unsafe extern "C" {
4758 pub fn pw_get_domain() -> *const ::std::os::raw::c_char;
4759}
4760unsafe extern "C" {
4761 pub fn pw_get_support(support: *mut spa_support, max_support: u32) -> u32;
4762}
4763unsafe extern "C" {
4764 pub fn pw_load_spa_handle(
4765 lib: *const ::std::os::raw::c_char,
4766 factory_name: *const ::std::os::raw::c_char,
4767 info: *const spa_dict,
4768 n_support: u32,
4769 support: *const spa_support,
4770 ) -> *mut spa_handle;
4771}
4772unsafe extern "C" {
4773 pub fn pw_unload_spa_handle(handle: *mut spa_handle) -> ::std::os::raw::c_int;
4774}
4775#[repr(C)]
4776#[derive(Debug, Copy, Clone)]
4777pub struct pw_client_node {
4778 _unused: [u8; 0],
4779}
4780#[doc = " information about a buffer"]
4781#[repr(C)]
4782#[derive(Debug, Copy, Clone)]
4783pub struct pw_client_node_buffer {
4784 #[doc = "< the memory id for the metadata"]
4785 pub mem_id: u32,
4786 #[doc = "< offset in memory"]
4787 pub offset: u32,
4788 #[doc = "< size in memory"]
4789 pub size: u32,
4790 #[doc = "< buffer describing metadata and buffer memory"]
4791 pub buffer: *mut spa_buffer,
4792}
4793#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4794const _: () = {
4795 ["Size of pw_client_node_buffer"][::std::mem::size_of::<pw_client_node_buffer>() - 24usize];
4796 ["Alignment of pw_client_node_buffer"]
4797 [::std::mem::align_of::<pw_client_node_buffer>() - 8usize];
4798 ["Offset of field: pw_client_node_buffer::mem_id"]
4799 [::std::mem::offset_of!(pw_client_node_buffer, mem_id) - 0usize];
4800 ["Offset of field: pw_client_node_buffer::offset"]
4801 [::std::mem::offset_of!(pw_client_node_buffer, offset) - 4usize];
4802 ["Offset of field: pw_client_node_buffer::size"]
4803 [::std::mem::offset_of!(pw_client_node_buffer, size) - 8usize];
4804 ["Offset of field: pw_client_node_buffer::buffer"]
4805 [::std::mem::offset_of!(pw_client_node_buffer, buffer) - 16usize];
4806};
4807#[doc = " \\ref pw_client_node events"]
4808#[repr(C)]
4809#[derive(Debug, Copy, Clone)]
4810pub struct pw_client_node_events {
4811 pub version: u32,
4812 #[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"]
4813 pub transport: ::std::option::Option<
4814 unsafe extern "C" fn(
4815 data: *mut ::std::os::raw::c_void,
4816 readfd: ::std::os::raw::c_int,
4817 writefd: ::std::os::raw::c_int,
4818 mem_id: u32,
4819 offset: u32,
4820 size: u32,
4821 ) -> ::std::os::raw::c_int,
4822 >,
4823 #[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"]
4824 pub set_param: ::std::option::Option<
4825 unsafe extern "C" fn(
4826 data: *mut ::std::os::raw::c_void,
4827 id: u32,
4828 flags: u32,
4829 param: *const spa_pod,
4830 ) -> ::std::os::raw::c_int,
4831 >,
4832 #[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"]
4833 pub set_io: ::std::option::Option<
4834 unsafe extern "C" fn(
4835 data: *mut ::std::os::raw::c_void,
4836 id: u32,
4837 mem_id: u32,
4838 offset: u32,
4839 size: u32,
4840 ) -> ::std::os::raw::c_int,
4841 >,
4842 #[doc = " Receive an event from the client node\n \\param event the received event"]
4843 pub event: ::std::option::Option<
4844 unsafe extern "C" fn(
4845 data: *mut ::std::os::raw::c_void,
4846 event: *const spa_event,
4847 ) -> ::std::os::raw::c_int,
4848 >,
4849 #[doc = " Notify of a new node command\n\n \\param command the command"]
4850 pub command: ::std::option::Option<
4851 unsafe extern "C" fn(
4852 data: *mut ::std::os::raw::c_void,
4853 command: *const spa_command,
4854 ) -> ::std::os::raw::c_int,
4855 >,
4856 #[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"]
4857 pub add_port: ::std::option::Option<
4858 unsafe extern "C" fn(
4859 data: *mut ::std::os::raw::c_void,
4860 direction: spa_direction,
4861 port_id: u32,
4862 props: *const spa_dict,
4863 ) -> ::std::os::raw::c_int,
4864 >,
4865 #[doc = " A port was removed from the node\n\n \\param direction a port direction\n \\param port_id the remove port id"]
4866 pub remove_port: ::std::option::Option<
4867 unsafe extern "C" fn(
4868 data: *mut ::std::os::raw::c_void,
4869 direction: spa_direction,
4870 port_id: u32,
4871 ) -> ::std::os::raw::c_int,
4872 >,
4873 #[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"]
4874 pub port_set_param: ::std::option::Option<
4875 unsafe extern "C" fn(
4876 data: *mut ::std::os::raw::c_void,
4877 direction: spa_direction,
4878 port_id: u32,
4879 id: u32,
4880 flags: u32,
4881 param: *const spa_pod,
4882 ) -> ::std::os::raw::c_int,
4883 >,
4884 #[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"]
4885 pub port_use_buffers: ::std::option::Option<
4886 unsafe extern "C" fn(
4887 data: *mut ::std::os::raw::c_void,
4888 direction: spa_direction,
4889 port_id: u32,
4890 mix_id: u32,
4891 flags: u32,
4892 n_buffers: u32,
4893 buffers: *mut pw_client_node_buffer,
4894 ) -> ::std::os::raw::c_int,
4895 >,
4896 #[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"]
4897 pub port_set_io: ::std::option::Option<
4898 unsafe extern "C" fn(
4899 data: *mut ::std::os::raw::c_void,
4900 direction: spa_direction,
4901 port_id: u32,
4902 mix_id: u32,
4903 id: u32,
4904 mem_id: u32,
4905 offset: u32,
4906 size: u32,
4907 ) -> ::std::os::raw::c_int,
4908 >,
4909 #[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"]
4910 pub set_activation: ::std::option::Option<
4911 unsafe extern "C" fn(
4912 data: *mut ::std::os::raw::c_void,
4913 node_id: u32,
4914 signalfd: ::std::os::raw::c_int,
4915 mem_id: u32,
4916 offset: u32,
4917 size: u32,
4918 ) -> ::std::os::raw::c_int,
4919 >,
4920 #[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"]
4921 pub port_set_mix_info: ::std::option::Option<
4922 unsafe extern "C" fn(
4923 data: *mut ::std::os::raw::c_void,
4924 direction: spa_direction,
4925 port_id: u32,
4926 mix_id: u32,
4927 peer_id: u32,
4928 props: *const spa_dict,
4929 ) -> ::std::os::raw::c_int,
4930 >,
4931}
4932#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4933const _: () = {
4934 ["Size of pw_client_node_events"][::std::mem::size_of::<pw_client_node_events>() - 104usize];
4935 ["Alignment of pw_client_node_events"]
4936 [::std::mem::align_of::<pw_client_node_events>() - 8usize];
4937 ["Offset of field: pw_client_node_events::version"]
4938 [::std::mem::offset_of!(pw_client_node_events, version) - 0usize];
4939 ["Offset of field: pw_client_node_events::transport"]
4940 [::std::mem::offset_of!(pw_client_node_events, transport) - 8usize];
4941 ["Offset of field: pw_client_node_events::set_param"]
4942 [::std::mem::offset_of!(pw_client_node_events, set_param) - 16usize];
4943 ["Offset of field: pw_client_node_events::set_io"]
4944 [::std::mem::offset_of!(pw_client_node_events, set_io) - 24usize];
4945 ["Offset of field: pw_client_node_events::event"]
4946 [::std::mem::offset_of!(pw_client_node_events, event) - 32usize];
4947 ["Offset of field: pw_client_node_events::command"]
4948 [::std::mem::offset_of!(pw_client_node_events, command) - 40usize];
4949 ["Offset of field: pw_client_node_events::add_port"]
4950 [::std::mem::offset_of!(pw_client_node_events, add_port) - 48usize];
4951 ["Offset of field: pw_client_node_events::remove_port"]
4952 [::std::mem::offset_of!(pw_client_node_events, remove_port) - 56usize];
4953 ["Offset of field: pw_client_node_events::port_set_param"]
4954 [::std::mem::offset_of!(pw_client_node_events, port_set_param) - 64usize];
4955 ["Offset of field: pw_client_node_events::port_use_buffers"]
4956 [::std::mem::offset_of!(pw_client_node_events, port_use_buffers) - 72usize];
4957 ["Offset of field: pw_client_node_events::port_set_io"]
4958 [::std::mem::offset_of!(pw_client_node_events, port_set_io) - 80usize];
4959 ["Offset of field: pw_client_node_events::set_activation"]
4960 [::std::mem::offset_of!(pw_client_node_events, set_activation) - 88usize];
4961 ["Offset of field: pw_client_node_events::port_set_mix_info"]
4962 [::std::mem::offset_of!(pw_client_node_events, port_set_mix_info) - 96usize];
4963};
4964#[doc = " \\ref pw_client_node methods"]
4965#[repr(C)]
4966#[derive(Debug, Copy, Clone)]
4967pub struct pw_client_node_methods {
4968 pub version: u32,
4969 pub add_listener: ::std::option::Option<
4970 unsafe extern "C" fn(
4971 object: *mut ::std::os::raw::c_void,
4972 listener: *mut spa_hook,
4973 events: *const pw_client_node_events,
4974 data: *mut ::std::os::raw::c_void,
4975 ) -> ::std::os::raw::c_int,
4976 >,
4977 #[doc = " get the node object"]
4978 pub get_node: ::std::option::Option<
4979 unsafe extern "C" fn(
4980 object: *mut ::std::os::raw::c_void,
4981 version: u32,
4982 user_data_size: usize,
4983 ) -> *mut pw_node,
4984 >,
4985 #[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"]
4986 pub update: ::std::option::Option<
4987 unsafe extern "C" fn(
4988 object: *mut ::std::os::raw::c_void,
4989 change_mask: u32,
4990 n_params: u32,
4991 params: *mut *const spa_pod,
4992 info: *const spa_node_info,
4993 ) -> ::std::os::raw::c_int,
4994 >,
4995 #[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"]
4996 pub port_update: ::std::option::Option<
4997 unsafe extern "C" fn(
4998 object: *mut ::std::os::raw::c_void,
4999 direction: spa_direction,
5000 port_id: u32,
5001 change_mask: u32,
5002 n_params: u32,
5003 params: *mut *const spa_pod,
5004 info: *const spa_port_info,
5005 ) -> ::std::os::raw::c_int,
5006 >,
5007 #[doc = " Activate or deactivate the node"]
5008 pub set_active: ::std::option::Option<
5009 unsafe extern "C" fn(
5010 object: *mut ::std::os::raw::c_void,
5011 active: bool,
5012 ) -> ::std::os::raw::c_int,
5013 >,
5014 #[doc = " Send an event to the node\n \\param event the event to send"]
5015 pub event: ::std::option::Option<
5016 unsafe extern "C" fn(
5017 object: *mut ::std::os::raw::c_void,
5018 event: *const spa_event,
5019 ) -> ::std::os::raw::c_int,
5020 >,
5021 #[doc = " Send allocated buffers"]
5022 pub port_buffers: ::std::option::Option<
5023 unsafe extern "C" fn(
5024 object: *mut ::std::os::raw::c_void,
5025 direction: spa_direction,
5026 port_id: u32,
5027 mix_id: u32,
5028 n_buffers: u32,
5029 buffers: *mut *mut spa_buffer,
5030 ) -> ::std::os::raw::c_int,
5031 >,
5032}
5033#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5034const _: () = {
5035 ["Size of pw_client_node_methods"][::std::mem::size_of::<pw_client_node_methods>() - 64usize];
5036 ["Alignment of pw_client_node_methods"]
5037 [::std::mem::align_of::<pw_client_node_methods>() - 8usize];
5038 ["Offset of field: pw_client_node_methods::version"]
5039 [::std::mem::offset_of!(pw_client_node_methods, version) - 0usize];
5040 ["Offset of field: pw_client_node_methods::add_listener"]
5041 [::std::mem::offset_of!(pw_client_node_methods, add_listener) - 8usize];
5042 ["Offset of field: pw_client_node_methods::get_node"]
5043 [::std::mem::offset_of!(pw_client_node_methods, get_node) - 16usize];
5044 ["Offset of field: pw_client_node_methods::update"]
5045 [::std::mem::offset_of!(pw_client_node_methods, update) - 24usize];
5046 ["Offset of field: pw_client_node_methods::port_update"]
5047 [::std::mem::offset_of!(pw_client_node_methods, port_update) - 32usize];
5048 ["Offset of field: pw_client_node_methods::set_active"]
5049 [::std::mem::offset_of!(pw_client_node_methods, set_active) - 40usize];
5050 ["Offset of field: pw_client_node_methods::event"]
5051 [::std::mem::offset_of!(pw_client_node_methods, event) - 48usize];
5052 ["Offset of field: pw_client_node_methods::port_buffers"]
5053 [::std::mem::offset_of!(pw_client_node_methods, port_buffers) - 56usize];
5054};
5055#[repr(C)]
5056#[derive(Debug, Copy, Clone)]
5057pub struct pw_metadata {
5058 _unused: [u8; 0],
5059}
5060#[doc = " \\ref pw_metadata events"]
5061#[repr(C)]
5062#[derive(Debug, Copy, Clone)]
5063pub struct pw_metadata_events {
5064 pub version: u32,
5065 pub property: ::std::option::Option<
5066 unsafe extern "C" fn(
5067 data: *mut ::std::os::raw::c_void,
5068 subject: u32,
5069 key: *const ::std::os::raw::c_char,
5070 type_: *const ::std::os::raw::c_char,
5071 value: *const ::std::os::raw::c_char,
5072 ) -> ::std::os::raw::c_int,
5073 >,
5074}
5075#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5076const _: () = {
5077 ["Size of pw_metadata_events"][::std::mem::size_of::<pw_metadata_events>() - 16usize];
5078 ["Alignment of pw_metadata_events"][::std::mem::align_of::<pw_metadata_events>() - 8usize];
5079 ["Offset of field: pw_metadata_events::version"]
5080 [::std::mem::offset_of!(pw_metadata_events, version) - 0usize];
5081 ["Offset of field: pw_metadata_events::property"]
5082 [::std::mem::offset_of!(pw_metadata_events, property) - 8usize];
5083};
5084#[doc = " \\ref pw_metadata methods"]
5085#[repr(C)]
5086#[derive(Debug, Copy, Clone)]
5087pub struct pw_metadata_methods {
5088 pub version: u32,
5089 pub add_listener: ::std::option::Option<
5090 unsafe extern "C" fn(
5091 object: *mut ::std::os::raw::c_void,
5092 listener: *mut spa_hook,
5093 events: *const pw_metadata_events,
5094 data: *mut ::std::os::raw::c_void,
5095 ) -> ::std::os::raw::c_int,
5096 >,
5097 #[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."]
5098 pub set_property: ::std::option::Option<
5099 unsafe extern "C" fn(
5100 object: *mut ::std::os::raw::c_void,
5101 subject: u32,
5102 key: *const ::std::os::raw::c_char,
5103 type_: *const ::std::os::raw::c_char,
5104 value: *const ::std::os::raw::c_char,
5105 ) -> ::std::os::raw::c_int,
5106 >,
5107 #[doc = " Clear all metadata\n\n This requires X and W permissions on the metadata."]
5108 pub clear: ::std::option::Option<
5109 unsafe extern "C" fn(object: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
5110 >,
5111}
5112#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5113const _: () = {
5114 ["Size of pw_metadata_methods"][::std::mem::size_of::<pw_metadata_methods>() - 32usize];
5115 ["Alignment of pw_metadata_methods"][::std::mem::align_of::<pw_metadata_methods>() - 8usize];
5116 ["Offset of field: pw_metadata_methods::version"]
5117 [::std::mem::offset_of!(pw_metadata_methods, version) - 0usize];
5118 ["Offset of field: pw_metadata_methods::add_listener"]
5119 [::std::mem::offset_of!(pw_metadata_methods, add_listener) - 8usize];
5120 ["Offset of field: pw_metadata_methods::set_property"]
5121 [::std::mem::offset_of!(pw_metadata_methods, set_property) - 16usize];
5122 ["Offset of field: pw_metadata_methods::clear"]
5123 [::std::mem::offset_of!(pw_metadata_methods, clear) - 24usize];
5124};
5125#[repr(C)]
5126#[derive(Debug, Copy, Clone)]
5127pub struct pw_profiler {
5128 _unused: [u8; 0],
5129}
5130#[doc = " \\ref pw_profiler events"]
5131#[repr(C)]
5132#[derive(Debug, Copy, Clone)]
5133pub struct pw_profiler_events {
5134 pub version: u32,
5135 pub profile: ::std::option::Option<
5136 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, pod: *const spa_pod),
5137 >,
5138}
5139#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5140const _: () = {
5141 ["Size of pw_profiler_events"][::std::mem::size_of::<pw_profiler_events>() - 16usize];
5142 ["Alignment of pw_profiler_events"][::std::mem::align_of::<pw_profiler_events>() - 8usize];
5143 ["Offset of field: pw_profiler_events::version"]
5144 [::std::mem::offset_of!(pw_profiler_events, version) - 0usize];
5145 ["Offset of field: pw_profiler_events::profile"]
5146 [::std::mem::offset_of!(pw_profiler_events, profile) - 8usize];
5147};
5148#[doc = " \\ref pw_profiler methods"]
5149#[repr(C)]
5150#[derive(Debug, Copy, Clone)]
5151pub struct pw_profiler_methods {
5152 pub version: u32,
5153 pub add_listener: ::std::option::Option<
5154 unsafe extern "C" fn(
5155 object: *mut ::std::os::raw::c_void,
5156 listener: *mut spa_hook,
5157 events: *const pw_profiler_events,
5158 data: *mut ::std::os::raw::c_void,
5159 ) -> ::std::os::raw::c_int,
5160 >,
5161}
5162#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5163const _: () = {
5164 ["Size of pw_profiler_methods"][::std::mem::size_of::<pw_profiler_methods>() - 16usize];
5165 ["Alignment of pw_profiler_methods"][::std::mem::align_of::<pw_profiler_methods>() - 8usize];
5166 ["Offset of field: pw_profiler_methods::version"]
5167 [::std::mem::offset_of!(pw_profiler_methods, version) - 0usize];
5168 ["Offset of field: pw_profiler_methods::add_listener"]
5169 [::std::mem::offset_of!(pw_profiler_methods, add_listener) - 8usize];
5170};
5171#[doc = " \\addtogroup pw_resource\n \\{"]
5172#[repr(C)]
5173#[derive(Debug, Copy, Clone)]
5174pub struct pw_resource {
5175 _unused: [u8; 0],
5176}
5177#[doc = " \\addtogroup pw_impl_module\n \\{"]
5178#[repr(C)]
5179#[derive(Debug, Copy, Clone)]
5180pub struct pw_impl_module {
5181 _unused: [u8; 0],
5182}
5183#[doc = " \\addtogroup pw_impl_port\n \\{"]
5184#[repr(C)]
5185#[derive(Debug, Copy, Clone)]
5186pub struct pw_impl_port {
5187 _unused: [u8; 0],
5188}
5189#[doc = " \\addtogroup pw_control\n \\{"]
5190#[repr(C)]
5191#[derive(Debug, Copy, Clone)]
5192pub struct pw_control {
5193 _unused: [u8; 0],
5194}
5195#[doc = " Port events, use \\ref pw_control_add_listener"]
5196#[repr(C)]
5197#[derive(Debug, Copy, Clone)]
5198pub struct pw_control_events {
5199 pub version: u32,
5200 #[doc = " The control is destroyed"]
5201 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5202 #[doc = " The control is freed"]
5203 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5204 #[doc = " control is linked to another control"]
5205 pub linked: ::std::option::Option<
5206 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, other: *mut pw_control),
5207 >,
5208 #[doc = " control is unlinked from another control"]
5209 pub unlinked: ::std::option::Option<
5210 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, other: *mut pw_control),
5211 >,
5212}
5213#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5214const _: () = {
5215 ["Size of pw_control_events"][::std::mem::size_of::<pw_control_events>() - 40usize];
5216 ["Alignment of pw_control_events"][::std::mem::align_of::<pw_control_events>() - 8usize];
5217 ["Offset of field: pw_control_events::version"]
5218 [::std::mem::offset_of!(pw_control_events, version) - 0usize];
5219 ["Offset of field: pw_control_events::destroy"]
5220 [::std::mem::offset_of!(pw_control_events, destroy) - 8usize];
5221 ["Offset of field: pw_control_events::free"]
5222 [::std::mem::offset_of!(pw_control_events, free) - 16usize];
5223 ["Offset of field: pw_control_events::linked"]
5224 [::std::mem::offset_of!(pw_control_events, linked) - 24usize];
5225 ["Offset of field: pw_control_events::unlinked"]
5226 [::std::mem::offset_of!(pw_control_events, unlinked) - 32usize];
5227};
5228unsafe extern "C" {
5229 #[doc = " Get the control parent port or NULL when not set"]
5230 pub fn pw_control_get_port(control: *mut pw_control) -> *mut pw_impl_port;
5231}
5232unsafe extern "C" {
5233 #[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."]
5234 pub fn pw_control_add_listener(
5235 control: *mut pw_control,
5236 listener: *mut spa_hook,
5237 events: *const pw_control_events,
5238 data: *mut ::std::os::raw::c_void,
5239 );
5240}
5241#[doc = " \\addtogroup pw_impl_core\n \\{"]
5242#[repr(C)]
5243#[derive(Debug, Copy, Clone)]
5244pub struct pw_impl_core {
5245 _unused: [u8; 0],
5246}
5247#[doc = " Factory events, listen to them with \\ref pw_impl_core_add_listener"]
5248#[repr(C)]
5249#[derive(Debug, Copy, Clone)]
5250pub struct pw_impl_core_events {
5251 pub version: u32,
5252 #[doc = " the core is destroyed"]
5253 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5254 #[doc = " the core is freed"]
5255 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5256 #[doc = " the core is initialized"]
5257 pub initialized: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5258}
5259#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5260const _: () = {
5261 ["Size of pw_impl_core_events"][::std::mem::size_of::<pw_impl_core_events>() - 32usize];
5262 ["Alignment of pw_impl_core_events"][::std::mem::align_of::<pw_impl_core_events>() - 8usize];
5263 ["Offset of field: pw_impl_core_events::version"]
5264 [::std::mem::offset_of!(pw_impl_core_events, version) - 0usize];
5265 ["Offset of field: pw_impl_core_events::destroy"]
5266 [::std::mem::offset_of!(pw_impl_core_events, destroy) - 8usize];
5267 ["Offset of field: pw_impl_core_events::free"]
5268 [::std::mem::offset_of!(pw_impl_core_events, free) - 16usize];
5269 ["Offset of field: pw_impl_core_events::initialized"]
5270 [::std::mem::offset_of!(pw_impl_core_events, initialized) - 24usize];
5271};
5272unsafe extern "C" {
5273 pub fn pw_context_create_core(
5274 context: *mut pw_context,
5275 properties: *mut pw_properties,
5276 user_data_size: usize,
5277 ) -> *mut pw_impl_core;
5278}
5279unsafe extern "C" {
5280 pub fn pw_context_get_default_core(context: *mut pw_context) -> *mut pw_impl_core;
5281}
5282unsafe extern "C" {
5283 #[doc = " Get the core properties"]
5284 pub fn pw_impl_core_get_properties(core: *mut pw_impl_core) -> *const pw_properties;
5285}
5286unsafe extern "C" {
5287 #[doc = " Get the core information"]
5288 pub fn pw_impl_core_get_info(core: *mut pw_impl_core) -> *const pw_core_info;
5289}
5290unsafe extern "C" {
5291 #[doc = " Update the core properties"]
5292 pub fn pw_impl_core_update_properties(
5293 core: *mut pw_impl_core,
5294 dict: *const spa_dict,
5295 ) -> ::std::os::raw::c_int;
5296}
5297unsafe extern "C" {
5298 pub fn pw_impl_core_register(
5299 core: *mut pw_impl_core,
5300 properties: *mut pw_properties,
5301 ) -> ::std::os::raw::c_int;
5302}
5303unsafe extern "C" {
5304 pub fn pw_impl_core_destroy(core: *mut pw_impl_core);
5305}
5306unsafe extern "C" {
5307 pub fn pw_impl_core_get_user_data(core: *mut pw_impl_core) -> *mut ::std::os::raw::c_void;
5308}
5309unsafe extern "C" {
5310 #[doc = " Get the global of this core"]
5311 pub fn pw_impl_core_get_global(core: *mut pw_impl_core) -> *mut pw_global;
5312}
5313unsafe extern "C" {
5314 #[doc = " Add an event listener"]
5315 pub fn pw_impl_core_add_listener(
5316 core: *mut pw_impl_core,
5317 listener: *mut spa_hook,
5318 events: *const pw_impl_core_events,
5319 data: *mut ::std::os::raw::c_void,
5320 );
5321}
5322#[doc = " \\addtogroup pw_impl_device\n \\{"]
5323#[repr(C)]
5324#[derive(Debug, Copy, Clone)]
5325pub struct pw_impl_device {
5326 _unused: [u8; 0],
5327}
5328#[doc = " Device events, listen to them with \\ref pw_impl_device_add_listener"]
5329#[repr(C)]
5330#[derive(Debug, Copy, Clone)]
5331pub struct pw_impl_device_events {
5332 pub version: u32,
5333 #[doc = " the device is destroyed"]
5334 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5335 #[doc = " the device is freed"]
5336 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5337 #[doc = " the device is initialized"]
5338 pub initialized: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5339 #[doc = " the device info changed"]
5340 pub info_changed: ::std::option::Option<
5341 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_device_info),
5342 >,
5343}
5344#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5345const _: () = {
5346 ["Size of pw_impl_device_events"][::std::mem::size_of::<pw_impl_device_events>() - 40usize];
5347 ["Alignment of pw_impl_device_events"]
5348 [::std::mem::align_of::<pw_impl_device_events>() - 8usize];
5349 ["Offset of field: pw_impl_device_events::version"]
5350 [::std::mem::offset_of!(pw_impl_device_events, version) - 0usize];
5351 ["Offset of field: pw_impl_device_events::destroy"]
5352 [::std::mem::offset_of!(pw_impl_device_events, destroy) - 8usize];
5353 ["Offset of field: pw_impl_device_events::free"]
5354 [::std::mem::offset_of!(pw_impl_device_events, free) - 16usize];
5355 ["Offset of field: pw_impl_device_events::initialized"]
5356 [::std::mem::offset_of!(pw_impl_device_events, initialized) - 24usize];
5357 ["Offset of field: pw_impl_device_events::info_changed"]
5358 [::std::mem::offset_of!(pw_impl_device_events, info_changed) - 32usize];
5359};
5360unsafe extern "C" {
5361 pub fn pw_context_create_device(
5362 context: *mut pw_context,
5363 properties: *mut pw_properties,
5364 user_data_size: usize,
5365 ) -> *mut pw_impl_device;
5366}
5367unsafe extern "C" {
5368 pub fn pw_impl_device_register(
5369 device: *mut pw_impl_device,
5370 properties: *mut pw_properties,
5371 ) -> ::std::os::raw::c_int;
5372}
5373unsafe extern "C" {
5374 pub fn pw_impl_device_destroy(device: *mut pw_impl_device);
5375}
5376unsafe extern "C" {
5377 pub fn pw_impl_device_get_user_data(device: *mut pw_impl_device)
5378 -> *mut ::std::os::raw::c_void;
5379}
5380unsafe extern "C" {
5381 #[doc = " Set the device implementation"]
5382 pub fn pw_impl_device_set_implementation(
5383 device: *mut pw_impl_device,
5384 spa_device: *mut spa_device,
5385 ) -> ::std::os::raw::c_int;
5386}
5387unsafe extern "C" {
5388 #[doc = " Get the device implementation"]
5389 pub fn pw_impl_device_get_implementation(device: *mut pw_impl_device) -> *mut spa_device;
5390}
5391unsafe extern "C" {
5392 #[doc = " Get the global of this device"]
5393 pub fn pw_impl_device_get_global(device: *mut pw_impl_device) -> *mut pw_global;
5394}
5395unsafe extern "C" {
5396 #[doc = " Add an event listener"]
5397 pub fn pw_impl_device_add_listener(
5398 device: *mut pw_impl_device,
5399 listener: *mut spa_hook,
5400 events: *const pw_impl_device_events,
5401 data: *mut ::std::os::raw::c_void,
5402 );
5403}
5404unsafe extern "C" {
5405 pub fn pw_impl_device_update_properties(
5406 device: *mut pw_impl_device,
5407 dict: *const spa_dict,
5408 ) -> ::std::os::raw::c_int;
5409}
5410unsafe extern "C" {
5411 pub fn pw_impl_device_get_properties(device: *mut pw_impl_device) -> *const pw_properties;
5412}
5413unsafe extern "C" {
5414 pub fn pw_impl_device_for_each_param(
5415 device: *mut pw_impl_device,
5416 seq: ::std::os::raw::c_int,
5417 param_id: u32,
5418 index: u32,
5419 max: u32,
5420 filter: *const spa_pod,
5421 callback: ::std::option::Option<
5422 unsafe extern "C" fn(
5423 data: *mut ::std::os::raw::c_void,
5424 seq: ::std::os::raw::c_int,
5425 id: u32,
5426 index: u32,
5427 next: u32,
5428 param: *mut spa_pod,
5429 ) -> ::std::os::raw::c_int,
5430 >,
5431 data: *mut ::std::os::raw::c_void,
5432 ) -> ::std::os::raw::c_int;
5433}
5434#[doc = " \\addtogroup pw_impl_factory\n \\{"]
5435#[repr(C)]
5436#[derive(Debug, Copy, Clone)]
5437pub struct pw_impl_factory {
5438 _unused: [u8; 0],
5439}
5440#[doc = " Factory events, listen to them with \\ref pw_impl_factory_add_listener"]
5441#[repr(C)]
5442#[derive(Debug, Copy, Clone)]
5443pub struct pw_impl_factory_events {
5444 pub version: u32,
5445 #[doc = " the factory is destroyed"]
5446 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5447 #[doc = " the factory is freed"]
5448 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5449 #[doc = " the factory is initialized"]
5450 pub initialized: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5451}
5452#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5453const _: () = {
5454 ["Size of pw_impl_factory_events"][::std::mem::size_of::<pw_impl_factory_events>() - 32usize];
5455 ["Alignment of pw_impl_factory_events"]
5456 [::std::mem::align_of::<pw_impl_factory_events>() - 8usize];
5457 ["Offset of field: pw_impl_factory_events::version"]
5458 [::std::mem::offset_of!(pw_impl_factory_events, version) - 0usize];
5459 ["Offset of field: pw_impl_factory_events::destroy"]
5460 [::std::mem::offset_of!(pw_impl_factory_events, destroy) - 8usize];
5461 ["Offset of field: pw_impl_factory_events::free"]
5462 [::std::mem::offset_of!(pw_impl_factory_events, free) - 16usize];
5463 ["Offset of field: pw_impl_factory_events::initialized"]
5464 [::std::mem::offset_of!(pw_impl_factory_events, initialized) - 24usize];
5465};
5466#[repr(C)]
5467#[derive(Debug, Copy, Clone)]
5468pub struct pw_impl_factory_implementation {
5469 pub version: u32,
5470 #[doc = " The function to create an object from this factory"]
5471 pub create_object: ::std::option::Option<
5472 unsafe extern "C" fn(
5473 data: *mut ::std::os::raw::c_void,
5474 resource: *mut pw_resource,
5475 type_: *const ::std::os::raw::c_char,
5476 version: u32,
5477 properties: *mut pw_properties,
5478 new_id: u32,
5479 ) -> *mut ::std::os::raw::c_void,
5480 >,
5481}
5482#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5483const _: () = {
5484 ["Size of pw_impl_factory_implementation"]
5485 [::std::mem::size_of::<pw_impl_factory_implementation>() - 16usize];
5486 ["Alignment of pw_impl_factory_implementation"]
5487 [::std::mem::align_of::<pw_impl_factory_implementation>() - 8usize];
5488 ["Offset of field: pw_impl_factory_implementation::version"]
5489 [::std::mem::offset_of!(pw_impl_factory_implementation, version) - 0usize];
5490 ["Offset of field: pw_impl_factory_implementation::create_object"]
5491 [::std::mem::offset_of!(pw_impl_factory_implementation, create_object) - 8usize];
5492};
5493unsafe extern "C" {
5494 pub fn pw_context_create_factory(
5495 context: *mut pw_context,
5496 name: *const ::std::os::raw::c_char,
5497 type_: *const ::std::os::raw::c_char,
5498 version: u32,
5499 properties: *mut pw_properties,
5500 user_data_size: usize,
5501 ) -> *mut pw_impl_factory;
5502}
5503unsafe extern "C" {
5504 #[doc = " Get the factory properties"]
5505 pub fn pw_impl_factory_get_properties(factory: *mut pw_impl_factory) -> *const pw_properties;
5506}
5507unsafe extern "C" {
5508 #[doc = " Get the factory info"]
5509 pub fn pw_impl_factory_get_info(factory: *mut pw_impl_factory) -> *const pw_factory_info;
5510}
5511unsafe extern "C" {
5512 #[doc = " Update the factory properties"]
5513 pub fn pw_impl_factory_update_properties(
5514 factory: *mut pw_impl_factory,
5515 dict: *const spa_dict,
5516 ) -> ::std::os::raw::c_int;
5517}
5518unsafe extern "C" {
5519 pub fn pw_impl_factory_register(
5520 factory: *mut pw_impl_factory,
5521 properties: *mut pw_properties,
5522 ) -> ::std::os::raw::c_int;
5523}
5524unsafe extern "C" {
5525 pub fn pw_impl_factory_destroy(factory: *mut pw_impl_factory);
5526}
5527unsafe extern "C" {
5528 pub fn pw_impl_factory_get_user_data(
5529 factory: *mut pw_impl_factory,
5530 ) -> *mut ::std::os::raw::c_void;
5531}
5532unsafe extern "C" {
5533 #[doc = " Get the global of this factory"]
5534 pub fn pw_impl_factory_get_global(factory: *mut pw_impl_factory) -> *mut pw_global;
5535}
5536unsafe extern "C" {
5537 #[doc = " Add an event listener"]
5538 pub fn pw_impl_factory_add_listener(
5539 factory: *mut pw_impl_factory,
5540 listener: *mut spa_hook,
5541 events: *const pw_impl_factory_events,
5542 data: *mut ::std::os::raw::c_void,
5543 );
5544}
5545unsafe extern "C" {
5546 pub fn pw_impl_factory_set_implementation(
5547 factory: *mut pw_impl_factory,
5548 implementation: *const pw_impl_factory_implementation,
5549 data: *mut ::std::os::raw::c_void,
5550 );
5551}
5552unsafe extern "C" {
5553 pub fn pw_impl_factory_create_object(
5554 factory: *mut pw_impl_factory,
5555 resource: *mut pw_resource,
5556 type_: *const ::std::os::raw::c_char,
5557 version: u32,
5558 properties: *mut pw_properties,
5559 new_id: u32,
5560 ) -> *mut ::std::os::raw::c_void;
5561}
5562unsafe extern "C" {
5563 #[doc = " Find a factory by name"]
5564 pub fn pw_context_find_factory(
5565 context: *mut pw_context,
5566 name: *const ::std::os::raw::c_char,
5567 ) -> *mut pw_impl_factory;
5568}
5569#[doc = " \\addtogroup pw_impl_link\n \\{"]
5570#[repr(C)]
5571#[derive(Debug, Copy, Clone)]
5572pub struct pw_impl_link {
5573 _unused: [u8; 0],
5574}
5575#[doc = " link events added with \\ref pw_impl_link_add_listener"]
5576#[repr(C)]
5577#[derive(Debug, Copy, Clone)]
5578pub struct pw_impl_link_events {
5579 pub version: u32,
5580 #[doc = " A link is destroyed"]
5581 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5582 #[doc = " A link is freed"]
5583 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5584 #[doc = " a Link is initialized"]
5585 pub initialized: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5586 #[doc = " The info changed on a link"]
5587 pub info_changed: ::std::option::Option<
5588 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_link_info),
5589 >,
5590 #[doc = " The link state changed, \\a error is only valid when the state is\n in error."]
5591 pub state_changed: ::std::option::Option<
5592 unsafe extern "C" fn(
5593 data: *mut ::std::os::raw::c_void,
5594 old: pw_link_state,
5595 state: pw_link_state,
5596 error: *const ::std::os::raw::c_char,
5597 ),
5598 >,
5599 #[doc = " A port is unlinked"]
5600 pub port_unlinked: ::std::option::Option<
5601 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, port: *mut pw_impl_port),
5602 >,
5603}
5604#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5605const _: () = {
5606 ["Size of pw_impl_link_events"][::std::mem::size_of::<pw_impl_link_events>() - 56usize];
5607 ["Alignment of pw_impl_link_events"][::std::mem::align_of::<pw_impl_link_events>() - 8usize];
5608 ["Offset of field: pw_impl_link_events::version"]
5609 [::std::mem::offset_of!(pw_impl_link_events, version) - 0usize];
5610 ["Offset of field: pw_impl_link_events::destroy"]
5611 [::std::mem::offset_of!(pw_impl_link_events, destroy) - 8usize];
5612 ["Offset of field: pw_impl_link_events::free"]
5613 [::std::mem::offset_of!(pw_impl_link_events, free) - 16usize];
5614 ["Offset of field: pw_impl_link_events::initialized"]
5615 [::std::mem::offset_of!(pw_impl_link_events, initialized) - 24usize];
5616 ["Offset of field: pw_impl_link_events::info_changed"]
5617 [::std::mem::offset_of!(pw_impl_link_events, info_changed) - 32usize];
5618 ["Offset of field: pw_impl_link_events::state_changed"]
5619 [::std::mem::offset_of!(pw_impl_link_events, state_changed) - 40usize];
5620 ["Offset of field: pw_impl_link_events::port_unlinked"]
5621 [::std::mem::offset_of!(pw_impl_link_events, port_unlinked) - 48usize];
5622};
5623unsafe extern "C" {
5624 #[doc = " Make a new link between two ports\n \\return a newly allocated link"]
5625 pub fn pw_context_create_link(
5626 context: *mut pw_context,
5627 output: *mut pw_impl_port,
5628 input: *mut pw_impl_port,
5629 format_filter: *mut spa_pod,
5630 properties: *mut pw_properties,
5631 user_data_size: usize,
5632 ) -> *mut pw_impl_link;
5633}
5634unsafe extern "C" {
5635 #[doc = " Destroy a link"]
5636 pub fn pw_impl_link_destroy(link: *mut pw_impl_link);
5637}
5638unsafe extern "C" {
5639 #[doc = " Add an event listener to \\a link"]
5640 pub fn pw_impl_link_add_listener(
5641 link: *mut pw_impl_link,
5642 listener: *mut spa_hook,
5643 events: *const pw_impl_link_events,
5644 data: *mut ::std::os::raw::c_void,
5645 );
5646}
5647unsafe extern "C" {
5648 #[doc = " Finish link configuration and register"]
5649 pub fn pw_impl_link_register(
5650 link: *mut pw_impl_link,
5651 properties: *mut pw_properties,
5652 ) -> ::std::os::raw::c_int;
5653}
5654unsafe extern "C" {
5655 #[doc = " Get the context of a link"]
5656 pub fn pw_impl_link_get_context(link: *mut pw_impl_link) -> *mut pw_context;
5657}
5658unsafe extern "C" {
5659 #[doc = " Get the user_data of a link, the size of the memory is given when\n constructing the link"]
5660 pub fn pw_impl_link_get_user_data(link: *mut pw_impl_link) -> *mut ::std::os::raw::c_void;
5661}
5662unsafe extern "C" {
5663 #[doc = " Get the link info"]
5664 pub fn pw_impl_link_get_info(link: *mut pw_impl_link) -> *const pw_link_info;
5665}
5666unsafe extern "C" {
5667 #[doc = " Get the global of the link"]
5668 pub fn pw_impl_link_get_global(link: *mut pw_impl_link) -> *mut pw_global;
5669}
5670unsafe extern "C" {
5671 #[doc = " Get the output port of the link"]
5672 pub fn pw_impl_link_get_output(link: *mut pw_impl_link) -> *mut pw_impl_port;
5673}
5674unsafe extern "C" {
5675 #[doc = " Get the input port of the link"]
5676 pub fn pw_impl_link_get_input(link: *mut pw_impl_link) -> *mut pw_impl_port;
5677}
5678unsafe extern "C" {
5679 #[doc = " Find the link between 2 ports"]
5680 pub fn pw_impl_link_find(
5681 output: *mut pw_impl_port,
5682 input: *mut pw_impl_port,
5683 ) -> *mut pw_impl_link;
5684}
5685#[doc = " \\addtogroup pw_impl_metadata\n \\{"]
5686#[repr(C)]
5687#[derive(Debug, Copy, Clone)]
5688pub struct pw_impl_metadata {
5689 _unused: [u8; 0],
5690}
5691#[doc = " Metadata events, listen to them with \\ref pw_impl_metadata_add_listener"]
5692#[repr(C)]
5693#[derive(Debug, Copy, Clone)]
5694pub struct pw_impl_metadata_events {
5695 pub version: u32,
5696 #[doc = " the metadata is destroyed"]
5697 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5698 #[doc = " the metadata is freed"]
5699 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5700 #[doc = " a property changed"]
5701 pub property: ::std::option::Option<
5702 unsafe extern "C" fn(
5703 data: *mut ::std::os::raw::c_void,
5704 subject: u32,
5705 key: *const ::std::os::raw::c_char,
5706 type_: *const ::std::os::raw::c_char,
5707 value: *const ::std::os::raw::c_char,
5708 ) -> ::std::os::raw::c_int,
5709 >,
5710}
5711#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5712const _: () = {
5713 ["Size of pw_impl_metadata_events"][::std::mem::size_of::<pw_impl_metadata_events>() - 32usize];
5714 ["Alignment of pw_impl_metadata_events"]
5715 [::std::mem::align_of::<pw_impl_metadata_events>() - 8usize];
5716 ["Offset of field: pw_impl_metadata_events::version"]
5717 [::std::mem::offset_of!(pw_impl_metadata_events, version) - 0usize];
5718 ["Offset of field: pw_impl_metadata_events::destroy"]
5719 [::std::mem::offset_of!(pw_impl_metadata_events, destroy) - 8usize];
5720 ["Offset of field: pw_impl_metadata_events::free"]
5721 [::std::mem::offset_of!(pw_impl_metadata_events, free) - 16usize];
5722 ["Offset of field: pw_impl_metadata_events::property"]
5723 [::std::mem::offset_of!(pw_impl_metadata_events, property) - 24usize];
5724};
5725unsafe extern "C" {
5726 pub fn pw_context_create_metadata(
5727 context: *mut pw_context,
5728 name: *const ::std::os::raw::c_char,
5729 properties: *mut pw_properties,
5730 user_data_size: usize,
5731 ) -> *mut pw_impl_metadata;
5732}
5733unsafe extern "C" {
5734 #[doc = " Get the metadata properties"]
5735 pub fn pw_impl_metadata_get_properties(metadata: *mut pw_impl_metadata)
5736 -> *const pw_properties;
5737}
5738unsafe extern "C" {
5739 pub fn pw_impl_metadata_register(
5740 metadata: *mut pw_impl_metadata,
5741 properties: *mut pw_properties,
5742 ) -> ::std::os::raw::c_int;
5743}
5744unsafe extern "C" {
5745 pub fn pw_impl_metadata_destroy(metadata: *mut pw_impl_metadata);
5746}
5747unsafe extern "C" {
5748 pub fn pw_impl_metadata_get_user_data(
5749 metadata: *mut pw_impl_metadata,
5750 ) -> *mut ::std::os::raw::c_void;
5751}
5752unsafe extern "C" {
5753 pub fn pw_impl_metadata_set_implementation(
5754 metadata: *mut pw_impl_metadata,
5755 impl_: *mut pw_metadata,
5756 ) -> ::std::os::raw::c_int;
5757}
5758unsafe extern "C" {
5759 pub fn pw_impl_metadata_get_implementation(metadata: *mut pw_impl_metadata)
5760 -> *mut pw_metadata;
5761}
5762unsafe extern "C" {
5763 #[doc = " Get the global of this metadata"]
5764 pub fn pw_impl_metadata_get_global(metadata: *mut pw_impl_metadata) -> *mut pw_global;
5765}
5766unsafe extern "C" {
5767 #[doc = " Add an event listener"]
5768 pub fn pw_impl_metadata_add_listener(
5769 metadata: *mut pw_impl_metadata,
5770 listener: *mut spa_hook,
5771 events: *const pw_impl_metadata_events,
5772 data: *mut ::std::os::raw::c_void,
5773 );
5774}
5775unsafe extern "C" {
5776 #[doc = " Set a property"]
5777 pub fn pw_impl_metadata_set_property(
5778 metadata: *mut pw_impl_metadata,
5779 subject: u32,
5780 key: *const ::std::os::raw::c_char,
5781 type_: *const ::std::os::raw::c_char,
5782 value: *const ::std::os::raw::c_char,
5783 ) -> ::std::os::raw::c_int;
5784}
5785unsafe extern "C" {
5786 pub fn pw_impl_metadata_set_propertyf(
5787 metadata: *mut pw_impl_metadata,
5788 subject: u32,
5789 key: *const ::std::os::raw::c_char,
5790 type_: *const ::std::os::raw::c_char,
5791 fmt: *const ::std::os::raw::c_char,
5792 ...
5793 ) -> ::std::os::raw::c_int;
5794}
5795#[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."]
5796pub type pw_impl_module_init_func_t = ::std::option::Option<
5797 unsafe extern "C" fn(
5798 module: *mut pw_impl_module,
5799 args: *const ::std::os::raw::c_char,
5800 ) -> ::std::os::raw::c_int,
5801>;
5802#[doc = " Module events added with \\ref pw_impl_module_add_listener"]
5803#[repr(C)]
5804#[derive(Debug, Copy, Clone)]
5805pub struct pw_impl_module_events {
5806 pub version: u32,
5807 #[doc = " The module is destroyed. This is the time to unregister and\n destroy any objects created by the module."]
5808 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5809 #[doc = " The module is freed. This will be called after destroy() returns."]
5810 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5811 #[doc = " The module is initialized"]
5812 pub initialized: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5813 #[doc = " The module is registered. This is a good time to register\n objects created from the module."]
5814 pub registered: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5815}
5816#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5817const _: () = {
5818 ["Size of pw_impl_module_events"][::std::mem::size_of::<pw_impl_module_events>() - 40usize];
5819 ["Alignment of pw_impl_module_events"]
5820 [::std::mem::align_of::<pw_impl_module_events>() - 8usize];
5821 ["Offset of field: pw_impl_module_events::version"]
5822 [::std::mem::offset_of!(pw_impl_module_events, version) - 0usize];
5823 ["Offset of field: pw_impl_module_events::destroy"]
5824 [::std::mem::offset_of!(pw_impl_module_events, destroy) - 8usize];
5825 ["Offset of field: pw_impl_module_events::free"]
5826 [::std::mem::offset_of!(pw_impl_module_events, free) - 16usize];
5827 ["Offset of field: pw_impl_module_events::initialized"]
5828 [::std::mem::offset_of!(pw_impl_module_events, initialized) - 24usize];
5829 ["Offset of field: pw_impl_module_events::registered"]
5830 [::std::mem::offset_of!(pw_impl_module_events, registered) - 32usize];
5831};
5832unsafe extern "C" {
5833 pub fn pw_context_load_module(
5834 context: *mut pw_context,
5835 name: *const ::std::os::raw::c_char,
5836 args: *const ::std::os::raw::c_char,
5837 properties: *mut pw_properties,
5838 ) -> *mut pw_impl_module;
5839}
5840unsafe extern "C" {
5841 #[doc = " Get the context of a module"]
5842 pub fn pw_impl_module_get_context(module: *mut pw_impl_module) -> *mut pw_context;
5843}
5844unsafe extern "C" {
5845 #[doc = " Get the global of a module"]
5846 pub fn pw_impl_module_get_global(module: *mut pw_impl_module) -> *mut pw_global;
5847}
5848unsafe extern "C" {
5849 #[doc = " Get the module properties"]
5850 pub fn pw_impl_module_get_properties(module: *mut pw_impl_module) -> *const pw_properties;
5851}
5852unsafe extern "C" {
5853 #[doc = " Update the module properties"]
5854 pub fn pw_impl_module_update_properties(
5855 module: *mut pw_impl_module,
5856 dict: *const spa_dict,
5857 ) -> ::std::os::raw::c_int;
5858}
5859unsafe extern "C" {
5860 #[doc = " Get the module info"]
5861 pub fn pw_impl_module_get_info(module: *mut pw_impl_module) -> *const pw_module_info;
5862}
5863unsafe extern "C" {
5864 #[doc = " Add an event listener to a module"]
5865 pub fn pw_impl_module_add_listener(
5866 module: *mut pw_impl_module,
5867 listener: *mut spa_hook,
5868 events: *const pw_impl_module_events,
5869 data: *mut ::std::os::raw::c_void,
5870 );
5871}
5872unsafe extern "C" {
5873 #[doc = " Destroy a module"]
5874 pub fn pw_impl_module_destroy(module: *mut pw_impl_module);
5875}
5876unsafe extern "C" {
5877 #[doc = " Schedule a destroy later on the main thread"]
5878 pub fn pw_impl_module_schedule_destroy(module: *mut pw_impl_module);
5879}
5880#[doc = " Node events, listen to them with \\ref pw_impl_node_add_listener"]
5881#[repr(C)]
5882#[derive(Debug, Copy, Clone)]
5883pub struct pw_impl_node_events {
5884 pub version: u32,
5885 #[doc = " the node is destroyed"]
5886 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5887 #[doc = " the node is about to be freed"]
5888 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5889 #[doc = " the node is initialized"]
5890 pub initialized: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
5891 #[doc = " a port is being initialized on the node"]
5892 pub port_init: ::std::option::Option<
5893 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, port: *mut pw_impl_port),
5894 >,
5895 #[doc = " a port was added"]
5896 pub port_added: ::std::option::Option<
5897 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, port: *mut pw_impl_port),
5898 >,
5899 #[doc = " a port was removed"]
5900 pub port_removed: ::std::option::Option<
5901 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, port: *mut pw_impl_port),
5902 >,
5903 #[doc = " the node info changed"]
5904 pub info_changed: ::std::option::Option<
5905 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_node_info),
5906 >,
5907 #[doc = " a port on the node changed info"]
5908 pub port_info_changed: ::std::option::Option<
5909 unsafe extern "C" fn(
5910 data: *mut ::std::os::raw::c_void,
5911 port: *mut pw_impl_port,
5912 info: *const pw_port_info,
5913 ),
5914 >,
5915 #[doc = " the node active state changed"]
5916 pub active_changed: ::std::option::Option<
5917 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, active: bool),
5918 >,
5919 #[doc = " a new state is requested on the node"]
5920 pub state_request: ::std::option::Option<
5921 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, state: pw_node_state),
5922 >,
5923 #[doc = " the state of the node changed"]
5924 pub state_changed: ::std::option::Option<
5925 unsafe extern "C" fn(
5926 data: *mut ::std::os::raw::c_void,
5927 old: pw_node_state,
5928 state: pw_node_state,
5929 error: *const ::std::os::raw::c_char,
5930 ),
5931 >,
5932 #[doc = " a result was received"]
5933 pub result: ::std::option::Option<
5934 unsafe extern "C" fn(
5935 data: *mut ::std::os::raw::c_void,
5936 seq: ::std::os::raw::c_int,
5937 res: ::std::os::raw::c_int,
5938 type_: u32,
5939 result: *const ::std::os::raw::c_void,
5940 ),
5941 >,
5942 #[doc = " an event is emitted"]
5943 pub event: ::std::option::Option<
5944 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, event: *const spa_event),
5945 >,
5946 #[doc = " the driver of the node changed"]
5947 pub driver_changed: ::std::option::Option<
5948 unsafe extern "C" fn(
5949 data: *mut ::std::os::raw::c_void,
5950 old: *mut pw_impl_node,
5951 driver: *mut pw_impl_node,
5952 ),
5953 >,
5954 #[doc = " a peer was added"]
5955 pub peer_added: ::std::option::Option<
5956 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, peer: *mut pw_impl_node),
5957 >,
5958 #[doc = " a peer was removed"]
5959 pub peer_removed: ::std::option::Option<
5960 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, peer: *mut pw_impl_node),
5961 >,
5962}
5963#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5964const _: () = {
5965 ["Size of pw_impl_node_events"][::std::mem::size_of::<pw_impl_node_events>() - 136usize];
5966 ["Alignment of pw_impl_node_events"][::std::mem::align_of::<pw_impl_node_events>() - 8usize];
5967 ["Offset of field: pw_impl_node_events::version"]
5968 [::std::mem::offset_of!(pw_impl_node_events, version) - 0usize];
5969 ["Offset of field: pw_impl_node_events::destroy"]
5970 [::std::mem::offset_of!(pw_impl_node_events, destroy) - 8usize];
5971 ["Offset of field: pw_impl_node_events::free"]
5972 [::std::mem::offset_of!(pw_impl_node_events, free) - 16usize];
5973 ["Offset of field: pw_impl_node_events::initialized"]
5974 [::std::mem::offset_of!(pw_impl_node_events, initialized) - 24usize];
5975 ["Offset of field: pw_impl_node_events::port_init"]
5976 [::std::mem::offset_of!(pw_impl_node_events, port_init) - 32usize];
5977 ["Offset of field: pw_impl_node_events::port_added"]
5978 [::std::mem::offset_of!(pw_impl_node_events, port_added) - 40usize];
5979 ["Offset of field: pw_impl_node_events::port_removed"]
5980 [::std::mem::offset_of!(pw_impl_node_events, port_removed) - 48usize];
5981 ["Offset of field: pw_impl_node_events::info_changed"]
5982 [::std::mem::offset_of!(pw_impl_node_events, info_changed) - 56usize];
5983 ["Offset of field: pw_impl_node_events::port_info_changed"]
5984 [::std::mem::offset_of!(pw_impl_node_events, port_info_changed) - 64usize];
5985 ["Offset of field: pw_impl_node_events::active_changed"]
5986 [::std::mem::offset_of!(pw_impl_node_events, active_changed) - 72usize];
5987 ["Offset of field: pw_impl_node_events::state_request"]
5988 [::std::mem::offset_of!(pw_impl_node_events, state_request) - 80usize];
5989 ["Offset of field: pw_impl_node_events::state_changed"]
5990 [::std::mem::offset_of!(pw_impl_node_events, state_changed) - 88usize];
5991 ["Offset of field: pw_impl_node_events::result"]
5992 [::std::mem::offset_of!(pw_impl_node_events, result) - 96usize];
5993 ["Offset of field: pw_impl_node_events::event"]
5994 [::std::mem::offset_of!(pw_impl_node_events, event) - 104usize];
5995 ["Offset of field: pw_impl_node_events::driver_changed"]
5996 [::std::mem::offset_of!(pw_impl_node_events, driver_changed) - 112usize];
5997 ["Offset of field: pw_impl_node_events::peer_added"]
5998 [::std::mem::offset_of!(pw_impl_node_events, peer_added) - 120usize];
5999 ["Offset of field: pw_impl_node_events::peer_removed"]
6000 [::std::mem::offset_of!(pw_impl_node_events, peer_removed) - 128usize];
6001};
6002#[repr(C)]
6003#[derive(Debug, Copy, Clone)]
6004pub struct pw_impl_node_rt_events {
6005 pub version: u32,
6006 #[doc = " the node is drained"]
6007 pub drained: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6008 #[doc = " the node had an xrun"]
6009 pub xrun: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6010 #[doc = " the driver node starts processing"]
6011 pub start: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6012 #[doc = " the driver node completed processing"]
6013 pub complete: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6014 #[doc = " the driver node did not complete processing"]
6015 pub incomplete: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6016 #[doc = " the node had a timeout"]
6017 pub timeout: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6018}
6019#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6020const _: () = {
6021 ["Size of pw_impl_node_rt_events"][::std::mem::size_of::<pw_impl_node_rt_events>() - 56usize];
6022 ["Alignment of pw_impl_node_rt_events"]
6023 [::std::mem::align_of::<pw_impl_node_rt_events>() - 8usize];
6024 ["Offset of field: pw_impl_node_rt_events::version"]
6025 [::std::mem::offset_of!(pw_impl_node_rt_events, version) - 0usize];
6026 ["Offset of field: pw_impl_node_rt_events::drained"]
6027 [::std::mem::offset_of!(pw_impl_node_rt_events, drained) - 8usize];
6028 ["Offset of field: pw_impl_node_rt_events::xrun"]
6029 [::std::mem::offset_of!(pw_impl_node_rt_events, xrun) - 16usize];
6030 ["Offset of field: pw_impl_node_rt_events::start"]
6031 [::std::mem::offset_of!(pw_impl_node_rt_events, start) - 24usize];
6032 ["Offset of field: pw_impl_node_rt_events::complete"]
6033 [::std::mem::offset_of!(pw_impl_node_rt_events, complete) - 32usize];
6034 ["Offset of field: pw_impl_node_rt_events::incomplete"]
6035 [::std::mem::offset_of!(pw_impl_node_rt_events, incomplete) - 40usize];
6036 ["Offset of field: pw_impl_node_rt_events::timeout"]
6037 [::std::mem::offset_of!(pw_impl_node_rt_events, timeout) - 48usize];
6038};
6039unsafe extern "C" {
6040 #[doc = " Create a new node"]
6041 pub fn pw_context_create_node(
6042 context: *mut pw_context,
6043 properties: *mut pw_properties,
6044 user_data_size: usize,
6045 ) -> *mut pw_impl_node;
6046}
6047unsafe extern "C" {
6048 #[doc = " Complete initialization of the node and register"]
6049 pub fn pw_impl_node_register(
6050 node: *mut pw_impl_node,
6051 properties: *mut pw_properties,
6052 ) -> ::std::os::raw::c_int;
6053}
6054unsafe extern "C" {
6055 #[doc = " Destroy a node"]
6056 pub fn pw_impl_node_destroy(node: *mut pw_impl_node);
6057}
6058unsafe extern "C" {
6059 #[doc = " Get the node info"]
6060 pub fn pw_impl_node_get_info(node: *mut pw_impl_node) -> *const pw_node_info;
6061}
6062unsafe extern "C" {
6063 #[doc = " Get node user_data. The size of the memory was given in \\ref pw_context_create_node"]
6064 pub fn pw_impl_node_get_user_data(node: *mut pw_impl_node) -> *mut ::std::os::raw::c_void;
6065}
6066unsafe extern "C" {
6067 #[doc = " Get the context of this node"]
6068 pub fn pw_impl_node_get_context(node: *mut pw_impl_node) -> *mut pw_context;
6069}
6070unsafe extern "C" {
6071 #[doc = " Get the global of this node"]
6072 pub fn pw_impl_node_get_global(node: *mut pw_impl_node) -> *mut pw_global;
6073}
6074unsafe extern "C" {
6075 #[doc = " Get the node properties"]
6076 pub fn pw_impl_node_get_properties(node: *mut pw_impl_node) -> *const pw_properties;
6077}
6078unsafe extern "C" {
6079 #[doc = " Update the node properties"]
6080 pub fn pw_impl_node_update_properties(
6081 node: *mut pw_impl_node,
6082 dict: *const spa_dict,
6083 ) -> ::std::os::raw::c_int;
6084}
6085unsafe extern "C" {
6086 #[doc = " Set the node implementation"]
6087 pub fn pw_impl_node_set_implementation(
6088 node: *mut pw_impl_node,
6089 spa_node: *mut spa_node,
6090 ) -> ::std::os::raw::c_int;
6091}
6092unsafe extern "C" {
6093 #[doc = " Get the node implementation"]
6094 pub fn pw_impl_node_get_implementation(node: *mut pw_impl_node) -> *mut spa_node;
6095}
6096unsafe extern "C" {
6097 #[doc = " Add an event listener"]
6098 pub fn pw_impl_node_add_listener(
6099 node: *mut pw_impl_node,
6100 listener: *mut spa_hook,
6101 events: *const pw_impl_node_events,
6102 data: *mut ::std::os::raw::c_void,
6103 );
6104}
6105unsafe extern "C" {
6106 #[doc = " Add an rt_event listener"]
6107 pub fn pw_impl_node_add_rt_listener(
6108 node: *mut pw_impl_node,
6109 listener: *mut spa_hook,
6110 events: *const pw_impl_node_rt_events,
6111 data: *mut ::std::os::raw::c_void,
6112 );
6113}
6114unsafe extern "C" {
6115 pub fn pw_impl_node_remove_rt_listener(node: *mut pw_impl_node, listener: *mut spa_hook);
6116}
6117unsafe extern "C" {
6118 #[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."]
6119 pub fn pw_impl_node_for_each_port(
6120 node: *mut pw_impl_node,
6121 direction: spa_direction,
6122 callback: ::std::option::Option<
6123 unsafe extern "C" fn(
6124 data: *mut ::std::os::raw::c_void,
6125 port: *mut pw_impl_port,
6126 ) -> ::std::os::raw::c_int,
6127 >,
6128 data: *mut ::std::os::raw::c_void,
6129 ) -> ::std::os::raw::c_int;
6130}
6131unsafe extern "C" {
6132 pub fn pw_impl_node_for_each_param(
6133 node: *mut pw_impl_node,
6134 seq: ::std::os::raw::c_int,
6135 param_id: u32,
6136 index: u32,
6137 max: u32,
6138 filter: *const spa_pod,
6139 callback: ::std::option::Option<
6140 unsafe extern "C" fn(
6141 data: *mut ::std::os::raw::c_void,
6142 seq: ::std::os::raw::c_int,
6143 id: u32,
6144 index: u32,
6145 next: u32,
6146 param: *mut spa_pod,
6147 ) -> ::std::os::raw::c_int,
6148 >,
6149 data: *mut ::std::os::raw::c_void,
6150 ) -> ::std::os::raw::c_int;
6151}
6152unsafe extern "C" {
6153 #[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."]
6154 pub fn pw_impl_node_find_port(
6155 node: *mut pw_impl_node,
6156 direction: spa_direction,
6157 port_id: u32,
6158 ) -> *mut pw_impl_port;
6159}
6160unsafe extern "C" {
6161 #[doc = " Get a free unused port_id from the node"]
6162 pub fn pw_impl_node_get_free_port_id(node: *mut pw_impl_node, direction: spa_direction) -> u32;
6163}
6164unsafe extern "C" {
6165 pub fn pw_impl_node_initialized(node: *mut pw_impl_node) -> ::std::os::raw::c_int;
6166}
6167unsafe extern "C" {
6168 #[doc = " Set a node active. This will start negotiation with all linked active\n nodes and start data transport"]
6169 pub fn pw_impl_node_set_active(node: *mut pw_impl_node, active: bool) -> ::std::os::raw::c_int;
6170}
6171unsafe extern "C" {
6172 #[doc = " Check if a node is active"]
6173 pub fn pw_impl_node_is_active(node: *mut pw_impl_node) -> bool;
6174}
6175unsafe extern "C" {
6176 #[doc = " Check if a node is active, Since 0.3.39"]
6177 pub fn pw_impl_node_send_command(
6178 node: *mut pw_impl_node,
6179 command: *const spa_command,
6180 ) -> ::std::os::raw::c_int;
6181}
6182unsafe extern "C" {
6183 #[doc = " Set a param on the node, Since 0.3.65"]
6184 pub fn pw_impl_node_set_param(
6185 node: *mut pw_impl_node,
6186 id: u32,
6187 flags: u32,
6188 param: *const spa_pod,
6189 ) -> ::std::os::raw::c_int;
6190}
6191#[doc = "< the port is in error"]
6192pub const pw_impl_port_state_PW_IMPL_PORT_STATE_ERROR: pw_impl_port_state = -1;
6193#[doc = "< the port is being created"]
6194pub const pw_impl_port_state_PW_IMPL_PORT_STATE_INIT: pw_impl_port_state = 0;
6195#[doc = "< the port is ready for format negotiation"]
6196pub const pw_impl_port_state_PW_IMPL_PORT_STATE_CONFIGURE: pw_impl_port_state = 1;
6197#[doc = "< the port is ready for buffer allocation"]
6198pub const pw_impl_port_state_PW_IMPL_PORT_STATE_READY: pw_impl_port_state = 2;
6199#[doc = "< the port is paused"]
6200pub const pw_impl_port_state_PW_IMPL_PORT_STATE_PAUSED: pw_impl_port_state = 3;
6201pub type pw_impl_port_state = ::std::os::raw::c_int;
6202#[doc = " Port events, use \\ref pw_impl_port_add_listener"]
6203#[repr(C)]
6204#[derive(Debug, Copy, Clone)]
6205pub struct pw_impl_port_events {
6206 pub version: u32,
6207 #[doc = " The port is destroyed"]
6208 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6209 #[doc = " The port is freed"]
6210 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6211 #[doc = " The port is initialized"]
6212 pub initialized: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6213 #[doc = " the port info changed"]
6214 pub info_changed: ::std::option::Option<
6215 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_port_info),
6216 >,
6217 #[doc = " a new link is added on this port"]
6218 pub link_added: ::std::option::Option<
6219 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, link: *mut pw_impl_link),
6220 >,
6221 #[doc = " a link is removed from this port"]
6222 pub link_removed: ::std::option::Option<
6223 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, link: *mut pw_impl_link),
6224 >,
6225 #[doc = " the state of the port changed"]
6226 pub state_changed: ::std::option::Option<
6227 unsafe extern "C" fn(
6228 data: *mut ::std::os::raw::c_void,
6229 old: pw_impl_port_state,
6230 state: pw_impl_port_state,
6231 error: *const ::std::os::raw::c_char,
6232 ),
6233 >,
6234 #[doc = " a control was added to the port"]
6235 pub control_added: ::std::option::Option<
6236 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, control: *mut pw_control),
6237 >,
6238 #[doc = " a control was removed from the port"]
6239 pub control_removed: ::std::option::Option<
6240 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, control: *mut pw_control),
6241 >,
6242 #[doc = " a parameter changed, since version 1"]
6243 pub param_changed:
6244 ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, id: u32)>,
6245 #[doc = " latency changed. Since version 2"]
6246 pub latency_changed:
6247 ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6248 #[doc = " tag changed. Since version 3"]
6249 pub tag_changed: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6250}
6251#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6252const _: () = {
6253 ["Size of pw_impl_port_events"][::std::mem::size_of::<pw_impl_port_events>() - 104usize];
6254 ["Alignment of pw_impl_port_events"][::std::mem::align_of::<pw_impl_port_events>() - 8usize];
6255 ["Offset of field: pw_impl_port_events::version"]
6256 [::std::mem::offset_of!(pw_impl_port_events, version) - 0usize];
6257 ["Offset of field: pw_impl_port_events::destroy"]
6258 [::std::mem::offset_of!(pw_impl_port_events, destroy) - 8usize];
6259 ["Offset of field: pw_impl_port_events::free"]
6260 [::std::mem::offset_of!(pw_impl_port_events, free) - 16usize];
6261 ["Offset of field: pw_impl_port_events::initialized"]
6262 [::std::mem::offset_of!(pw_impl_port_events, initialized) - 24usize];
6263 ["Offset of field: pw_impl_port_events::info_changed"]
6264 [::std::mem::offset_of!(pw_impl_port_events, info_changed) - 32usize];
6265 ["Offset of field: pw_impl_port_events::link_added"]
6266 [::std::mem::offset_of!(pw_impl_port_events, link_added) - 40usize];
6267 ["Offset of field: pw_impl_port_events::link_removed"]
6268 [::std::mem::offset_of!(pw_impl_port_events, link_removed) - 48usize];
6269 ["Offset of field: pw_impl_port_events::state_changed"]
6270 [::std::mem::offset_of!(pw_impl_port_events, state_changed) - 56usize];
6271 ["Offset of field: pw_impl_port_events::control_added"]
6272 [::std::mem::offset_of!(pw_impl_port_events, control_added) - 64usize];
6273 ["Offset of field: pw_impl_port_events::control_removed"]
6274 [::std::mem::offset_of!(pw_impl_port_events, control_removed) - 72usize];
6275 ["Offset of field: pw_impl_port_events::param_changed"]
6276 [::std::mem::offset_of!(pw_impl_port_events, param_changed) - 80usize];
6277 ["Offset of field: pw_impl_port_events::latency_changed"]
6278 [::std::mem::offset_of!(pw_impl_port_events, latency_changed) - 88usize];
6279 ["Offset of field: pw_impl_port_events::tag_changed"]
6280 [::std::mem::offset_of!(pw_impl_port_events, tag_changed) - 96usize];
6281};
6282unsafe extern "C" {
6283 #[doc = " Create a new port\n \\return a newly allocated port"]
6284 pub fn pw_context_create_port(
6285 context: *mut pw_context,
6286 direction: spa_direction,
6287 port_id: u32,
6288 info: *const spa_port_info,
6289 user_data_size: usize,
6290 ) -> *mut pw_impl_port;
6291}
6292unsafe extern "C" {
6293 #[doc = " Get the port direction"]
6294 pub fn pw_impl_port_get_direction(port: *mut pw_impl_port) -> spa_direction;
6295}
6296unsafe extern "C" {
6297 #[doc = " Get the port properties"]
6298 pub fn pw_impl_port_get_properties(port: *mut pw_impl_port) -> *const pw_properties;
6299}
6300unsafe extern "C" {
6301 #[doc = " Update the port properties"]
6302 pub fn pw_impl_port_update_properties(
6303 port: *mut pw_impl_port,
6304 dict: *const spa_dict,
6305 ) -> ::std::os::raw::c_int;
6306}
6307unsafe extern "C" {
6308 #[doc = " Get the port info"]
6309 pub fn pw_impl_port_get_info(port: *mut pw_impl_port) -> *const pw_port_info;
6310}
6311unsafe extern "C" {
6312 #[doc = " Get the port id"]
6313 pub fn pw_impl_port_get_id(port: *mut pw_impl_port) -> u32;
6314}
6315unsafe extern "C" {
6316 #[doc = " Get the port state as a string"]
6317 pub fn pw_impl_port_state_as_string(state: pw_impl_port_state)
6318 -> *const ::std::os::raw::c_char;
6319}
6320unsafe extern "C" {
6321 #[doc = " Get the port parent node or NULL when not yet set"]
6322 pub fn pw_impl_port_get_node(port: *mut pw_impl_port) -> *mut pw_impl_node;
6323}
6324unsafe extern "C" {
6325 #[doc = " check is a port has links, return 0 if not, 1 if it is linked"]
6326 pub fn pw_impl_port_is_linked(port: *mut pw_impl_port) -> ::std::os::raw::c_int;
6327}
6328unsafe extern "C" {
6329 #[doc = " Add a port to a node"]
6330 pub fn pw_impl_port_add(
6331 port: *mut pw_impl_port,
6332 node: *mut pw_impl_node,
6333 ) -> ::std::os::raw::c_int;
6334}
6335unsafe extern "C" {
6336 #[doc = " Add an event listener on the port"]
6337 pub fn pw_impl_port_add_listener(
6338 port: *mut pw_impl_port,
6339 listener: *mut spa_hook,
6340 events: *const pw_impl_port_events,
6341 data: *mut ::std::os::raw::c_void,
6342 );
6343}
6344pub type pw_work_func_t = ::std::option::Option<
6345 unsafe extern "C" fn(
6346 obj: *mut ::std::os::raw::c_void,
6347 data: *mut ::std::os::raw::c_void,
6348 res: ::std::os::raw::c_int,
6349 id: u32,
6350 ),
6351>;
6352unsafe extern "C" {
6353 pub fn pw_work_queue_new(loop_: *mut pw_loop) -> *mut pw_work_queue;
6354}
6355unsafe extern "C" {
6356 pub fn pw_work_queue_destroy(queue: *mut pw_work_queue);
6357}
6358unsafe extern "C" {
6359 pub fn pw_work_queue_add(
6360 queue: *mut pw_work_queue,
6361 obj: *mut ::std::os::raw::c_void,
6362 res: ::std::os::raw::c_int,
6363 func: pw_work_func_t,
6364 data: *mut ::std::os::raw::c_void,
6365 ) -> u32;
6366}
6367unsafe extern "C" {
6368 pub fn pw_work_queue_cancel(
6369 queue: *mut pw_work_queue,
6370 obj: *mut ::std::os::raw::c_void,
6371 id: u32,
6372 ) -> ::std::os::raw::c_int;
6373}
6374unsafe extern "C" {
6375 pub fn pw_work_queue_complete(
6376 queue: *mut pw_work_queue,
6377 obj: *mut ::std::os::raw::c_void,
6378 seq: u32,
6379 res: ::std::os::raw::c_int,
6380 ) -> ::std::os::raw::c_int;
6381}
6382pub type pw_global_bind_func_t = ::std::option::Option<
6383 unsafe extern "C" fn(
6384 object: *mut ::std::os::raw::c_void,
6385 client: *mut pw_impl_client,
6386 permissions: u32,
6387 version: u32,
6388 id: u32,
6389 ) -> ::std::os::raw::c_int,
6390>;
6391#[doc = " Global events, use \\ref pw_global_add_listener"]
6392#[repr(C)]
6393#[derive(Debug, Copy, Clone)]
6394pub struct pw_global_events {
6395 pub version: u32,
6396 #[doc = " The global is destroyed"]
6397 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6398 #[doc = " The global is freed"]
6399 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6400 #[doc = " The permissions changed for a client"]
6401 pub permissions_changed: ::std::option::Option<
6402 unsafe extern "C" fn(
6403 data: *mut ::std::os::raw::c_void,
6404 client: *mut pw_impl_client,
6405 old_permissions: u32,
6406 new_permissions: u32,
6407 ),
6408 >,
6409}
6410#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6411const _: () = {
6412 ["Size of pw_global_events"][::std::mem::size_of::<pw_global_events>() - 32usize];
6413 ["Alignment of pw_global_events"][::std::mem::align_of::<pw_global_events>() - 8usize];
6414 ["Offset of field: pw_global_events::version"]
6415 [::std::mem::offset_of!(pw_global_events, version) - 0usize];
6416 ["Offset of field: pw_global_events::destroy"]
6417 [::std::mem::offset_of!(pw_global_events, destroy) - 8usize];
6418 ["Offset of field: pw_global_events::free"]
6419 [::std::mem::offset_of!(pw_global_events, free) - 16usize];
6420 ["Offset of field: pw_global_events::permissions_changed"]
6421 [::std::mem::offset_of!(pw_global_events, permissions_changed) - 24usize];
6422};
6423unsafe extern "C" {
6424 #[doc = " Create a new global object"]
6425 pub fn pw_global_new(
6426 context: *mut pw_context,
6427 type_: *const ::std::os::raw::c_char,
6428 version: u32,
6429 permission_mask: u32,
6430 properties: *mut pw_properties,
6431 func: pw_global_bind_func_t,
6432 object: *mut ::std::os::raw::c_void,
6433 ) -> *mut pw_global;
6434}
6435unsafe extern "C" {
6436 #[doc = " Register a global object to the context registry"]
6437 pub fn pw_global_register(global: *mut pw_global) -> ::std::os::raw::c_int;
6438}
6439unsafe extern "C" {
6440 #[doc = " Add an event listener on the global"]
6441 pub fn pw_global_add_listener(
6442 global: *mut pw_global,
6443 listener: *mut spa_hook,
6444 events: *const pw_global_events,
6445 data: *mut ::std::os::raw::c_void,
6446 );
6447}
6448unsafe extern "C" {
6449 #[doc = " Get the permissions of the global for a given client"]
6450 pub fn pw_global_get_permissions(global: *mut pw_global, client: *mut pw_impl_client) -> u32;
6451}
6452unsafe extern "C" {
6453 #[doc = " Get the context object of this global"]
6454 pub fn pw_global_get_context(global: *mut pw_global) -> *mut pw_context;
6455}
6456unsafe extern "C" {
6457 #[doc = " Get the global type"]
6458 pub fn pw_global_get_type(global: *mut pw_global) -> *const ::std::os::raw::c_char;
6459}
6460unsafe extern "C" {
6461 #[doc = " Check a global type"]
6462 pub fn pw_global_is_type(global: *mut pw_global, type_: *const ::std::os::raw::c_char) -> bool;
6463}
6464unsafe extern "C" {
6465 #[doc = " Get the global version"]
6466 pub fn pw_global_get_version(global: *mut pw_global) -> u32;
6467}
6468unsafe extern "C" {
6469 #[doc = " Get the global properties"]
6470 pub fn pw_global_get_properties(global: *mut pw_global) -> *const pw_properties;
6471}
6472unsafe extern "C" {
6473 #[doc = " Update the global properties, must be done when unregistered"]
6474 pub fn pw_global_update_keys(
6475 global: *mut pw_global,
6476 dict: *const spa_dict,
6477 keys: *const *const ::std::os::raw::c_char,
6478 ) -> ::std::os::raw::c_int;
6479}
6480unsafe extern "C" {
6481 #[doc = " Get the object associated with the global. This depends on the type of the\n global"]
6482 pub fn pw_global_get_object(global: *mut pw_global) -> *mut ::std::os::raw::c_void;
6483}
6484unsafe extern "C" {
6485 #[doc = " Get the unique id of the global"]
6486 pub fn pw_global_get_id(global: *mut pw_global) -> u32;
6487}
6488unsafe extern "C" {
6489 #[doc = " Get the serial number of the global"]
6490 pub fn pw_global_get_serial(global: *mut pw_global) -> u64;
6491}
6492unsafe extern "C" {
6493 #[doc = " Add a resource to a global"]
6494 pub fn pw_global_add_resource(
6495 global: *mut pw_global,
6496 resource: *mut pw_resource,
6497 ) -> ::std::os::raw::c_int;
6498}
6499unsafe extern "C" {
6500 #[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."]
6501 pub fn pw_global_for_each_resource(
6502 global: *mut pw_global,
6503 callback: ::std::option::Option<
6504 unsafe extern "C" fn(
6505 data: *mut ::std::os::raw::c_void,
6506 resource: *mut pw_resource,
6507 ) -> ::std::os::raw::c_int,
6508 >,
6509 data: *mut ::std::os::raw::c_void,
6510 ) -> ::std::os::raw::c_int;
6511}
6512unsafe extern "C" {
6513 #[doc = " Let a client bind to a global"]
6514 pub fn pw_global_bind(
6515 global: *mut pw_global,
6516 client: *mut pw_impl_client,
6517 permissions: u32,
6518 version: u32,
6519 id: u32,
6520 ) -> ::std::os::raw::c_int;
6521}
6522unsafe extern "C" {
6523 pub fn pw_global_update_permissions(
6524 global: *mut pw_global,
6525 client: *mut pw_impl_client,
6526 old_permissions: u32,
6527 new_permissions: u32,
6528 ) -> ::std::os::raw::c_int;
6529}
6530unsafe extern "C" {
6531 #[doc = " Destroy a global"]
6532 pub fn pw_global_destroy(global: *mut pw_global);
6533}
6534#[doc = " The events that a client can emit"]
6535#[repr(C)]
6536#[derive(Debug, Copy, Clone)]
6537pub struct pw_impl_client_events {
6538 pub version: u32,
6539 #[doc = " emitted when the client is destroyed"]
6540 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6541 #[doc = " emitted right before the client is freed"]
6542 pub free: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6543 #[doc = " the client is initialized"]
6544 pub initialized: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6545 #[doc = " emitted when the client info changed"]
6546 pub info_changed: ::std::option::Option<
6547 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_client_info),
6548 >,
6549 #[doc = " emitted when a new resource is added for client"]
6550 pub resource_added: ::std::option::Option<
6551 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, resource: *mut pw_resource),
6552 >,
6553 #[doc = " emitted when a resource is removed"]
6554 pub resource_removed: ::std::option::Option<
6555 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, resource: *mut pw_resource),
6556 >,
6557 #[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"]
6558 pub busy_changed:
6559 ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, busy: bool)>,
6560}
6561#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6562const _: () = {
6563 ["Size of pw_impl_client_events"][::std::mem::size_of::<pw_impl_client_events>() - 64usize];
6564 ["Alignment of pw_impl_client_events"]
6565 [::std::mem::align_of::<pw_impl_client_events>() - 8usize];
6566 ["Offset of field: pw_impl_client_events::version"]
6567 [::std::mem::offset_of!(pw_impl_client_events, version) - 0usize];
6568 ["Offset of field: pw_impl_client_events::destroy"]
6569 [::std::mem::offset_of!(pw_impl_client_events, destroy) - 8usize];
6570 ["Offset of field: pw_impl_client_events::free"]
6571 [::std::mem::offset_of!(pw_impl_client_events, free) - 16usize];
6572 ["Offset of field: pw_impl_client_events::initialized"]
6573 [::std::mem::offset_of!(pw_impl_client_events, initialized) - 24usize];
6574 ["Offset of field: pw_impl_client_events::info_changed"]
6575 [::std::mem::offset_of!(pw_impl_client_events, info_changed) - 32usize];
6576 ["Offset of field: pw_impl_client_events::resource_added"]
6577 [::std::mem::offset_of!(pw_impl_client_events, resource_added) - 40usize];
6578 ["Offset of field: pw_impl_client_events::resource_removed"]
6579 [::std::mem::offset_of!(pw_impl_client_events, resource_removed) - 48usize];
6580 ["Offset of field: pw_impl_client_events::busy_changed"]
6581 [::std::mem::offset_of!(pw_impl_client_events, busy_changed) - 56usize];
6582};
6583unsafe extern "C" {
6584 #[doc = " Create a new client. This is mainly used by protocols."]
6585 pub fn pw_context_create_client(
6586 core: *mut pw_impl_core,
6587 protocol: *mut pw_protocol,
6588 properties: *mut pw_properties,
6589 user_data_size: usize,
6590 ) -> *mut pw_impl_client;
6591}
6592unsafe extern "C" {
6593 #[doc = " Destroy a previously created client"]
6594 pub fn pw_impl_client_destroy(client: *mut pw_impl_client);
6595}
6596unsafe extern "C" {
6597 #[doc = " Finish configuration and register a client"]
6598 pub fn pw_impl_client_register(
6599 client: *mut pw_impl_client,
6600 properties: *mut pw_properties,
6601 ) -> ::std::os::raw::c_int;
6602}
6603unsafe extern "C" {
6604 #[doc = " Get the client user data"]
6605 pub fn pw_impl_client_get_user_data(client: *mut pw_impl_client)
6606 -> *mut ::std::os::raw::c_void;
6607}
6608unsafe extern "C" {
6609 #[doc = " Get the client information"]
6610 pub fn pw_impl_client_get_info(client: *mut pw_impl_client) -> *const pw_client_info;
6611}
6612unsafe extern "C" {
6613 #[doc = " Update the client properties"]
6614 pub fn pw_impl_client_update_properties(
6615 client: *mut pw_impl_client,
6616 dict: *const spa_dict,
6617 ) -> ::std::os::raw::c_int;
6618}
6619unsafe extern "C" {
6620 #[doc = " Update the client permissions"]
6621 pub fn pw_impl_client_update_permissions(
6622 client: *mut pw_impl_client,
6623 n_permissions: u32,
6624 permissions: *const pw_permission,
6625 ) -> ::std::os::raw::c_int;
6626}
6627unsafe extern "C" {
6628 #[doc = " check if a client has permissions for global_id, Since 0.3.9"]
6629 pub fn pw_impl_client_check_permissions(
6630 client: *mut pw_impl_client,
6631 global_id: u32,
6632 permissions: u32,
6633 ) -> ::std::os::raw::c_int;
6634}
6635unsafe extern "C" {
6636 #[doc = " Get the client properties"]
6637 pub fn pw_impl_client_get_properties(client: *mut pw_impl_client) -> *const pw_properties;
6638}
6639unsafe extern "C" {
6640 #[doc = " Get the context used to create this client"]
6641 pub fn pw_impl_client_get_context(client: *mut pw_impl_client) -> *mut pw_context;
6642}
6643unsafe extern "C" {
6644 #[doc = " Get the protocol used to create this client"]
6645 pub fn pw_impl_client_get_protocol(client: *mut pw_impl_client) -> *mut pw_protocol;
6646}
6647unsafe extern "C" {
6648 #[doc = " Get the client core resource"]
6649 pub fn pw_impl_client_get_core_resource(client: *mut pw_impl_client) -> *mut pw_resource;
6650}
6651unsafe extern "C" {
6652 #[doc = " Get a resource with the given id"]
6653 pub fn pw_impl_client_find_resource(client: *mut pw_impl_client, id: u32) -> *mut pw_resource;
6654}
6655unsafe extern "C" {
6656 #[doc = " Get the global associated with this client"]
6657 pub fn pw_impl_client_get_global(client: *mut pw_impl_client) -> *mut pw_global;
6658}
6659unsafe extern "C" {
6660 #[doc = " Get the mempool associated with this client, Since 0.3.74"]
6661 pub fn pw_impl_client_get_mempool(client: *mut pw_impl_client) -> *mut pw_mempool;
6662}
6663unsafe extern "C" {
6664 #[doc = " listen to events from this client"]
6665 pub fn pw_impl_client_add_listener(
6666 client: *mut pw_impl_client,
6667 listener: *mut spa_hook,
6668 events: *const pw_impl_client_events,
6669 data: *mut ::std::os::raw::c_void,
6670 );
6671}
6672unsafe extern "C" {
6673 #[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"]
6674 pub fn pw_impl_client_set_busy(client: *mut pw_impl_client, busy: bool);
6675}
6676#[doc = " Resource events"]
6677#[repr(C)]
6678#[derive(Debug, Copy, Clone)]
6679pub struct pw_resource_events {
6680 pub version: u32,
6681 #[doc = " The resource is destroyed"]
6682 pub destroy: ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void)>,
6683 #[doc = " a reply to a ping event completed"]
6684 pub pong: ::std::option::Option<
6685 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, seq: ::std::os::raw::c_int),
6686 >,
6687 #[doc = " an error occurred on the resource"]
6688 pub error: ::std::option::Option<
6689 unsafe extern "C" fn(
6690 data: *mut ::std::os::raw::c_void,
6691 seq: ::std::os::raw::c_int,
6692 res: ::std::os::raw::c_int,
6693 message: *const ::std::os::raw::c_char,
6694 ),
6695 >,
6696}
6697#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6698const _: () = {
6699 ["Size of pw_resource_events"][::std::mem::size_of::<pw_resource_events>() - 32usize];
6700 ["Alignment of pw_resource_events"][::std::mem::align_of::<pw_resource_events>() - 8usize];
6701 ["Offset of field: pw_resource_events::version"]
6702 [::std::mem::offset_of!(pw_resource_events, version) - 0usize];
6703 ["Offset of field: pw_resource_events::destroy"]
6704 [::std::mem::offset_of!(pw_resource_events, destroy) - 8usize];
6705 ["Offset of field: pw_resource_events::pong"]
6706 [::std::mem::offset_of!(pw_resource_events, pong) - 16usize];
6707 ["Offset of field: pw_resource_events::error"]
6708 [::std::mem::offset_of!(pw_resource_events, error) - 24usize];
6709};
6710unsafe extern "C" {
6711 #[doc = " Make a new resource for client"]
6712 pub fn pw_resource_new(
6713 client: *mut pw_impl_client,
6714 id: u32,
6715 permissions: u32,
6716 type_: *const ::std::os::raw::c_char,
6717 version: u32,
6718 user_data_size: usize,
6719 ) -> *mut pw_resource;
6720}
6721unsafe extern "C" {
6722 #[doc = " Destroy a resource"]
6723 pub fn pw_resource_destroy(resource: *mut pw_resource);
6724}
6725unsafe extern "C" {
6726 #[doc = " Remove a resource, like pw_resource_destroy but without sending a\n remove_id message to the client"]
6727 pub fn pw_resource_remove(resource: *mut pw_resource);
6728}
6729unsafe extern "C" {
6730 #[doc = " Get the client owning this resource"]
6731 pub fn pw_resource_get_client(resource: *mut pw_resource) -> *mut pw_impl_client;
6732}
6733unsafe extern "C" {
6734 #[doc = " Get the unique id of this resource"]
6735 pub fn pw_resource_get_id(resource: *mut pw_resource) -> u32;
6736}
6737unsafe extern "C" {
6738 #[doc = " Get the permissions of this resource"]
6739 pub fn pw_resource_get_permissions(resource: *mut pw_resource) -> u32;
6740}
6741unsafe extern "C" {
6742 #[doc = " Get the type and optionally the version of this resource"]
6743 pub fn pw_resource_get_type(
6744 resource: *mut pw_resource,
6745 version: *mut u32,
6746 ) -> *const ::std::os::raw::c_char;
6747}
6748unsafe extern "C" {
6749 #[doc = " Get the protocol used for this resource"]
6750 pub fn pw_resource_get_protocol(resource: *mut pw_resource) -> *mut pw_protocol;
6751}
6752unsafe extern "C" {
6753 #[doc = " Get the user data for the resource, the size was given in \\ref pw_resource_new"]
6754 pub fn pw_resource_get_user_data(resource: *mut pw_resource) -> *mut ::std::os::raw::c_void;
6755}
6756unsafe extern "C" {
6757 #[doc = " Add an event listener"]
6758 pub fn pw_resource_add_listener(
6759 resource: *mut pw_resource,
6760 listener: *mut spa_hook,
6761 events: *const pw_resource_events,
6762 data: *mut ::std::os::raw::c_void,
6763 );
6764}
6765unsafe extern "C" {
6766 #[doc = " Set the resource implementation."]
6767 pub fn pw_resource_add_object_listener(
6768 resource: *mut pw_resource,
6769 listener: *mut spa_hook,
6770 funcs: *const ::std::os::raw::c_void,
6771 data: *mut ::std::os::raw::c_void,
6772 );
6773}
6774unsafe extern "C" {
6775 #[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."]
6776 pub fn pw_resource_ping(
6777 resource: *mut pw_resource,
6778 seq: ::std::os::raw::c_int,
6779 ) -> ::std::os::raw::c_int;
6780}
6781unsafe extern "C" {
6782 #[doc = " ref/unref a resource, Since 0.3.52"]
6783 pub fn pw_resource_ref(resource: *mut pw_resource);
6784}
6785unsafe extern "C" {
6786 pub fn pw_resource_unref(resource: *mut pw_resource);
6787}
6788unsafe extern "C" {
6789 #[doc = " Notify global id this resource is bound to"]
6790 pub fn pw_resource_set_bound_id(
6791 resource: *mut pw_resource,
6792 global_id: u32,
6793 ) -> ::std::os::raw::c_int;
6794}
6795unsafe extern "C" {
6796 #[doc = " Get the global id this resource is bound to or SPA_ID_INVALID when not bound"]
6797 pub fn pw_resource_get_bound_id(resource: *mut pw_resource) -> u32;
6798}
6799unsafe extern "C" {
6800 #[doc = " Generate an error for a resource"]
6801 pub fn pw_resource_error(
6802 resource: *mut pw_resource,
6803 res: ::std::os::raw::c_int,
6804 error: *const ::std::os::raw::c_char,
6805 );
6806}
6807unsafe extern "C" {
6808 pub fn pw_resource_errorf(
6809 resource: *mut pw_resource,
6810 res: ::std::os::raw::c_int,
6811 error: *const ::std::os::raw::c_char,
6812 ...
6813 );
6814}
6815unsafe extern "C" {
6816 pub fn pw_resource_errorf_id(
6817 resource: *mut pw_resource,
6818 id: u32,
6819 res: ::std::os::raw::c_int,
6820 error: *const ::std::os::raw::c_char,
6821 ...
6822 );
6823}
6824unsafe extern "C" {
6825 #[doc = " Get the list of object listeners from a resource"]
6826 pub fn pw_resource_get_object_listeners(resource: *mut pw_resource) -> *mut spa_hook_list;
6827}
6828unsafe extern "C" {
6829 #[doc = " Get the marshal functions for the resource"]
6830 pub fn pw_resource_get_marshal(resource: *mut pw_resource) -> *const pw_protocol_marshal;
6831}
6832unsafe extern "C" {
6833 #[doc = " install a marshal function on a resource"]
6834 pub fn pw_resource_install_marshal(
6835 resource: *mut pw_resource,
6836 implementor: bool,
6837 ) -> ::std::os::raw::c_int;
6838}
6839#[repr(C)]
6840#[derive(Debug, Copy, Clone)]
6841pub struct pw_protocol_native_message {
6842 pub id: u32,
6843 pub opcode: u32,
6844 pub data: *mut ::std::os::raw::c_void,
6845 pub size: u32,
6846 pub n_fds: u32,
6847 pub fds: *mut ::std::os::raw::c_int,
6848 pub seq: ::std::os::raw::c_int,
6849}
6850#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6851const _: () = {
6852 ["Size of pw_protocol_native_message"]
6853 [::std::mem::size_of::<pw_protocol_native_message>() - 40usize];
6854 ["Alignment of pw_protocol_native_message"]
6855 [::std::mem::align_of::<pw_protocol_native_message>() - 8usize];
6856 ["Offset of field: pw_protocol_native_message::id"]
6857 [::std::mem::offset_of!(pw_protocol_native_message, id) - 0usize];
6858 ["Offset of field: pw_protocol_native_message::opcode"]
6859 [::std::mem::offset_of!(pw_protocol_native_message, opcode) - 4usize];
6860 ["Offset of field: pw_protocol_native_message::data"]
6861 [::std::mem::offset_of!(pw_protocol_native_message, data) - 8usize];
6862 ["Offset of field: pw_protocol_native_message::size"]
6863 [::std::mem::offset_of!(pw_protocol_native_message, size) - 16usize];
6864 ["Offset of field: pw_protocol_native_message::n_fds"]
6865 [::std::mem::offset_of!(pw_protocol_native_message, n_fds) - 20usize];
6866 ["Offset of field: pw_protocol_native_message::fds"]
6867 [::std::mem::offset_of!(pw_protocol_native_message, fds) - 24usize];
6868 ["Offset of field: pw_protocol_native_message::seq"]
6869 [::std::mem::offset_of!(pw_protocol_native_message, seq) - 32usize];
6870};
6871#[repr(C)]
6872#[derive(Debug, Copy, Clone)]
6873pub struct pw_protocol_native_demarshal {
6874 pub func: ::std::option::Option<
6875 unsafe extern "C" fn(
6876 object: *mut ::std::os::raw::c_void,
6877 msg: *const pw_protocol_native_message,
6878 ) -> ::std::os::raw::c_int,
6879 >,
6880 pub permissions: u32,
6881 pub flags: u32,
6882}
6883#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6884const _: () = {
6885 ["Size of pw_protocol_native_demarshal"]
6886 [::std::mem::size_of::<pw_protocol_native_demarshal>() - 16usize];
6887 ["Alignment of pw_protocol_native_demarshal"]
6888 [::std::mem::align_of::<pw_protocol_native_demarshal>() - 8usize];
6889 ["Offset of field: pw_protocol_native_demarshal::func"]
6890 [::std::mem::offset_of!(pw_protocol_native_demarshal, func) - 0usize];
6891 ["Offset of field: pw_protocol_native_demarshal::permissions"]
6892 [::std::mem::offset_of!(pw_protocol_native_demarshal, permissions) - 8usize];
6893 ["Offset of field: pw_protocol_native_demarshal::flags"]
6894 [::std::mem::offset_of!(pw_protocol_native_demarshal, flags) - 12usize];
6895};
6896#[doc = " \\ref pw_protocol_native_ext methods"]
6897#[repr(C)]
6898#[derive(Debug, Copy, Clone)]
6899pub struct pw_protocol_native_ext {
6900 pub version: u32,
6901 pub begin_proxy: ::std::option::Option<
6902 unsafe extern "C" fn(
6903 proxy: *mut pw_proxy,
6904 opcode: u8,
6905 msg: *mut *mut pw_protocol_native_message,
6906 ) -> *mut spa_pod_builder,
6907 >,
6908 pub add_proxy_fd: ::std::option::Option<
6909 unsafe extern "C" fn(proxy: *mut pw_proxy, fd: ::std::os::raw::c_int) -> u32,
6910 >,
6911 pub get_proxy_fd: ::std::option::Option<
6912 unsafe extern "C" fn(proxy: *mut pw_proxy, index: u32) -> ::std::os::raw::c_int,
6913 >,
6914 pub end_proxy: ::std::option::Option<
6915 unsafe extern "C" fn(
6916 proxy: *mut pw_proxy,
6917 builder: *mut spa_pod_builder,
6918 ) -> ::std::os::raw::c_int,
6919 >,
6920 pub begin_resource: ::std::option::Option<
6921 unsafe extern "C" fn(
6922 resource: *mut pw_resource,
6923 opcode: u8,
6924 msg: *mut *mut pw_protocol_native_message,
6925 ) -> *mut spa_pod_builder,
6926 >,
6927 pub add_resource_fd: ::std::option::Option<
6928 unsafe extern "C" fn(resource: *mut pw_resource, fd: ::std::os::raw::c_int) -> u32,
6929 >,
6930 pub get_resource_fd: ::std::option::Option<
6931 unsafe extern "C" fn(resource: *mut pw_resource, index: u32) -> ::std::os::raw::c_int,
6932 >,
6933 pub end_resource: ::std::option::Option<
6934 unsafe extern "C" fn(
6935 resource: *mut pw_resource,
6936 builder: *mut spa_pod_builder,
6937 ) -> ::std::os::raw::c_int,
6938 >,
6939}
6940#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6941const _: () = {
6942 ["Size of pw_protocol_native_ext"][::std::mem::size_of::<pw_protocol_native_ext>() - 72usize];
6943 ["Alignment of pw_protocol_native_ext"]
6944 [::std::mem::align_of::<pw_protocol_native_ext>() - 8usize];
6945 ["Offset of field: pw_protocol_native_ext::version"]
6946 [::std::mem::offset_of!(pw_protocol_native_ext, version) - 0usize];
6947 ["Offset of field: pw_protocol_native_ext::begin_proxy"]
6948 [::std::mem::offset_of!(pw_protocol_native_ext, begin_proxy) - 8usize];
6949 ["Offset of field: pw_protocol_native_ext::add_proxy_fd"]
6950 [::std::mem::offset_of!(pw_protocol_native_ext, add_proxy_fd) - 16usize];
6951 ["Offset of field: pw_protocol_native_ext::get_proxy_fd"]
6952 [::std::mem::offset_of!(pw_protocol_native_ext, get_proxy_fd) - 24usize];
6953 ["Offset of field: pw_protocol_native_ext::end_proxy"]
6954 [::std::mem::offset_of!(pw_protocol_native_ext, end_proxy) - 32usize];
6955 ["Offset of field: pw_protocol_native_ext::begin_resource"]
6956 [::std::mem::offset_of!(pw_protocol_native_ext, begin_resource) - 40usize];
6957 ["Offset of field: pw_protocol_native_ext::add_resource_fd"]
6958 [::std::mem::offset_of!(pw_protocol_native_ext, add_resource_fd) - 48usize];
6959 ["Offset of field: pw_protocol_native_ext::get_resource_fd"]
6960 [::std::mem::offset_of!(pw_protocol_native_ext, get_resource_fd) - 56usize];
6961 ["Offset of field: pw_protocol_native_ext::end_resource"]
6962 [::std::mem::offset_of!(pw_protocol_native_ext, end_resource) - 64usize];
6963};
6964pub const pw_endpoint_link_state_PW_ENDPOINT_LINK_STATE_ERROR: pw_endpoint_link_state = -1;
6965pub const pw_endpoint_link_state_PW_ENDPOINT_LINK_STATE_PREPARING: pw_endpoint_link_state = 0;
6966pub const pw_endpoint_link_state_PW_ENDPOINT_LINK_STATE_INACTIVE: pw_endpoint_link_state = 1;
6967pub const pw_endpoint_link_state_PW_ENDPOINT_LINK_STATE_ACTIVE: pw_endpoint_link_state = 2;
6968#[doc = " \\addtogroup pw_session_manager\n \\{"]
6969pub type pw_endpoint_link_state = ::std::os::raw::c_int;
6970#[repr(C)]
6971#[derive(Debug, Copy, Clone)]
6972pub struct pw_session_info {
6973 #[doc = "< version of this structure"]
6974 pub version: u32,
6975 #[doc = "< the session id (global)"]
6976 pub id: u32,
6977 #[doc = "< bitfield of changed fields since last call"]
6978 pub change_mask: u64,
6979 #[doc = "< extra properties"]
6980 pub props: *mut spa_dict,
6981 #[doc = "< parameters"]
6982 pub params: *mut spa_param_info,
6983 #[doc = "< number of items in \\a params"]
6984 pub n_params: u32,
6985}
6986#[allow(clippy::unnecessary_operation, clippy::identity_op)]
6987const _: () = {
6988 ["Size of pw_session_info"][::std::mem::size_of::<pw_session_info>() - 40usize];
6989 ["Alignment of pw_session_info"][::std::mem::align_of::<pw_session_info>() - 8usize];
6990 ["Offset of field: pw_session_info::version"]
6991 [::std::mem::offset_of!(pw_session_info, version) - 0usize];
6992 ["Offset of field: pw_session_info::id"][::std::mem::offset_of!(pw_session_info, id) - 4usize];
6993 ["Offset of field: pw_session_info::change_mask"]
6994 [::std::mem::offset_of!(pw_session_info, change_mask) - 8usize];
6995 ["Offset of field: pw_session_info::props"]
6996 [::std::mem::offset_of!(pw_session_info, props) - 16usize];
6997 ["Offset of field: pw_session_info::params"]
6998 [::std::mem::offset_of!(pw_session_info, params) - 24usize];
6999 ["Offset of field: pw_session_info::n_params"]
7000 [::std::mem::offset_of!(pw_session_info, n_params) - 32usize];
7001};
7002#[repr(C)]
7003pub struct pw_endpoint_info {
7004 #[doc = "< version of this structure"]
7005 pub version: u32,
7006 #[doc = "< the endpoint id (global)"]
7007 pub id: u32,
7008 #[doc = "< name of the endpoint"]
7009 pub name: *mut ::std::os::raw::c_char,
7010 #[doc = "< media class of the endpoint"]
7011 pub media_class: *mut ::std::os::raw::c_char,
7012 #[doc = "< direction of the endpoint"]
7013 pub direction: spa_direction,
7014 #[doc = "< additional flags"]
7015 pub flags: u32,
7016 #[doc = "< bitfield of changed fields since last call"]
7017 pub change_mask: u64,
7018 #[doc = "< number of streams available"]
7019 pub n_streams: u32,
7020 #[doc = "< the id of the controlling session"]
7021 pub session_id: u32,
7022 #[doc = "< extra properties"]
7023 pub props: *mut spa_dict,
7024 #[doc = "< parameters"]
7025 pub params: *mut spa_param_info,
7026 #[doc = "< number of items in \\a params"]
7027 pub n_params: u32,
7028}
7029#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7030const _: () = {
7031 ["Size of pw_endpoint_info"][::std::mem::size_of::<pw_endpoint_info>() - 72usize];
7032 ["Alignment of pw_endpoint_info"][::std::mem::align_of::<pw_endpoint_info>() - 8usize];
7033 ["Offset of field: pw_endpoint_info::version"]
7034 [::std::mem::offset_of!(pw_endpoint_info, version) - 0usize];
7035 ["Offset of field: pw_endpoint_info::id"]
7036 [::std::mem::offset_of!(pw_endpoint_info, id) - 4usize];
7037 ["Offset of field: pw_endpoint_info::name"]
7038 [::std::mem::offset_of!(pw_endpoint_info, name) - 8usize];
7039 ["Offset of field: pw_endpoint_info::media_class"]
7040 [::std::mem::offset_of!(pw_endpoint_info, media_class) - 16usize];
7041 ["Offset of field: pw_endpoint_info::direction"]
7042 [::std::mem::offset_of!(pw_endpoint_info, direction) - 24usize];
7043 ["Offset of field: pw_endpoint_info::flags"]
7044 [::std::mem::offset_of!(pw_endpoint_info, flags) - 28usize];
7045 ["Offset of field: pw_endpoint_info::change_mask"]
7046 [::std::mem::offset_of!(pw_endpoint_info, change_mask) - 32usize];
7047 ["Offset of field: pw_endpoint_info::n_streams"]
7048 [::std::mem::offset_of!(pw_endpoint_info, n_streams) - 40usize];
7049 ["Offset of field: pw_endpoint_info::session_id"]
7050 [::std::mem::offset_of!(pw_endpoint_info, session_id) - 44usize];
7051 ["Offset of field: pw_endpoint_info::props"]
7052 [::std::mem::offset_of!(pw_endpoint_info, props) - 48usize];
7053 ["Offset of field: pw_endpoint_info::params"]
7054 [::std::mem::offset_of!(pw_endpoint_info, params) - 56usize];
7055 ["Offset of field: pw_endpoint_info::n_params"]
7056 [::std::mem::offset_of!(pw_endpoint_info, n_params) - 64usize];
7057};
7058#[repr(C)]
7059#[derive(Debug, Copy, Clone)]
7060pub struct pw_endpoint_stream_info {
7061 #[doc = "< version of this structure"]
7062 pub version: u32,
7063 #[doc = "< the stream id (local or global)"]
7064 pub id: u32,
7065 #[doc = "< the endpoint id (global)"]
7066 pub endpoint_id: u32,
7067 #[doc = "< name of the stream"]
7068 pub name: *mut ::std::os::raw::c_char,
7069 #[doc = "< bitfield of changed fields since last call"]
7070 pub change_mask: u64,
7071 #[doc = "< information for linking this stream"]
7072 pub link_params: *mut spa_pod,
7073 #[doc = "< extra properties"]
7074 pub props: *mut spa_dict,
7075 #[doc = "< parameters"]
7076 pub params: *mut spa_param_info,
7077 #[doc = "< number of items in \\a params"]
7078 pub n_params: u32,
7079}
7080#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7081const _: () = {
7082 ["Size of pw_endpoint_stream_info"][::std::mem::size_of::<pw_endpoint_stream_info>() - 64usize];
7083 ["Alignment of pw_endpoint_stream_info"]
7084 [::std::mem::align_of::<pw_endpoint_stream_info>() - 8usize];
7085 ["Offset of field: pw_endpoint_stream_info::version"]
7086 [::std::mem::offset_of!(pw_endpoint_stream_info, version) - 0usize];
7087 ["Offset of field: pw_endpoint_stream_info::id"]
7088 [::std::mem::offset_of!(pw_endpoint_stream_info, id) - 4usize];
7089 ["Offset of field: pw_endpoint_stream_info::endpoint_id"]
7090 [::std::mem::offset_of!(pw_endpoint_stream_info, endpoint_id) - 8usize];
7091 ["Offset of field: pw_endpoint_stream_info::name"]
7092 [::std::mem::offset_of!(pw_endpoint_stream_info, name) - 16usize];
7093 ["Offset of field: pw_endpoint_stream_info::change_mask"]
7094 [::std::mem::offset_of!(pw_endpoint_stream_info, change_mask) - 24usize];
7095 ["Offset of field: pw_endpoint_stream_info::link_params"]
7096 [::std::mem::offset_of!(pw_endpoint_stream_info, link_params) - 32usize];
7097 ["Offset of field: pw_endpoint_stream_info::props"]
7098 [::std::mem::offset_of!(pw_endpoint_stream_info, props) - 40usize];
7099 ["Offset of field: pw_endpoint_stream_info::params"]
7100 [::std::mem::offset_of!(pw_endpoint_stream_info, params) - 48usize];
7101 ["Offset of field: pw_endpoint_stream_info::n_params"]
7102 [::std::mem::offset_of!(pw_endpoint_stream_info, n_params) - 56usize];
7103};
7104#[repr(C)]
7105#[derive(Debug, Copy, Clone)]
7106pub struct pw_endpoint_link_info {
7107 #[doc = "< version of this structure"]
7108 pub version: u32,
7109 #[doc = "< the link id (global)"]
7110 pub id: u32,
7111 #[doc = "< the session id (global)"]
7112 pub session_id: u32,
7113 #[doc = "< the output endpoint id (global)"]
7114 pub output_endpoint_id: u32,
7115 #[doc = "< the output stream id (local or global)"]
7116 pub output_stream_id: u32,
7117 #[doc = "< the input endpoint id (global)"]
7118 pub input_endpoint_id: u32,
7119 #[doc = "< the input stream id (local or global)"]
7120 pub input_stream_id: u32,
7121 #[doc = "< bitfield of changed fields since last call"]
7122 pub change_mask: u64,
7123 #[doc = "< the state of the link"]
7124 pub state: pw_endpoint_link_state,
7125 #[doc = "< error string if state == ERROR"]
7126 pub error: *mut ::std::os::raw::c_char,
7127 #[doc = "< extra properties"]
7128 pub props: *mut spa_dict,
7129 #[doc = "< parameters"]
7130 pub params: *mut spa_param_info,
7131 #[doc = "< number of items in \\a params"]
7132 pub n_params: u32,
7133}
7134#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7135const _: () = {
7136 ["Size of pw_endpoint_link_info"][::std::mem::size_of::<pw_endpoint_link_info>() - 80usize];
7137 ["Alignment of pw_endpoint_link_info"]
7138 [::std::mem::align_of::<pw_endpoint_link_info>() - 8usize];
7139 ["Offset of field: pw_endpoint_link_info::version"]
7140 [::std::mem::offset_of!(pw_endpoint_link_info, version) - 0usize];
7141 ["Offset of field: pw_endpoint_link_info::id"]
7142 [::std::mem::offset_of!(pw_endpoint_link_info, id) - 4usize];
7143 ["Offset of field: pw_endpoint_link_info::session_id"]
7144 [::std::mem::offset_of!(pw_endpoint_link_info, session_id) - 8usize];
7145 ["Offset of field: pw_endpoint_link_info::output_endpoint_id"]
7146 [::std::mem::offset_of!(pw_endpoint_link_info, output_endpoint_id) - 12usize];
7147 ["Offset of field: pw_endpoint_link_info::output_stream_id"]
7148 [::std::mem::offset_of!(pw_endpoint_link_info, output_stream_id) - 16usize];
7149 ["Offset of field: pw_endpoint_link_info::input_endpoint_id"]
7150 [::std::mem::offset_of!(pw_endpoint_link_info, input_endpoint_id) - 20usize];
7151 ["Offset of field: pw_endpoint_link_info::input_stream_id"]
7152 [::std::mem::offset_of!(pw_endpoint_link_info, input_stream_id) - 24usize];
7153 ["Offset of field: pw_endpoint_link_info::change_mask"]
7154 [::std::mem::offset_of!(pw_endpoint_link_info, change_mask) - 32usize];
7155 ["Offset of field: pw_endpoint_link_info::state"]
7156 [::std::mem::offset_of!(pw_endpoint_link_info, state) - 40usize];
7157 ["Offset of field: pw_endpoint_link_info::error"]
7158 [::std::mem::offset_of!(pw_endpoint_link_info, error) - 48usize];
7159 ["Offset of field: pw_endpoint_link_info::props"]
7160 [::std::mem::offset_of!(pw_endpoint_link_info, props) - 56usize];
7161 ["Offset of field: pw_endpoint_link_info::params"]
7162 [::std::mem::offset_of!(pw_endpoint_link_info, params) - 64usize];
7163 ["Offset of field: pw_endpoint_link_info::n_params"]
7164 [::std::mem::offset_of!(pw_endpoint_link_info, n_params) - 72usize];
7165};
7166#[repr(C)]
7167#[derive(Debug, Copy, Clone)]
7168pub struct pw_session {
7169 _unused: [u8; 0],
7170}
7171#[repr(C)]
7172#[derive(Debug, Copy, Clone)]
7173pub struct pw_endpoint {
7174 _unused: [u8; 0],
7175}
7176#[repr(C)]
7177#[derive(Debug, Copy, Clone)]
7178pub struct pw_endpoint_stream {
7179 _unused: [u8; 0],
7180}
7181#[repr(C)]
7182#[derive(Debug, Copy, Clone)]
7183pub struct pw_endpoint_link {
7184 _unused: [u8; 0],
7185}
7186#[repr(C)]
7187#[derive(Debug, Copy, Clone)]
7188pub struct pw_session_events {
7189 #[doc = "< version of this structure"]
7190 pub version: u32,
7191 #[doc = " Notify session info\n\n \\param info info about the session"]
7192 pub info: ::std::option::Option<
7193 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_session_info),
7194 >,
7195 #[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"]
7196 pub param: ::std::option::Option<
7197 unsafe extern "C" fn(
7198 data: *mut ::std::os::raw::c_void,
7199 seq: ::std::os::raw::c_int,
7200 id: u32,
7201 index: u32,
7202 next: u32,
7203 param: *const spa_pod,
7204 ),
7205 >,
7206}
7207#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7208const _: () = {
7209 ["Size of pw_session_events"][::std::mem::size_of::<pw_session_events>() - 24usize];
7210 ["Alignment of pw_session_events"][::std::mem::align_of::<pw_session_events>() - 8usize];
7211 ["Offset of field: pw_session_events::version"]
7212 [::std::mem::offset_of!(pw_session_events, version) - 0usize];
7213 ["Offset of field: pw_session_events::info"]
7214 [::std::mem::offset_of!(pw_session_events, info) - 8usize];
7215 ["Offset of field: pw_session_events::param"]
7216 [::std::mem::offset_of!(pw_session_events, param) - 16usize];
7217};
7218#[repr(C)]
7219#[derive(Debug, Copy, Clone)]
7220pub struct pw_session_methods {
7221 #[doc = "< version of this structure"]
7222 pub version: u32,
7223 pub add_listener: ::std::option::Option<
7224 unsafe extern "C" fn(
7225 object: *mut ::std::os::raw::c_void,
7226 listener: *mut spa_hook,
7227 events: *const pw_session_events,
7228 data: *mut ::std::os::raw::c_void,
7229 ) -> ::std::os::raw::c_int,
7230 >,
7231 #[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."]
7232 pub subscribe_params: ::std::option::Option<
7233 unsafe extern "C" fn(
7234 object: *mut ::std::os::raw::c_void,
7235 ids: *mut u32,
7236 n_ids: u32,
7237 ) -> ::std::os::raw::c_int,
7238 >,
7239 #[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."]
7240 pub enum_params: ::std::option::Option<
7241 unsafe extern "C" fn(
7242 object: *mut ::std::os::raw::c_void,
7243 seq: ::std::os::raw::c_int,
7244 id: u32,
7245 start: u32,
7246 num: u32,
7247 filter: *const spa_pod,
7248 ) -> ::std::os::raw::c_int,
7249 >,
7250 #[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."]
7251 pub set_param: ::std::option::Option<
7252 unsafe extern "C" fn(
7253 object: *mut ::std::os::raw::c_void,
7254 id: u32,
7255 flags: u32,
7256 param: *const spa_pod,
7257 ) -> ::std::os::raw::c_int,
7258 >,
7259}
7260#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7261const _: () = {
7262 ["Size of pw_session_methods"][::std::mem::size_of::<pw_session_methods>() - 40usize];
7263 ["Alignment of pw_session_methods"][::std::mem::align_of::<pw_session_methods>() - 8usize];
7264 ["Offset of field: pw_session_methods::version"]
7265 [::std::mem::offset_of!(pw_session_methods, version) - 0usize];
7266 ["Offset of field: pw_session_methods::add_listener"]
7267 [::std::mem::offset_of!(pw_session_methods, add_listener) - 8usize];
7268 ["Offset of field: pw_session_methods::subscribe_params"]
7269 [::std::mem::offset_of!(pw_session_methods, subscribe_params) - 16usize];
7270 ["Offset of field: pw_session_methods::enum_params"]
7271 [::std::mem::offset_of!(pw_session_methods, enum_params) - 24usize];
7272 ["Offset of field: pw_session_methods::set_param"]
7273 [::std::mem::offset_of!(pw_session_methods, set_param) - 32usize];
7274};
7275#[repr(C)]
7276#[derive(Debug, Copy, Clone)]
7277pub struct pw_endpoint_events {
7278 #[doc = "< version of this structure"]
7279 pub version: u32,
7280 #[doc = " Notify endpoint info\n\n \\param info info about the endpoint"]
7281 pub info: ::std::option::Option<
7282 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_endpoint_info),
7283 >,
7284 #[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"]
7285 pub param: ::std::option::Option<
7286 unsafe extern "C" fn(
7287 data: *mut ::std::os::raw::c_void,
7288 seq: ::std::os::raw::c_int,
7289 id: u32,
7290 index: u32,
7291 next: u32,
7292 param: *const spa_pod,
7293 ),
7294 >,
7295}
7296#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7297const _: () = {
7298 ["Size of pw_endpoint_events"][::std::mem::size_of::<pw_endpoint_events>() - 24usize];
7299 ["Alignment of pw_endpoint_events"][::std::mem::align_of::<pw_endpoint_events>() - 8usize];
7300 ["Offset of field: pw_endpoint_events::version"]
7301 [::std::mem::offset_of!(pw_endpoint_events, version) - 0usize];
7302 ["Offset of field: pw_endpoint_events::info"]
7303 [::std::mem::offset_of!(pw_endpoint_events, info) - 8usize];
7304 ["Offset of field: pw_endpoint_events::param"]
7305 [::std::mem::offset_of!(pw_endpoint_events, param) - 16usize];
7306};
7307#[repr(C)]
7308#[derive(Debug, Copy, Clone)]
7309pub struct pw_endpoint_methods {
7310 #[doc = "< version of this structure"]
7311 pub version: u32,
7312 pub add_listener: ::std::option::Option<
7313 unsafe extern "C" fn(
7314 object: *mut ::std::os::raw::c_void,
7315 listener: *mut spa_hook,
7316 events: *const pw_endpoint_events,
7317 data: *mut ::std::os::raw::c_void,
7318 ) -> ::std::os::raw::c_int,
7319 >,
7320 #[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."]
7321 pub subscribe_params: ::std::option::Option<
7322 unsafe extern "C" fn(
7323 object: *mut ::std::os::raw::c_void,
7324 ids: *mut u32,
7325 n_ids: u32,
7326 ) -> ::std::os::raw::c_int,
7327 >,
7328 #[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."]
7329 pub enum_params: ::std::option::Option<
7330 unsafe extern "C" fn(
7331 object: *mut ::std::os::raw::c_void,
7332 seq: ::std::os::raw::c_int,
7333 id: u32,
7334 start: u32,
7335 num: u32,
7336 filter: *const spa_pod,
7337 ) -> ::std::os::raw::c_int,
7338 >,
7339 #[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."]
7340 pub set_param: ::std::option::Option<
7341 unsafe extern "C" fn(
7342 object: *mut ::std::os::raw::c_void,
7343 id: u32,
7344 flags: u32,
7345 param: *const spa_pod,
7346 ) -> ::std::os::raw::c_int,
7347 >,
7348 #[doc = " Create a link\n\n This requires X permissions."]
7349 pub create_link: ::std::option::Option<
7350 unsafe extern "C" fn(
7351 object: *mut ::std::os::raw::c_void,
7352 props: *const spa_dict,
7353 ) -> ::std::os::raw::c_int,
7354 >,
7355}
7356#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7357const _: () = {
7358 ["Size of pw_endpoint_methods"][::std::mem::size_of::<pw_endpoint_methods>() - 48usize];
7359 ["Alignment of pw_endpoint_methods"][::std::mem::align_of::<pw_endpoint_methods>() - 8usize];
7360 ["Offset of field: pw_endpoint_methods::version"]
7361 [::std::mem::offset_of!(pw_endpoint_methods, version) - 0usize];
7362 ["Offset of field: pw_endpoint_methods::add_listener"]
7363 [::std::mem::offset_of!(pw_endpoint_methods, add_listener) - 8usize];
7364 ["Offset of field: pw_endpoint_methods::subscribe_params"]
7365 [::std::mem::offset_of!(pw_endpoint_methods, subscribe_params) - 16usize];
7366 ["Offset of field: pw_endpoint_methods::enum_params"]
7367 [::std::mem::offset_of!(pw_endpoint_methods, enum_params) - 24usize];
7368 ["Offset of field: pw_endpoint_methods::set_param"]
7369 [::std::mem::offset_of!(pw_endpoint_methods, set_param) - 32usize];
7370 ["Offset of field: pw_endpoint_methods::create_link"]
7371 [::std::mem::offset_of!(pw_endpoint_methods, create_link) - 40usize];
7372};
7373#[repr(C)]
7374#[derive(Debug, Copy, Clone)]
7375pub struct pw_endpoint_stream_events {
7376 #[doc = "< version of this structure"]
7377 pub version: u32,
7378 #[doc = " Notify endpoint stream info\n\n \\param info info about the endpoint stream"]
7379 pub info: ::std::option::Option<
7380 unsafe extern "C" fn(
7381 data: *mut ::std::os::raw::c_void,
7382 info: *const pw_endpoint_stream_info,
7383 ),
7384 >,
7385 #[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"]
7386 pub param: ::std::option::Option<
7387 unsafe extern "C" fn(
7388 data: *mut ::std::os::raw::c_void,
7389 seq: ::std::os::raw::c_int,
7390 id: u32,
7391 index: u32,
7392 next: u32,
7393 param: *const spa_pod,
7394 ),
7395 >,
7396}
7397#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7398const _: () = {
7399 ["Size of pw_endpoint_stream_events"]
7400 [::std::mem::size_of::<pw_endpoint_stream_events>() - 24usize];
7401 ["Alignment of pw_endpoint_stream_events"]
7402 [::std::mem::align_of::<pw_endpoint_stream_events>() - 8usize];
7403 ["Offset of field: pw_endpoint_stream_events::version"]
7404 [::std::mem::offset_of!(pw_endpoint_stream_events, version) - 0usize];
7405 ["Offset of field: pw_endpoint_stream_events::info"]
7406 [::std::mem::offset_of!(pw_endpoint_stream_events, info) - 8usize];
7407 ["Offset of field: pw_endpoint_stream_events::param"]
7408 [::std::mem::offset_of!(pw_endpoint_stream_events, param) - 16usize];
7409};
7410#[repr(C)]
7411#[derive(Debug, Copy, Clone)]
7412pub struct pw_endpoint_stream_methods {
7413 #[doc = "< version of this structure"]
7414 pub version: u32,
7415 pub add_listener: ::std::option::Option<
7416 unsafe extern "C" fn(
7417 object: *mut ::std::os::raw::c_void,
7418 listener: *mut spa_hook,
7419 events: *const pw_endpoint_stream_events,
7420 data: *mut ::std::os::raw::c_void,
7421 ) -> ::std::os::raw::c_int,
7422 >,
7423 #[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."]
7424 pub subscribe_params: ::std::option::Option<
7425 unsafe extern "C" fn(
7426 object: *mut ::std::os::raw::c_void,
7427 ids: *mut u32,
7428 n_ids: u32,
7429 ) -> ::std::os::raw::c_int,
7430 >,
7431 #[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."]
7432 pub enum_params: ::std::option::Option<
7433 unsafe extern "C" fn(
7434 object: *mut ::std::os::raw::c_void,
7435 seq: ::std::os::raw::c_int,
7436 id: u32,
7437 start: u32,
7438 num: u32,
7439 filter: *const spa_pod,
7440 ) -> ::std::os::raw::c_int,
7441 >,
7442 #[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."]
7443 pub set_param: ::std::option::Option<
7444 unsafe extern "C" fn(
7445 object: *mut ::std::os::raw::c_void,
7446 id: u32,
7447 flags: u32,
7448 param: *const spa_pod,
7449 ) -> ::std::os::raw::c_int,
7450 >,
7451}
7452#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7453const _: () = {
7454 ["Size of pw_endpoint_stream_methods"]
7455 [::std::mem::size_of::<pw_endpoint_stream_methods>() - 40usize];
7456 ["Alignment of pw_endpoint_stream_methods"]
7457 [::std::mem::align_of::<pw_endpoint_stream_methods>() - 8usize];
7458 ["Offset of field: pw_endpoint_stream_methods::version"]
7459 [::std::mem::offset_of!(pw_endpoint_stream_methods, version) - 0usize];
7460 ["Offset of field: pw_endpoint_stream_methods::add_listener"]
7461 [::std::mem::offset_of!(pw_endpoint_stream_methods, add_listener) - 8usize];
7462 ["Offset of field: pw_endpoint_stream_methods::subscribe_params"]
7463 [::std::mem::offset_of!(pw_endpoint_stream_methods, subscribe_params) - 16usize];
7464 ["Offset of field: pw_endpoint_stream_methods::enum_params"]
7465 [::std::mem::offset_of!(pw_endpoint_stream_methods, enum_params) - 24usize];
7466 ["Offset of field: pw_endpoint_stream_methods::set_param"]
7467 [::std::mem::offset_of!(pw_endpoint_stream_methods, set_param) - 32usize];
7468};
7469#[repr(C)]
7470#[derive(Debug, Copy, Clone)]
7471pub struct pw_endpoint_link_events {
7472 #[doc = "< version of this structure"]
7473 pub version: u32,
7474 #[doc = " Notify endpoint link info\n\n \\param info info about the endpoint link"]
7475 pub info: ::std::option::Option<
7476 unsafe extern "C" fn(data: *mut ::std::os::raw::c_void, info: *const pw_endpoint_link_info),
7477 >,
7478 #[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"]
7479 pub param: ::std::option::Option<
7480 unsafe extern "C" fn(
7481 data: *mut ::std::os::raw::c_void,
7482 seq: ::std::os::raw::c_int,
7483 id: u32,
7484 index: u32,
7485 next: u32,
7486 param: *const spa_pod,
7487 ),
7488 >,
7489}
7490#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7491const _: () = {
7492 ["Size of pw_endpoint_link_events"][::std::mem::size_of::<pw_endpoint_link_events>() - 24usize];
7493 ["Alignment of pw_endpoint_link_events"]
7494 [::std::mem::align_of::<pw_endpoint_link_events>() - 8usize];
7495 ["Offset of field: pw_endpoint_link_events::version"]
7496 [::std::mem::offset_of!(pw_endpoint_link_events, version) - 0usize];
7497 ["Offset of field: pw_endpoint_link_events::info"]
7498 [::std::mem::offset_of!(pw_endpoint_link_events, info) - 8usize];
7499 ["Offset of field: pw_endpoint_link_events::param"]
7500 [::std::mem::offset_of!(pw_endpoint_link_events, param) - 16usize];
7501};
7502#[repr(C)]
7503#[derive(Debug, Copy, Clone)]
7504pub struct pw_endpoint_link_methods {
7505 #[doc = "< version of this structure"]
7506 pub version: u32,
7507 pub add_listener: ::std::option::Option<
7508 unsafe extern "C" fn(
7509 object: *mut ::std::os::raw::c_void,
7510 listener: *mut spa_hook,
7511 events: *const pw_endpoint_link_events,
7512 data: *mut ::std::os::raw::c_void,
7513 ) -> ::std::os::raw::c_int,
7514 >,
7515 #[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."]
7516 pub subscribe_params: ::std::option::Option<
7517 unsafe extern "C" fn(
7518 object: *mut ::std::os::raw::c_void,
7519 ids: *mut u32,
7520 n_ids: u32,
7521 ) -> ::std::os::raw::c_int,
7522 >,
7523 #[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."]
7524 pub enum_params: ::std::option::Option<
7525 unsafe extern "C" fn(
7526 object: *mut ::std::os::raw::c_void,
7527 seq: ::std::os::raw::c_int,
7528 id: u32,
7529 start: u32,
7530 num: u32,
7531 filter: *const spa_pod,
7532 ) -> ::std::os::raw::c_int,
7533 >,
7534 #[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."]
7535 pub set_param: ::std::option::Option<
7536 unsafe extern "C" fn(
7537 object: *mut ::std::os::raw::c_void,
7538 id: u32,
7539 flags: u32,
7540 param: *const spa_pod,
7541 ) -> ::std::os::raw::c_int,
7542 >,
7543 #[doc = " Request a state on the link.\n\n This requires X and W permissions."]
7544 pub request_state: ::std::option::Option<
7545 unsafe extern "C" fn(
7546 object: *mut ::std::os::raw::c_void,
7547 state: pw_endpoint_link_state,
7548 ) -> ::std::os::raw::c_int,
7549 >,
7550}
7551#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7552const _: () = {
7553 ["Size of pw_endpoint_link_methods"]
7554 [::std::mem::size_of::<pw_endpoint_link_methods>() - 48usize];
7555 ["Alignment of pw_endpoint_link_methods"]
7556 [::std::mem::align_of::<pw_endpoint_link_methods>() - 8usize];
7557 ["Offset of field: pw_endpoint_link_methods::version"]
7558 [::std::mem::offset_of!(pw_endpoint_link_methods, version) - 0usize];
7559 ["Offset of field: pw_endpoint_link_methods::add_listener"]
7560 [::std::mem::offset_of!(pw_endpoint_link_methods, add_listener) - 8usize];
7561 ["Offset of field: pw_endpoint_link_methods::subscribe_params"]
7562 [::std::mem::offset_of!(pw_endpoint_link_methods, subscribe_params) - 16usize];
7563 ["Offset of field: pw_endpoint_link_methods::enum_params"]
7564 [::std::mem::offset_of!(pw_endpoint_link_methods, enum_params) - 24usize];
7565 ["Offset of field: pw_endpoint_link_methods::set_param"]
7566 [::std::mem::offset_of!(pw_endpoint_link_methods, set_param) - 32usize];
7567 ["Offset of field: pw_endpoint_link_methods::request_state"]
7568 [::std::mem::offset_of!(pw_endpoint_link_methods, request_state) - 40usize];
7569};
7570#[repr(C)]
7571#[derive(Debug, Copy, Clone)]
7572pub struct pw_client_endpoint {
7573 _unused: [u8; 0],
7574}
7575#[repr(C)]
7576#[derive(Debug, Copy, Clone)]
7577pub struct pw_client_endpoint_events {
7578 #[doc = "< version of this structure"]
7579 pub version: u32,
7580 #[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"]
7581 pub set_session_id: ::std::option::Option<
7582 unsafe extern "C" fn(
7583 data: *mut ::std::os::raw::c_void,
7584 session_id: u32,
7585 ) -> ::std::os::raw::c_int,
7586 >,
7587 #[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"]
7588 pub set_param: ::std::option::Option<
7589 unsafe extern "C" fn(
7590 data: *mut ::std::os::raw::c_void,
7591 id: u32,
7592 flags: u32,
7593 param: *const spa_pod,
7594 ) -> ::std::os::raw::c_int,
7595 >,
7596 #[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"]
7597 pub stream_set_param: ::std::option::Option<
7598 unsafe extern "C" fn(
7599 data: *mut ::std::os::raw::c_void,
7600 stream_id: u32,
7601 id: u32,
7602 flags: u32,
7603 param: *const spa_pod,
7604 ) -> ::std::os::raw::c_int,
7605 >,
7606 pub create_link: ::std::option::Option<
7607 unsafe extern "C" fn(
7608 data: *mut ::std::os::raw::c_void,
7609 props: *const spa_dict,
7610 ) -> ::std::os::raw::c_int,
7611 >,
7612}
7613#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7614const _: () = {
7615 ["Size of pw_client_endpoint_events"]
7616 [::std::mem::size_of::<pw_client_endpoint_events>() - 40usize];
7617 ["Alignment of pw_client_endpoint_events"]
7618 [::std::mem::align_of::<pw_client_endpoint_events>() - 8usize];
7619 ["Offset of field: pw_client_endpoint_events::version"]
7620 [::std::mem::offset_of!(pw_client_endpoint_events, version) - 0usize];
7621 ["Offset of field: pw_client_endpoint_events::set_session_id"]
7622 [::std::mem::offset_of!(pw_client_endpoint_events, set_session_id) - 8usize];
7623 ["Offset of field: pw_client_endpoint_events::set_param"]
7624 [::std::mem::offset_of!(pw_client_endpoint_events, set_param) - 16usize];
7625 ["Offset of field: pw_client_endpoint_events::stream_set_param"]
7626 [::std::mem::offset_of!(pw_client_endpoint_events, stream_set_param) - 24usize];
7627 ["Offset of field: pw_client_endpoint_events::create_link"]
7628 [::std::mem::offset_of!(pw_client_endpoint_events, create_link) - 32usize];
7629};
7630#[repr(C)]
7631#[derive(Debug, Copy, Clone)]
7632pub struct pw_client_endpoint_methods {
7633 #[doc = "< version of this structure"]
7634 pub version: u32,
7635 pub add_listener: ::std::option::Option<
7636 unsafe extern "C" fn(
7637 object: *mut ::std::os::raw::c_void,
7638 listener: *mut spa_hook,
7639 events: *const pw_client_endpoint_events,
7640 data: *mut ::std::os::raw::c_void,
7641 ) -> ::std::os::raw::c_int,
7642 >,
7643 #[doc = " Update endpoint information"]
7644 pub update: ::std::option::Option<
7645 unsafe extern "C" fn(
7646 object: *mut ::std::os::raw::c_void,
7647 change_mask: u32,
7648 n_params: u32,
7649 params: *mut *const spa_pod,
7650 info: *const pw_endpoint_info,
7651 ) -> ::std::os::raw::c_int,
7652 >,
7653 #[doc = " Update stream information"]
7654 pub stream_update: ::std::option::Option<
7655 unsafe extern "C" fn(
7656 object: *mut ::std::os::raw::c_void,
7657 stream_id: u32,
7658 change_mask: u32,
7659 n_params: u32,
7660 params: *mut *const spa_pod,
7661 info: *const pw_endpoint_stream_info,
7662 ) -> ::std::os::raw::c_int,
7663 >,
7664}
7665#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7666const _: () = {
7667 ["Size of pw_client_endpoint_methods"]
7668 [::std::mem::size_of::<pw_client_endpoint_methods>() - 32usize];
7669 ["Alignment of pw_client_endpoint_methods"]
7670 [::std::mem::align_of::<pw_client_endpoint_methods>() - 8usize];
7671 ["Offset of field: pw_client_endpoint_methods::version"]
7672 [::std::mem::offset_of!(pw_client_endpoint_methods, version) - 0usize];
7673 ["Offset of field: pw_client_endpoint_methods::add_listener"]
7674 [::std::mem::offset_of!(pw_client_endpoint_methods, add_listener) - 8usize];
7675 ["Offset of field: pw_client_endpoint_methods::update"]
7676 [::std::mem::offset_of!(pw_client_endpoint_methods, update) - 16usize];
7677 ["Offset of field: pw_client_endpoint_methods::stream_update"]
7678 [::std::mem::offset_of!(pw_client_endpoint_methods, stream_update) - 24usize];
7679};
7680#[repr(C)]
7681#[derive(Debug, Copy, Clone)]
7682pub struct pw_client_session {
7683 _unused: [u8; 0],
7684}
7685#[repr(C)]
7686#[derive(Debug, Copy, Clone)]
7687pub struct pw_client_session_events {
7688 #[doc = "< version of this structure"]
7689 pub version: u32,
7690 #[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"]
7691 pub set_param: ::std::option::Option<
7692 unsafe extern "C" fn(
7693 data: *mut ::std::os::raw::c_void,
7694 id: u32,
7695 flags: u32,
7696 param: *const spa_pod,
7697 ) -> ::std::os::raw::c_int,
7698 >,
7699 #[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"]
7700 pub link_set_param: ::std::option::Option<
7701 unsafe extern "C" fn(
7702 data: *mut ::std::os::raw::c_void,
7703 link_id: u32,
7704 id: u32,
7705 flags: u32,
7706 param: *const spa_pod,
7707 ) -> ::std::os::raw::c_int,
7708 >,
7709 pub link_request_state: ::std::option::Option<
7710 unsafe extern "C" fn(
7711 data: *mut ::std::os::raw::c_void,
7712 link_id: u32,
7713 state: u32,
7714 ) -> ::std::os::raw::c_int,
7715 >,
7716}
7717#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7718const _: () = {
7719 ["Size of pw_client_session_events"]
7720 [::std::mem::size_of::<pw_client_session_events>() - 32usize];
7721 ["Alignment of pw_client_session_events"]
7722 [::std::mem::align_of::<pw_client_session_events>() - 8usize];
7723 ["Offset of field: pw_client_session_events::version"]
7724 [::std::mem::offset_of!(pw_client_session_events, version) - 0usize];
7725 ["Offset of field: pw_client_session_events::set_param"]
7726 [::std::mem::offset_of!(pw_client_session_events, set_param) - 8usize];
7727 ["Offset of field: pw_client_session_events::link_set_param"]
7728 [::std::mem::offset_of!(pw_client_session_events, link_set_param) - 16usize];
7729 ["Offset of field: pw_client_session_events::link_request_state"]
7730 [::std::mem::offset_of!(pw_client_session_events, link_request_state) - 24usize];
7731};
7732#[repr(C)]
7733#[derive(Debug, Copy, Clone)]
7734pub struct pw_client_session_methods {
7735 #[doc = "< version of this structure"]
7736 pub version: u32,
7737 pub add_listener: ::std::option::Option<
7738 unsafe extern "C" fn(
7739 object: *mut ::std::os::raw::c_void,
7740 listener: *mut spa_hook,
7741 events: *const pw_client_session_events,
7742 data: *mut ::std::os::raw::c_void,
7743 ) -> ::std::os::raw::c_int,
7744 >,
7745 #[doc = " Update session information"]
7746 pub update: ::std::option::Option<
7747 unsafe extern "C" fn(
7748 object: *mut ::std::os::raw::c_void,
7749 change_mask: u32,
7750 n_params: u32,
7751 params: *mut *const spa_pod,
7752 info: *const pw_session_info,
7753 ) -> ::std::os::raw::c_int,
7754 >,
7755 #[doc = " Update link information"]
7756 pub link_update: ::std::option::Option<
7757 unsafe extern "C" fn(
7758 object: *mut ::std::os::raw::c_void,
7759 link_id: u32,
7760 change_mask: u32,
7761 n_params: u32,
7762 params: *mut *const spa_pod,
7763 info: *const pw_endpoint_link_info,
7764 ) -> ::std::os::raw::c_int,
7765 >,
7766}
7767#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7768const _: () = {
7769 ["Size of pw_client_session_methods"]
7770 [::std::mem::size_of::<pw_client_session_methods>() - 32usize];
7771 ["Alignment of pw_client_session_methods"]
7772 [::std::mem::align_of::<pw_client_session_methods>() - 8usize];
7773 ["Offset of field: pw_client_session_methods::version"]
7774 [::std::mem::offset_of!(pw_client_session_methods, version) - 0usize];
7775 ["Offset of field: pw_client_session_methods::add_listener"]
7776 [::std::mem::offset_of!(pw_client_session_methods, add_listener) - 8usize];
7777 ["Offset of field: pw_client_session_methods::update"]
7778 [::std::mem::offset_of!(pw_client_session_methods, update) - 16usize];
7779 ["Offset of field: pw_client_session_methods::link_update"]
7780 [::std::mem::offset_of!(pw_client_session_methods, link_update) - 24usize];
7781};
7782pub type __builtin_va_list = [__va_list_tag; 1usize];
7783#[repr(C)]
7784#[derive(Debug, Copy, Clone)]
7785pub struct __va_list_tag {
7786 pub gp_offset: ::std::os::raw::c_uint,
7787 pub fp_offset: ::std::os::raw::c_uint,
7788 pub overflow_arg_area: *mut ::std::os::raw::c_void,
7789 pub reg_save_area: *mut ::std::os::raw::c_void,
7790}
7791#[allow(clippy::unnecessary_operation, clippy::identity_op)]
7792const _: () = {
7793 ["Size of __va_list_tag"][::std::mem::size_of::<__va_list_tag>() - 24usize];
7794 ["Alignment of __va_list_tag"][::std::mem::align_of::<__va_list_tag>() - 8usize];
7795 ["Offset of field: __va_list_tag::gp_offset"]
7796 [::std::mem::offset_of!(__va_list_tag, gp_offset) - 0usize];
7797 ["Offset of field: __va_list_tag::fp_offset"]
7798 [::std::mem::offset_of!(__va_list_tag, fp_offset) - 4usize];
7799 ["Offset of field: __va_list_tag::overflow_arg_area"]
7800 [::std::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize];
7801 ["Offset of field: __va_list_tag::reg_save_area"]
7802 [::std::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize];
7803};