Projects
Essentials
pipewire-aptx
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 7
View file
pipewire-aptx.changes
Changed
@@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Wed Apr 20 11:17:00 UTC 2022 - Bjørn Lie <zaitor@opensuse.org> + +- Update to version 0.3.50 + +------------------------------------------------------------------- Mon Apr 4 15:18:29 UTC 2022 - Bjørn Lie <zaitor@opensuse.org> - Update to version 0.3.49
View file
pipewire-aptx.spec
Changed
@@ -7,7 +7,7 @@ %define soversion 0_2 Name: pipewire-aptx -Version: 0.3.49 +Version: 0.3.50 Release: 0 Summary: PipeWire Bluetooth aptX codec plugin License: MIT
View file
pipewire-0.3.49.tar.gz/spa/plugins/alsa/dll.h
Deleted
@@ -1,71 +0,0 @@ -/* Simple DLL - * - * Copyright © 2019 Wim Taymans - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef SPA_DLL_H -#define SPA_DLL_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include <stddef.h> -#include <math.h> - -#define SPA_DLL_BW_MAX 0.128 -#define SPA_DLL_BW_MIN 0.016 - -struct spa_dll { - double bw; - double z1, z2, z3; - double w0, w1, w2; -}; - -static inline void spa_dll_init(struct spa_dll *dll) -{ - dll->bw = 0.0; - dll->z1 = dll->z2 = dll->z3 = 0.0; -} - -static inline void spa_dll_set_bw(struct spa_dll *dll, double bw, uint32_t period, uint32_t rate) -{ - double w = 2 * M_PI * bw * period / rate; - dll->w0 = 1.0 - exp (-20.0 * w); - dll->w1 = w * 1.5 / period; - dll->w2 = w / 1.5; - dll->bw = bw; -} - -static inline double spa_dll_update(struct spa_dll *dll, double err) -{ - dll->z1 += dll->w0 * (dll->w1 * err - dll->z1); - dll->z2 += dll->w0 * (dll->z1 - dll->z2); - dll->z3 += dll->w2 * dll->z2; - return 1.0 - (dll->z2 + dll->z3); -} - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* SPA_DLL_H */
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/registry.h
Deleted
@@ -1,54 +0,0 @@ -/* PipeWire - * - * Copyright © 2021 Wim Taymans <wim.taymans@gmail.com> - * Copyright © 2021 Arun Raghavan <arun@asymptotic.io> - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - */ - -#ifndef PIPEWIRE_PULSE_MODULE_REGISTRY_H -#define PIPEWIRE_PULSE_MODULE_REGISTRY_H - -struct impl; - -struct module *create_module_always_sink(struct impl *impl, const char *argument); -struct module *create_module_combine_sink(struct impl *impl, const char *argument); -struct module *create_module_echo_cancel(struct impl *impl, const char *argument); -struct module *create_module_ladspa_sink(struct impl *impl, const char *argument); -struct module *create_module_ladspa_source(struct impl *impl, const char *argument); -struct module *create_module_loopback(struct impl *impl, const char *argument); -struct module *create_module_native_protocol_tcp(struct impl *impl, const char *argument); -struct module *create_module_null_sink(struct impl *impl, const char *argument); -struct module *create_module_raop_discover(struct impl *impl, const char *argument); -struct module *create_module_remap_sink(struct impl *impl, const char *argument); -struct module *create_module_remap_source(struct impl *impl, const char *argument); -struct module *create_module_tunnel_sink(struct impl *impl, const char *argument); -struct module *create_module_tunnel_source(struct impl *impl, const char *argument); -struct module *create_module_simple_protocol_tcp(struct impl *impl, const char *argument); -struct module *create_module_switch_on_connect(struct impl *impl, const char *argument); -struct module *create_module_pipe_source(struct impl *impl, const char *argument); -struct module *create_module_pipe_sink(struct impl *impl, const char *argument); -struct module *create_module_zeroconf_discover(struct impl *impl, const char *argument); -struct module *create_module_zeroconf_publish(struct impl *impl, const char *argument); -struct module *create_module_roc_sink(struct impl *impl, const char *argument); -struct module *create_module_roc_source(struct impl *impl, const char *argument); -struct module *create_module_x11_bell(struct impl *impl, const char *argument); - -#endif
View file
pipewire-0.3.49.tar.gz/NEWS -> pipewire-0.3.50.tar.gz/NEWS
Changed
@@ -1,4 +1,95 @@ -# PipeWire 0.3.49 (2022-03-31) +# PipeWire 0.3.50 (2022-04-13) + +This is a bugfix release that is API and ABI compatible with previous +0.3.x releases. + +## Highlights + - pw-stream can now report more timing information and can suggest + the optimal number of samples to queue for playback. + - pw-dot now works again.. + - module-pulse-tunnel latency was improved. + - WINE applications using the JACK backend should no longer crash. + - The channelmixer defaults are improved and the muffled sound when + playing back 5.1 and 7.1 material has been fixed. + - Many fixes and improvements. + + +## PipeWire + - pw-stream now places a suggested amount of samples in the pw-buffer + for playback. This allows you to remove some places where + spa_io_rate_match was needed to get this information. + - pw-stream has new API to request a timing update. New fields are + added in the timing info, such as number of buffered samples in + the resampler and the number of queued and dequeued buffers. + - pw-stream has support for double controls now. More controls are + exposed such as the Rate control to do adaptive resampling. + - The thread-utils object was moved to the context to avoid some + concurrent use cases that caused crashes. (#2252) + - Deactivating an exported node/stream will now remove the node from + the data-thread immediately so that the process function will not + be called anymore and resources can be safely freed. This could + fix some of the last remaining crashes when streams are stopped. + - PipeWire will now fail to load a module that tries to register + the same export type twice instead of silently doing the wrong + thing. (#2281) + +## Modules + - Many modules now use the NODE_WANT_DRIVER instead of the + pipewire.dummy NODE_GROUP property. This makes it possible to use + them with any other driver and can avoid resampling in some + cases. + - module-pulse-tunnel now uses an adaptive resampler to keep the + latency under control. Latency should be much better than before + and stay constant even when there are network delays. + - There is now an option for packages to disable building the RTKit + module, which is still built by default for backwards compatibility + reasons. + - A leak was fixed in filter-chain. (#2220) + - Module node names are now made more unique with the pid. + +## tools + - pw-cat verbose output has been improved. + - pw-link now has a man page. (#2263) + - pw-reserve now has an -r option to make it issue a RequestRelease + command on the owner of the device. This makes it possible to ask + WirePlumber to close and release a device. + - Fix pw-dot again. It didn't work anymore because of stray done + events that were emitted to notify the client of object serials. + (#2253) + +## SPA + - The channelmixer now has PSD upmixing enabled again. We used the + simple upmixing in the previous release but that just sounds too + aweful to be a good default. (#861) and (#2219) + - The channelmixer will not upmix FC and LFE anymore when upmixing is + explicitly disabled. (#2266) + - The channelmixer will only lowpass filter FC and LFE channels when + they were upmixed. (#2280) + - The defaults of the channelmixer were tweaked a little. There is now + a little bit more bass in the LFE channel and more high fequencies + in the FC channel when upmixing. Also the channel widening has been + disabled by default. + - Locale independent float parsing now uses a more portable solution + with uselocale. + - ALSA will now only allocate a buffer size big enough to hold 4 + times the quantum limit instead of as large as possible. + +## pulse-server + - Internal cleanups in handling of modules. + - A quirk to force s16 sample formats for teams-insider has been added. + +## JACK + - The data-loop is now started in activate and stopped in deactivate. + This makes the data-loop respect any custom thread functions you + configure. This also makes WINE apps using the JACK backend work. + (#1495). + - Port sorting was improved/fixed. (#2260) + + +Older versions: + + +# PipeWire 0.3.49 (2022-03-29) This is a bugfix release that is API and ABI compatible with previous 0.3.x releases. @@ -69,9 +160,6 @@ adding a track would fail after some time. (#1714) -Older versions: - - # PipeWire 0.3.48 (2022-03-03) This is a bugfix release that is API and ABI compatible with previous
View file
pipewire-0.3.49.tar.gz/man/meson.build -> pipewire-0.3.50.tar.gz/man/meson.build
Changed
@@ -13,6 +13,7 @@ 'pw-cat.1.rst.in', 'pw-cli.1.rst.in', 'pw-dot.1.rst.in', + 'pw-link.1.rst.in', 'pw-metadata.1.rst.in', 'pw-mididump.1.rst.in', 'pw-mon.1.rst.in',
View file
pipewire-0.3.50.tar.gz/man/pw-link.1.rst.in
Added
@@ -0,0 +1,139 @@ +pw-link +####### + +------------------------- +The PipeWire Link Command +------------------------- + +:Manual section: 1 +:Manual group: General Commands Manual + +SYNOPSIS +======== + +| **pw-link** *options* -o|-i|-l *out-pattern* *in-pattern* + +| **pw-link** *options* *output* *input* + +| **pw-link** *options* -d *output* *input* + +| **pw-link** *options* -d *link-id* + +DESCRIPTION +=========== + +List, create and destroy links between PipeWire ports. + +COMMON OPTIONS +============== + +-r | --remote=NAME + The name the *remote* instance to monitor. If left unspecified, + a connection is made to the default PipeWire instance. + +-h | --help + Show help. + +--version + Show version information. + +LISTING PORTS AND LINKS +======================= + +Specify one of -o, -i or -l to list the matching optional input and +output ports and their links. + +-o | --output + List output ports + +-i | --input + List output ports + +-l | --links + List links + +-m | --monitor + Monitor links and ports. **pw-link** will not exit but monitor and + print new and destroyed ports or links. + +-I | --id + List IDs. Also list the unique link and port ids. + +-v | --verbose + Verbose port properties. Also list the port-object-path and the port-alias. + +CONNECTING PORTS +================ + +Whithout any list option (-i, -o or -l), the given ports will be linked. +Valid port specifications are: + +*port-id* + As obtained with the -I option when listing ports. + +*node-name:port-name* + As obtained when listing ports. + +*port-object-path* + As obtained from the first alternative name for the port when listing + them with the -v option. + +*port-alias* + As obtained from the second alternative name for the ports when listing + them with the -v option. + +Extra options when linking can be given: + +-L | --linger + Linger. Will create a link that exists after **pw-link** is destroyed. + This is the default behaviour, unless the -m option is given. + +-P | --passive + Passive link. A passive link will keep both nodes it links inactive + unless another non-passive link is activating the nodes. You can use this + to link a sink to a filter and have them both suspended when nothing else + is linked to either of them. + +-p | --props=PROPS + Properties as JSON object. Give extra properties when creaing the link. + +DISCONNECTING PORTS +=================== + +When the -d option is given, an existing link between port is destroyed. + +To disconnect port, a single *link-id*, as obtained when listing links with +the -I option, or two port specifications can be given. See the connecting +ports section for valid port specifications. + +-d | --disconnect + Disconnect ports + +EXAMPLES +======== + +**pw-link** -iol + List all port and their links. + +**pw-link** -lm + List all links and monitor changes until **pw-link** is stopped. + +**pw-link** paplay:output_FL alsa_output.pci-0000_00_1b.0.analog-stereo:playback_FL + Link the given output port to the input port. + +**pw-link** -lI + List links and their Id. + +**pw-link** -d 89 + Destroy the link with id 89. + +AUTHORS +======= + +The PipeWire Developers <@PACKAGE_BUGREPORT@>; PipeWire is available from @PACKAGE_URL@ + +SEE ALSO +======== + +``pipewire(1)``, +``pw-cli(1)``,
View file
pipewire-0.3.49.tar.gz/meson.build -> pipewire-0.3.50.tar.gz/meson.build
Changed
@@ -1,5 +1,5 @@ project('pipewire', 'c' , - version : '0.3.49', + version : '0.3.50', license : 'MIT', 'LGPL-2.1-or-later', 'GPL-2.0-only' , meson_version : '>= 0.59.0', default_options : 'warning_level=3',
View file
pipewire-0.3.49.tar.gz/meson_options.txt -> pipewire-0.3.50.tar.gz/meson_options.txt
Changed
@@ -237,3 +237,7 @@ description: 'Enable code that depends on libcanberra', type: 'feature', value: 'auto') +option('legacy-rtkit', + description: 'Build legacy rtkit module', + type: 'boolean', + value: 'true')
View file
pipewire-0.3.49.tar.gz/pipewire-alsa/alsa-plugins/pcm_pipewire.c -> pipewire-0.3.50.tar.gz/pipewire-alsa/alsa-plugins/pcm_pipewire.c
Changed
@@ -90,7 +90,6 @@ struct spa_hook stream_listener; struct pw_time time; - struct spa_io_rate_match *rate_match; struct spa_audio_info_raw format; } snd_pcm_pipewire_t; @@ -374,19 +373,6 @@ pw_stream_update_params(pw->stream, params, n_params); } -static void on_stream_io_changed(void *data, uint32_t id, void *area, uint32_t size) -{ - snd_pcm_pipewire_t *pw = data; - switch (id) { - case SPA_IO_RateMatch: - if (pw->io.stream == SND_PCM_STREAM_PLAYBACK) - pw->rate_match = area; - break; - default: - break; - } -} - static void on_stream_drained(void *data) { snd_pcm_pipewire_t *pw = data; @@ -403,7 +389,7 @@ struct pw_buffer *b; snd_pcm_uframes_t hw_avail, before, want, xfer; - pw_stream_get_time(pw->stream, &pw->time); + pw_stream_get_time_n(pw->stream, &pw->time, sizeof(pw->time)); if (pw->time.rate.num != 0) { pw->time.delay = pw->time.delay * io->rate * pw->time.rate.num / pw->time.rate.denom; @@ -422,7 +408,7 @@ if (b == NULL) return; - want = pw->rate_match ? pw->rate_match->size : hw_avail; + want = b->requested ? b->requested : hw_avail; xfer = snd_pcm_pipewire_process(pw, b, &hw_avail, want); @@ -451,7 +437,6 @@ static const struct pw_stream_events stream_events = { PW_VERSION_STREAM_EVENTS, .param_changed = on_stream_param_changed, - .io_changed = on_stream_io_changed, .process = on_stream_process, .drained = on_stream_drained, };
View file
pipewire-0.3.49.tar.gz/pipewire-jack/src/pipewire-jack.c -> pipewire-0.3.50.tar.gz/pipewire-jack/src/pipewire-jack.c
Changed
@@ -261,6 +261,8 @@ struct pw_thread_loop *loop; /* thread_lock protects all below */ struct pw_context *context; + struct spa_thread_utils *old_thread_utils; + struct spa_thread_utils thread_utils; pthread_mutex_t lock; /* protects map and lists below, in addition to thread_lock */ struct spa_list objects; uint32_t free_count; @@ -2486,6 +2488,72 @@ .port_set_mix_info = client_node_port_set_mix_info, }; +#define CHECK(expression,label) \ +do { \ + if ((errno = expression) != 0) { \ + res = -errno; \ + pw_log_error(#expression ": %s", strerror(errno)); \ + goto label; \ + } \ +} while(false); + +static struct spa_thread *impl_create(void *data, + const struct spa_dict *props, + void *(*start)(void*), void *arg) +{ + struct client *c = (struct client *) data; + struct spa_thread *thr; + int res = 0; + + pw_log_info("create thread"); + if (globals.creator != NULL) { + pthread_t pt; + pthread_attr_t attributes; + + pthread_attr_init(&attributes); + CHECK(pthread_attr_setdetachstate(&attributes, PTHREAD_CREATE_JOINABLE), error); + CHECK(pthread_attr_setscope(&attributes, PTHREAD_SCOPE_SYSTEM), error); + CHECK(pthread_attr_setinheritsched(&attributes, PTHREAD_EXPLICIT_SCHED), error); + CHECK(pthread_attr_setstacksize(&attributes, THREAD_STACK), error); + + res = -globals.creator(&pt, &attributes, start, arg); + + pthread_attr_destroy(&attributes); + if (res != 0) + goto error; + thr = (struct spa_thread*)pt; + } else { + thr = spa_thread_utils_create(c->context.old_thread_utils, NULL, start, arg); + } + return thr; +error: + pw_log_warn("create RT thread failed: %s", strerror(res)); + errno = -res; + return NULL; + +} + +static int impl_join(void *data, + struct spa_thread *thread, void **retval) +{ + struct client *c = (struct client *) data; + pw_log_info("join thread"); + return spa_thread_utils_join(c->context.old_thread_utils, thread, retval); +} + +static int impl_acquire_rt(void *data, struct spa_thread *thread, int priority) +{ + struct client *c = (struct client *) data; + return spa_thread_utils_acquire_rt(c->context.old_thread_utils, thread, priority); +} + +static struct spa_thread_utils_methods thread_utils_impl = { + SPA_VERSION_THREAD_UTILS_METHODS, + .create = impl_create, + .join = impl_join, + .acquire_rt = impl_acquire_rt, +}; + static jack_port_type_id_t string_to_type(const char *port_type) { if (spa_streq(JACK_DEFAULT_AUDIO_TYPE, port_type)) @@ -3205,7 +3273,23 @@ mix2 = mix2_sse; #endif } + client->context.old_thread_utils = + pw_context_get_object(client->context.context, + SPA_TYPE_INTERFACE_ThreadUtils); + if (client->context.old_thread_utils == NULL) + client->context.old_thread_utils = pw_thread_utils_get(); + + client->context.thread_utils.iface = SPA_INTERFACE_INIT( + SPA_TYPE_INTERFACE_ThreadUtils, + SPA_VERSION_THREAD_UTILS, + &thread_utils_impl, client); + client->loop = client->context.context->data_loop_impl; + pw_data_loop_stop(client->loop); + + pw_context_set_object(client->context.context, + SPA_TYPE_INTERFACE_ThreadUtils, + &client->context.thread_utils); spa_list_init(&client->links); spa_list_init(&client->rt.target_links); @@ -3568,6 +3652,7 @@ return 0; pw_thread_loop_lock(c->context.loop); + pw_data_loop_start(c->loop); if ((res = do_activate(c)) < 0) goto done; @@ -3575,15 +3660,17 @@ c->activation->pending_new_pos = true; c->activation->pending_sync = true; - c->active = true; do_callback(c, graph_callback, c->graph_arg); done: + if (res < 0) + pw_data_loop_stop(c->loop); + pw_thread_loop_unlock(c->context.loop); - return 0; + return res; } SPA_EXPORT @@ -3617,7 +3704,6 @@ res = do_sync(c); - pw_data_loop_start(c->loop); pw_thread_loop_unlock(c->context.loop); if (res < 0) @@ -5325,15 +5411,14 @@ res = is_def2 - is_def1; else if ((*o1)->port.priority != (*o2)->port.priority) res = (*o2)->port.priority - (*o1)->port.priority; - else if ((res = strcmp((*o1)->port.alias1, (*o2)->port.alias1)) == 0) { - res = (*o1)->port.node_id - (*o2)->port.node_id; + else if ((res = (*o1)->port.node_id - (*o2)->port.node_id) == 0) { + if ((*o1)->port.is_monitor != (*o2)->port.is_monitor) + res = (*o1)->port.is_monitor - (*o2)->port.is_monitor; if (res == 0) res = (*o1)->port.system_id - (*o2)->port.system_id; if (res == 0) res = (*o1)->serial - (*o2)->serial; } - - pw_log_debug("port %s<->%s type:%d<->%d def:%d<->%d prio:%d<->%d id:%d<->%d res:%d", (*o1)->port.name, (*o2)->port.name, (*o1)->port.type_id, (*o2)->port.type_id, @@ -5964,19 +6049,10 @@ spa_return_val_if_fail(c != NULL, -1); - pw_thread_utils_get_rt_range(NULL, &min, &max); + spa_thread_utils_get_rt_range(&c->context.thread_utils, NULL, &min, &max); return SPA_MIN(max, c->rt_max) - 1; } -#define CHECK(expression,label) \ -do { \ - if ((errno = expression) != 0) { \ - res = -errno; \ - pw_log_error(#expression ": %s", strerror(errno)); \ - goto label; \ - } \ -} while(false); - SPA_EXPORT int jack_acquire_real_time_scheduling (jack_native_thread_t thread, int priority) { @@ -6015,55 +6091,45 @@ void *(*start_routine)(void*), void *arg) { + struct client *c = (struct client *) client; int res = 0; + struct spa_thread *thr; spa_return_val_if_fail(client != NULL, -EINVAL); + spa_return_val_if_fail(thread != NULL, -EINVAL); + spa_return_val_if_fail(start_routine != NULL, -EINVAL); pw_log_info("client %p: create thread rt:%d prio:%d", client, realtime, priority); - if (globals.creator != NULL) { - pthread_attr_t attributes; - pthread_attr_init(&attributes); - CHECK(pthread_attr_setdetachstate(&attributes, PTHREAD_CREATE_JOINABLE), error);
View file
pipewire-0.3.49.tar.gz/po/hr.po -> pipewire-0.3.50.tar.gz/po/hr.po
Changed
@@ -6,10 +6,9 @@ msgid "" msgstr "" "Project-Id-Version: pipewire\n" -"Report-Msgid-Bugs-To: https://gitlab.freedesktop.org/pipewire/pipewire/" -"issues/new\n" -"POT-Creation-Date: 2021-04-18 16:54+0800\n" -"PO-Revision-Date: 2021-11-17 15:36+0100\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2022-04-03 12:56+0200\n" +"PO-Revision-Date: 2022-04-03 12:57+0200\n" "Last-Translator: gogo <trebelnik2@gmail.com>\n" "Language-Team: Croatian <https://translate.fedoraproject.org/projects/" "pipewire/pipewire/hr/>\n" @@ -22,7 +21,7 @@ "X-Generator: Poedit 2.3\n" "X-Launchpad-Export-Date: 2017-04-20 21:04+0000\n" -#: src/daemon/pipewire.c:45 +#: src/daemon/pipewire.c:46 #, c-format msgid "" "%s options\n" @@ -35,32 +34,36 @@ " --version Prikaži inačicu\n" " -c, --config Učitaj podešavanje (Zadano %s)\n" -#: src/modules/module-protocol-pulse/modules/module-tunnel-sink.c:185 -#: src/modules/module-protocol-pulse/modules/module-tunnel-source.c:185 +#: src/modules/module-protocol-pulse/modules/module-tunnel-sink.c:190 +#: src/modules/module-protocol-pulse/modules/module-tunnel-source.c:190 #, c-format msgid "Tunnel to %s/%s" msgstr "Tunel do %s/%s" -#: src/modules/module-pulse-tunnel.c:536 +#: src/modules/module-fallback-sink.c:51 +msgid "Dummy Output" +msgstr "Lažni izlaz" + +#: src/modules/module-pulse-tunnel.c:545 #, c-format msgid "Tunnel for %s@%s" msgstr "Tunel za %s@%s" -#: src/modules/module-zeroconf-discover.c:332 +#: src/modules/module-zeroconf-discover.c:313 msgid "Unknown device" msgstr "Nepoznat uređaj" -#: src/modules/module-zeroconf-discover.c:344 +#: src/modules/module-zeroconf-discover.c:325 #, c-format msgid "%s on %s@%s" msgstr "%s na %s@%s" -#: src/modules/module-zeroconf-discover.c:348 +#: src/modules/module-zeroconf-discover.c:329 #, c-format msgid "%s on %s" msgstr "%s na %s" -#: src/tools/pw-cat.c:1058 +#: src/tools/pw-cat.c:1087 #, c-format msgid "" "%s options <file>\n" @@ -75,7 +78,7 @@ " -v, --verbose Omogući opširnije radnje\n" "\n" -#: src/tools/pw-cat.c:1065 +#: src/tools/pw-cat.c:1094 #, c-format msgid "" " -R, --remote Remote daemon name\n" @@ -112,7 +115,7 @@ "target\n" "\n" -#: src/tools/pw-cat.c:1083 +#: src/tools/pw-cat.c:1112 #, c-format msgid "" " --rate Sample rate (req. for rec) (default " @@ -148,7 +151,7 @@ "15) (zadano je %d)\n" "\n" -#: src/tools/pw-cat.c:1100 +#: src/tools/pw-cat.c:1129 msgid "" " -p, --playback Playback mode\n" " -r, --record Recording mode\n" @@ -162,7 +165,7 @@ " -d, --dsd DSD način\n" "\n" -#: src/tools/pw-cli.c:3018 +#: src/tools/pw-cli.c:3051 #, c-format msgid "" "%s options command\n" @@ -186,7 +189,7 @@ msgstr "Pro Audio" #: spa/plugins/alsa/acp/acp.c:444 spa/plugins/alsa/acp/alsa-mixer.c:4648 -#: spa/plugins/bluez5/bluez5-device.c:1145 +#: spa/plugins/bluez5/bluez5-device.c:1159 msgid "Off" msgstr "Isključeno" @@ -213,7 +216,7 @@ #: spa/plugins/alsa/acp/alsa-mixer.c:2657 #: spa/plugins/alsa/acp/alsa-mixer.c:2741 -#: spa/plugins/bluez5/bluez5-device.c:1302 +#: spa/plugins/bluez5/bluez5-device.c:1328 msgid "Microphone" msgstr "Mikrofon" @@ -279,7 +282,7 @@ msgstr "Bez pojačanja basa" #: spa/plugins/alsa/acp/alsa-mixer.c:2672 -#: spa/plugins/bluez5/bluez5-device.c:1307 +#: spa/plugins/bluez5/bluez5-device.c:1333 msgid "Speaker" msgstr "Zvučnik" @@ -394,7 +397,7 @@ #: spa/plugins/alsa/acp/alsa-mixer.c:4484 #: spa/plugins/alsa/acp/alsa-mixer.c:4642 -#: spa/plugins/bluez5/bluez5-device.c:1292 +#: spa/plugins/bluez5/bluez5-device.c:1318 msgid "Headset" msgstr "Slušalice s mikrofonom" @@ -508,17 +511,18 @@ msgid "Mono Chat + 7.1 Surround" msgstr "Mono razgovor + 7.1 Surround" -#: spa/plugins/alsa/acp/alsa-mixer.c:4750 +#: spa/plugins/alsa/acp/alsa-mixer.c:4754 #, c-format msgid "%s Output" msgstr "%s izlaz" -#: spa/plugins/alsa/acp/alsa-mixer.c:4757 +#: spa/plugins/alsa/acp/alsa-mixer.c:4761 #, c-format msgid "%s Input" msgstr "%s ulaz" -#: spa/plugins/alsa/acp/alsa-util.c:1173 spa/plugins/alsa/acp/alsa-util.c:1267 +#: spa/plugins/alsa/acp/alsa-util.c:1173 +#: spa/plugins/alsa/acp/alsa-util.c:1267 #, c-format msgid "" "snd_pcm_avail() returned a value that is exceptionally large: %lu byte (%lu " @@ -627,62 +631,62 @@ msgid "Modem" msgstr "Modem" -#: spa/plugins/bluez5/bluez5-device.c:1155 +#: spa/plugins/bluez5/bluez5-device.c:1170 msgid "Audio Gateway (A2DP Source & HSP/HFP AG)" msgstr "Zvučni pristupnik (A2DP izvor i HSP/HFP AG)" -#: spa/plugins/bluez5/bluez5-device.c:1178 +#: spa/plugins/bluez5/bluez5-device.c:1195 #, c-format msgid "High Fidelity Playback (A2DP Sink, codec %s)" msgstr "Reprodukcija visoke autentičnosti (A2DP slivnik, kôdek %s)" -#: spa/plugins/bluez5/bluez5-device.c:1181 +#: spa/plugins/bluez5/bluez5-device.c:1198 #, c-format msgid "High Fidelity Duplex (A2DP Source/Sink, codec %s)" msgstr "Telefonija visoke autentičnosti (A2DP slivnik, kôdek %s)" -#: spa/plugins/bluez5/bluez5-device.c:1188 +#: spa/plugins/bluez5/bluez5-device.c:1206 msgid "High Fidelity Playback (A2DP Sink)" msgstr "Reprodukcija visoke autentičnosti (A2DP slivnik)" -#: spa/plugins/bluez5/bluez5-device.c:1190 +#: spa/plugins/bluez5/bluez5-device.c:1208 msgid "High Fidelity Duplex (A2DP Source/Sink)" msgstr "Telefonija visoke autentičnosti (A2DP izvor/slivnik)" -#: spa/plugins/bluez5/bluez5-device.c:1217 +#: spa/plugins/bluez5/bluez5-device.c:1236 #, c-format msgid "Headset Head Unit (HSP/HFP, codec %s)" msgstr "Jedinica slušalice s mikrofonom (HSP/HFP, kôdek %s)" -#: spa/plugins/bluez5/bluez5-device.c:1221 +#: spa/plugins/bluez5/bluez5-device.c:1241
View file
pipewire-0.3.49.tar.gz/po/pipewire.pot -> pipewire-0.3.50.tar.gz/po/pipewire.pot
Changed
@@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: pipewire\n" "Report-Msgid-Bugs-To: https://gitlab.freedesktop.org/pipewire/pipewire/issues/new\n" -"POT-Creation-Date: 2021-11-17 15:06+0100\n" +"POT-Creation-Date: 2022-04-03 12:56+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -18,7 +18,7 @@ "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" -#: src/daemon/pipewire.c:45 +#: src/daemon/pipewire.c:46 #, c-format msgid "" "%s options\n" @@ -27,32 +27,36 @@ " -c, --config Load config (Default %s)\n" msgstr "" -#: src/modules/module-protocol-pulse/modules/module-tunnel-sink.c:185 -#: src/modules/module-protocol-pulse/modules/module-tunnel-source.c:185 +#: src/modules/module-protocol-pulse/modules/module-tunnel-sink.c:190 +#: src/modules/module-protocol-pulse/modules/module-tunnel-source.c:190 #, c-format msgid "Tunnel to %s/%s" msgstr "" -#: src/modules/module-pulse-tunnel.c:536 +#: src/modules/module-fallback-sink.c:51 +msgid "Dummy Output" +msgstr "" + +#: src/modules/module-pulse-tunnel.c:545 #, c-format msgid "Tunnel for %s@%s" msgstr "" -#: src/modules/module-zeroconf-discover.c:332 +#: src/modules/module-zeroconf-discover.c:313 msgid "Unknown device" msgstr "" -#: src/modules/module-zeroconf-discover.c:344 +#: src/modules/module-zeroconf-discover.c:325 #, c-format msgid "%s on %s@%s" msgstr "" -#: src/modules/module-zeroconf-discover.c:348 +#: src/modules/module-zeroconf-discover.c:329 #, c-format msgid "%s on %s" msgstr "" -#: src/tools/pw-cat.c:1058 +#: src/tools/pw-cat.c:1087 #, c-format msgid "" "%s options <file>\n" @@ -62,7 +66,7 @@ "\n" msgstr "" -#: src/tools/pw-cat.c:1065 +#: src/tools/pw-cat.c:1094 #, c-format msgid "" " -R, --remote Remote daemon name\n" @@ -80,7 +84,7 @@ "\n" msgstr "" -#: src/tools/pw-cat.c:1083 +#: src/tools/pw-cat.c:1112 #, c-format msgid "" " --rate Sample rate (req. for rec) (default " @@ -100,7 +104,7 @@ "\n" msgstr "" -#: src/tools/pw-cat.c:1100 +#: src/tools/pw-cat.c:1129 msgid "" " -p, --playback Playback mode\n" " -r, --record Recording mode\n" @@ -109,7 +113,7 @@ "\n" msgstr "" -#: src/tools/pw-cli.c:3018 +#: src/tools/pw-cli.c:3051 #, c-format msgid "" "%s options command\n" @@ -125,7 +129,7 @@ msgstr "" #: spa/plugins/alsa/acp/acp.c:444 spa/plugins/alsa/acp/alsa-mixer.c:4648 -#: spa/plugins/bluez5/bluez5-device.c:1145 +#: spa/plugins/bluez5/bluez5-device.c:1159 msgid "Off" msgstr "" @@ -152,7 +156,7 @@ #: spa/plugins/alsa/acp/alsa-mixer.c:2657 #: spa/plugins/alsa/acp/alsa-mixer.c:2741 -#: spa/plugins/bluez5/bluez5-device.c:1302 +#: spa/plugins/bluez5/bluez5-device.c:1328 msgid "Microphone" msgstr "" @@ -218,7 +222,7 @@ msgstr "" #: spa/plugins/alsa/acp/alsa-mixer.c:2672 -#: spa/plugins/bluez5/bluez5-device.c:1307 +#: spa/plugins/bluez5/bluez5-device.c:1333 msgid "Speaker" msgstr "" @@ -333,7 +337,7 @@ #: spa/plugins/alsa/acp/alsa-mixer.c:4484 #: spa/plugins/alsa/acp/alsa-mixer.c:4642 -#: spa/plugins/bluez5/bluez5-device.c:1292 +#: spa/plugins/bluez5/bluez5-device.c:1318 msgid "Headset" msgstr "" @@ -447,12 +451,12 @@ msgid "Mono Chat + 7.1 Surround" msgstr "" -#: spa/plugins/alsa/acp/alsa-mixer.c:4750 +#: spa/plugins/alsa/acp/alsa-mixer.c:4754 #, c-format msgid "%s Output" msgstr "" -#: spa/plugins/alsa/acp/alsa-mixer.c:4757 +#: spa/plugins/alsa/acp/alsa-mixer.c:4761 #, c-format msgid "%s Input" msgstr "" @@ -524,61 +528,61 @@ msgid "Modem" msgstr "" -#: spa/plugins/bluez5/bluez5-device.c:1155 +#: spa/plugins/bluez5/bluez5-device.c:1170 msgid "Audio Gateway (A2DP Source & HSP/HFP AG)" msgstr "" -#: spa/plugins/bluez5/bluez5-device.c:1178 +#: spa/plugins/bluez5/bluez5-device.c:1195 #, c-format msgid "High Fidelity Playback (A2DP Sink, codec %s)" msgstr "" -#: spa/plugins/bluez5/bluez5-device.c:1181 +#: spa/plugins/bluez5/bluez5-device.c:1198 #, c-format msgid "High Fidelity Duplex (A2DP Source/Sink, codec %s)" msgstr "" -#: spa/plugins/bluez5/bluez5-device.c:1188 +#: spa/plugins/bluez5/bluez5-device.c:1206 msgid "High Fidelity Playback (A2DP Sink)" msgstr "" -#: spa/plugins/bluez5/bluez5-device.c:1190 +#: spa/plugins/bluez5/bluez5-device.c:1208 msgid "High Fidelity Duplex (A2DP Source/Sink)" msgstr "" -#: spa/plugins/bluez5/bluez5-device.c:1217 +#: spa/plugins/bluez5/bluez5-device.c:1236 #, c-format msgid "Headset Head Unit (HSP/HFP, codec %s)" msgstr "" -#: spa/plugins/bluez5/bluez5-device.c:1221 +#: spa/plugins/bluez5/bluez5-device.c:1241 msgid "Headset Head Unit (HSP/HFP)" msgstr "" -#: spa/plugins/bluez5/bluez5-device.c:1297 +#: spa/plugins/bluez5/bluez5-device.c:1323 msgid "Handsfree" msgstr "" -#: spa/plugins/bluez5/bluez5-device.c:1312 +#: spa/plugins/bluez5/bluez5-device.c:1338 msgid "Headphone" msgstr ""
View file
pipewire-0.3.49.tar.gz/po/pt.po -> pipewire-0.3.50.tar.gz/po/pt.po
Changed
@@ -1,17 +1,19 @@ -# +# Portuguese translation for pipewire. +# Copyright © 2008-2022 the pipewire authors. +# This file is distributed under the same license as the pipewire package. # Rui Gouveia <rui.gouveia@globaltek.pt>, 2012. # Rui Gouveia <rui.gouveia@globaltek.pt>, 2012, 2015. # Pedro Albuquerque <palbuquerque73@openmailbox.com>, 2015. # Juliano de Souza Camargo <julianosc@pm.me>, 2020. -# Hugo Carvalho <hugokarvalho@hotmail.com>, 2021. +# Hugo Carvalho <hugokarvalho@hotmail.com>, 2021 2022. # msgid "" msgstr "" "Project-Id-Version: pipewire\n" "Report-Msgid-Bugs-To: https://gitlab.freedesktop.org/pipewire/pipewire/" "issues/new\n" -"POT-Creation-Date: 2021-04-18 16:54+0800\n" -"PO-Revision-Date: 2021-08-02 15:28+0100\n" +"POT-Creation-Date: 2021-11-17 15:06+0100\n" +"PO-Revision-Date: 2022-03-30 19:37+0100\n" "Last-Translator: Hugo Carvalho <hugokarvalho@hotmail.com>\n" "Language-Team: Portuguese <https://l10n.gnome.org/teams/pt/>\n" "Language: pt\n" @@ -19,9 +21,9 @@ "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -"X-Generator: Poedit 3.0\n" +"X-Generator: Poedit 3.0.1\n" -#: src/daemon/pipewire.c:43 +#: src/daemon/pipewire.c:45 #, c-format msgid "" "%s options\n" @@ -35,29 +37,32 @@ " -c, --config Carrega uma configuração (Padrão " "%s)\n" -#: src/daemon/pipewire.desktop.in:4 -msgid "PipeWire Media System" -msgstr "Sistema de Multimédia PipeWire" - -#: src/daemon/pipewire.desktop.in:5 -msgid "Start the PipeWire Media System" -msgstr "Iniciar o Sistema de Multimédia PipeWire" - -#: src/examples/media-session/alsa-monitor.c:526 -#: spa/plugins/alsa/acp/compat.c:187 -msgid "Built-in Audio" -msgstr "Áudio interno" +#: src/modules/module-protocol-pulse/modules/module-tunnel-sink.c:185 +#: src/modules/module-protocol-pulse/modules/module-tunnel-source.c:185 +#, c-format +msgid "Tunnel to %s/%s" +msgstr "Túnel para %s/%s" -#: src/examples/media-session/alsa-monitor.c:530 -#: spa/plugins/alsa/acp/compat.c:192 -msgid "Modem" -msgstr "Modem" +#: src/modules/module-pulse-tunnel.c:536 +#, c-format +msgid "Tunnel for %s@%s" +msgstr "Túnel para %s@%s" -#: src/examples/media-session/alsa-monitor.c:539 +#: src/modules/module-zeroconf-discover.c:332 msgid "Unknown device" msgstr "Dispositivo desconhecido" -#: src/tools/pw-cat.c:991 +#: src/modules/module-zeroconf-discover.c:344 +#, c-format +msgid "%s on %s@%s" +msgstr "%s em %s@%s" + +#: src/modules/module-zeroconf-discover.c:348 +#, c-format +msgid "%s on %s" +msgstr "%s em %s" + +#: src/tools/pw-cat.c:1058 #, c-format msgid "" "%s options <file>\n" @@ -72,7 +77,7 @@ " -v, --verbose Ativa operações descritivas\n" "\n" -#: src/tools/pw-cat.c:998 +#: src/tools/pw-cat.c:1065 #, c-format msgid "" " -R, --remote Remote daemon name\n" @@ -106,7 +111,7 @@ "target\n" "\n" -#: src/tools/pw-cat.c:1016 +#: src/tools/pw-cat.c:1083 #, c-format msgid "" " --rate Sample rate (req. for rec) (default " @@ -143,19 +148,21 @@ "(padrão: %d)\n" "\n" -#: src/tools/pw-cat.c:1033 +#: src/tools/pw-cat.c:1100 msgid "" " -p, --playback Playback mode\n" " -r, --record Recording mode\n" " -m, --midi Midi mode\n" +" -d, --dsd DSD mode\n" "\n" msgstr "" " -p, --playback Modo de reprodução\n" " -r, --record Modo de gravação\n" " -m, --midi Modo midi\n" +" -d, --dsd Modo DSD\n" "\n" -#: src/tools/pw-cli.c:2932 +#: src/tools/pw-cli.c:3018 #, c-format msgid "" "%s options command\n" @@ -167,205 +174,201 @@ msgstr "" "%s options command\n" " -h, --help Mostra esta ajuda\n" -" --version Mostra versão\n" -" -d, --daemon Inicia como daemon (Falso por " +" --version Mostra a versão\n" +" -d, --daemon Inicia como daemon (falso por " "padrão)\n" " -r, --remote Nome do daemon remoto\n" "\n" -#: spa/plugins/alsa/acp/acp.c:290 +#: spa/plugins/alsa/acp/acp.c:321 msgid "Pro Audio" msgstr "Pró áudio" -#: spa/plugins/alsa/acp/acp.c:411 spa/plugins/alsa/acp/alsa-mixer.c:4704 -#: spa/plugins/bluez5/bluez5-device.c:1000 +#: spa/plugins/alsa/acp/acp.c:444 spa/plugins/alsa/acp/alsa-mixer.c:4648 +#: spa/plugins/bluez5/bluez5-device.c:1145 msgid "Off" msgstr "Desligado" -#: spa/plugins/alsa/acp/channelmap.h:466 -msgid "(invalid)" -msgstr "(inválido)" - -#: spa/plugins/alsa/acp/alsa-mixer.c:2709 +#: spa/plugins/alsa/acp/alsa-mixer.c:2652 msgid "Input" msgstr "Entrada" -#: spa/plugins/alsa/acp/alsa-mixer.c:2710 +#: spa/plugins/alsa/acp/alsa-mixer.c:2653 msgid "Docking Station Input" msgstr "Base de entrada da estação" -#: spa/plugins/alsa/acp/alsa-mixer.c:2711 +#: spa/plugins/alsa/acp/alsa-mixer.c:2654 msgid "Docking Station Microphone" msgstr "Base de microfone da estação" -#: spa/plugins/alsa/acp/alsa-mixer.c:2712 +#: spa/plugins/alsa/acp/alsa-mixer.c:2655 msgid "Docking Station Line In" msgstr "Base de linha de entrada da estação" -#: spa/plugins/alsa/acp/alsa-mixer.c:2713 -#: spa/plugins/alsa/acp/alsa-mixer.c:2804 +#: spa/plugins/alsa/acp/alsa-mixer.c:2656 +#: spa/plugins/alsa/acp/alsa-mixer.c:2747 msgid "Line In" msgstr "Linha de entrada" -#: spa/plugins/alsa/acp/alsa-mixer.c:2714 -#: spa/plugins/alsa/acp/alsa-mixer.c:2798 -#: spa/plugins/bluez5/bluez5-device.c:1145 +#: spa/plugins/alsa/acp/alsa-mixer.c:2657 +#: spa/plugins/alsa/acp/alsa-mixer.c:2741 +#: spa/plugins/bluez5/bluez5-device.c:1302 msgid "Microphone" msgstr "Microfone" -#: spa/plugins/alsa/acp/alsa-mixer.c:2715 -#: spa/plugins/alsa/acp/alsa-mixer.c:2799 +#: spa/plugins/alsa/acp/alsa-mixer.c:2658 +#: spa/plugins/alsa/acp/alsa-mixer.c:2742 msgid "Front Microphone" msgstr "Microfone frontal"
View file
pipewire-0.3.50.tar.gz/spa/include/spa/utils/dll.h
Added
@@ -0,0 +1,71 @@ +/* Simple DLL + * + * Copyright © 2019 Wim Taymans + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#ifndef SPA_DLL_H +#define SPA_DLL_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include <stddef.h> +#include <math.h> + +#define SPA_DLL_BW_MAX 0.128 +#define SPA_DLL_BW_MIN 0.016 + +struct spa_dll { + double bw; + double z1, z2, z3; + double w0, w1, w2; +}; + +static inline void spa_dll_init(struct spa_dll *dll) +{ + dll->bw = 0.0; + dll->z1 = dll->z2 = dll->z3 = 0.0; +} + +static inline void spa_dll_set_bw(struct spa_dll *dll, double bw, unsigned period, unsigned rate) +{ + double w = 2 * M_PI * bw * period / rate; + dll->w0 = 1.0 - exp (-20.0 * w); + dll->w1 = w * 1.5 / period; + dll->w2 = w / 1.5; + dll->bw = bw; +} + +static inline double spa_dll_update(struct spa_dll *dll, double err) +{ + dll->z1 += dll->w0 * (dll->w1 * err - dll->z1); + dll->z2 += dll->w0 * (dll->z1 - dll->z2); + dll->z3 += dll->w2 * dll->z2; + return 1.0 - (dll->z2 + dll->z3); +} + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* SPA_DLL_H */
View file
pipewire-0.3.49.tar.gz/spa/include/spa/utils/string.h -> pipewire-0.3.50.tar.gz/spa/include/spa/utils/string.h
Changed
@@ -279,10 +279,9 @@ float v; if (SPA_UNLIKELY(locale == NULL)) locale = newlocale(LC_ALL_MASK, "C", NULL); - if (locale != NULL) - v = strtof_l(str, endptr, locale); - else - v = strtof(str, endptr); + locale_t prev = uselocale(locale); + v = strtof(str, endptr); + uselocale(prev); return v; } @@ -323,10 +322,9 @@ double v; if (SPA_UNLIKELY(locale == NULL)) locale = newlocale(LC_ALL_MASK, "C", NULL); - if (locale != NULL) - v = strtod_l(str, endptr, locale); - else - v = strtod(str, endptr); + locale_t prev = uselocale(locale); + v = strtod(str, endptr); + uselocale(prev); return v; }
View file
pipewire-0.3.49.tar.gz/spa/plugins/alsa/alsa-pcm.c -> pipewire-0.3.50.tar.gz/spa/plugins/alsa/alsa-pcm.c
Changed
@@ -1476,6 +1476,10 @@ state->buffer_frames = period_size * periods; } else { CHECK(snd_pcm_hw_params_get_buffer_size_max(params, &state->buffer_frames), "get_buffer_size_max"); + + state->buffer_frames = SPA_MIN(state->buffer_frames, state->quantum_limit * 4); + + CHECK(snd_pcm_hw_params_set_buffer_size_min(hndl, params, &state->buffer_frames), "set_buffer_size_min"); CHECK(snd_pcm_hw_params_set_buffer_size_near(hndl, params, &state->buffer_frames), "set_buffer_size_near"); periods = state->buffer_frames / period_size; }
View file
pipewire-0.3.49.tar.gz/spa/plugins/alsa/alsa-pcm.h -> pipewire-0.3.50.tar.gz/spa/plugins/alsa/alsa-pcm.h
Changed
@@ -39,6 +39,7 @@ #include <spa/support/loop.h> #include <spa/utils/list.h> #include <spa/utils/json.h> +#include <spa/utils/dll.h> #include <spa/node/node.h> #include <spa/node/utils.h> @@ -50,7 +51,6 @@ #include "alsa.h" -#include "dll.h" #define MAX_RATES 16
View file
pipewire-0.3.49.tar.gz/spa/plugins/alsa/alsa-seq-bridge.c -> pipewire-0.3.50.tar.gz/spa/plugins/alsa/alsa-seq-bridge.c
Changed
@@ -81,7 +81,7 @@ param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_device), - SPA_PROP_INFO_name, SPA_POD_String("The ALSA device"), + SPA_PROP_INFO_description, SPA_POD_String("The ALSA device"), SPA_PROP_INFO_type, SPA_POD_Stringn(p->device, sizeof(p->device))); break; default:
View file
pipewire-0.3.49.tar.gz/spa/plugins/alsa/alsa-seq.c -> pipewire-0.3.50.tar.gz/spa/plugins/alsa/alsa-seq.c
Changed
@@ -39,7 +39,6 @@ #include "alsa.h" -#include "dll.h" #include "alsa-seq.h" #define CHECK(s,msg,...) if ((res = (s)) < 0) { spa_log_error(state->log, msg ": %s", ##__VA_ARGS__, snd_strerror(res)); return res; }
View file
pipewire-0.3.49.tar.gz/spa/plugins/alsa/alsa-seq.h -> pipewire-0.3.50.tar.gz/spa/plugins/alsa/alsa-seq.h
Changed
@@ -37,6 +37,7 @@ #include <spa/support/plugin.h> #include <spa/support/loop.h> #include <spa/utils/list.h> +#include <spa/utils/dll.h> #include <spa/node/node.h> #include <spa/node/utils.h> @@ -47,7 +48,6 @@ #include "alsa.h" -#include "dll.h" struct props { char device64;
View file
pipewire-0.3.49.tar.gz/spa/plugins/alsa/meson.build -> pipewire-0.3.50.tar.gz/spa/plugins/alsa/meson.build
Changed
@@ -37,7 +37,7 @@ executable('test-timer', 'test-timer.c' , - dependencies : alsa_dep, mathlib, epoll_shim_dep , + dependencies : spa_dep, alsa_dep, mathlib, epoll_shim_dep , install : false, )
View file
pipewire-0.3.49.tar.gz/spa/plugins/alsa/test-timer.c -> pipewire-0.3.50.tar.gz/spa/plugins/alsa/test-timer.c
Changed
@@ -31,7 +31,7 @@ #include <alsa/asoundlib.h> -#include <dll.h> +#include <spa/utils/dll.h> #define DEFAULT_DEVICE "hw:0"
View file
pipewire-0.3.49.tar.gz/spa/plugins/audioconvert/channelmix-ops-c.c -> pipewire-0.3.50.tar.gz/spa/plugins/audioconvert/channelmix-ops-c.c
Changed
@@ -24,28 +24,52 @@ #include "channelmix-ops.h" +static inline void clear_c(float *d, uint32_t n_samples) +{ + memset(d, 0, n_samples * sizeof(float)); +} + +static inline void copy_c(float *d, const float *s, uint32_t n_samples) +{ + spa_memcpy(d, s, n_samples * sizeof(float)); +} + +static inline void vol_c(float *d, const float *s, float vol, uint32_t n_samples) +{ + uint32_t n; + if (vol == 0.0f) { + clear_c(d, n_samples); + } else if (vol == 1.0f) { + copy_c(d, s, n_samples); + } else { + for (n = 0; n < n_samples; n++) + dn = sn * vol; + } +} + +static inline void add_c(float *d, const float *s0, const float *s1, uint32_t n_samples) +{ + uint32_t n; + for (n = 0; n < n_samples; n++) + dn = s0n + s1n; +} + +static inline void sub_c(float *d, const float *s0, const float *s1, uint32_t n_samples) +{ + uint32_t n; + for (n = 0; n < n_samples; n++) + dn = s0n - s1n; +} + void channelmix_copy_c(struct channelmix *mix, void * SPA_RESTRICT dst, const void * SPA_RESTRICT src, uint32_t n_samples) { - uint32_t i, n, n_dst = mix->dst_chan; + uint32_t i, n_dst = mix->dst_chan; float **d = (float **)dst; const float **s = (const float **)src; - - if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_ZERO)) { - for (i = 0; i < n_dst; i++) - memset(di, 0, n_samples * sizeof(float)); - } - else if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_IDENTITY)) { - for (i = 0; i < n_dst; i++) - spa_memcpy(di, si, n_samples * sizeof(float)); - } - else { - for (i = 0; i < n_dst; i++) { - for (n = 0; n < n_samples; n++) - din = sin * mix->matrixii; - } - } + for (i = 0; i < n_dst; i++) + vol_c(di, si, mix->matrixii, n_samples); } #define _M(ch) (1UL << SPA_AUDIO_CHANNEL_ ## ch) @@ -60,14 +84,14 @@ if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_ZERO)) { for (i = 0; i < n_dst; i++) - memset(di, 0, n_samples * sizeof(float)); + clear_c(di, n_samples); } else if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_COPY)) { uint32_t copy = SPA_MIN(n_dst, n_src); for (i = 0; i < copy; i++) - spa_memcpy(di, si, n_samples * sizeof(float)); + copy_c(di, si, n_samples); for (; i < n_dst; i++) - memset(di, 0, n_samples * sizeof(float)); + clear_c(di, n_samples); } else { for (n = 0; n < n_samples; n++) { @@ -90,29 +114,13 @@ channelmix_f32_1_2_c(struct channelmix *mix, void * SPA_RESTRICT dst, const void * SPA_RESTRICT src, uint32_t n_samples) { - uint32_t n; float **d = (float **)dst; const float **s = (const float **)src; const float v0 = mix->matrix00; const float v1 = mix->matrix10; - if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_ZERO)) { - memset(d0, 0, n_samples * sizeof(float)); - memset(d1, 0, n_samples * sizeof(float)); - } else if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_EQUAL)) { - if (v0 == 1.0f) { - for (n = 0; n < n_samples; n++) - d0n = d1n = s0n; - } else { - for (n = 0; n < n_samples; n++) - d0n = d1n = s0n * v0; - } - } else { - for (n = 0; n < n_samples; n++) { - d0n = s0n * v0; - d1n = s0n * v1; - } - } + vol_c(d0, s0, v0, n_samples); + vol_c(d1, s0, v1, n_samples); } void @@ -126,7 +134,7 @@ const float v1 = mix->matrix01; if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_ZERO)) { - memset(d0, 0, n_samples * sizeof(float)); + clear_c(d0, n_samples); } else if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_EQUAL)) { for (n = 0; n < n_samples; n++) d0n = (s0n + s1n) * v0; @@ -150,7 +158,7 @@ const float v3 = mix->matrix03; if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_ZERO)) { - memset(d0, 0, n_samples * sizeof(float)); + clear_c(d0, n_samples); } else if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_EQUAL)) { for (n = 0; n < n_samples; n++) @@ -163,38 +171,12 @@ } } -void -channelmix_f32_3p1_1_c(struct channelmix *mix, void * SPA_RESTRICT dst, - const void * SPA_RESTRICT src, uint32_t n_samples) -{ - uint32_t n; - float **d = (float **)dst; - const float **s = (const float **)src; - const float v0 = mix->matrix00; - const float v1 = mix->matrix01; - const float v2 = mix->matrix02; - - if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_ZERO)) { - memset(d0, 0, n_samples * sizeof(float)); - } - else if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_EQUAL)) { - for (n = 0; n < n_samples; n++) - d0n = (s0n + s1n + s2n + s3n) * v0; - } - else { - for (n = 0; n < n_samples; n++) - d0n = s0n * v0 + s1n * v1 + s2n * v2; - } -} - - #define MASK_QUAD _M(FL)|_M(FR)|_M(RL)|_M(RR)|_M(UNKNOWN) void channelmix_f32_2_4_c(struct channelmix *mix, void * SPA_RESTRICT dst, const void * SPA_RESTRICT src, uint32_t n_samples) { - uint32_t i, n, n_dst = mix->dst_chan; float **d = (float **)dst; const float **s = (const float **)src; const float v0 = mix->matrix00; @@ -202,31 +184,10 @@ const float v2 = mix->matrix20; const float v3 = mix->matrix31; - if (SPA_FLAG_IS_SET(mix->flags, CHANNELMIX_FLAG_ZERO)) { - for (i = 0; i < n_dst; i++) - memset(di, 0, n_samples * sizeof(float)); - } - else if (v0 == v2 && v1 == v3) { - if (v0 == 1.0f && v1 == 1.0f) { - for (n = 0; n < n_samples; n++) { - d0n = d2n = s0n; - d1n = d3n = s1n; - } - } else { - for (n = 0; n < n_samples; n++) { - d0n = d2n = s0n * v0; - d1n = d3n = s1n * v1; - } - } - } - else { - for (n = 0; n < n_samples; n++) { - d0n = s0n * v0;
View file
pipewire-0.3.49.tar.gz/spa/plugins/audioconvert/channelmix-ops.c -> pipewire-0.3.50.tar.gz/spa/plugins/audioconvert/channelmix-ops.c
Changed
@@ -78,7 +78,7 @@ { 1, MASK_MONO, 2, MASK_STEREO, channelmix_f32_1_2_c, 0, "f32_1_2_c" }, { 2, MASK_STEREO, 1, MASK_MONO, channelmix_f32_2_1_c, 0, "f32_2_1_c" }, { 4, MASK_QUAD, 1, MASK_MONO, channelmix_f32_4_1_c, 0, "f32_4_1_c" }, - { 4, MASK_3_1, 1, MASK_MONO, channelmix_f32_3p1_1_c, 0, "f32_3p1_1_c" }, + { 4, MASK_3_1, 1, MASK_MONO, channelmix_f32_4_1_c, 0, "f32_4_1_c" }, #if defined (HAVE_SSE) { 2, MASK_STEREO, 4, MASK_QUAD, channelmix_f32_2_4_sse, SPA_CPU_FLAG_SSE, "f32_2_4_sse" }, #endif @@ -157,6 +157,7 @@ float slev = SQRT1_2; float llev = 0.5f; float maxsum = 0.0f; + bool filter_fc = false, filter_lfe = false; #define _MATRIX(s,d) matrix_CH(s)_CH(d) spa_log_debug(mix->log, "src-mask:%08"PRIx64" dst-mask:%08"PRIx64 @@ -210,15 +211,17 @@ unassigned = src_mask & ~dst_mask; keep = dst_mask & ~src_mask; - if (!SPA_FLAG_IS_SET(mix->options, CHANNELMIX_OPTION_UPMIX) || - mix->upmix == CHANNELMIX_UPMIX_NONE) + if (!SPA_FLAG_IS_SET(mix->options, CHANNELMIX_OPTION_UPMIX)) { keep = 0; - - keep |= FRONT; - if (mix->lfe_cutoff > 0.0f) - keep |= _MASK(LFE); - else - keep &= ~_MASK(LFE); + } else { + if (mix->upmix == CHANNELMIX_UPMIX_NONE) + keep = 0; + keep |= FRONT; + if (mix->lfe_cutoff > 0.0f) + keep |= _MASK(LFE); + else + keep &= ~_MASK(LFE); + } spa_log_debug(mix->log, "unassigned downmix %08" PRIx64 " %08" PRIx64, unassigned, keep); @@ -397,6 +400,7 @@ spa_log_debug(mix->log, "produce FC from STEREO"); _MATRIX(FC,FL) += clev; _MATRIX(FC,FR) += clev; + filter_fc = true; } else { spa_log_warn(mix->log, "can't produce FC"); } @@ -406,9 +410,11 @@ spa_log_debug(mix->log, "produce LFE from STEREO"); _MATRIX(LFE,FL) += llev; _MATRIX(LFE,FR) += llev; + filter_lfe = true; } else if ((src_mask & FRONT) == FRONT) { spa_log_debug(mix->log, "produce LFE from FC"); _MATRIX(LFE,FC) += llev; + filter_lfe = true; } else { spa_log_warn(mix->log, "can't produce LFE"); } @@ -456,11 +462,11 @@ sum += fabs(matrixij); } maxsum = SPA_MAX(maxsum, sum); - if (i == _CH(LFE) && mix->lfe_cutoff > 0.0f) { - spa_log_debug(mix->log, "channel %d is LFE cutoff:%f", ic, mix->lfe_cutoff); + if (i == _CH(LFE) && mix->lfe_cutoff > 0.0f && filter_lfe) { + spa_log_info(mix->log, "channel %d is LFE cutoff:%f", ic, mix->lfe_cutoff); lr4_set(&mix->lr4ic, BQ_LOWPASS, mix->lfe_cutoff / mix->freq); - } else if (i == _CH(FC) && mix->fc_cutoff > 0.0f) { - spa_log_debug(mix->log, "channel %d is FC cutoff:%f", ic, mix->fc_cutoff); + } else if (i == _CH(FC) && mix->fc_cutoff > 0.0f && filter_fc) { + spa_log_info(mix->log, "channel %d is FC cutoff:%f", ic, mix->fc_cutoff); lr4_set(&mix->lr4ic, BQ_LOWPASS, mix->fc_cutoff / mix->freq); } else { mix->lr4ic.active = false;
View file
pipewire-0.3.49.tar.gz/spa/plugins/audioconvert/channelmix-ops.h -> pipewire-0.3.50.tar.gz/spa/plugins/audioconvert/channelmix-ops.h
Changed
@@ -138,7 +138,6 @@ DEFINE_FUNCTION(f32_1_2, c); DEFINE_FUNCTION(f32_2_1, c); DEFINE_FUNCTION(f32_4_1, c); -DEFINE_FUNCTION(f32_3p1_1, c); DEFINE_FUNCTION(f32_2_4, c); DEFINE_FUNCTION(f32_2_3p1, c); DEFINE_FUNCTION(f32_2_5p1, c);
View file
pipewire-0.3.49.tar.gz/spa/plugins/audioconvert/channelmix.c -> pipewire-0.3.50.tar.gz/spa/plugins/audioconvert/channelmix.c
Changed
@@ -410,21 +410,21 @@ param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_volume), - SPA_PROP_INFO_name, SPA_POD_String("Volume"), + SPA_PROP_INFO_description, SPA_POD_String("Volume"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->volume, 0.0, 10.0)); break; case 1: param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_mute), - SPA_PROP_INFO_name, SPA_POD_String("Mute"), + SPA_PROP_INFO_description, SPA_POD_String("Mute"), SPA_PROP_INFO_type, SPA_POD_CHOICE_Bool(p->channel.mute)); break; case 2: param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_channelVolumes), - SPA_PROP_INFO_name, SPA_POD_String("Channel Volumes"), + SPA_PROP_INFO_description, SPA_POD_String("Channel Volumes"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->volume, 0.0, 10.0), SPA_PROP_INFO_container, SPA_POD_Id(SPA_TYPE_Array)); break; @@ -432,7 +432,7 @@ param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_channelMap), - SPA_PROP_INFO_name, SPA_POD_String("Channel Map"), + SPA_PROP_INFO_description, SPA_POD_String("Channel Map"), SPA_PROP_INFO_type, SPA_POD_Id(SPA_AUDIO_CHANNEL_UNKNOWN), SPA_PROP_INFO_container, SPA_POD_Id(SPA_TYPE_Array)); break; @@ -440,14 +440,14 @@ param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_softMute), - SPA_PROP_INFO_name, SPA_POD_String("Soft Mute"), + SPA_PROP_INFO_description, SPA_POD_String("Soft Mute"), SPA_PROP_INFO_type, SPA_POD_CHOICE_Bool(p->soft.mute)); break; case 5: param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_softVolumes), - SPA_PROP_INFO_name, SPA_POD_String("Soft Volumes"), + SPA_PROP_INFO_description, SPA_POD_String("Soft Volumes"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->volume, 0.0, 10.0), SPA_PROP_INFO_container, SPA_POD_Id(SPA_TYPE_Array)); break; @@ -455,14 +455,14 @@ param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_monitorMute), - SPA_PROP_INFO_name, SPA_POD_String("Monitor Mute"), + SPA_PROP_INFO_description, SPA_POD_String("Monitor Mute"), SPA_PROP_INFO_type, SPA_POD_CHOICE_Bool(p->monitor.mute)); break; case 7: param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_monitorVolumes), - SPA_PROP_INFO_name, SPA_POD_String("Monitor Volumes"), + SPA_PROP_INFO_description, SPA_POD_String("Monitor Volumes"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->volume, 0.0, 10.0), SPA_PROP_INFO_container, SPA_POD_Id(SPA_TYPE_Array)); break; @@ -1655,12 +1655,12 @@ props_reset(&this->props); this->mix.options = CHANNELMIX_OPTION_UPMIX; - this->mix.upmix = CHANNELMIX_UPMIX_SIMPLE; + this->mix.upmix = CHANNELMIX_UPMIX_PSD; this->mix.log = this->log; - this->mix.lfe_cutoff = 120.0f; - this->mix.fc_cutoff = 6000.0f; + this->mix.lfe_cutoff = 150.0f; + this->mix.fc_cutoff = 12000.0f; this->mix.rear_delay = 12.0f; - this->mix.widen = 0.1f; + this->mix.widen = 0.0f; for (i = 0; info && i < info->n_items; i++) { const char *k = info->itemsi.key;
View file
pipewire-0.3.49.tar.gz/spa/plugins/audioconvert/fmtconvert.c -> pipewire-0.3.50.tar.gz/spa/plugins/audioconvert/fmtconvert.c
Changed
@@ -617,6 +617,7 @@ case SPA_AUDIO_FORMAT_S16P: case SPA_AUDIO_FORMAT_S16: case SPA_AUDIO_FORMAT_S16_OE: + case SPA_AUDIO_FORMAT_U16: return 2; case SPA_AUDIO_FORMAT_S24P: case SPA_AUDIO_FORMAT_S24:
View file
pipewire-0.3.49.tar.gz/spa/plugins/audioconvert/resample.c -> pipewire-0.3.50.tar.gz/spa/plugins/audioconvert/resample.c
Changed
@@ -391,6 +391,8 @@ static void update_rate_match(struct impl *this, bool passthrough, uint32_t out_size, uint32_t in_queued) { + double r = this->rate_scale / this->props.rate; + if (this->io_rate_match) { uint32_t delay, match_size; @@ -399,9 +401,9 @@ match_size = out_size; } else { if (SPA_FLAG_IS_SET(this->io_rate_match->flags, SPA_IO_RATE_MATCH_FLAG_ACTIVE)) - resample_update_rate(&this->resample, this->rate_scale * this->io_rate_match->rate); + resample_update_rate(&this->resample, r * this->io_rate_match->rate); else - resample_update_rate(&this->resample, this->rate_scale); + resample_update_rate(&this->resample, r); delay = resample_delay(&this->resample) + in_queued; match_size = resample_in_len(&this->resample, out_size); @@ -412,12 +414,13 @@ spa_log_trace_fp(this->log, "%p: next match:%u queued:%u delay:%u", this, match_size, in_queued, delay); } else { - resample_update_rate(&this->resample, this->rate_scale * this->props.rate); + resample_update_rate(&this->resample, r); } } static inline bool is_passthrough(struct impl *this) { - return this->resample.i_rate == this->resample.o_rate && this->rate_scale == 1.0 && + return this->resample.i_rate == this->resample.o_rate && + this->rate_scale == 1.0 && this->props.rate == 1.0 && (this->io_rate_match == NULL || this->props.disabled || !SPA_FLAG_IS_SET(this->io_rate_match->flags, SPA_IO_RATE_MATCH_FLAG_ACTIVE)); }
View file
pipewire-0.3.49.tar.gz/spa/plugins/audioconvert/test-channelmix.c -> pipewire-0.3.50.tar.gz/spa/plugins/audioconvert/test-channelmix.c
Changed
@@ -51,13 +51,14 @@ } } -static void test_mix(uint32_t src_chan, uint32_t src_mask, uint32_t dst_chan, uint32_t dst_mask, float *coeff) +static void test_mix(uint32_t src_chan, uint32_t src_mask, uint32_t dst_chan, uint32_t dst_mask, uint32_t options, float *coeff) { struct channelmix mix; spa_log_debug(&logger.log, "start %d->%d (%08x -> %08x)", src_chan, dst_chan, src_mask, dst_mask); spa_zero(mix); + mix.options = options; mix.src_chan = src_chan; mix.dst_chan = dst_chan; mix.src_mask = src_mask; @@ -70,68 +71,68 @@ static void test_1_N_MONO(void) { - test_mix(1, _M(MONO), 2, _M(FL)|_M(FR), + test_mix(1, _M(MONO), 2, _M(FL)|_M(FR), 0, MATRIX(1.0, 1.0)); - test_mix(1, _M(MONO), 3, _M(FL)|_M(FR)|_M(LFE), + test_mix(1, _M(MONO), 3, _M(FL)|_M(FR)|_M(LFE), 0, MATRIX(1.0, 1.0, 1.0)); - test_mix(1, _M(MONO), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), + test_mix(1, _M(MONO), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 0, MATRIX(1.0, 1.0, 1.0, 1.0)); - test_mix(1, _M(MONO), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR), + test_mix(1, _M(MONO), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 0, MATRIX(1.0, 1.0, 1.0, 1.0)); - test_mix(1, _M(MONO), 12, 0, + test_mix(1, _M(MONO), 12, 0, 0, MATRIX(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)); } static void test_1_N_FC(void) { - test_mix(1, _M(FC), 2, _M(FL)|_M(FR), + test_mix(1, _M(FC), 2, _M(FL)|_M(FR), 0, MATRIX(0.707107, 0.707107)); - test_mix(1, _M(FC), 3, _M(FL)|_M(FR)|_M(LFE), + test_mix(1, _M(FC), 3, _M(FL)|_M(FR)|_M(LFE), 0, MATRIX(0.707107, 0.707107, 0.0)); - test_mix(1, _M(FC), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), + test_mix(1, _M(FC), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 0, MATRIX(0.0, 0.0, 1.0, 0.0)); - test_mix(1, _M(FC), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR), + test_mix(1, _M(FC), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 0, MATRIX(0.707107, 0.707107, 0.0, 0.0)); - test_mix(1, _M(FC), 12, 0, + test_mix(1, _M(FC), 12, 0, 0, MATRIX(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0)); } static void test_N_1(void) { - test_mix(1, _M(MONO), 1, _M(MONO), + test_mix(1, _M(MONO), 1, _M(MONO), 0, MATRIX(1.0)); - test_mix(1, _M(MONO), 1, _M(FC), + test_mix(1, _M(MONO), 1, _M(FC), 0, MATRIX(1.0)); - test_mix(1, _M(FC), 1, _M(MONO), + test_mix(1, _M(FC), 1, _M(MONO), 0, MATRIX(1.0)); - test_mix(1, _M(FC), 1, _M(FC), + test_mix(1, _M(FC), 1, _M(FC), 0, MATRIX(1.0)); - test_mix(2, _M(FL)|_M(FR), 1, _M(MONO), + test_mix(2, _M(FL)|_M(FR), 1, _M(MONO), 0, MATRIX(0.707107, 0.707107)); - test_mix(12, 0, 1, _M(MONO), + test_mix(12, 0, 1, _M(MONO), 0, MATRIX(0.083333, 0.083333, 0.083333, 0.083333, 0.083333, 0.083333, 0.083333, 0.083333, 0.083333, 0.083333, 0.083333, 0.0833333)); } static void test_3p1_N(void) { - test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 1, _M(MONO), + test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 1, _M(MONO), 0, MATRIX(0.707107, 0.707107, 1.0, 0.0)); - test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 2, _M(FL)|_M(FR), + test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 2, _M(FL)|_M(FR), 0, MATRIX(1.0, 0.0, 0.707107, 0.0, 0.0, 1.0, 0.707107, 0.0 )); - test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 3, _M(FL)|_M(FR)|_M(LFE), + test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 3, _M(FL)|_M(FR)|_M(LFE), 0, MATRIX(1.0, 0.0, 0.707107, 0.0, 0.0, 1.0, 0.707107, 0.0, 0.0, 0.0, 0.0, 1.0 )); - test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), + test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 0, MATRIX(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0,)); - test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR), + test_mix(4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 0, MATRIX(1.0, 0.0, 0.707107, 0.0, 0.0, 1.0, 0.707107, 0.0, 0.0, 0.0, 0.0, 0.0, @@ -140,26 +141,31 @@ static void test_4_N(void) { - test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 1, _M(MONO), + test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 1, _M(MONO), 0, MATRIX(0.707107, 0.707107, 0.5, 0.5)); - test_mix(4, _M(FL)|_M(FR)|_M(SL)|_M(SR), 1, _M(MONO), + test_mix(4, _M(FL)|_M(FR)|_M(SL)|_M(SR), 1, _M(MONO), 0, MATRIX(0.707107, 0.707107, 0.5, 0.5)); - test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 2, _M(FL)|_M(FR), + test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 2, _M(FL)|_M(FR), 0, MATRIX(1.0, 0.0, 0.707107, 0.0, 0.0, 1.0, 0.0, 0.707107)); - test_mix(4, _M(FL)|_M(FR)|_M(SL)|_M(SR), 2, _M(FL)|_M(FR), + test_mix(4, _M(FL)|_M(FR)|_M(SL)|_M(SR), 2, _M(FL)|_M(FR), 0, MATRIX(1.0, 0.0, 0.707107, 0.0, 0.0, 1.0, 0.0, 0.707107)); - test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 3, _M(FL)|_M(FR)|_M(LFE), + test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 3, _M(FL)|_M(FR)|_M(LFE), 0, MATRIX(1.0, 0.0, 0.707107, 0.0, 0.0, 1.0, 0.0, 0.707107, 0.0, 0.0, 0.0, 0.0)); - test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR), + test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 0, MATRIX(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0)); - test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), + test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 0, + MATRIX(1.0, 0.0, 0.707107, 0.0, + 0.0, 1.0, 0.0, 0.707107, + 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0)); + test_mix(4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), CHANNELMIX_OPTION_UPMIX, MATRIX(1.0, 0.0, 0.707107, 0.0, 0.0, 1.0, 0.0, 0.707107, 0.707107, 0.707107, 0.0, 0.0, @@ -168,35 +174,35 @@ static void test_5p1_N(void) { - test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 1, _M(MONO), + test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 1, _M(MONO), 0, MATRIX(0.707107, 0.707107, 1.0, 0.0, 0.5, 0.5)); - test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 2, _M(FL)|_M(FR), + test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 2, _M(FL)|_M(FR), 0, MATRIX(1.0, 0.0, 0.707107, 0.0, 0.707107, 0.0, 0.0, 1.0, 0.707107, 0.0, 0.0, 0.707107)); - test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(RL)|_M(RR), 2, _M(FL)|_M(FR), + test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(RL)|_M(RR), 2, _M(FL)|_M(FR), 0, MATRIX(1.0, 0.0, 0.707107, 0.0, 0.707107, 0.0, 0.0, 1.0, 0.707107, 0.0, 0.0, 0.707107)); - test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 3, _M(FL)|_M(FR)|_M(LFE), + test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 3, _M(FL)|_M(FR)|_M(LFE), 0, MATRIX(1.0, 0.0, 0.707107, 0.0, 0.707107, 0.0, 0.0, 1.0, 0.707107, 0.0, 0.0, 0.707107, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0)); - test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), + test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 4, _M(FL)|_M(FR)|_M(LFE)|_M(FC), 0, MATRIX(1.0, 0.0, 0.0, 0.0, 0.707107, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.707107, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0)); - test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR), + test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 4, _M(FL)|_M(FR)|_M(RL)|_M(RR), 0, MATRIX(1.0, 0.0, 0.707107, 0.0, 0.0, 0.0, 0.0, 1.0, 0.707107, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0)); - test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 5, _M(FL)|_M(FR)|_M(FC)|_M(SL)|_M(SR), + test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 5, _M(FL)|_M(FR)|_M(FC)|_M(SL)|_M(SR), 0, MATRIX(1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0)); - test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), + test_mix(6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 6, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR), 0, MATRIX(1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, @@ -207,9 +213,9 @@ static void test_7p1_N(void) { - test_mix(8, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR)|_M(RL)|_M(RR), 1, _M(MONO), + test_mix(8, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR)|_M(RL)|_M(RR), 1, _M(MONO), 0, MATRIX(0.707107, 0.707107, 1.0, 0.0, 0.5, 0.5, 0.5, 0.5)); - test_mix(8, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR)|_M(RL)|_M(RR), 2, _M(FL)|_M(FR), + test_mix(8, _M(FL)|_M(FR)|_M(LFE)|_M(FC)|_M(SL)|_M(SR)|_M(RL)|_M(RR), 2, _M(FL)|_M(FR), 0, MATRIX(1.0, 0.0, 0.707107, 0.0, 0.707107, 0.0, 0.707107, 0.0, 0.0, 1.0, 0.707107, 0.0, 0.0, 0.707107, 0.0, 0.707107));
View file
pipewire-0.3.49.tar.gz/spa/plugins/audioconvert/test-source.c -> pipewire-0.3.50.tar.gz/spa/plugins/audioconvert/test-source.c
Changed
@@ -216,14 +216,14 @@ param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_volume), - SPA_PROP_INFO_name, SPA_POD_String("Volume"), + SPA_PROP_INFO_description, SPA_POD_String("Volume"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->volume, 0.0, 10.0)); break; case 1: param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_mute), - SPA_PROP_INFO_name, SPA_POD_String("Mute"), + SPA_PROP_INFO_description, SPA_POD_String("Mute"), SPA_PROP_INFO_type, SPA_POD_CHOICE_Bool(p->mute)); break; default:
View file
pipewire-0.3.49.tar.gz/spa/plugins/audiotestsrc/audiotestsrc.c -> pipewire-0.3.50.tar.gz/spa/plugins/audiotestsrc/audiotestsrc.c
Changed
@@ -177,14 +177,14 @@ param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_live), - SPA_PROP_INFO_name, SPA_POD_String("Configure live mode of the source"), + SPA_PROP_INFO_description, SPA_POD_String("Configure live mode of the source"), SPA_PROP_INFO_type, SPA_POD_Bool(p->live)); break; case 1: spa_pod_builder_push_object(&b, &f0, SPA_TYPE_OBJECT_PropInfo, id); spa_pod_builder_add(&b, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_waveType), - SPA_PROP_INFO_name, SPA_POD_String("Select the waveform"), + SPA_PROP_INFO_description, SPA_POD_String("Select the waveform"), SPA_PROP_INFO_type, SPA_POD_Int(p->wave), 0); spa_pod_builder_prop(&b, SPA_PROP_INFO_labels, 0); @@ -200,14 +200,14 @@ param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_frequency), - SPA_PROP_INFO_name, SPA_POD_String("Select the frequency"), + SPA_PROP_INFO_description, SPA_POD_String("Select the frequency"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->freq, 0.0, 50000000.0)); break; case 3: param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_volume), - SPA_PROP_INFO_name, SPA_POD_String("Select the volume"), + SPA_PROP_INFO_description, SPA_POD_String("Select the volume"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->volume, 0.0, 10.0)); break; default:
View file
pipewire-0.3.49.tar.gz/spa/plugins/bluez5/a2dp-codec-ldac.c -> pipewire-0.3.50.tar.gz/spa/plugins/bluez5/a2dp-codec-ldac.c
Changed
@@ -317,7 +317,7 @@ spa_pod_builder_push_object(b, &f0, SPA_TYPE_OBJECT_PropInfo, id); spa_pod_builder_prop(b, SPA_PROP_INFO_id, 0); spa_pod_builder_id(b, SPA_PROP_quality); - spa_pod_builder_prop(b, SPA_PROP_INFO_name, 0); + spa_pod_builder_prop(b, SPA_PROP_INFO_description, 0); spa_pod_builder_string(b, "LDAC quality"); spa_pod_builder_prop(b, SPA_PROP_INFO_type, 0);
View file
pipewire-0.3.49.tar.gz/spa/plugins/bluez5/a2dp-sink.c -> pipewire-0.3.50.tar.gz/spa/plugins/bluez5/a2dp-sink.c
Changed
@@ -212,21 +212,21 @@ param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_minLatency), - SPA_PROP_INFO_name, SPA_POD_String("The minimum latency"), + SPA_PROP_INFO_description, SPA_POD_String("The minimum latency"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Int(p->min_latency, 1, INT32_MAX)); break; case 1: param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_maxLatency), - SPA_PROP_INFO_name, SPA_POD_String("The maximum latency"), + SPA_PROP_INFO_description, SPA_POD_String("The maximum latency"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Int(p->max_latency, 1, INT32_MAX)); break; case 2: param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_latencyOffsetNsec), - SPA_PROP_INFO_name, SPA_POD_String("Latency offset (ns)"), + SPA_PROP_INFO_description, SPA_POD_String("Latency offset (ns)"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Long(0LL, INT64_MIN, INT64_MAX)); break; default:
View file
pipewire-0.3.49.tar.gz/spa/plugins/bluez5/a2dp-source.c -> pipewire-0.3.50.tar.gz/spa/plugins/bluez5/a2dp-source.c
Changed
@@ -206,14 +206,14 @@ param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_minLatency), - SPA_PROP_INFO_name, SPA_POD_String("The minimum latency"), + SPA_PROP_INFO_description, SPA_POD_String("The minimum latency"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Int(p->min_latency, 1, INT32_MAX)); break; case 1: param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_maxLatency), - SPA_PROP_INFO_name, SPA_POD_String("The maximum latency"), + SPA_PROP_INFO_description, SPA_POD_String("The maximum latency"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Int(p->max_latency, 1, INT32_MAX)); break; default:
View file
pipewire-0.3.49.tar.gz/spa/plugins/bluez5/bluez5-device.c -> pipewire-0.3.50.tar.gz/spa/plugins/bluez5/bluez5-device.c
Changed
@@ -1523,7 +1523,7 @@ /* Transport codec */ spa_pod_builder_prop(b, SPA_PROP_INFO_id, 0); spa_pod_builder_id(b, SPA_PROP_bluetoothAudioCodec); - spa_pod_builder_prop(b, SPA_PROP_INFO_name, 0); + spa_pod_builder_prop(b, SPA_PROP_INFO_description, 0); spa_pod_builder_string(b, "Air codec"); spa_pod_builder_prop(b, SPA_PROP_INFO_type, 0); spa_pod_builder_push_choice(b, &f1, SPA_CHOICE_Enum, 0);
View file
pipewire-0.3.49.tar.gz/spa/plugins/bluez5/sco-sink.c -> pipewire-0.3.50.tar.gz/spa/plugins/bluez5/sco-sink.c
Changed
@@ -206,14 +206,14 @@ param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_minLatency), - SPA_PROP_INFO_name, SPA_POD_String("The minimum latency"), + SPA_PROP_INFO_description, SPA_POD_String("The minimum latency"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Int(p->min_latency, 1, INT32_MAX)); break; case 1: param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_maxLatency), - SPA_PROP_INFO_name, SPA_POD_String("The maximum latency"), + SPA_PROP_INFO_description, SPA_POD_String("The maximum latency"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Int(p->max_latency, 1, INT32_MAX)); break; default:
View file
pipewire-0.3.49.tar.gz/spa/plugins/bluez5/sco-source.c -> pipewire-0.3.50.tar.gz/spa/plugins/bluez5/sco-source.c
Changed
@@ -191,14 +191,14 @@ param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_minLatency), - SPA_PROP_INFO_name, SPA_POD_String("The minimum latency"), + SPA_PROP_INFO_description, SPA_POD_String("The minimum latency"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Int(p->min_latency, 1, INT32_MAX)); break; case 1: param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_maxLatency), - SPA_PROP_INFO_name, SPA_POD_String("The maximum latency"), + SPA_PROP_INFO_description, SPA_POD_String("The maximum latency"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Int(p->max_latency, 1, INT32_MAX)); break; default:
View file
pipewire-0.3.49.tar.gz/spa/plugins/libcamera/libcamera-source.cpp -> pipewire-0.3.50.tar.gz/spa/plugins/libcamera/libcamera-source.cpp
Changed
@@ -205,14 +205,14 @@ param = (struct spa_pod*)spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_device), - SPA_PROP_INFO_name, SPA_POD_String("The libcamera device"), + SPA_PROP_INFO_description, SPA_POD_String("The libcamera device"), SPA_PROP_INFO_type, SPA_POD_String(p->device)); break; case 1: param = (struct spa_pod*)spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_deviceName), - SPA_PROP_INFO_name, SPA_POD_String("The libcamera device name"), + SPA_PROP_INFO_description, SPA_POD_String("The libcamera device name"), SPA_PROP_INFO_type, SPA_POD_String(p->device_name)); break; default:
View file
pipewire-0.3.49.tar.gz/spa/plugins/v4l2/v4l2-source.c -> pipewire-0.3.50.tar.gz/spa/plugins/v4l2/v4l2-source.c
Changed
@@ -198,21 +198,21 @@ param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_device), - SPA_PROP_INFO_name, SPA_POD_String("The V4L2 device"), + SPA_PROP_INFO_description, SPA_POD_String("The V4L2 device"), SPA_PROP_INFO_type, SPA_POD_String(p->device)); break; case 1: param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_deviceName), - SPA_PROP_INFO_name, SPA_POD_String("The V4L2 device name"), + SPA_PROP_INFO_description, SPA_POD_String("The V4L2 device name"), SPA_PROP_INFO_type, SPA_POD_String(p->device_name)); break; case 2: param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_deviceFd), - SPA_PROP_INFO_name, SPA_POD_String("The V4L2 fd"), + SPA_PROP_INFO_description, SPA_POD_String("The V4L2 fd"), SPA_PROP_INFO_type, SPA_POD_Int(p->device_fd)); break; default:
View file
pipewire-0.3.49.tar.gz/spa/plugins/v4l2/v4l2-utils.c -> pipewire-0.3.50.tar.gz/spa/plugins/v4l2/v4l2-utils.c
Changed
@@ -1160,14 +1160,14 @@ queryctrl.minimum, queryctrl.maximum, queryctrl.step), - SPA_PROP_INFO_name, SPA_POD_String(queryctrl.name)); + SPA_PROP_INFO_description, SPA_POD_String(queryctrl.name)); break; case V4L2_CTRL_TYPE_BOOLEAN: param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, SPA_PARAM_PropInfo, SPA_PROP_INFO_id, SPA_POD_Id(prop_id), SPA_PROP_INFO_type, SPA_POD_CHOICE_Bool(queryctrl.default_value), - SPA_PROP_INFO_name, SPA_POD_String(queryctrl.name)); + SPA_PROP_INFO_description, SPA_POD_String(queryctrl.name)); break; case V4L2_CTRL_TYPE_MENU: { @@ -1178,7 +1178,7 @@ spa_pod_builder_add(&b, SPA_PROP_INFO_id, SPA_POD_Id(prop_id), SPA_PROP_INFO_type, SPA_POD_CHOICE_ENUM_Int(1, queryctrl.default_value), - SPA_PROP_INFO_name, SPA_POD_String(queryctrl.name), + SPA_PROP_INFO_description, SPA_POD_String(queryctrl.name), 0); spa_zero(querymenu);
View file
pipewire-0.3.49.tar.gz/spa/plugins/videotestsrc/videotestsrc.c -> pipewire-0.3.50.tar.gz/spa/plugins/videotestsrc/videotestsrc.c
Changed
@@ -158,14 +158,14 @@ param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_live), - SPA_PROP_INFO_name, SPA_POD_String("Configure live mode of the source"), + SPA_PROP_INFO_description, SPA_POD_String("Configure live mode of the source"), SPA_PROP_INFO_type, SPA_POD_Bool(p->live)); break; case 1: spa_pod_builder_push_object(&b, &f0, SPA_TYPE_OBJECT_PropInfo, id); spa_pod_builder_add(&b, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_patternType), - SPA_PROP_INFO_name, SPA_POD_String("The pattern"), + SPA_PROP_INFO_description, SPA_POD_String("The pattern"), SPA_PROP_INFO_type, SPA_POD_Int(p->pattern), 0); spa_pod_builder_prop(&b, SPA_PROP_INFO_labels, 0),
View file
pipewire-0.3.49.tar.gz/spa/plugins/volume/volume.c -> pipewire-0.3.50.tar.gz/spa/plugins/volume/volume.c
Changed
@@ -145,14 +145,14 @@ param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_volume), - SPA_PROP_INFO_name, SPA_POD_String("The volume"), + SPA_PROP_INFO_description, SPA_POD_String("The volume"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->volume, 0.0, 10.0)); break; case 1: param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_mute), - SPA_PROP_INFO_name, SPA_POD_String("Mute"), + SPA_PROP_INFO_description, SPA_POD_String("Mute"), SPA_PROP_INFO_type, SPA_POD_Bool(p->mute)); break; default:
View file
pipewire-0.3.49.tar.gz/spa/plugins/vulkan/vulkan-compute-source.c -> pipewire-0.3.50.tar.gz/spa/plugins/vulkan/vulkan-compute-source.c
Changed
@@ -155,7 +155,7 @@ param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_live), - SPA_PROP_INFO_name, SPA_POD_String("Configure live mode of the source"), + SPA_PROP_INFO_description, SPA_POD_String("Configure live mode of the source"), SPA_PROP_INFO_type, SPA_POD_Bool(p->live)); break; default:
View file
pipewire-0.3.49.tar.gz/src/daemon/client-rt.conf.in -> pipewire-0.3.50.tar.gz/src/daemon/client-rt.conf.in
Changed
@@ -84,10 +84,10 @@ #channelmix.normalize = false #channelmix.mix-lfe = true #channelmix.upmix = true - #channelmix.upmix-method = simple # none, psd - #channelmix.lfe-cutoff = 120 - #channelmix.fc-cutoff = 6000 + #channelmix.upmix-method = psd # none, simple + #channelmix.lfe-cutoff = 150 + #channelmix.fc-cutoff = 12000 #channelmix.rear-delay = 12.0 - #channelmix.stereo-widen = 0.1 + #channelmix.stereo-widen = 0.0 #channelmix.hilbert-taps = 0 }
View file
pipewire-0.3.49.tar.gz/src/daemon/client.conf.in -> pipewire-0.3.50.tar.gz/src/daemon/client.conf.in
Changed
@@ -74,10 +74,10 @@ #channelmix.normalize = false #channelmix.mix-lfe = false #channelmix.upmix = true - #channelmix.upmix-method = simple # none, psd - #channelmix.lfe-cutoff = 120 - #channelmix.fc-cutoff = 6000 + #channelmix.upmix-method = psd # none, simple + #channelmix.lfe-cutoff = 150 + #channelmix.fc-cutoff = 12000 #channelmix.rear-delay = 12.0 - #channelmix.stereo-widen = 0.1 + #channelmix.stereo-widen = 0.0 #channelmix.hilbert-taps = 0 }
View file
pipewire-0.3.49.tar.gz/src/daemon/minimal.conf.in -> pipewire-0.3.50.tar.gz/src/daemon/minimal.conf.in
Changed
@@ -205,11 +205,11 @@ #channelmix.normalize = false #channelmix.mix-lfe = false #channelmix.upmix = true - #channelmix.upmix-method = simple # none, psd - #channelmix.lfe-cutoff = 120 - #channelmix.fc-cutoff = 6000 + #channelmix.upmix-method = psd # none, simple + #channelmix.lfe-cutoff = 150 + #channelmix.fc-cutoff = 12000 #channelmix.rear-delay = 12.0 - #channelmix.stereo-widen = 0.1 + #channelmix.stereo-widen = 0.0 #channelmix.hilbert-taps = 0 channelmix.disable = true #node.param.Props = { @@ -265,11 +265,11 @@ #channelmix.normalize = false #channelmix.mix-lfe = false #channelmix.upmix = true - #channelmix.upmix-method = simple # none, psd - #channelmix.lfe-cutoff = 120 - #channelmix.fc-cutoff = 6000 + #channelmix.upmix-method = psd # none, simple + #channelmix.lfe-cutoff = 150 + #channelmix.fc-cutoff = 12000 #channelmix.rear-delay = 12.0 - #channelmix.stereo-widen = 0.1 + #channelmix.stereo-widen = 0.0 #channelmix.hilbert-taps = 0 channelmix.disable = true #node.param.Props = {
View file
pipewire-0.3.49.tar.gz/src/daemon/pipewire-pulse.conf.in -> pipewire-0.3.50.tar.gz/src/daemon/pipewire-pulse.conf.in
Changed
@@ -60,11 +60,11 @@ #channelmix.normalize = false #channelmix.mix-lfe = false #channelmix.upmix = true - #channelmix.upmix-method = simple # none, psd - #channelmix.lfe-cutoff = 120 - #channelmix.fc-cutoff = 6000 + #channelmix.upmix-method = psd # none, simple + #channelmix.lfe-cutoff = 150 + #channelmix.fc-cutoff = 12000 #channelmix.rear-delay = 12.0 - #channelmix.stereo-widen = 0.1 + #channelmix.stereo-widen = 0.0 #channelmix.hilbert-taps = 0 } @@ -122,6 +122,7 @@ # skype does not want to use devices that don't have an S16 sample format. matches = { application.process.binary = "teams" } + { application.process.binary = "teams-insiders" } { application.process.binary = "skypeforlinux" } actions = { quirks = force-s16-info }
View file
pipewire-0.3.49.tar.gz/src/modules/meson.build -> pipewire-0.3.50.tar.gz/src/modules/meson.build
Changed
@@ -139,7 +139,7 @@ dependencies : dbus_dep, mathlib, dl_lib, pipewire_dep, ) -build_module_rtkit = dbus_dep.found() +build_module_rtkit = dbus_dep.found() and (get_option('legacy-rtkit') == true) if build_module_rtkit # TODO: This serves as a temporary alias to prevent breaking existing setups # while `module-rtkit` is being migrated to `module-rt`
View file
pipewire-0.3.49.tar.gz/src/modules/module-client-device.c -> pipewire-0.3.50.tar.gz/src/modules/module-client-device.c
Changed
@@ -175,6 +175,7 @@ struct pw_context *context = pw_impl_module_get_context(module); struct pw_impl_factory *factory; struct factory_data *data; + int res; PW_LOG_TOPIC_INIT(mod_topic); factory = pw_context_create_factory(context, @@ -198,15 +199,19 @@ &impl_factory, data); - pw_protocol_native_ext_client_device_init(context); - data->export_spadevice.type = SPA_TYPE_INTERFACE_Device; data->export_spadevice.func = pw_core_spa_device_export; - pw_context_register_export_type(context, &data->export_spadevice); + if ((res = pw_context_register_export_type(context, &data->export_spadevice)) < 0) + goto error; + + pw_protocol_native_ext_client_device_init(context); pw_impl_module_add_listener(module, &data->module_listener, &module_events, data); pw_impl_module_update_properties(module, &SPA_DICT_INIT_ARRAY(module_props)); return 0; +error: + pw_impl_factory_destroy(data->this); + return res; }
View file
pipewire-0.3.49.tar.gz/src/modules/module-client-node.c -> pipewire-0.3.50.tar.gz/src/modules/module-client-node.c
Changed
@@ -163,6 +163,7 @@ struct pw_context *context = pw_impl_module_get_context(module); struct pw_impl_factory *factory; struct factory_data *data; + int res; PW_LOG_TOPIC_INIT(mod_topic); @@ -185,20 +186,27 @@ &impl_factory, data); - pw_protocol_native_ext_client_node_init(context); - pw_protocol_native_ext_client_node0_init(context); - data->export_node.type = PW_TYPE_INTERFACE_Node; data->export_node.func = pw_core_node_export; - pw_context_register_export_type(context, &data->export_node); + if ((res = pw_context_register_export_type(context, &data->export_node)) < 0) + goto error; data->export_spanode.type = SPA_TYPE_INTERFACE_Node; data->export_spanode.func = pw_core_spa_node_export; - pw_context_register_export_type(context, &data->export_spanode); + if ((res = pw_context_register_export_type(context, &data->export_spanode)) < 0) + goto error_remove; + + pw_protocol_native_ext_client_node_init(context); + pw_protocol_native_ext_client_node0_init(context); pw_impl_module_add_listener(module, &data->module_listener, &module_events, data); pw_impl_module_update_properties(module, &SPA_DICT_INIT_ARRAY(module_props)); return 0; +error_remove: + spa_list_remove(&data->export_node.link); +error: + pw_impl_factory_destroy(data->this); + return res; }
View file
pipewire-0.3.49.tar.gz/src/modules/module-echo-cancel.c -> pipewire-0.3.50.tar.gz/src/modules/module-echo-cancel.c
Changed
@@ -153,8 +153,6 @@ struct pw_impl_module *module; struct spa_hook module_listener; - uint32_t id; - struct pw_core *core; struct spa_hook core_proxy_listener; struct spa_hook core_listener; @@ -169,7 +167,6 @@ void *rec_bufferSPA_AUDIO_MAX_CHANNELS; uint32_t rec_ringsize; struct spa_ringbuffer rec_ring; - struct spa_io_rate_match *rec_rate_match; struct pw_stream *playback; struct spa_hook playback_listener; @@ -180,7 +177,6 @@ uint32_t play_ringsize; struct spa_ringbuffer play_ring; struct spa_ringbuffer play_delayed_ring; - struct spa_io_rate_match *play_rate_match; void *out_bufferSPA_AUDIO_MAX_CHANNELS; uint32_t out_ringsize; @@ -338,17 +334,6 @@ impl->capture = NULL; } -static void capture_io_changed(void *data, uint32_t id, void *area, uint32_t size) -{ - struct impl *impl = data; - - switch (id) { - case SPA_IO_RateMatch: - impl->rec_rate_match = area; - break; - } -} - static void capture_process(void *data) { struct impl *impl = data; @@ -382,7 +367,7 @@ * if it has a specific requirement, else keep the block size the same * on input and output or what the resampler needs */ if (impl->aec_blocksize == 0) { - impl->aec_blocksize = SPA_MAX(size, impl->rec_rate_match->size); + impl->aec_blocksize = size; pw_log_debug("Setting AEC block size to %u", impl->aec_blocksize); } @@ -454,7 +439,6 @@ PW_VERSION_STREAM_EVENTS, .destroy = capture_destroy, .state_changed = input_state_changed, - .io_changed = capture_io_changed, .process = capture_process, .param_changed = input_param_changed }; @@ -523,17 +507,6 @@ impl->sink = NULL; } -static void sink_io_changed(void *data, uint32_t id, void *area, uint32_t size) -{ - struct impl *impl = data; - - switch (id) { - case SPA_IO_RateMatch: - impl->play_rate_match = area; - break; - } -} - static void sink_process(void *data) { struct impl *impl = data; @@ -567,7 +540,7 @@ } if (impl->aec_blocksize == 0) { - impl->aec_blocksize = SPA_MAX(size, impl->rec_rate_match->size); + impl->aec_blocksize = size; pw_log_debug("Setting AEC block size to %u", impl->aec_blocksize); } @@ -608,7 +581,6 @@ static const struct pw_stream_events sink_events = { PW_VERSION_STREAM_EVENTS, .destroy = sink_destroy, - .io_changed = sink_io_changed, .process = sink_process, .state_changed = output_state_changed, .param_changed = output_param_changed @@ -638,6 +610,10 @@ pw_properties_set(props, PW_KEY_NODE_LATENCY, str); else if (impl->aec->latency) pw_properties_set(props, PW_KEY_NODE_LATENCY, impl->aec->latency); + if ((str = pw_properties_get(impl->source_props, SPA_KEY_AUDIO_CHANNELS)) != NULL) + pw_properties_set(props, SPA_KEY_AUDIO_CHANNELS, str); + if ((str = pw_properties_get(impl->source_props, SPA_KEY_AUDIO_POSITION)) != NULL) + pw_properties_set(props, SPA_KEY_AUDIO_POSITION, str); impl->capture = pw_stream_new(impl->core, "Echo-Cancel Capture", props); @@ -671,6 +647,10 @@ pw_properties_set(props, PW_KEY_NODE_LATENCY, str); else if (impl->aec->latency) pw_properties_set(props, PW_KEY_NODE_LATENCY, impl->aec->latency); + if ((str = pw_properties_get(impl->sink_props, SPA_KEY_AUDIO_CHANNELS)) != NULL) + pw_properties_set(props, SPA_KEY_AUDIO_CHANNELS, str); + if ((str = pw_properties_get(impl->sink_props, SPA_KEY_AUDIO_POSITION)) != NULL) + pw_properties_set(props, SPA_KEY_AUDIO_POSITION, str); impl->playback = pw_stream_new(impl->core, "Echo-Cancel Playback", props); @@ -877,6 +857,7 @@ struct pw_properties *props, *aec_props; struct impl *impl; uint32_t id = pw_global_get_id(pw_impl_module_get_global(module)); + uint32_t pid = getpid(); const char *str; const char *path; int res = 0; @@ -909,14 +890,13 @@ goto error; } - impl->id = id; impl->module = module; impl->context = context; if (pw_properties_get(props, PW_KEY_NODE_GROUP) == NULL) - pw_properties_setf(props, PW_KEY_NODE_GROUP, "echo-cancel-%u", id); + pw_properties_setf(props, PW_KEY_NODE_GROUP, "echo-cancel-%u-%u", pid, id); if (pw_properties_get(props, PW_KEY_NODE_LINK_GROUP) == NULL) - pw_properties_setf(props, PW_KEY_NODE_LINK_GROUP, "echo-cancel-%u", id); + pw_properties_setf(props, PW_KEY_NODE_LINK_GROUP, "echo-cancel-%u-%u", pid, id); if (pw_properties_get(props, PW_KEY_NODE_VIRTUAL) == NULL) pw_properties_set(props, PW_KEY_NODE_VIRTUAL, "true"); @@ -1052,6 +1032,8 @@ copy_props(impl, props, PW_KEY_NODE_LINK_GROUP); copy_props(impl, props, PW_KEY_NODE_VIRTUAL); copy_props(impl, props, PW_KEY_NODE_LATENCY); + copy_props(impl, props, SPA_KEY_AUDIO_CHANNELS); + copy_props(impl, props, SPA_KEY_AUDIO_POSITION); impl->max_buffer_size = pw_properties_get_uint32(props,"buffer.max_size", MAX_BUFSIZE_MS);
View file
pipewire-0.3.49.tar.gz/src/modules/module-example-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-example-sink.c
Changed
@@ -366,6 +366,7 @@ struct pw_context *context = pw_impl_module_get_context(module); struct pw_properties *props = NULL; uint32_t id = pw_global_get_id(pw_impl_module_get_global(module)); + uint32_t pid = getpid(); struct impl *impl; const char *str; int res; @@ -400,8 +401,8 @@ impl->context = context; impl->work = pw_context_get_work_queue(context); - if (pw_properties_get(props, PW_KEY_NODE_GROUP) == NULL) - pw_properties_set(props, PW_KEY_NODE_GROUP, "pipewire.dummy"); + if (pw_properties_get(props, PW_KEY_NODE_WANT_DRIVER) == NULL) + pw_properties_set(props, PW_KEY_NODE_WANT_DRIVER, "true"); if (pw_properties_get(props, PW_KEY_NODE_VIRTUAL) == NULL) pw_properties_set(props, PW_KEY_NODE_VIRTUAL, "true"); @@ -409,7 +410,7 @@ pw_properties_set(props, PW_KEY_MEDIA_CLASS, "Audio/Sink"); if (pw_properties_get(props, PW_KEY_NODE_NAME) == NULL) - pw_properties_setf(props, PW_KEY_NODE_NAME, "example-sink-%u", id); + pw_properties_setf(props, PW_KEY_NODE_NAME, "example-sink-%u-%u", pid, id); if (pw_properties_get(props, PW_KEY_NODE_DESCRIPTION) == NULL) pw_properties_set(props, PW_KEY_NODE_DESCRIPTION, pw_properties_get(props, PW_KEY_NODE_NAME)); @@ -423,6 +424,7 @@ copy_props(impl, props, PW_KEY_NODE_NAME); copy_props(impl, props, PW_KEY_NODE_DESCRIPTION); copy_props(impl, props, PW_KEY_NODE_GROUP); + copy_props(impl, props, PW_KEY_NODE_WANT_DRIVER); copy_props(impl, props, PW_KEY_NODE_LATENCY); copy_props(impl, props, PW_KEY_NODE_VIRTUAL); copy_props(impl, props, PW_KEY_MEDIA_CLASS);
View file
pipewire-0.3.49.tar.gz/src/modules/module-example-source.c -> pipewire-0.3.50.tar.gz/src/modules/module-example-source.c
Changed
@@ -95,7 +95,6 @@ struct pw_properties *stream_props; struct pw_stream *stream; struct spa_hook stream_listener; - struct spa_io_rate_match *rate_match; struct spa_audio_info_raw info; uint32_t frame_size; @@ -157,10 +156,7 @@ bd = &buf->buffer->datas0; data = bd->data; - if (impl->rate_match) - size = SPA_MIN(impl->rate_match->size * impl->frame_size, bd->maxsize); - else - size = bd->maxsize; + size = buf->requested ? buf->requested * impl->frame_size : bd->maxsize; /* fill buffer contents here */ pw_log_info("fill buffer data %p with up to %u bytes", data, size); @@ -168,25 +164,15 @@ bd->chunk->size = size; bd->chunk->stride = impl->frame_size; bd->chunk->offset = 0; + buf->size = size / impl->frame_size; pw_stream_queue_buffer(impl->stream, buf); } -static void stream_io_changed(void *data, uint32_t id, void *area, uint32_t size) -{ - struct impl *impl = data; - switch (id) { - case SPA_IO_RateMatch: - impl->rate_match = area; - break; - } -} - static const struct pw_stream_events capture_stream_events = { PW_VERSION_STREAM_EVENTS, .destroy = stream_destroy, .state_changed = stream_state_changed, - .io_changed = stream_io_changed, .process = capture_stream_process }; @@ -385,6 +371,7 @@ { struct pw_context *context = pw_impl_module_get_context(module); uint32_t id = pw_global_get_id(pw_impl_module_get_global(module)); + uint32_t pid = getpid(); struct pw_properties *props = NULL; struct impl *impl; const char *str; @@ -420,8 +407,8 @@ impl->context = context; impl->work = pw_context_get_work_queue(context); - if (pw_properties_get(props, PW_KEY_NODE_GROUP) == NULL) - pw_properties_set(props, PW_KEY_NODE_GROUP, "pipewire.dummy"); + if (pw_properties_get(props, PW_KEY_NODE_WANT_DRIVER) == NULL) + pw_properties_set(props, PW_KEY_NODE_WANT_DRIVER, "true"); if (pw_properties_get(props, PW_KEY_NODE_VIRTUAL) == NULL) pw_properties_set(props, PW_KEY_NODE_VIRTUAL, "true"); @@ -429,7 +416,7 @@ pw_properties_set(props, PW_KEY_MEDIA_CLASS, "Audio/Source"); if (pw_properties_get(props, PW_KEY_NODE_NAME) == NULL) - pw_properties_setf(props, PW_KEY_NODE_NAME, "example-source-%u", id); + pw_properties_setf(props, PW_KEY_NODE_NAME, "example-source-%u-%u", pid, id); if (pw_properties_get(props, PW_KEY_NODE_DESCRIPTION) == NULL) pw_properties_set(props, PW_KEY_NODE_DESCRIPTION, pw_properties_get(props, PW_KEY_NODE_NAME)); @@ -443,6 +430,7 @@ copy_props(impl, props, PW_KEY_NODE_NAME); copy_props(impl, props, PW_KEY_NODE_DESCRIPTION); copy_props(impl, props, PW_KEY_NODE_GROUP); + copy_props(impl, props, PW_KEY_NODE_WANT_DRIVER); copy_props(impl, props, PW_KEY_NODE_LATENCY); copy_props(impl, props, PW_KEY_NODE_VIRTUAL); copy_props(impl, props, PW_KEY_MEDIA_CLASS);
View file
pipewire-0.3.49.tar.gz/src/modules/module-filter-chain.c -> pipewire-0.3.50.tar.gz/src/modules/module-filter-chain.c
Changed
@@ -816,6 +816,8 @@ spa_list_remove(&desc->link); plugin_unref(desc->plugin); + if (desc->desc) + fc_descriptor_free(desc->desc); free(desc->input); free(desc->output); free(desc->control); @@ -1723,6 +1725,7 @@ struct pw_properties *props; struct impl *impl; uint32_t id = pw_global_get_id(pw_impl_module_get_global(module)); + uint32_t pid = getpid(); const char *str; int res; @@ -1761,14 +1764,13 @@ spa_list_init(&impl->plugin_list); if (pw_properties_get(props, PW_KEY_NODE_GROUP) == NULL) - pw_properties_setf(props, PW_KEY_NODE_GROUP, "filter-chain-%u", id); + pw_properties_setf(props, PW_KEY_NODE_GROUP, "filter-chain-%u-%u", pid, id); if (pw_properties_get(props, PW_KEY_NODE_LINK_GROUP) == NULL) - pw_properties_setf(props, PW_KEY_NODE_LINK_GROUP, "filter-chain-%u", id); + pw_properties_setf(props, PW_KEY_NODE_LINK_GROUP, "filter-chain-%u-%u", pid, id); if (pw_properties_get(props, PW_KEY_NODE_VIRTUAL) == NULL) pw_properties_set(props, PW_KEY_NODE_VIRTUAL, "true"); - if (pw_properties_get(props, PW_KEY_NODE_DESCRIPTION) == NULL) - pw_properties_setf(props, PW_KEY_NODE_DESCRIPTION, "filter-chain-%u", id); + pw_properties_setf(props, PW_KEY_NODE_DESCRIPTION, "filter-chain-%u-%u", pid, id); if ((str = pw_properties_get(props, "capture.props")) != NULL) pw_properties_update_string(impl->capture_props, str, strlen(str)); @@ -1790,10 +1792,10 @@ if (pw_properties_get(impl->capture_props, PW_KEY_NODE_NAME) == NULL) pw_properties_setf(impl->capture_props, PW_KEY_NODE_NAME, - "input.filter-chain-%u", id); + "input.filter-chain-%u-%u", pid, id); if (pw_properties_get(impl->playback_props, PW_KEY_NODE_NAME) == NULL) pw_properties_setf(impl->playback_props, PW_KEY_NODE_NAME, - "output.filter-chain-%u", id); + "output.filter-chain-%u-%u", pid, id); if (pw_properties_get(impl->capture_props, PW_KEY_MEDIA_NAME) == NULL) pw_properties_setf(impl->capture_props, PW_KEY_MEDIA_NAME, "%s input",
View file
pipewire-0.3.49.tar.gz/src/modules/module-filter-chain/ladspa_plugin.c -> pipewire-0.3.50.tar.gz/src/modules/module-filter-chain/ladspa_plugin.c
Changed
@@ -136,7 +136,7 @@ port->max = upper; } -static void ladspa_free(struct fc_descriptor *desc) +static void ladspa_free(const struct fc_descriptor *desc) { struct descriptor *d = (struct descriptor*)desc; free(d->desc.ports);
View file
pipewire-0.3.49.tar.gz/src/modules/module-filter-chain/lv2_plugin.c -> pipewire-0.3.50.tar.gz/src/modules/module-filter-chain/lv2_plugin.c
Changed
@@ -380,7 +380,7 @@ i->work_iface->end_run(i->instance); } -static void lv2_free(struct fc_descriptor *desc) +static void lv2_free(const struct fc_descriptor *desc) { struct descriptor *d = (struct descriptor*)desc; free((char*)d->desc.name);
View file
pipewire-0.3.49.tar.gz/src/modules/module-filter-chain/plugin.h -> pipewire-0.3.50.tar.gz/src/modules/module-filter-chain/plugin.h
Changed
@@ -66,7 +66,7 @@ #define FC_DESCRIPTOR_SUPPORTS_NULL_DATA (1ULL << 0) uint64_t flags; - void (*free) (struct fc_descriptor *desc); + void (*free) (const struct fc_descriptor *desc); uint32_t n_ports; struct fc_port *ports; @@ -90,7 +90,7 @@ plugin->unload(plugin); } -static inline void fc_descriptor_free(struct fc_descriptor *desc) +static inline void fc_descriptor_free(const struct fc_descriptor *desc) { if (desc->free) desc->free(desc);
View file
pipewire-0.3.49.tar.gz/src/modules/module-loopback.c -> pipewire-0.3.50.tar.gz/src/modules/module-loopback.c
Changed
@@ -398,6 +398,7 @@ struct pw_properties *props; struct impl *impl; uint32_t id = pw_global_get_id(pw_impl_module_get_global(module)); + uint32_t pid = getpid(); const char *str; int res; @@ -431,15 +432,15 @@ impl->context = context; if (pw_properties_get(props, PW_KEY_NODE_GROUP) == NULL) - pw_properties_setf(props, PW_KEY_NODE_GROUP, "loopback-%u", id); + pw_properties_setf(props, PW_KEY_NODE_GROUP, "loopback-%u-%u", pid, id); if (pw_properties_get(props, PW_KEY_NODE_LINK_GROUP) == NULL) - pw_properties_setf(props, PW_KEY_NODE_LINK_GROUP, "loopback-%u", id); + pw_properties_setf(props, PW_KEY_NODE_LINK_GROUP, "loopback-%u-%u", pid, id); if (pw_properties_get(props, PW_KEY_NODE_VIRTUAL) == NULL) pw_properties_set(props, PW_KEY_NODE_VIRTUAL, "true"); if (pw_properties_get(props, PW_KEY_NODE_DESCRIPTION) == NULL) pw_properties_setf(props, PW_KEY_NODE_DESCRIPTION, - "loopback-%u", id); + "loopback-%u-%u", pid, id); if ((str = pw_properties_get(props, "capture.props")) != NULL) pw_properties_update_string(impl->capture_props, str, strlen(str)); @@ -458,10 +459,10 @@ if (pw_properties_get(impl->capture_props, PW_KEY_NODE_NAME) == NULL) pw_properties_setf(impl->capture_props, PW_KEY_NODE_NAME, - "input.loopback-%u", id); + "input.loopback-%u-%u", pid, id); if (pw_properties_get(impl->playback_props, PW_KEY_NODE_NAME) == NULL) pw_properties_setf(impl->playback_props, PW_KEY_NODE_NAME, - "output.loopback-%u", id); + "output.loopback-%u-%u", pid, id); parse_audio_info(impl->capture_props, &impl->capture_info); parse_audio_info(impl->playback_props, &impl->playback_info);
View file
pipewire-0.3.49.tar.gz/src/modules/module-metadata.c -> pipewire-0.3.50.tar.gz/src/modules/module-metadata.c
Changed
@@ -212,11 +212,15 @@ data->export_metadata.type = PW_TYPE_INTERFACE_Metadata; data->export_metadata.func = pw_core_metadata_export; - pw_context_register_export_type(context, &data->export_metadata); + if ((res = pw_context_register_export_type(context, &data->export_metadata)) < 0) + goto error; pw_impl_module_add_listener(module, &data->module_listener, &module_events, data); pw_impl_module_update_properties(module, &SPA_DICT_INIT_ARRAY(module_props)); return 0; +error: + pw_impl_factory_destroy(data->this); + return res; }
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-native/protocol-native.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-native/protocol-native.c
Changed
@@ -347,6 +347,9 @@ SPA_POD_Int(&seq)) < 0) return -EINVAL; + if (id == SPA_ID_INVALID) + return 0; + return pw_proxy_notify(proxy, struct pw_core_events, done, 0, id, seq); }
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/module.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/module.c
Changed
@@ -59,7 +59,7 @@ module->unloading = true; } -struct module *module_new(struct impl *impl, const struct module_methods *methods, size_t user_data) +struct module *module_new(struct impl *impl, size_t user_data) { struct module *module; @@ -69,7 +69,6 @@ module->index = SPA_ID_INVALID; module->impl = impl; - module->methods = methods; spa_hook_list_init(&module->listener_list); module->user_data = SPA_PTROFF(module, sizeof(*module), void); module->loaded = false; @@ -86,12 +85,12 @@ int module_load(struct client *client, struct module *module) { - pw_log_info("load module index:%u name:%s", module->index, module->name); - if (module->methods->load == NULL) + pw_log_info("load module index:%u name:%s", module->index, module->info->name); + if (module->info->load == NULL) return -ENOTSUP; /* subscription event is sent when the module does a * module_emit_loaded() */ - return module->methods->load(client, module); + return module->info->load(client, module); } void module_free(struct module *module) @@ -109,7 +108,6 @@ spa_hook_list_clean(&module->listener_list); pw_properties_free(module->props); - free((char*)module->name); free((char*)module->args); free(module); @@ -123,10 +121,10 @@ /* Note that client can be NULL (when the module is being unloaded * internally and not by a client request */ - pw_log_info("unload module index:%u name:%s", module->index, module->name); + pw_log_info("unload module index:%u name:%s", module->index, module->info->name); - if (module->methods->unload) - res = module->methods->unload(module); + if (module->info->unload) + res = module->info->unload(module); if (module->loaded) broadcast_subscribe_event(impl, @@ -260,44 +258,20 @@ return false; } -#include "modules/registry.h" - -static const struct module_info module_list = { - { "module-always-sink", 1, create_module_always_sink, }, - { "module-combine-sink", 0, create_module_combine_sink, }, - { "module-echo-cancel", 0, create_module_echo_cancel, }, - { "module-ladspa-sink", 0, create_module_ladspa_sink, }, - { "module-ladspa-source", 0, create_module_ladspa_source, }, - { "module-loopback", 0, create_module_loopback, }, - { "module-null-sink", 0, create_module_null_sink, }, - { "module-native-protocol-tcp", 0, create_module_native_protocol_tcp, }, - { "module-pipe-source", 0, create_module_pipe_source, }, - { "module-pipe-sink", 0, create_module_pipe_sink, }, - { "module-raop-discover", 1, create_module_raop_discover, }, - { "module-remap-sink", 0, create_module_remap_sink, }, - { "module-remap-source", 0, create_module_remap_source, }, - { "module-simple-protocol-tcp", 0, create_module_simple_protocol_tcp, }, - { "module-switch-on-connect", 1, create_module_switch_on_connect, }, - { "module-tunnel-sink", 0, create_module_tunnel_sink, }, - { "module-tunnel-source", 0, create_module_tunnel_source, }, - { "module-zeroconf-discover", 1, create_module_zeroconf_discover, }, -#ifdef HAVE_AVAHI - { "module-zeroconf-publish", 0, create_module_zeroconf_publish, }, -#endif - { "module-roc-sink", 0, create_module_roc_sink, }, - { "module-roc-source", 0, create_module_roc_source, }, - { "module-x11-bell", 0, create_module_x11_bell, }, -}; - static const struct module_info *find_module_info(const char *name) { - const struct module_info *info; + extern const struct module_info __start_pw_mod_pulse_modules; + extern const struct module_info __stop_pw_mod_pulse_modules; - SPA_FOR_EACH_ELEMENT(module_list, info) { + const struct module_info *info = __start_pw_mod_pulse_modules; + + for (; info < __stop_pw_mod_pulse_modules; info++) { if (spa_streq(info->name, name)) return info; } + spa_assert(info == __stop_pw_mod_pulse_modules); + return NULL; } @@ -305,7 +279,7 @@ { const char *name = data; const struct module *module = item_data; - return spa_streq(module->name, name) ? 1 : 0; + return spa_streq(module->info->name, name) ? 1 : 0; } struct module *module_create(struct client *client, const char *name, const char *args) @@ -334,12 +308,12 @@ if (module == NULL) return NULL; + module->info = info; module->index = pw_map_insert_new(&impl->modules, module); if (module->index == SPA_ID_INVALID) { module_unload(module); return NULL; } - module->name = strdup(name); module->args = args ? strdup(args) : NULL; module->index |= MODULE_FLAG; return module;
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/module.h -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/module.h
Changed
@@ -37,10 +37,20 @@ struct module_info { const char *name; + unsigned int load_once:1; + struct module *(*create) (struct impl *impl, const char *args); + int (*load) (struct client *client, struct module *module); + int (*unload) (struct module *module); }; +#define DEFINE_MODULE_INFO(name) \ + __attribute__((used)) \ + __attribute__((section("pw_mod_pulse_modules"))) \ + __attribute__((aligned(__alignof__(struct module_info)))) \ + const struct module_info name + struct module_events { #define VERSION_MODULE_EVENTS 0 uint32_t version; @@ -49,21 +59,12 @@ void (*destroy) (void *data); }; -struct module_methods { -#define VERSION_MODULE_METHODS 0 - uint32_t version; - - int (*load) (struct client *client, struct module *module); - int (*unload) (struct module *module); -}; - struct module { uint32_t index; - const char *name; const char *args; struct pw_properties *props; struct impl *impl; - const struct module_methods *methods; + const struct module_info *info; struct spa_hook_list listener_list; void *user_data; unsigned int loaded:1; @@ -75,7 +76,7 @@ struct module *module_create(struct client *client, const char *name, const char *args); void module_free(struct module *module); -struct module *module_new(struct impl *impl, const struct module_methods *methods, size_t user_data); +struct module *module_new(struct impl *impl, size_t user_data); int module_load(struct client *client, struct module *module); int module_unload(struct module *module); void module_schedule_unload(struct module *module);
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-always-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-always-sink.c
Changed
@@ -94,12 +94,6 @@ return 0; } -static const struct module_methods module_always_sink_methods = { - VERSION_MODULE_METHODS, - .load = module_always_sink_load, - .unload = module_always_sink_unload, -}; - static const struct spa_dict_item module_always_sink_info = { { PW_KEY_MODULE_AUTHOR, "Pauli Virtanen <pav@iki.fi>" }, { PW_KEY_MODULE_DESCRIPTION, "Always keeps at least one sink loaded even if it's a null one" }, @@ -123,7 +117,7 @@ if (argument) module_args_add_props(props, argument); - module = module_new(impl, &module_always_sink_methods, sizeof(struct module_always_sink_data)); + module = module_new(impl, sizeof(struct module_always_sink_data)); if (module == NULL) { res = -errno; goto out; @@ -136,3 +130,11 @@ errno = -res; return NULL; } + +DEFINE_MODULE_INFO(module_always_sink) = { + .name = "module-always-sink", + .load_once = true, + .create = create_module_always_sink, + .load = module_always_sink_load, + .unload = module_always_sink_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-combine-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-combine-sink.c
Changed
@@ -30,7 +30,6 @@ #include "../manager.h" #include "../module.h" -#include "registry.h" #define NAME "combine-sink" @@ -500,12 +499,6 @@ return 0; } -static const struct module_methods module_combine_sink_methods = { - VERSION_MODULE_METHODS, - .load = module_combine_sink_load, - .unload = module_combine_sink_unload, -}; - struct module *create_module_combine_sink(struct impl *impl, const char *argument) { struct module *module; @@ -554,7 +547,7 @@ goto out; } - module = module_new(impl, &module_combine_sink_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -580,3 +573,10 @@ errno = -res; return NULL; } + +DEFINE_MODULE_INFO(module_combine_sink) = { + .name = "module-combine-sink", + .create = create_module_combine_sink, + .load = module_combine_sink_load, + .unload = module_combine_sink_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-echo-cancel.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-echo-cancel.c
Changed
@@ -31,7 +31,6 @@ #include "../defs.h" #include "../module.h" -#include "registry.h" #define NAME "echo-cancel" @@ -127,12 +126,6 @@ return 0; } -static const struct module_methods module_echo_cancel_methods = { - VERSION_MODULE_METHODS, - .load = module_echo_cancel_load, - .unload = module_echo_cancel_unload, -}; - static const struct spa_dict_item module_echo_cancel_info = { { PW_KEY_MODULE_AUTHOR, "Arun Raghavan <arun@asymptotic.io>" }, { PW_KEY_MODULE_DESCRIPTION, "Acoustic echo canceller" }, @@ -240,7 +233,7 @@ pw_properties_set(props, "aec_args", NULL); } - module = module_new(impl, &module_echo_cancel_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -264,3 +257,10 @@ return NULL; } + +DEFINE_MODULE_INFO(module_echo_cancel) = { + .name = "module-echo-cancel", + .create = create_module_echo_cancel, + .load = module_echo_cancel_load, + .unload = module_echo_cancel_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-ladspa-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-ladspa-sink.c
Changed
@@ -30,7 +30,6 @@ #include "../defs.h" #include "../module.h" -#include "registry.h" #define NAME "ladspa-sink" @@ -144,12 +143,6 @@ return 0; } -static const struct module_methods module_ladspa_sink_methods = { - VERSION_MODULE_METHODS, - .load = module_ladspa_sink_load, - .unload = module_ladspa_sink_unload, -}; - static const struct spa_dict_item module_ladspa_sink_info = { { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_DESCRIPTION, "Virtual LADSPA sink" }, @@ -245,7 +238,7 @@ if (pw_properties_get(playback_props, PW_KEY_NODE_PASSIVE) == NULL) pw_properties_set(playback_props, PW_KEY_NODE_PASSIVE, "true"); - module = module_new(impl, &module_ladspa_sink_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -265,3 +258,10 @@ errno = -res; return NULL; } + +DEFINE_MODULE_INFO(module_ladspa_sink) = { + .name = "module-ladspa-sink", + .create = create_module_ladspa_sink, + .load = module_ladspa_sink_load, + .unload = module_ladspa_sink_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-ladspa-source.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-ladspa-source.c
Changed
@@ -30,7 +30,6 @@ #include "../defs.h" #include "../module.h" -#include "registry.h" #define NAME "ladspa-source" @@ -144,12 +143,6 @@ return 0; } -static const struct module_methods module_ladspa_source_methods = { - VERSION_MODULE_METHODS, - .load = module_ladspa_source_load, - .unload = module_ladspa_source_unload, -}; - static const struct spa_dict_item module_ladspa_source_info = { { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_DESCRIPTION, "Virtual LADSPA source" }, @@ -245,7 +238,7 @@ if (pw_properties_get(capture_props, PW_KEY_NODE_PASSIVE) == NULL) pw_properties_set(capture_props, PW_KEY_NODE_PASSIVE, "true"); - module = module_new(impl, &module_ladspa_source_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -265,3 +258,10 @@ errno = -res; return NULL; } + +DEFINE_MODULE_INFO(module_ladspa_source) = { + .name = "module-ladspa-source", + .create = create_module_ladspa_source, + .load = module_ladspa_source_load, + .unload = module_ladspa_source_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-loopback.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-loopback.c
Changed
@@ -31,7 +31,6 @@ #include "../defs.h" #include "../module.h" -#include "registry.h" #define NAME "loopback" @@ -127,12 +126,6 @@ return 0; } -static const struct module_methods module_loopback_methods = { - VERSION_MODULE_METHODS, - .load = module_loopback_load, - .unload = module_loopback_unload, -}; - static const struct spa_dict_item module_loopback_info = { { PW_KEY_MODULE_AUTHOR, "Arun Raghavan <arun@asymptotic.io>" }, { PW_KEY_MODULE_DESCRIPTION, "Loopback from source to sink" }, @@ -234,7 +227,7 @@ pw_properties_set(props, "source_output_properties", NULL); } - module = module_new(impl, &module_loopback_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -256,3 +249,10 @@ return NULL; } + +DEFINE_MODULE_INFO(module_loopback) = { + .name = "module-loopback", + .create = create_module_loopback, + .load = module_loopback_load, + .unload = module_loopback_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-native-protocol-tcp.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-native-protocol-tcp.c
Changed
@@ -27,7 +27,6 @@ #include "../module.h" #include "../pulse-server.h" #include "../server.h" -#include "registry.h" #define NAME "protocol-tcp" @@ -71,12 +70,6 @@ return 0; } -static const struct module_methods module_native_protocol_tcp_methods = { - VERSION_MODULE_METHODS, - .load = module_native_protocol_tcp_load, - .unload = module_native_protocol_tcp_unload, -}; - static const struct spa_dict_item module_native_protocol_tcp_info = { { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_DESCRIPTION, "Native protocol (TCP sockets)" }, @@ -111,7 +104,7 @@ pw_properties_setf(props, "pulse.tcp", " \"tcp:%s%s%s\" ", listen ? listen : "", listen ? ":" : "", port); - module = module_new(impl, &module_native_protocol_tcp_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -127,3 +120,10 @@ errno = -res; return NULL; } + +DEFINE_MODULE_INFO(module_native_protocol_tcp) = { + .name = "module-native-protocol-tcp", + .create = create_module_native_protocol_tcp, + .load = module_native_protocol_tcp_load, + .unload = module_native_protocol_tcp_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-null-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-null-sink.c
Changed
@@ -26,7 +26,6 @@ #include "../manager.h" #include "../module.h" -#include "registry.h" #define NAME "null-sink" @@ -147,12 +146,6 @@ return 0; } -static const struct module_methods module_null_sink_methods = { - VERSION_MODULE_METHODS, - .load = module_null_sink_load, - .unload = module_null_sink_unload, -}; - static const struct spa_dict_item module_null_sink_info = { { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_DESCRIPTION, "A NULL sink" }, @@ -234,7 +227,7 @@ if (pw_properties_get(props, "monitor.channel-volumes") == NULL) pw_properties_set(props, "monitor.channel-volumes", "true"); - module = module_new(impl, &module_null_sink_methods, sizeof(struct module_null_sink_data)); + module = module_new(impl, sizeof(struct module_null_sink_data)); if (module == NULL) { res = -errno; goto out; @@ -247,3 +240,10 @@ errno = -res; return NULL; } + +DEFINE_MODULE_INFO(module_null_sink) = { + .name = "module-null-sink", + .create = create_module_null_sink, + .load = module_null_sink_load, + .unload = module_null_sink_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-pipe-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-pipe-sink.c
Changed
@@ -34,7 +34,6 @@ #include "../defs.h" #include "../module.h" -#include "registry.h" #define NAME "pipe-sink" @@ -140,7 +139,7 @@ .process = capture_process }; -static int module_pipesink_load(struct client *client, struct module *module) +static int module_pipe_sink_load(struct client *client, struct module *module) { struct module_pipesink_data *data = module->user_data; int res; @@ -187,7 +186,7 @@ return 0; } -static int module_pipesink_unload(struct module *module) +static int module_pipe_sink_unload(struct module *module) { struct module_pipesink_data *d = module->user_data; @@ -207,13 +206,7 @@ return 0; } -static const struct module_methods module_pipesink_methods = { - VERSION_MODULE_METHODS, - .load = module_pipesink_load, - .unload = module_pipesink_unload, -}; - -static const struct spa_dict_item module_pipesink_info = { +static const struct spa_dict_item module_pipe_sink_info = { { PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" }, { PW_KEY_MODULE_DESCRIPTION, "Pipe sink" }, { PW_KEY_MODULE_USAGE, "file=<name of the FIFO special file to use> " @@ -240,7 +233,7 @@ PW_LOG_TOPIC_INIT(mod_topic); - props = pw_properties_new_dict(&SPA_DICT_INIT_ARRAY(module_pipesink_info)); + props = pw_properties_new_dict(&SPA_DICT_INIT_ARRAY(module_pipe_sink_info)); capture_props = pw_properties_new(NULL, NULL); if (!props || !capture_props) { res = -EINVAL; @@ -305,13 +298,13 @@ goto out; } - if (pw_properties_get(capture_props, PW_KEY_NODE_GROUP) == NULL) - pw_properties_set(capture_props, PW_KEY_NODE_GROUP, "pipewire.dummy"); + if (pw_properties_get(capture_props, PW_KEY_NODE_WANT_DRIVER) == NULL) + pw_properties_set(capture_props, PW_KEY_NODE_WANT_DRIVER, "true"); if (pw_properties_get(capture_props, PW_KEY_NODE_VIRTUAL) == NULL) pw_properties_set(capture_props, PW_KEY_NODE_VIRTUAL, "true"); pw_properties_set(capture_props, PW_KEY_MEDIA_CLASS, "Audio/Sink"); - module = module_new(impl, &module_pipesink_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -343,3 +336,10 @@ return NULL; } + +DEFINE_MODULE_INFO(module_pipe_sink) = { + .name = "module-pipe-sink", + .create = create_module_pipe_sink, + .load = module_pipe_sink_load, + .unload = module_pipe_sink_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-pipe-source.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-pipe-source.c
Changed
@@ -34,7 +34,6 @@ #include "../defs.h" #include "../module.h" -#include "registry.h" #define NAME "pipe-source" @@ -161,7 +160,7 @@ .process = playback_process }; -static int module_pipesource_load(struct client *client, struct module *module) +static int module_pipe_source_load(struct client *client, struct module *module) { struct module_pipesrc_data *data = module->user_data; int res; @@ -209,7 +208,7 @@ return 0; } -static int module_pipesource_unload(struct module *module) +static int module_pipe_source_unload(struct module *module) { struct module_pipesrc_data *d = module->user_data; @@ -227,13 +226,7 @@ return 0; } -static const struct module_methods module_pipesource_methods = { - VERSION_MODULE_METHODS, - .load = module_pipesource_load, - .unload = module_pipesource_unload, -}; - -static const struct spa_dict_item module_pipesource_info = { +static const struct spa_dict_item module_pipe_source_info = { { PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" }, { PW_KEY_MODULE_DESCRIPTION, "Pipe source" }, { PW_KEY_MODULE_USAGE, "file=<name of the FIFO special file to use> " @@ -260,7 +253,7 @@ PW_LOG_TOPIC_INIT(mod_topic); - props = pw_properties_new_dict(&SPA_DICT_INIT_ARRAY(module_pipesource_info)); + props = pw_properties_new_dict(&SPA_DICT_INIT_ARRAY(module_pipe_source_info)); playback_props = pw_properties_new(NULL, NULL); if (!props || !playback_props) { res = -errno; @@ -364,13 +357,13 @@ goto out; } - if (pw_properties_get(playback_props, PW_KEY_NODE_GROUP) == NULL) - pw_properties_set(playback_props, PW_KEY_NODE_GROUP, "pipewire.dummy"); + if (pw_properties_get(playback_props, PW_KEY_NODE_WANT_DRIVER) == NULL) + pw_properties_set(playback_props, PW_KEY_NODE_WANT_DRIVER, "true"); if (pw_properties_get(playback_props, PW_KEY_NODE_VIRTUAL) == NULL) pw_properties_set(playback_props, PW_KEY_NODE_VIRTUAL, "true"); pw_properties_set(playback_props, PW_KEY_MEDIA_CLASS, "Audio/Source"); - module = module_new(impl, &module_pipesource_methods, sizeof(*d) + stride); + module = module_new(impl, sizeof(*d) + stride); if (module == NULL) { res = -errno; goto out; @@ -401,3 +394,10 @@ return NULL; } + +DEFINE_MODULE_INFO(module_pipe_source) = { + .name = "module-pipe-source", + .create = create_module_pipe_source, + .load = module_pipe_source_load, + .unload = module_pipe_source_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-raop-discover.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-raop-discover.c
Changed
@@ -28,7 +28,6 @@ #include "../defs.h" #include "../module.h" -#include "registry.h" #define NAME "raop-discover" @@ -86,12 +85,6 @@ return 0; } -static const struct module_methods module_raop_discover_methods = { - VERSION_MODULE_METHODS, - .load = module_raop_discover_load, - .unload = module_raop_discover_unload, -}; - static const struct spa_dict_item module_raop_discover_info = { { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.con>" }, { PW_KEY_MODULE_DESCRIPTION, "mDNS/DNS-SD Service Discovery of RAOP devices" }, @@ -116,7 +109,7 @@ if (argument != NULL) module_args_add_props(props, argument); - module = module_new(impl, &module_raop_discover_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -132,3 +125,11 @@ errno = -res; return NULL; } + +DEFINE_MODULE_INFO(module_raop_discover) = { + .name = "module-raop-discover", + .load_once = true, + .create = create_module_raop_discover, + .load = module_raop_discover_load, + .unload = module_raop_discover_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-remap-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-remap-sink.c
Changed
@@ -30,7 +30,6 @@ #include "../defs.h" #include "../module.h" -#include "registry.h" #define NAME "remap-sink" @@ -115,12 +114,6 @@ return 0; } -static const struct module_methods module_remap_sink_methods = { - VERSION_MODULE_METHODS, - .load = module_remap_sink_load, - .unload = module_remap_sink_unload, -}; - static const struct spa_dict_item module_remap_sink_info = { { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_DESCRIPTION, "Remap sink channels" }, @@ -242,7 +235,7 @@ if (pw_properties_get(playback_props, PW_KEY_NODE_PASSIVE) == NULL) pw_properties_set(playback_props, PW_KEY_NODE_PASSIVE, "true"); - module = module_new(impl, &module_remap_sink_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -262,3 +255,10 @@ errno = -res; return NULL; } + +DEFINE_MODULE_INFO(module_remap_sink) = { + .name = "module-remap-sink", + .create = create_module_remap_sink, + .load = module_remap_sink_load, + .unload = module_remap_sink_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-remap-source.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-remap-source.c
Changed
@@ -30,7 +30,6 @@ #include "../defs.h" #include "../module.h" -#include "registry.h" #define NAME "remap-sink" @@ -115,12 +114,6 @@ return 0; } -static const struct module_methods module_remap_source_methods = { - VERSION_MODULE_METHODS, - .load = module_remap_source_load, - .unload = module_remap_source_unload, -}; - static const struct spa_dict_item module_remap_source_info = { { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_DESCRIPTION, "Remap source channels" }, @@ -242,7 +235,7 @@ if (pw_properties_get(capture_props, PW_KEY_NODE_PASSIVE) == NULL) pw_properties_set(capture_props, PW_KEY_NODE_PASSIVE, "true"); - module = module_new(impl, &module_remap_source_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -262,3 +255,10 @@ errno = -res; return NULL; } + +DEFINE_MODULE_INFO(module_remap_source) = { + .name = "module-remap-source", + .create = create_module_remap_source, + .load = module_remap_source_load, + .unload = module_remap_source_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-roc-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-roc-sink.c
Changed
@@ -29,7 +29,6 @@ #include "../defs.h" #include "../module.h" -#include "registry.h" #define NAME "roc-sink" @@ -115,12 +114,6 @@ return 0; } -static const struct module_methods module_roc_sink_methods = { - VERSION_MODULE_METHODS, - .load = module_roc_sink_load, - .unload = module_roc_sink_unload, -}; - static const struct spa_dict_item module_roc_sink_info = { { PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" }, { PW_KEY_MODULE_DESCRIPTION, "roc sink" }, @@ -197,7 +190,7 @@ pw_properties_set(roc_props, "remote.repair.port", ROC_DEFAULT_REPAIR_PORT); } - module = module_new(impl, &module_roc_sink_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -217,3 +210,10 @@ errno = -res; return NULL; } + +DEFINE_MODULE_INFO(module_roc_sink) = { + .name = "module-roc-sink", + .create = create_module_roc_sink, + .load = module_roc_sink_load, + .unload = module_roc_sink_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-roc-source.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-roc-source.c
Changed
@@ -29,7 +29,6 @@ #include "../defs.h" #include "../module.h" -#include "registry.h" #define NAME "roc-source" @@ -115,12 +114,6 @@ return 0; } -static const struct module_methods module_roc_source_methods = { - VERSION_MODULE_METHODS, - .load = module_roc_source_load, - .unload = module_roc_source_unload, -}; - static const struct spa_dict_item module_roc_source_info = { { PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io>" }, { PW_KEY_MODULE_DESCRIPTION, "roc source" }, @@ -204,7 +197,7 @@ pw_properties_set(roc_props, "resampler.profile", ROC_DEFAULT_REPAIR_PORT); } - module = module_new(impl, &module_roc_source_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -224,3 +217,10 @@ errno = -res; return NULL; } + +DEFINE_MODULE_INFO(module_roc_source) = { + .name = "module-roc-source", + .create = create_module_roc_source, + .load = module_roc_source_load, + .unload = module_roc_source_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-simple-protocol-tcp.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-simple-protocol-tcp.c
Changed
@@ -27,7 +27,6 @@ #include "../defs.h" #include "../module.h" -#include "registry.h" #define NAME "simple-protocol-tcp" @@ -115,12 +114,6 @@ return 0; } -static const struct module_methods module_simple_protocol_tcp_methods = { - VERSION_MODULE_METHODS, - .load = module_simple_protocol_tcp_load, - .unload = module_simple_protocol_tcp_unload, -}; - static const struct spa_dict_item module_simple_protocol_tcp_info = { { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_DESCRIPTION, "Simple protocol (TCP sockets)" }, @@ -204,7 +197,7 @@ pw_properties_setf(module_props, "server.address", " \"tcp:%s%s%s\" ", listen ? listen : "", listen ? ":" : "", port); - module = module_new(impl, &module_simple_protocol_tcp_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -223,3 +216,10 @@ errno = -res; return NULL; } + +DEFINE_MODULE_INFO(module_simple_protocol_tcp) = { + .name = "module-simple-protocol-tcp", + .create = create_module_simple_protocol_tcp, + .load = module_simple_protocol_tcp_load, + .unload = module_simple_protocol_tcp_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-switch-on-connect.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-switch-on-connect.c
Changed
@@ -31,7 +31,6 @@ #include "../defs.h" #include "../module.h" -#include "registry.h" #include "../manager.h" #include "../collect.h" @@ -234,12 +233,6 @@ return 0; } -static const struct module_methods module_switch_on_connect_methods = { - VERSION_MODULE_METHODS, - .load = module_switch_on_connect_load, - .unload = module_switch_on_connect_unload, -}; - static const struct spa_dict_item module_switch_on_connect_info = { { PW_KEY_MODULE_AUTHOR, "Pauli Virtanen <pav@iki.fi>" }, { PW_KEY_MODULE_DESCRIPTION, "Switch to new devices on connect. " @@ -299,7 +292,7 @@ pw_properties_set(props, "blocklist", NULL); - module = module_new(impl, &module_switch_on_connect_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -329,3 +322,11 @@ return NULL; } + +DEFINE_MODULE_INFO(module_switch_on_connect) = { + .name = "module-switch-on-connect", + .load_once = true, + .create = create_module_switch_on_connect, + .load = module_switch_on_connect_load, + .unload = module_switch_on_connect_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-tunnel-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-tunnel-sink.c
Changed
@@ -32,7 +32,6 @@ #include "../defs.h" #include "../module.h" -#include "registry.h" #define NAME "tunnel-sink" @@ -120,12 +119,6 @@ return 0; } -static const struct module_methods module_tunnel_sink_methods = { - VERSION_MODULE_METHODS, - .load = module_tunnel_sink_load, - .unload = module_tunnel_sink_unload, -}; - static const struct spa_dict_item module_tunnel_sink_info = { { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_DESCRIPTION, "Create a network sink which connects to a remote PulseAudio server" }, @@ -219,7 +212,7 @@ pw_properties_set(stream_props, PW_KEY_AUDIO_FORMAT, format_id2name(id)); } - module = module_new(impl, &module_tunnel_sink_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -239,3 +232,10 @@ errno = -res; return NULL; } + +DEFINE_MODULE_INFO(module_tunnel_sink) = { + .name = "module-tunnel-sink", + .create = create_module_tunnel_sink, + .load = module_tunnel_sink_load, + .unload = module_tunnel_sink_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-tunnel-source.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-tunnel-source.c
Changed
@@ -32,7 +32,6 @@ #include "../defs.h" #include "../module.h" -#include "registry.h" #define NAME "tunnel-source" @@ -120,12 +119,6 @@ return 0; } -static const struct module_methods module_tunnel_source_methods = { - VERSION_MODULE_METHODS, - .load = module_tunnel_source_load, - .unload = module_tunnel_source_unload, -}; - static const struct spa_dict_item module_tunnel_source_info = { { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_DESCRIPTION, "Create a network source which connects to a remote PulseAudio server" }, @@ -209,7 +202,7 @@ audio_info_to_props(&info, stream_props); - module = module_new(impl, &module_tunnel_source_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -229,3 +222,10 @@ errno = -res; return NULL; } + +DEFINE_MODULE_INFO(module_tunnel_source) = { + .name = "module-tunnel-source", + .create = create_module_tunnel_source, + .load = module_tunnel_source_load, + .unload = module_tunnel_source_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-x11-bell.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-x11-bell.c
Changed
@@ -100,12 +100,6 @@ return 0; } -static const struct module_methods module_x11_bell_methods = { - VERSION_MODULE_METHODS, - .load = module_x11_bell_load, - .unload = module_x11_bell_unload, -}; - static const struct spa_dict_item module_x11_bell_info = { { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" }, { PW_KEY_MODULE_DESCRIPTION, "X11 bell interceptor" }, @@ -132,7 +126,7 @@ if (argument) module_args_add_props(props, argument); - module = module_new(impl, &module_x11_bell_methods, sizeof(struct module_x11_bell_data)); + module = module_new(impl, sizeof(struct module_x11_bell_data)); if (module == NULL) { res = -errno; goto out; @@ -145,3 +139,10 @@ errno = -res; return NULL; } + +DEFINE_MODULE_INFO(module_x11_bell) = { + .name = "module-x11-bell", + .create = create_module_x11_bell, + .load = module_x11_bell_load, + .unload = module_x11_bell_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-zeroconf-discover.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-zeroconf-discover.c
Changed
@@ -28,7 +28,6 @@ #include "../defs.h" #include "../module.h" -#include "registry.h" #define NAME "zeroconf-discover" @@ -86,12 +85,6 @@ return 0; } -static const struct module_methods module_zeroconf_discover_methods = { - VERSION_MODULE_METHODS, - .load = module_zeroconf_discover_load, - .unload = module_zeroconf_discover_unload, -}; - static const struct spa_dict_item module_zeroconf_discover_info = { { PW_KEY_MODULE_AUTHOR, "Wim Taymans <wim.taymans@gmail.con>" }, { PW_KEY_MODULE_DESCRIPTION, "mDNS/DNS-SD Service Discovery" }, @@ -116,7 +109,7 @@ if (argument != NULL) module_args_add_props(props, argument); - module = module_new(impl, &module_zeroconf_discover_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -132,3 +125,11 @@ errno = -res; return NULL; } + +DEFINE_MODULE_INFO(module_zeroconf_discover) = { + .name = "module-zeroconf-discover", + .load_once = true, + .create = create_module_zeroconf_discover, + .load = module_zeroconf_discover_load, + .unload = module_zeroconf_discover_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/modules/module-zeroconf-publish.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/modules/module-zeroconf-publish.c
Changed
@@ -32,7 +32,6 @@ #include "../manager.h" #include "../module.h" #include "../pulse-server.h" -#include "registry.h" #include "../../module-zeroconf-discover/avahi-poll.h" #include <avahi-client/client.h> @@ -631,12 +630,6 @@ return 0; } -static const struct module_methods module_zeroconf_publish_methods = { - VERSION_MODULE_METHODS, - .load = module_zeroconf_publish_load, - .unload = module_zeroconf_publish_unload, -}; - static const struct spa_dict_item module_zeroconf_publish_info = { { PW_KEY_MODULE_AUTHOR, "Sanchayan Maity <sanchayan@asymptotic.io" }, { PW_KEY_MODULE_DESCRIPTION, "mDNS/DNS-SD Service Publish" }, @@ -661,7 +654,7 @@ if (argument) module_args_add_props(props, argument); - module = module_new(impl, &module_zeroconf_publish_methods, sizeof(*d)); + module = module_new(impl, sizeof(*d)); if (module == NULL) { res = -errno; goto out; @@ -680,3 +673,10 @@ errno = -res; return NULL; } + +DEFINE_MODULE_INFO(module_zeroconf_publish) = { + .name = "module-zeroconf-publish", + .create = create_module_zeroconf_publish, + .load = module_zeroconf_publish_load, + .unload = module_zeroconf_publish_unload, +};
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/pulse-server.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/pulse-server.c
Changed
@@ -1145,10 +1145,9 @@ int32_t avail; stream->timestamp = pd->pwt.now; + stream->delay = pd->pwt.buffered * SPA_USEC_PER_SEC / stream->ss.rate; if (pd->pwt.rate.denom > 0) stream->delay = pd->pwt.delay * SPA_USEC_PER_SEC / pd->pwt.rate.denom; - else - stream->delay = 0; if (stream->direction == PW_DIRECTION_OUTPUT) { if (pd->quantum != stream->last_quantum) @@ -1260,8 +1259,7 @@ if (stream->direction == PW_DIRECTION_OUTPUT) { int32_t avail = spa_ringbuffer_get_read_index(&stream->ring, &index); - if (stream->rate_match) - minreq = stream->rate_match->size * stream->frame_size; + minreq = buffer->requested * stream->frame_size; if (minreq == 0) minreq = stream->attr.minreq; @@ -1357,7 +1355,7 @@ if (do_flush) pw_stream_flush(stream->stream, true); - pw_stream_get_time(stream->stream, &pd.pwt); + pw_stream_get_time_n(stream->stream, &pd.pwt, sizeof(pd.pwt)); pw_loop_invoke(impl->loop, do_process_done, 1, &pd, sizeof(pd), false, stream); @@ -3355,7 +3353,7 @@ { message_put(m, TAG_U32, module->index, /* module index */ - TAG_STRING, module->name, + TAG_STRING, module->info->name, TAG_STRING, module->args, TAG_U32, -1, /* n_used */ TAG_INVALID); @@ -4743,7 +4741,7 @@ if (SPA_RESULT_IS_OK(result)) { pw_log_info("%s loaded module index:%u name:%s tag:%d", - client_name, module->index, module->name, tag); + client_name, module->index, module->info->name, tag); module->loaded = true; @@ -4764,7 +4762,7 @@ else { pw_log_warn("%p: %s failed to load module index:%u name:%s tag:%d result:%d (%s)", impl, client_name, - module->index, module->name, tag, + module->index, module->info->name, tag, result, spa_strerror(result)); module_schedule_unload(module);
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/sample-play.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/sample-play.c
Changed
@@ -61,17 +61,6 @@ } } -static void sample_play_stream_io_changed(void *data, uint32_t id, void *area, uint32_t size) -{ - struct sample_play *p = data; - - switch (id) { - case SPA_IO_RateMatch: - p->rate_match = area; - break; - } -} - static void sample_play_stream_destroy(void *data) { struct sample_play *p = data; @@ -111,8 +100,8 @@ return; size = SPA_MIN(size, buf->datas0.maxsize); - if (p->rate_match) - size = SPA_MIN(size, p->rate_match->size * p->stride); + if (b->requested) + size = SPA_MIN(size, b->requested * p->stride); memcpy(d, s->buffer + p->offset, size); @@ -135,7 +124,6 @@ static const struct pw_stream_events sample_play_stream_events = { PW_VERSION_STREAM_EVENTS, .state_changed = sample_play_stream_state_changed, - .io_changed = sample_play_stream_io_changed, .destroy = sample_play_stream_destroy, .process = sample_play_stream_process, .drained = sample_play_stream_drained,
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-pulse/sample-play.h -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-pulse/sample-play.h
Changed
@@ -37,7 +37,6 @@ struct pw_stream; struct pw_context; struct pw_properties; -struct spa_io_rate_match; struct sample_play_events { #define VERSION_SAMPLE_PLAY_EVENTS 0 @@ -55,7 +54,6 @@ struct spa_list link; struct sample *sample; struct pw_stream *stream; - struct spa_io_rate_match *rate_match; uint32_t id; struct spa_hook listener; struct pw_context *context;
View file
pipewire-0.3.49.tar.gz/src/modules/module-protocol-simple.c -> pipewire-0.3.50.tar.gz/src/modules/module-protocol-simple.c
Changed
@@ -121,8 +121,6 @@ struct pw_stream *playback; struct spa_hook playback_listener; - struct spa_io_rate_match *rate_match; - unsigned int disconnect:1; unsigned int disconnecting:1; unsigned int cleanup:1; @@ -282,12 +280,9 @@ } d = &buf->buffer->datas0; - if (client->rate_match) { - size = client->rate_match->size * impl->frame_size; - size = SPA_MIN(size, d->maxsize); - } else { - size = d->maxsize; - } + size = d->maxsize; + if (buf->requested) + size = SPA_MIN(size, buf->requested * impl->frame_size); offset = 0; while (size > 0) { @@ -354,16 +349,6 @@ client->playback = NULL; } -static void playback_io_changed(void *data, uint32_t id, void *area, uint32_t size) -{ - struct client *client = data; - switch (id) { - case SPA_IO_RateMatch: - client->rate_match = area; - break; - } -} - static const struct pw_stream_events capture_stream_events = { PW_VERSION_STREAM_EVENTS, .destroy = capture_destroy, @@ -375,7 +360,6 @@ PW_VERSION_STREAM_EVENTS, .destroy = playback_destroy, .state_changed = on_stream_state_changed, - .io_changed = playback_io_changed, .process = playback_process }; @@ -394,7 +378,7 @@ if (impl->capture) { props = pw_properties_new( - PW_KEY_NODE_GROUP, "pipewire.dummy", + PW_KEY_NODE_WANT_DRIVER, "true", PW_KEY_NODE_LATENCY, latency, PW_KEY_NODE_RATE, pw_properties_get(impl->props, PW_KEY_NODE_RATE), PW_KEY_NODE_TARGET, pw_properties_get(impl->props, "capture.node"), @@ -418,7 +402,7 @@ } if (impl->playback) { props = pw_properties_new( - PW_KEY_NODE_GROUP, "pipewire.dummy", + PW_KEY_NODE_WANT_DRIVER, "true", PW_KEY_NODE_LATENCY, latency, PW_KEY_NODE_RATE, pw_properties_get(impl->props, PW_KEY_NODE_RATE), PW_KEY_NODE_TARGET, pw_properties_get(impl->props, "playback.node"),
View file
pipewire-0.3.49.tar.gz/src/modules/module-pulse-tunnel.c -> pipewire-0.3.50.tar.gz/src/modules/module-pulse-tunnel.c
Changed
@@ -40,6 +40,7 @@ #include <spa/utils/string.h> #include <spa/utils/json.h> #include <spa/utils/ringbuffer.h> +#include <spa/utils/dll.h> #include <spa/debug/pod.h> #include <spa/pod/builder.h> #include <spa/param/audio/format-utils.h> @@ -85,7 +86,7 @@ #define RINGBUFFER_SIZE (1u << 22) #define RINGBUFFER_MASK (RINGBUFFER_SIZE-1) -#define DEFAULT_LATENCY_MSEC (100) +#define DEFAULT_LATENCY_MSEC (200) struct impl { struct pw_context *context; @@ -108,7 +109,6 @@ struct pw_properties *stream_props; struct pw_stream *stream; struct spa_hook stream_listener; - struct spa_io_rate_match *rate_match; struct spa_audio_info_raw info; uint32_t frame_size; @@ -120,6 +120,10 @@ pa_context *pa_context; pa_stream *pa_stream; + uint32_t target_buffer; + struct spa_dll dll; + float max_error; + unsigned int do_disconnect:1; }; @@ -189,13 +193,29 @@ size = SPA_MIN(bd->chunk->size, RINGBUFFER_SIZE); filled = spa_ringbuffer_get_write_index(&impl->ring, &write_index); + if (filled < 0) { pw_log_warn("%p: underrun write:%u filled:%d", impl, write_index, filled); - } else if ((uint32_t)filled + size > RINGBUFFER_SIZE) { - pw_log_debug("%p: overrun write:%u filled:%d size:%u max:%u", - impl, write_index, filled, - size, RINGBUFFER_SIZE); + } else { + float error, corr; + + if ((uint32_t)filled + size > impl->target_buffer * 2) { + pw_log_warn("%p: overrun write:%u filled:%d size:%u max:%u", + impl, write_index, filled, + size, RINGBUFFER_SIZE); + write_index -= impl->target_buffer; + filled -= impl->target_buffer; + } else { + error = (float)filled - (float)impl->target_buffer; + error = SPA_CLAMP(error, -impl->max_error, impl->max_error); + + pw_log_debug("filled:%u target:%u error:%f corr:%f", filled, + impl->target_buffer, error, corr); + corr = spa_dll_update(&impl->dll, error); + pw_stream_set_control(impl->stream, + SPA_PROP_rate, 1, &corr, NULL); + } } spa_ringbuffer_write_data(&impl->ring, impl->buffer, RINGBUFFER_SIZE, @@ -223,16 +243,31 @@ bd = &buf->buffer->datas0; - if (impl->rate_match) - req = impl->rate_match->size * impl->frame_size; - else - req = 4096; + if ((req = buf->requested * impl->frame_size) == 0) + req = 4096 * impl->frame_size; avail = spa_ringbuffer_get_read_index(&impl->ring, &read_index); if (avail <= 0) { size = SPA_MIN(bd->maxsize, req); memset(bd->data, 0, size); } else { + float error, corr; + + if (avail > (int32_t)impl->target_buffer * 2) { + avail -= impl->target_buffer; + read_index += impl->target_buffer; + } else { + error = (float)impl->target_buffer - (float)avail; + error = SPA_CLAMP(error, -impl->max_error, impl->max_error); + + corr = spa_dll_update(&impl->dll, error); + + pw_log_debug("avail:%u target:%u error:%f corr:%f", avail, + impl->target_buffer, error, corr); + pw_stream_set_control(impl->stream, + SPA_PROP_rate, 1, &corr, NULL); + } + size = SPA_MIN(bd->maxsize, (uint32_t)avail); size = SPA_MIN(size, req); @@ -243,6 +278,7 @@ read_index += size; spa_ringbuffer_read_update(&impl->ring, read_index); + } bd->chunk->offset = 0; bd->chunk->size = size; @@ -250,16 +286,6 @@ pw_stream_queue_buffer(impl->stream, buf); } -static void stream_io_changed(void *data, uint32_t id, void *area, uint32_t size) -{ - struct impl *impl = data; - switch (id) { - case SPA_IO_RateMatch: - impl->rate_match = area; - break; - } -} - static const struct pw_stream_events playback_stream_events = { PW_VERSION_STREAM_EVENTS, .destroy = stream_destroy, @@ -271,7 +297,6 @@ PW_VERSION_STREAM_EVENTS, .destroy = stream_destroy, .state_changed = stream_state_changed, - .io_changed = stream_io_changed, .process = capture_stream_process }; @@ -300,8 +325,6 @@ &playback_stream_events, impl); } - impl->frame_size = 2 * 2; - n_params = 0; spa_pod_builder_init(&b, buffer, sizeof(buffer)); paramsn_params++ = spa_format_audio_raw_build(&b, @@ -472,6 +495,7 @@ char stream_name1024; pa_buffer_attr bufferattr; int res = -EIO; + uint32_t latency_bytes; if ((impl->pa_mainloop = pa_threaded_mainloop_new()) == NULL) goto error; @@ -538,19 +562,26 @@ bufferattr.maxlength = (uint32_t) -1; bufferattr.prebuf = (uint32_t) -1; + latency_bytes = pa_usec_to_bytes(impl->latency_msec * SPA_USEC_PER_MSEC, &ss); + + /* half in our buffer, half in the network + remote */ + impl->target_buffer = latency_bytes / 2; + if (impl->mode == MODE_CAPTURE) { - bufferattr.fragsize = pa_usec_to_bytes(impl->latency_msec * SPA_USEC_PER_MSEC, &ss); + bufferattr.fragsize = latency_bytes / 2; res = pa_stream_connect_record(impl->pa_stream, remote_node_target, &bufferattr, + PA_STREAM_DONT_MOVE | PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_ADJUST_LATENCY | PA_STREAM_AUTO_TIMING_UPDATE); } else { - bufferattr.tlength = pa_usec_to_bytes(impl->latency_msec * SPA_USEC_PER_MSEC, &ss); + bufferattr.tlength = latency_bytes / 2; res = pa_stream_connect_playback(impl->pa_stream, remote_node_target, &bufferattr, + PA_STREAM_DONT_MOVE | PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_ADJUST_LATENCY | PA_STREAM_AUTO_TIMING_UPDATE, @@ -713,6 +744,41 @@ info->channels = pw_properties_get_uint32(props, PW_KEY_AUDIO_CHANNELS, info->channels); if ((str = pw_properties_get(props, SPA_KEY_AUDIO_POSITION)) != NULL) parse_position(info, str, strlen(str)); + +} + +static int calc_frame_size(struct spa_audio_info_raw *info) +{ + int res = info->channels; + switch (info->format) { + case SPA_AUDIO_FORMAT_U8: + case SPA_AUDIO_FORMAT_S8: + case SPA_AUDIO_FORMAT_ALAW: + case SPA_AUDIO_FORMAT_ULAW:
View file
pipewire-0.3.49.tar.gz/src/modules/module-raop-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-raop-sink.c
Changed
@@ -1541,6 +1541,7 @@ struct pw_context *context = pw_impl_module_get_context(module); struct pw_properties *props = NULL; uint32_t id = pw_global_get_id(pw_impl_module_get_global(module)); + uint32_t pid = getpid(); struct impl *impl; const char *str; int res; @@ -1578,8 +1579,8 @@ impl->context = context; impl->loop = pw_context_get_main_loop(context); - if (pw_properties_get(props, PW_KEY_NODE_GROUP) == NULL) - pw_properties_set(props, PW_KEY_NODE_GROUP, "pipewire.dummy"); + if (pw_properties_get(props, PW_KEY_NODE_WANT_DRIVER) == NULL) + pw_properties_set(props, PW_KEY_NODE_WANT_DRIVER, "true"); if (pw_properties_get(props, PW_KEY_NODE_VIRTUAL) == NULL) pw_properties_set(props, PW_KEY_NODE_VIRTUAL, "true"); @@ -1587,7 +1588,7 @@ pw_properties_set(props, PW_KEY_MEDIA_CLASS, "Audio/Sink"); if (pw_properties_get(props, PW_KEY_NODE_NAME) == NULL) - pw_properties_setf(props, PW_KEY_NODE_NAME, "raop-sink-%u", id); + pw_properties_setf(props, PW_KEY_NODE_NAME, "raop-sink-%u-%u", pid, id); if (pw_properties_get(props, PW_KEY_NODE_DESCRIPTION) == NULL) pw_properties_set(props, PW_KEY_NODE_DESCRIPTION, pw_properties_get(props, PW_KEY_NODE_NAME)); @@ -1604,6 +1605,7 @@ copy_props(impl, props, PW_KEY_NODE_NAME); copy_props(impl, props, PW_KEY_NODE_DESCRIPTION); copy_props(impl, props, PW_KEY_NODE_GROUP); + copy_props(impl, props, PW_KEY_NODE_WANT_DRIVER); copy_props(impl, props, PW_KEY_NODE_LATENCY); copy_props(impl, props, PW_KEY_NODE_VIRTUAL); copy_props(impl, props, PW_KEY_MEDIA_CLASS);
View file
pipewire-0.3.49.tar.gz/src/modules/module-roc-sink.c -> pipewire-0.3.50.tar.gz/src/modules/module-roc-sink.c
Changed
@@ -410,8 +410,8 @@ pw_properties_set(capture_props, PW_KEY_NODE_NAME, "roc-sink"); if (pw_properties_get(capture_props, PW_KEY_NODE_DESCRIPTION) == NULL) pw_properties_set(capture_props, PW_KEY_NODE_DESCRIPTION, "ROC Sink"); - if (pw_properties_get(capture_props, PW_KEY_NODE_GROUP) == NULL) - pw_properties_set(capture_props, PW_KEY_NODE_GROUP, "pipewire.dummy"); + if (pw_properties_get(capture_props, PW_KEY_NODE_WANT_DRIVER) == NULL) + pw_properties_set(capture_props, PW_KEY_NODE_WANT_DRIVER, "true"); if (pw_properties_get(capture_props, PW_KEY_NODE_VIRTUAL) == NULL) pw_properties_set(capture_props, PW_KEY_NODE_VIRTUAL, "true"); if (pw_properties_get(capture_props, PW_KEY_NODE_NETWORK) == NULL)
View file
pipewire-0.3.49.tar.gz/src/modules/module-roc-source.c -> pipewire-0.3.50.tar.gz/src/modules/module-roc-source.c
Changed
@@ -455,8 +455,8 @@ pw_properties_set(playback_props, PW_KEY_NODE_NAME, "roc-source"); if (pw_properties_get(playback_props, PW_KEY_NODE_DESCRIPTION) == NULL) pw_properties_set(playback_props, PW_KEY_NODE_DESCRIPTION, "ROC Source"); - if (pw_properties_get(playback_props, PW_KEY_NODE_GROUP) == NULL) - pw_properties_set(playback_props, PW_KEY_NODE_GROUP, "pipewire.dummy"); + if (pw_properties_get(playback_props, PW_KEY_NODE_WANT_DRIVER) == NULL) + pw_properties_set(playback_props, PW_KEY_NODE_WANT_DRIVER, "true"); if (pw_properties_get(playback_props, PW_KEY_NODE_VIRTUAL) == NULL) pw_properties_set(playback_props, PW_KEY_NODE_VIRTUAL, "true"); if (pw_properties_get(playback_props, PW_KEY_NODE_NETWORK) == NULL)
View file
pipewire-0.3.49.tar.gz/src/modules/module-rt.c -> pipewire-0.3.50.tar.gz/src/modules/module-rt.c
Changed
@@ -464,8 +464,7 @@ static void module_destroy(void *data) { struct impl *impl = data; - - pw_thread_utils_set(NULL); + pw_context_set_object(impl->context, SPA_TYPE_INTERFACE_ThreadUtils, NULL); spa_hook_remove(&impl->module_listener); #ifdef HAVE_DBUS @@ -931,7 +930,9 @@ SPA_TYPE_INTERFACE_ThreadUtils, SPA_VERSION_THREAD_UTILS, &impl_thread_utils, impl); - pw_thread_utils_set(&impl->thread_utils); + + pw_context_set_object(context, SPA_TYPE_INTERFACE_ThreadUtils, + &impl->thread_utils); pw_impl_module_add_listener(module, &impl->module_listener, &module_events, impl);
View file
pipewire-0.3.49.tar.gz/src/modules/module-session-manager/endpoint-link.c -> pipewire-0.3.50.tar.gz/src/modules/module-session-manager/endpoint-link.c
Changed
@@ -540,6 +540,7 @@ struct pw_context *context = pw_impl_module_get_context(module); struct pw_impl_factory *factory; struct factory_data *data; + int res; factory = pw_context_create_factory(context, "endpoint-link", @@ -558,9 +559,13 @@ data->export.type = PW_TYPE_INTERFACE_EndpointLink; data->export.func = pw_core_endpoint_link_export; - pw_context_register_export_type(context, &data->export); + if ((res = pw_context_register_export_type(context, &data->export)) < 0) + goto error; pw_impl_module_add_listener(module, &data->module_listener, &module_events, data); return 0; +error: + pw_impl_factory_destroy(data->this); + return res; }
View file
pipewire-0.3.49.tar.gz/src/modules/module-session-manager/endpoint-stream.c -> pipewire-0.3.50.tar.gz/src/modules/module-session-manager/endpoint-stream.c
Changed
@@ -531,6 +531,7 @@ struct pw_context *context = pw_impl_module_get_context(module); struct pw_impl_factory *factory; struct factory_data *data; + int res; factory = pw_context_create_factory(context, "endpoint-stream", @@ -549,9 +550,13 @@ data->export.type = PW_TYPE_INTERFACE_EndpointStream; data->export.func = pw_core_endpoint_stream_export; - pw_context_register_export_type(context, &data->export); + if ((res = pw_context_register_export_type(context, &data->export)) < 0) + goto error; pw_impl_module_add_listener(module, &data->module_listener, &module_events, data); return 0; +error: + pw_impl_factory_destroy(data->this); + return res; }
View file
pipewire-0.3.49.tar.gz/src/modules/module-session-manager/endpoint.c -> pipewire-0.3.50.tar.gz/src/modules/module-session-manager/endpoint.c
Changed
@@ -540,6 +540,7 @@ struct pw_context *context = pw_impl_module_get_context(module); struct pw_impl_factory *factory; struct factory_data *data; + int res; factory = pw_context_create_factory(context, "endpoint", @@ -558,9 +559,13 @@ data->export.type = PW_TYPE_INTERFACE_Endpoint; data->export.func = pw_core_endpoint_export; - pw_context_register_export_type(context, &data->export); + if ((res = pw_context_register_export_type(context, &data->export)) < 0) + goto error; pw_impl_module_add_listener(module, &data->module_listener, &module_events, data); return 0; +error: + pw_impl_factory_destroy(data->this); + return res; }
View file
pipewire-0.3.49.tar.gz/src/modules/module-session-manager/session.c -> pipewire-0.3.50.tar.gz/src/modules/module-session-manager/session.c
Changed
@@ -529,6 +529,7 @@ struct pw_context *context = pw_impl_module_get_context(module); struct pw_impl_factory *factory; struct factory_data *data; + int res; factory = pw_context_create_factory(context, "session", @@ -547,9 +548,13 @@ data->export.type = PW_TYPE_INTERFACE_Session; data->export.func = pw_core_session_export; - pw_context_register_export_type(context, &data->export); + if ((res = pw_context_register_export_type(context, &data->export)) < 0) + goto error; pw_impl_module_add_listener(module, &data->module_listener, &module_events, data); return 0; +error: + pw_impl_factory_destroy(data->this); + return res; }
View file
pipewire-0.3.49.tar.gz/src/pipewire/context.c -> pipewire-0.3.50.tar.gz/src/pipewire/context.c
Changed
@@ -124,18 +124,20 @@ static int context_set_freewheel(struct pw_context *context, bool freewheel) { struct spa_thread *thr; - int res; + int res = 0; if ((thr = pw_data_loop_get_thread(context->data_loop_impl)) == NULL) return -EIO; if (freewheel) { pw_log_info("%p: enter freewheel", context); - res = pw_thread_utils_drop_rt(thr); + if (context->thread_utils) + res = spa_thread_utils_drop_rt(context->thread_utils, thr); } else { pw_log_info("%p: exit freewheel", context); - // Use the priority as configured within the realtime module - res = pw_thread_utils_acquire_rt(thr, -1); + /* Use the priority as configured within the realtime module */ + if (context->thread_utils) + res = spa_thread_utils_acquire_rt(context->thread_utils, thr, -1); } if (res < 0) pw_log_info("%p: freewheel error:%s", context, spa_strerror(res)); @@ -411,8 +413,6 @@ pw_data_loop_invoke(this->data_loop_impl, do_data_loop_setup, 0, NULL, 0, false, this); - context_set_freewheel(this, false); - pw_settings_expose(this); pw_log_debug("%p: created", this); @@ -464,7 +464,7 @@ pw_resource_destroy(resource); if (context->data_loop_impl) - pw_data_loop_destroy(context->data_loop_impl); + pw_data_loop_stop(context->data_loop_impl); spa_list_consume(module, &context->module_list, link) pw_impl_module_destroy(module); @@ -481,6 +481,9 @@ pw_log_debug("%p: free", context); pw_context_emit_free(context); + if (context->data_loop_impl) + pw_data_loop_destroy(context->data_loop_impl); + if (context->pool) pw_mempool_destroy(context->pool); @@ -1172,7 +1175,8 @@ if (t == NULL) ensure_state(n, false); else { - t->passive = false; + if (n->always_process) + t->passive = false; collect_nodes(context, n); } } @@ -1456,6 +1460,12 @@ } entry->value = value; } + if (spa_streq(type, SPA_TYPE_INTERFACE_ThreadUtils)) { + context->thread_utils = value; + if (context->data_loop_impl) + pw_data_loop_set_thread_utils(context->data_loop_impl, + context->thread_utils); + } return 0; }
View file
pipewire-0.3.49.tar.gz/src/pipewire/data-loop.c -> pipewire-0.3.50.tar.gz/src/pipewire/data-loop.c
Changed
@@ -197,16 +197,21 @@ int pw_data_loop_start(struct pw_data_loop *loop) { if (!loop->running) { + struct spa_thread_utils *utils; struct spa_thread *thr; loop->running = true; - thr = pw_thread_utils_create(NULL, do_loop, loop); + + if ((utils = loop->thread_utils) == NULL) + utils = pw_thread_utils_get(); + thr = spa_thread_utils_create(utils, NULL, do_loop, loop); loop->thread = (pthread_t)thr; if (thr == NULL) { pw_log_error("%p: can't create thread: %m", loop); loop->running = false; return -errno; } + spa_thread_utils_acquire_rt(utils, thr, -1); } return 0; } @@ -223,6 +228,7 @@ { pw_log_debug("%p stopping", loop); if (loop->running) { + struct spa_thread_utils *utils; if (loop->cancel) { pw_log_debug("%p cancel", loop); pthread_cancel(loop->thread); @@ -231,7 +237,9 @@ pw_loop_invoke(loop->loop, do_stop, 1, NULL, 0, false, loop); } pw_log_debug("%p join", loop); - pw_thread_utils_join((struct spa_thread*)loop->thread, NULL); + if ((utils = loop->thread_utils) == NULL) + utils = pw_thread_utils_get(); + spa_thread_utils_join(utils, (struct spa_thread*)loop->thread, NULL); pw_log_debug("%p joined", loop); } pw_log_debug("%p stopped", loop); @@ -246,7 +254,7 @@ SPA_EXPORT bool pw_data_loop_in_thread(struct pw_data_loop * loop) { - return pthread_equal(loop->thread, pthread_self()); + return loop->running && pthread_equal(loop->thread, pthread_self()); } /** Get the thread object. @@ -273,3 +281,17 @@ res = func(loop->loop->loop, false, seq, data, size, user_data); return res; } + +/** Set a thread utils implementation. + * \param loop the data loop to set the thread utils on + * \param impl the thread utils implementation + * + * This configures a custom spa_thread_utils implementation for this data + * loop. Use NULL to restore the system default implementation. + */ +SPA_EXPORT +void pw_data_loop_set_thread_utils(struct pw_data_loop *loop, + struct spa_thread_utils *impl) +{ + loop->thread_utils = impl; +}
View file
pipewire-0.3.49.tar.gz/src/pipewire/data-loop.h -> pipewire-0.3.50.tar.gz/src/pipewire/data-loop.h
Changed
@@ -30,6 +30,7 @@ #endif #include <spa/utils/hook.h> +#include <spa/support/thread.h> /** \defgroup pw_data_loop Data Loop * @@ -97,6 +98,10 @@ spa_invoke_func_t func, uint32_t seq, const void *data, size_t size, bool block, void *user_data); +/** Set a custom spa_thread_utils for this loop. Setting NULL restores the + * system default implementation. Since 0.3.50 */ +void pw_data_loop_set_thread_utils(struct pw_data_loop *loop, + struct spa_thread_utils *impl); /** * \} */
View file
pipewire-0.3.49.tar.gz/src/pipewire/filter.c -> pipewire-0.3.50.tar.gz/src/pipewire/filter.c
Changed
@@ -974,7 +974,7 @@ impl->clock_id = p->clock.id; } impl->time.ticks = p->clock.position - impl->base_pos; - impl->time.delay = p->clock.delay; + impl->time.delay = 0; SEQ_WRITE(impl->seq); } }
View file
pipewire-0.3.49.tar.gz/src/pipewire/filter.h -> pipewire-0.3.50.tar.gz/src/pipewire/filter.h
Changed
@@ -217,17 +217,9 @@ uint32_t n_params /**< number of elements in \a params */); -#if 0 -/** A time structure */ -struct pw_time { - int64_t now; /**< the monotonic time */ - struct spa_fraction rate; /**< the rate of \a ticks and delay */ - uint64_t ticks; /**< the ticks at \a now. This is the current time that - * the remote end is reading/writing. */ -}; -#endif - -/** Query the time on the filter */ +/** Query the time on the filter, deprecated, use the spa_io_position in the + * process() method for timing information. */ +SPA_DEPRECATED int pw_filter_get_time(struct pw_filter *filter, struct pw_time *time); /** Get a buffer that can be filled for output ports or consumed
View file
pipewire-0.3.49.tar.gz/src/pipewire/global.c -> pipewire-0.3.50.tar.gz/src/pipewire/global.c
Changed
@@ -177,7 +177,7 @@ pw_log_debug("impl-client %p: (no registry) global %d %08x serial:%"PRIu64 " generation:%"PRIu64, client, global->id, permissions, global->serial, global->generation); - pw_core_resource_done(client->core_resource, global->id, 0); + pw_core_resource_done(client->core_resource, SPA_ID_INVALID, 0); } }
View file
pipewire-0.3.49.tar.gz/src/pipewire/impl-node.c -> pipewire-0.3.50.tar.gz/src/pipewire/impl-node.c
Changed
@@ -2213,7 +2213,9 @@ bool old = node->active; if (old != active) { - pw_log_debug("%p: %s", node, active ? "activate" : "deactivate"); + pw_log_debug("%p: %s registered:%d", node, + active ? "activate" : "deactivate", + node->registered); node->active = active; pw_impl_node_emit_active_changed(node, active); @@ -2221,6 +2223,8 @@ if (node->registered) pw_context_recalc_graph(node->context, active ? "node activate" : "node deactivate"); + else if (!active && node->exported) + pw_loop_invoke(node->data_loop, do_node_remove, 1, NULL, 0, true, node); } return 0; }
View file
pipewire-0.3.49.tar.gz/src/pipewire/pipewire.c -> pipewire-0.3.50.tar.gz/src/pipewire/pipewire.c
Changed
@@ -577,8 +577,7 @@ * Initialize the PipeWire system, parse and modify any parameters given * by \a argc and \a argv and set up debugging. * - * The environment variable \a PIPEWIRE_DEBUG - * + * This function can be called multiple times. */ SPA_EXPORT void pw_init(int *argc, char **argv) @@ -670,6 +669,19 @@ pthread_mutex_unlock(&init_lock); } +/** Deinitialize PipeWire + * + * Deinitialize the PipeWire system and free up all resources allocated + * by pw_init(). + * + * Before 0.3.49 this function can only be called once after which the pipewire + * library can not be used again. This is usually called by test programs to + * check for memory leaks. + * + * Since 0.3.49 this function must be paired with an equal amount of pw_init() + * calls to deinitialize the PipeWire library. The PipeWire library can be + * used again after being deinitialized with a new pw_init() call. + */ SPA_EXPORT void pw_deinit(void) { @@ -708,7 +720,6 @@ * * Debugging categories can be enabled by using the PIPEWIRE_DEBUG * environment variable - * */ SPA_EXPORT bool pw_debug_is_category_enabled(const char *name)
View file
pipewire-0.3.49.tar.gz/src/pipewire/private.h -> pipewire-0.3.50.tar.gz/src/pipewire/private.h
Changed
@@ -455,6 +455,7 @@ struct spa_hook_list driver_listener_list; struct spa_hook_list listener_list; + struct spa_thread_utils *thread_utils; struct pw_loop *main_loop; /**< main loop for control */ struct pw_loop *data_loop; /**< data loop for data passing */ struct pw_data_loop *data_loop_impl; @@ -483,6 +484,8 @@ struct spa_hook_list listener_list; + struct spa_thread_utils *thread_utils; + pthread_t thread; unsigned int cancel:1; unsigned int created:1;
View file
pipewire-0.3.49.tar.gz/src/pipewire/stream.c -> pipewire-0.3.50.tar.gz/src/pipewire/stream.c
Changed
@@ -547,6 +547,28 @@ return 0; } +static inline uint32_t update_requested(struct stream *impl) +{ + uint32_t index, id, res = 0; + struct buffer *buffer; + struct spa_io_rate_match *r = impl->rate_match; + + if (spa_ringbuffer_get_read_index(&impl->dequeued.ring, &index) < 1) + return 0; + + id = impl->dequeued.idsindex & MASK_BUFFERS; + buffer = &impl->buffersid; + if (r) { + buffer->this.requested = r->size; + res = r->size > 0 ? 1 : 0; + } else { + buffer->this.requested = impl->quantum; + res = 1; + } + pw_log_trace_fp("%p: update buffer:%u size:%u", impl, id, r->size); + return res; +} + static int impl_send_command(void *object, const struct spa_command *command) { struct stream *impl = object; @@ -574,8 +596,10 @@ if (impl->direction == SPA_DIRECTION_INPUT) impl->io->status = SPA_STATUS_NEED_DATA; - else if (!impl->process_rt && !impl->driving) - call_process(impl); + else if (!impl->process_rt && !impl->driving) { + if (update_requested(impl) > 0) + call_process(impl); + } stream_set_state(stream, PW_STREAM_STATE_STREAMING, NULL); } @@ -1029,12 +1053,13 @@ if (!impl->process_rt && (recycled || res == SPA_STATUS_NEED_DATA)) { /* not realtime and we have a free buffer, trigger process so that we have * data in the next round. */ - if (spa_ringbuffer_get_read_index(&impl->dequeued.ring, &index) > 0) + if (update_requested(impl) > 0) call_process(impl); } else if (res == SPA_STATUS_NEED_DATA) { /* realtime and we don't have a buffer, trigger process and try * again when there is something in the queue now */ - call_process(impl); + if (update_requested(impl) > 0) + call_process(impl); if (impl->draining || spa_ringbuffer_get_read_index(&impl->queued.ring, &index) > 0) goto again; @@ -1127,7 +1152,7 @@ struct control *c; const struct spa_pod *type, *pod; uint32_t iid, choice, n_vals, container = SPA_ID_INVALID; - float *vals, bool_range3 = { 1.0, 0.0, 1.0 }; + float *vals, bool_range3 = { 1.0, 0.0, 1.0 }, dbl3; if (spa_pod_parse_object(param, SPA_TYPE_OBJECT_PropInfo, NULL, @@ -1147,7 +1172,7 @@ if (spa_pod_parse_object(c->info, SPA_TYPE_OBJECT_PropInfo, NULL, - SPA_PROP_INFO_name, SPA_POD_String(&c->control.name), + SPA_PROP_INFO_description, SPA_POD_OPT_String(&c->control.name), SPA_PROP_INFO_type, SPA_POD_PodChoice(&type), SPA_PROP_INFO_container, SPA_POD_OPT_Id(&container)) < 0) { free(c); @@ -1161,6 +1186,15 @@ c->type = SPA_POD_TYPE(pod); if (spa_pod_is_float(pod)) vals = SPA_POD_BODY(pod); + else if (spa_pod_is_double(pod)) { + double *v = SPA_POD_BODY(pod); + dbl0 = v0; + if (n_vals > 1) + dbl1 = v1; + if (n_vals > 2) + dbl2 = v2; + vals = dbl; + } else if (spa_pod_is_bool(pod) && n_vals > 0) { choice = SPA_CHOICE_Range; vals = bool_range; @@ -1206,6 +1240,7 @@ struct spa_pod_object *obj = (struct spa_pod_object *) param; union { float f; + double d; bool b; } value; float *values; @@ -1225,6 +1260,13 @@ n_values = 1; values = &value.f; break; + case SPA_TYPE_Double: + if (spa_pod_get_double(&prop->value, &value.d) < 0) + continue; + n_values = 1; + value.f = value.d; + values = &value.f; + break; case SPA_TYPE_Bool: if (spa_pod_get_bool(&prop->value, &value.b) < 0) continue; @@ -2014,6 +2056,9 @@ case SPA_TYPE_Float: spa_pod_builder_float(&b, values0); break; + case SPA_TYPE_Double: + spa_pod_builder_double(&b, values0); + break; case SPA_TYPE_Bool: spa_pod_builder_bool(&b, values0 < 0.5 ? false : true); break; @@ -2070,17 +2115,32 @@ return 0; } +struct old_time { + int64_t now; + struct spa_fraction rate; + uint64_t ticks; + int64_t delay; + uint64_t queued; +}; + SPA_EXPORT int pw_stream_get_time(struct pw_stream *stream, struct pw_time *time) { + return pw_stream_get_time_n(stream, time, sizeof(struct old_time)); +} + +SPA_EXPORT +int pw_stream_get_time_n(struct pw_stream *stream, struct pw_time *time, size_t size) +{ struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this); uintptr_t seq1, seq2; - uint32_t rate_queued; + uint32_t buffered, quantum, index; do { seq1 = SEQ_READ(impl->seq); - *time = impl->time; - rate_queued = impl->rate_queued; + memcpy(time, &impl->time, SPA_MIN(size, sizeof(struct pw_time))); + buffered = impl->rate_queued; + quantum = impl->quantum; seq2 = SEQ_READ(impl->seq); } while (!SEQ_READ_SUCCESS(seq1, seq2)); @@ -2089,19 +2149,23 @@ else time->queued = (int64_t)(impl->queued.incount - time->queued); - time->queued += rate_queued; - - time->delay += ((impl->latency.min_quantum + impl->latency.max_quantum) / 2) * impl->quantum; + time->delay += ((impl->latency.min_quantum + impl->latency.max_quantum) / 2) * quantum; time->delay += (impl->latency.min_rate + impl->latency.max_rate) / 2; time->delay += ((impl->latency.min_ns + impl->latency.max_ns) / 2) * time->rate.denom / SPA_NSEC_PER_SEC; + if (size >= offsetof(struct pw_time, queued_buffers)) + time->buffered = buffered; + if (size >= offsetof(struct pw_time, avail_buffers)) + time->queued_buffers = spa_ringbuffer_get_read_index(&impl->queued.ring, &index); + if (size >= sizeof(struct pw_time)) + time->avail_buffers = spa_ringbuffer_get_read_index(&impl->dequeued.ring, &index); + pw_log_trace_fp("%p: %"PRIi64" %"PRIi64" %"PRIu64" %d/%d %"PRIu64" %" PRIu64" %"PRIu64" %"PRIu64" %"PRIu64, stream, time->now, time->delay, time->ticks, time->rate.num, time->rate.denom, time->queued, impl->dequeued.outcount, impl->dequeued.incount, impl->queued.outcount, impl->queued.incount); - return 0; }
View file
pipewire-0.3.49.tar.gz/src/pipewire/stream.h -> pipewire-0.3.50.tar.gz/src/pipewire/stream.h
Changed
@@ -173,11 +173,20 @@ PW_STREAM_STATE_STREAMING = 3 /**< streaming */ }; +/** a buffer structure obtained from pw_stream_dequeue_buffer(). The size of this + * structure can grow as more field are added in the future */ struct pw_buffer { struct spa_buffer *buffer; /**< the spa buffer */ void *user_data; /**< user data attached to the buffer */ uint64_t size; /**< This field is set by the user and the sum of - * all queued buffer is returned in the time info */ + * all queued buffer is returned in the time info. + * For audio, it is advised to use the number of + * samples in the buffer for this field. */ + uint64_t requested; /**< For playback streams, this field contains the + * suggested amount of data to provide. For audio + * streams this will be the amount of samples + * required by the resampler. This field is 0 + * when no suggestion is provided. Since 0.3.49 */ }; struct pw_stream_control { @@ -191,7 +200,71 @@ uint32_t max_values; /**< max values that can be set on this control */ }; -/** A time structure */ +/** A time structure. + * + * Use pw_stream_get_time_n() to get an updated time snapshot of the stream. + * The time snapshot can give information about the time in the driver of the + * graph, the delay to the edge of the graph and the internal queuing in the + * stream. + * + * pw_time.ticks gives a monotonic increasing counter of the time in the graph + * driver. I can be used to generate a timetime to schedule samples as well + * as detect discontinuities in the timeline caused by xruns. + * + * pw_time.delay is expressed as pw_time.rate, the time domain of the graph. This + * value, and pw_time.ticks, were captured at pw_time.now and can be extrapolated + * to the current time like this: + * + * struct timespec ts; + * clock_gettime(CLOCK_MONOTONIC, &ts); + * int64_t diff = SPA_TIMESPEC_TO_NSEC(&ts) - pw_time.now; + * int64_t elapsed = (pw_time.rate.denom * diff) / (pw_time.rate.num * SPA_NSEC_PER_SEC); + * + * pw_time.delay contains the total delay that a signal will travel through the + * graph. This includes the delay caused by filters in the graph as well as delays + * caused by the hardware. The delay is usually quite stable and should only change when + * the topology, quantum or samplerate of the graph changes. + * + * pw_time.queued and pw_time.buffered is expressed in the time domain of the stream, + * or the format that is used for the buffers of this stream. + * + * pw_time.queued is the sum of all the pw_buffer.size fields of the buffers that are + * currently queued in the stream but not yet processed. The application can choose + * the units of this value, for example, time, samples or bytes (below expressed + * as app.rate). + * + * pw_time.buffered is format dependent, for audio/raw it contains the number of samples + * that are buffered inside the resampler/converter. + * + * The total delay of data in a stream is the sum of the queued and buffered data + * (not yet processed data) and the delay to the edge of the graph, usually a + * playback or capture device. + * + * For an audio playback stream, if you were to queue a buffer, the total delay + * in milliseconds for the first sample in the newly queued buffer to be played + * by the hardware can be calculated as: + * + * (pw_time.buffered * 1000 / stream.samplerate) + + * (pw_time.queued * 1000 / app.rate) + + * ((pw_time.delay - elapsed) * 1000 * pw_time.rate.num / pw_time.rate.denom) + * + * The current extrapolated time (in ms) in the source or sink can be calculated as: + * + * (pw_time.ticks + elapsed) * 1000 * pw_time.rate.num / pw_time.rate.denom + * + * + * stream time domain graph time domain + * /-----------------------\/-----------------------------\ + * + * queue +-+ +-+ +-----------+ +--------+ + * ----> | | | |->| converter | -> graph -> | kernel | -> speaker + * <---- +-+ +-+ +-----------+ +--------+ + * dequeue buffers \-------------------/\--------/ + * graph internal + * latency latency + * \--------/\-------------/\-----------------------------/ + * queued buffered delay + */ struct pw_time { int64_t now; /**< the monotonic time in nanoseconds. This is the time * when this time report was updated. It is usually @@ -202,21 +275,25 @@ struct spa_fraction rate; /**< the rate of \a ticks and delay. This is usually * expressed in 1/<samplerate>. */ uint64_t ticks; /**< the ticks at \a now. This is the current time that - * the remote end is reading/writing. */ + * the remote end is reading/writing. This is monotonicaly + * increasing. */ int64_t delay; /**< delay to device. This is the time it will take for - * the next sample in the stream to be presented by + * the next output sample of the stream to be presented by * the playback device or the time a sample traveled * from the capture device. This delay includes the * delay introduced by all filters on the path between * the stream and the device. The delay is normally * constant in a graph and can change when the topology - * of the graph or the quantum changes. */ + * of the graph or the quantum changes. This delay does + * not include the delay caused by queued buffers. */ uint64_t queued; /**< data queued in the stream, this is the sum * of the size fields in the pw_buffer that are - * currently queued and, for audio streams, the extra - * data queued in the resampler. For audio streams, it - * is thus highly recommended to use the buffer size - * field as the sample count in the buffer. */ + * currently queued */ + uint64_t buffered; /**< for audio/raw streams, this contains the extra + * number of samples buffered in the resampler. + * Since 0.3.50. */ + uint32_t queued_buffers; /**< The number of buffers that are queued. Since 0.3.50 */ + uint32_t avail_buffers; /**< The number of buffers that can be dequeued. Since 0.3.50 */ }; #include <pipewire/port.h> @@ -374,7 +451,12 @@ /** Set control values */ int pw_stream_set_control(struct pw_stream *stream, uint32_t id, uint32_t n_values, float *values, ...); -/** Query the time on the stream */ +/** Query the time on the stream */ +int pw_stream_get_time_n(struct pw_stream *stream, struct pw_time *time, size_t size); + +/** Query the time on the stream, deprecated since 0.3.50, + * use pw_stream_get_time_n() to get the fields added since 0.3.50. */ +SPA_DEPRECATED int pw_stream_get_time(struct pw_stream *stream, struct pw_time *time); /** Get a buffer that can be filled for playback streams or consumed
View file
pipewire-0.3.49.tar.gz/src/pipewire/thread-loop.c -> pipewire-0.3.50.tar.gz/src/pipewire/thread-loop.c
Changed
@@ -465,5 +465,5 @@ SPA_EXPORT bool pw_thread_loop_in_thread(struct pw_thread_loop *loop) { - return pthread_self() == loop->thread; + return loop->running && pthread_self() == loop->thread; }
View file
pipewire-0.3.49.tar.gz/src/pipewire/thread.c -> pipewire-0.3.50.tar.gz/src/pipewire/thread.c
Changed
@@ -83,9 +83,7 @@ SPA_EXPORT void pw_thread_utils_set(struct spa_thread_utils *impl) { - if (impl == NULL) - impl = &default_impl.utils; - global_impl = impl; + pw_log_warn("pw_thread_utils_set is deprecated and does nothing anymore"); } SPA_EXPORT
View file
pipewire-0.3.49.tar.gz/src/pipewire/thread.h -> pipewire-0.3.50.tar.gz/src/pipewire/thread.h
Changed
@@ -44,6 +44,7 @@ * \{ */ +SPA_DEPRECATED void pw_thread_utils_set(struct spa_thread_utils *impl); struct spa_thread_utils *pw_thread_utils_get(void);
View file
pipewire-0.3.49.tar.gz/src/tests/test-endpoint.c -> pipewire-0.3.50.tar.gz/src/tests/test-endpoint.c
Changed
@@ -101,14 +101,14 @@ param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_volume), - SPA_PROP_INFO_name, SPA_POD_String("volume"), + SPA_PROP_INFO_description, SPA_POD_String("volume"), SPA_PROP_INFO_type, SPA_POD_CHOICE_RANGE_Float(p->volume, 0.0, 1.0)); break; case 1: param = spa_pod_builder_add_object(&b, SPA_TYPE_OBJECT_PropInfo, id, SPA_PROP_INFO_id, SPA_POD_Id(SPA_PROP_mute), - SPA_PROP_INFO_name, SPA_POD_String("mute"), + SPA_PROP_INFO_description, SPA_POD_String("mute"), SPA_PROP_INFO_type, SPA_POD_CHOICE_Bool(p->mute)); break; default:
View file
pipewire-0.3.49.tar.gz/src/tests/test-stream.c -> pipewire-0.3.50.tar.gz/src/tests/test-stream.c
Changed
@@ -67,8 +67,8 @@ TEST_FUNC(ev, test, trigger_done); #if defined(__x86_64__) && defined(__LP64__) - spa_assert_se(sizeof(struct pw_buffer) == 24); - spa_assert_se(sizeof(struct pw_time) == 40); + spa_assert_se(sizeof(struct pw_buffer) == 32); + spa_assert_se(sizeof(struct pw_time) == 56); #else fprintf(stderr, "%zd\n", sizeof(struct pw_buffer)); fprintf(stderr, "%zd\n", sizeof(struct pw_time)); @@ -171,13 +171,14 @@ /* check id, only when connected */ spa_assert_se(pw_stream_get_node_id(stream) == SPA_ID_INVALID); - spa_assert_se(pw_stream_get_time(stream, &tm) == 0); + spa_assert_se(pw_stream_get_time_n(stream, &tm, sizeof(tm)) == 0); spa_assert_se(tm.now == 0); spa_assert_se(tm.rate.num == 0); spa_assert_se(tm.rate.denom == 0); spa_assert_se(tm.ticks == 0); spa_assert_se(tm.delay == 0); spa_assert_se(tm.queued == 0); + spa_assert_se(tm.buffered == 0); spa_assert_se(pw_stream_dequeue_buffer(stream) == NULL);
View file
pipewire-0.3.49.tar.gz/src/tools/pw-cat.c -> pipewire-0.3.50.tar.gz/src/tools/pw-cat.c
Changed
@@ -120,6 +120,8 @@ struct pw_stream *stream; struct spa_hook stream_listener; + struct spa_source *timer; + enum mode mode; bool verbose; #define TYPE_PCM 0 @@ -162,7 +164,6 @@ int sync; struct spa_io_position *position; - struct spa_io_rate_match *rate_match; bool drained; uint64_t clock_time; @@ -657,9 +658,6 @@ { struct data *data = userdata; - if (data->verbose) - printf("core done\n"); - /* if we're listing targets just exist */ if (data->sync == seq && data->list_targets) { data->targets_listed = true; @@ -845,29 +843,41 @@ pw_stream_state_as_string(old), pw_stream_state_as_string(state)); - if (state == PW_STREAM_STATE_STREAMING && !data->volume_is_set) { - - ret = pw_stream_set_control(data->stream, - SPA_PROP_volume, 1, &data->volume, - 0); - if (data->verbose) - printf("set stream volume to %.3f - %s\n", data->volume, - ret == 0 ? "success" : "FAILED"); - - data->volume_is_set = true; - - } - - if (state == PW_STREAM_STATE_STREAMING) { - if (data->verbose) + switch (state) { + case PW_STREAM_STATE_STREAMING: + if (!data->volume_is_set) { + ret = pw_stream_set_control(data->stream, + SPA_PROP_volume, 1, &data->volume, + 0); + if (data->verbose) + printf("stream set volume to %.3f - %s\n", data->volume, + ret == 0 ? "success" : "FAILED"); + + data->volume_is_set = true; + } + if (data->verbose) { + struct timespec timeout = {0, 1}, interval = {1, 0}; + struct pw_loop *l = pw_main_loop_get_loop(data->loop); + pw_loop_update_timer(l, data->timer, &timeout, &interval, false); printf("stream node %"PRIu32"\n", pw_stream_get_node_id(data->stream)); - } - if (state == PW_STREAM_STATE_ERROR) { + } + break; + case PW_STREAM_STATE_PAUSED: + if (data->verbose) { + struct timespec timeout = {0, 0}, interval = {0, 0}; + struct pw_loop *l = pw_main_loop_get_loop(data->loop); + pw_loop_update_timer(l, data->timer, &timeout, &interval, false); + } + break; + case PW_STREAM_STATE_ERROR: printf("stream node %"PRIu32" error: %s\n", pw_stream_get_node_id(data->stream), error); pw_main_loop_quit(data->loop); + break; + default: + break; } } @@ -880,10 +890,6 @@ case SPA_IO_Position: d->position = data; break; - case SPA_IO_RateMatch: - if (d->data_type == TYPE_PCM) - d->rate_match = data; - break; default: break; } @@ -897,7 +903,8 @@ int err; if (data->verbose) - printf("stream param change: id=%"PRIu32"\n", id); + printf("stream param change: %s\n", + spa_debug_type_find_name(spa_type_param, id)); if (id != SPA_PARAM_Format || param == NULL) return; @@ -919,7 +926,7 @@ data->stride = data->dsf.layout.channels * SPA_ABS(data->dsf.layout.interleave); if (data->verbose) { - printf("DSD out: channels:%d bitorder:%s interleave:%d\n", + printf("DSD: channels:%d bitorder:%s interleave:%d\n", data->dsf.layout.channels, data->dsf.layout.lsb ? "lsb" : "msb", data->dsf.layout.interleave); @@ -951,8 +958,7 @@ if (data->mode == mode_playback) { n_frames = d->maxsize / data->stride; - if (data->rate_match && data->rate_match->size > 0) - n_frames = SPA_MIN((uint32_t)n_frames, data->rate_match->size); + n_frames = SPA_MIN(n_frames, (int)b->requested); n_fill_frames = data->fill(data, p, n_frames); @@ -961,8 +967,10 @@ d->chunk->stride = data->stride; d->chunk->size = n_fill_frames * data->stride; have_data = true; - } else if (n_fill_frames < 0) + b->size = n_frames; + } else if (n_fill_frames < 0) { fprintf(stderr, "fill error %d\n", n_fill_frames); + } } else { offset = SPA_MIN(d->chunk->offset, d->maxsize); size = SPA_MIN(d->chunk->size, d->maxsize - offset); @@ -1015,11 +1023,14 @@ { struct data *data = userdata; struct pw_time time; - pw_stream_get_time(data->stream, &time); - printf("now=%"PRIi64" rate=%u/%u ticks=%"PRIu64" delay=%"PRIi64" queued=%"PRIu64"\n", + pw_stream_get_time_n(data->stream, &time, sizeof(time)); + printf("stream time: now:%"PRIi64" rate:%u/%u ticks:%"PRIu64 + " delay:%"PRIi64" queued:%"PRIu64 + " buffered:%"PRIi64" buffers:%u avail:%u\n", time.now, time.rate.num, time.rate.denom, - time.ticks, time.delay, time.queued); + time.ticks, time.delay, time.queued, time.buffered, + time.queued_buffers, time.avail_buffers); } enum { @@ -1222,12 +1233,12 @@ data->mode == mode_playback ? "r" : "w", &data->midi.info); if (data->midi.file == NULL) { - fprintf(stderr, "error: can't read midi file '%s': %m\n", data->filename); + fprintf(stderr, "midifile: can't read midi file '%s': %m\n", data->filename); return -errno; } if (data->verbose) - printf("opened file \"%s\" format %08x ntracks:%d div:%d\n", + printf("midifile: opened file \"%s\" format %08x ntracks:%d div:%d\n", data->filename, data->midi.info.format, data->midi.info.ntracks, data->midi.info.division); @@ -1264,12 +1275,12 @@ data->dsf.file = dsf_file_open(data->filename, "r", &data->dsf.info); if (data->dsf.file == NULL) { - fprintf(stderr, "error: can't read dsf file '%s': %m\n", data->filename); + fprintf(stderr, "dsffile: can't read dsf file '%s': %m\n", data->filename); return -errno; } if (data->verbose) - printf("opened file \"%s\" channels:%d rate:%d samples:%"PRIu64" bitorder:%s\n", + printf("dsffile: opened file \"%s\" channels:%d rate:%d samples:%"PRIu64" bitorder:%s\n", data->filename, data->dsf.info.channels, data->dsf.info.rate, data->dsf.info.samples, @@ -1366,16 +1377,16 @@ data->mode == mode_playback ? SFM_READ : SFM_WRITE, &info); if (!data->file) { - fprintf(stderr, "error: failed to open audio file \"%s\": %s\n", + fprintf(stderr, "sndfile: failed to open audio file \"%s\": %s\n", data->filename, sf_strerror(NULL)); return -EIO; } if (data->verbose) - printf("opened file \"%s\" format %08x channels:%d rate:%d\n", + printf("sndfile: opened file \"%s\" format %08x channels:%d rate:%d\n", data->filename, info.format, info.channels, info.samplerate);
View file
pipewire-0.3.49.tar.gz/src/tools/pw-reserve.c -> pipewire-0.3.50.tar.gz/src/tools/pw-reserve.c
Changed
@@ -30,6 +30,7 @@ #include <dbus/dbus.h> +#include <spa/utils/result.h> #include <spa/support/dbus.h> #include "pipewire/pipewire.h" @@ -95,7 +96,8 @@ " -n, --name Name to reserve (Audio0, Midi0, Video0, ..)\n" " -a, --appname Application Name (default %s)\n" " -p, --priority Priority (default %d)\n" - " -m, --monitor Monitor only, don't try to acquire\n", + " -m, --monitor Monitor only, don't try to acquire\n" + " -r, --release Request release when busy\n", name, DEFAULT_APPNAME, DEFAULT_PRIORITY); } @@ -107,6 +109,7 @@ const char *opt_name = NULL; const char *opt_appname = DEFAULT_APPNAME; bool opt_monitor = false; + bool opt_release = false; int opt_priority= DEFAULT_PRIORITY; int res = 0, c; @@ -117,6 +120,7 @@ { "app", required_argument, NULL, 'a' }, { "priority", required_argument, NULL, 'p' }, { "monitor", no_argument, NULL, 'm' }, + { "release", no_argument, NULL, 'r' }, { NULL, 0, NULL, 0} }; @@ -125,7 +129,7 @@ setlocale(LC_ALL, ""); pw_init(&argc, &argv); - while ((c = getopt_long(argc, argv, "hVn:a:p:m", long_options, NULL)) != -1) { + while ((c = getopt_long(argc, argv, "hVn:a:p:mr", long_options, NULL)) != -1) { switch (c) { case 'h': show_help(argv0, false); @@ -150,6 +154,9 @@ case 'm': opt_monitor = true; break; + case 'r': + opt_release = true; + break; default: show_help(argv0, true); return -1; @@ -204,8 +211,19 @@ opt_priority, &reserve_callbacks, &impl); - if (!opt_monitor) - rd_device_acquire(impl.device); + if (!opt_monitor) { + res = rd_device_acquire(impl.device); + if (res == -EBUSY) { + printf("device %s is busy, use -r to attempt to release\n", opt_name); + if (opt_release) { + printf("doing RequestRelease on %s\n", opt_name); + res = rd_device_request_release(impl.device); + } + } else { + printf("Device %s can not be acquired: %s\n", opt_name, + spa_strerror(res)); + } + } pw_main_loop_run(impl.mainloop);
View file
pipewire-0.3.49.tar.gz/test/test-spa-pod.c -> pipewire-0.3.50.tar.gz/test/test-spa-pod.c
Changed
@@ -1610,7 +1610,7 @@ spa_pod_builder_add(&b, SPA_PROP_INFO_id, SPA_POD_Id(32567359), SPA_PROP_INFO_type, SPA_POD_CHOICE_ENUM_Int(1, 0), - SPA_PROP_INFO_name, SPA_POD_String("DV Timings"), + SPA_PROP_INFO_description, SPA_POD_String("DV Timings"), 0); spa_pod_builder_get_state(&b, &state),
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.