Commit graph

3806 commits

Author SHA1 Message Date
Peter Hutterer
2cb7b19b7d pulse-server: fix scan-build errors for unused variables
All cases of value stored but never read
2021-05-26 07:51:27 +00:00
Peter Hutterer
6d19dd0162 pulse-server: if all transport methods failed, fail server creation
No point in keeping a server running if it doesn't listen to anything.
2021-05-26 07:46:55 +00:00
Barnabás Pőcze
1e9442e6b8 pulse-server: fix memory issue
Previously, when `pw_protocol_pulse_new()` returned NULL,
the code would jump to the `error` label, which would
call `impl_free()`. At this point, however, `impl->module_listener`
is not initialized, which would lead to a SIGSEGV when
`spa_hook_remove()` is called from `impl_free()`.
2021-05-25 14:55:00 +02:00
Wim Taymans
8e36353311 pulse-server: module-combine-sink remove right property 2021-05-24 12:58:10 +02:00
Arun Raghavan
25f9765e9c pulse-server: Implement module-combine-sink 2021-05-24 08:34:23 +00:00
Fabrice Fontaine
fa64d93e64 fix linking with -latomic
Linking with -latomic has been added to pipewire-jack since
b8c58c74d8

However, this is not the right place to add this dependency, atomic_dep
should be added to pipewire_dep to avoid the following build failure:

/home/giuliobenetti/autobuild/run/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/sparc-buildroot-linux-uclibc/9.3.0/../../../../sparc-buildroot-linux-uclibc/bin/ld: src/pipewire/libpipewire-0.3.so.0.326.0.p/filter.c.o: in function `impl_node_process':
filter.c:(.text+0xf28): undefined reference to `__atomic_fetch_add_4'

Indeed, atomic operation such as __atomic_fetch_add is used in libcamera
as well as in ./spa/plugins/libcamera/libcamera_wrapper.cpp,
./spa/include/spa/utils/ringbuffer.h and ./spa/include/spa/graph/graph.h

Fixes:
 - http://autobuild.buildroot.org/results/b5305e8e7dd1a5e8bfaba72b06251056ba7d1af1

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2021-05-24 08:33:50 +00:00
Barnabás Pőcze
22d874cdeb filter-chain: handle LADSPA_PATH as colon separated list of paths
Split up LADSPA_PATH at colons, and try to load the particular
plugin from each directory specified in LADSPA_PATH.

Fixes #1217.
2021-05-24 08:23:21 +00:00
Barnabás Pőcze
67e588f382 filter-chain: actually use ladspa_handle_list
Add successfully loaded handles to the list in `ladspa_handle_load()`,
and remove them when they are freed in `ladspa_handle_unref()`.
2021-05-24 08:23:21 +00:00
Barnabás Pőcze
a8a6def20f filter-chain: fix reference counting issue
Fix a reference counting issue that resulted in
ladspa_handle's refcount being equal to the
sum of the refcounts of its descriptors.

This would result in a memory leak when a descriptor
is loaded more than once from the same handle.
This cannot happen because `ladspa_handle_list` is
not  populated by `ladspa_handle_load()`.
The next commit implements exactly that, so
the fix is applied before the change that
would introduce the problem.
2021-05-24 08:23:21 +00:00
Barnabás Pőcze
e9ba0899c2 filter-chain: fix rnnoise example configuration
Other filter-chain configuration file examples do not prefix
the plugin key with 'ladspa/'. And in the absence of
the LADSPA_PATH environmental variable, this would lead
to "/usr/lib64/ladspa/ladspa/librnnoise_ladspa.so" being used
as the path, which is not correct.
2021-05-24 08:23:21 +00:00
Sjoerd Simons
d2e1b968af Let pipewire-pulse services conflict with their pulseaudio counterparts
You can only run either pulseaudio *or* the pipewire-pulse daemon at one
time. So make the pipewire-pulse units conflict with their pulseaudio
counterparts to avoid both running at the same time
2021-05-22 14:26:30 +02:00
Wim Taymans
3c503ca240 impl-link: improve debug, log param name 2021-05-21 10:46:14 +02:00
Wim Taymans
36000ea508 stream: clean up the params
Use defines for the param index.
Fix params for filter. Make it possible to use Props params.
2021-05-21 10:45:19 +02:00
Peter Hutterer
cbe29c070c doc: switch doxygen to using groups instead of pages and classes
C code doesn't lend itself well to using classes and pages are best for prose.
A doxygen group is a set of related functions - which is exactly what we have
here, e.g. pw_context.

This patch basically adds the following lines to each header:
\defgroup pw_whatever
\addtogroup pw_whatever
\{
....  function declarations ....
\}

Doxygen is smart enough to merge documentation in the header with
documentation in the correspondin .c file where the function is implemented.
2021-05-21 15:05:30 +10:00
Peter Hutterer
7c4bfe5a15 doc: use markdown ticks instead of escaped html for readability 2021-05-21 15:04:22 +10:00
Peter Hutterer
923e7c8b59 doc: doxygen can't document a nonexisting enum 2021-05-21 15:04:22 +10:00
Peter Hutterer
1567dd4e3a doc: fix some missing parameter warnings
Where both declaration and definition are documented, drop one and rely on the
other. Drop the obvious documentations where not needed, doxygen wants either
none or all parameters documented.
2021-05-21 15:04:22 +10:00
Peter Hutterer
ac9de03672 doc: document some missing parameters 2021-05-21 15:04:22 +10:00
Peter Hutterer
c9cab11a82 doc: drop two references to entities we don't include in doxygen 2021-05-21 15:04:22 +10:00
Peter Hutterer
f47f85bbcb doc: fix broken references
These pages never existed, let's not try to reference them.
2021-05-21 15:04:22 +10:00
Peter Hutterer
0c41f24401 doc: fix an outdated reference 2021-05-21 15:04:18 +10:00
Peter Hutterer
ef6528c513 doc: fix an obsolete reference to pw_fill_stream_properties
As of f724319e8a this happens automatically and
the function is no longer available.
2021-05-21 14:19:13 +10:00
Peter Hutterer
ff7675b142 doc: escape the use of <pid> and <username> with markdown
Doxygen complains about invalid HTML tags, let's mark them as code.
2021-05-21 14:18:50 +10:00
Peter Hutterer
2b626bc31a doc: add a missing endcond to the context 2021-05-21 14:18:50 +10:00
Peter Hutterer
1ce6db47e3 doc: drop meaningless cond/endcond 2021-05-21 14:18:50 +10:00
Wim Taymans
6df32666b4 filter-chain: check external ports only once
When we duplicate the pipeline to match the channels, only check
if a port was used only once for the first instance. Makes
demonic filter work again.
2021-05-20 11:24:34 +02:00
Peter Hutterer
71c6a175c4 Drop double semicolons 2021-05-20 07:24:22 +00:00
Jonas Holmberg
b1610d37fe modules: Add module-rt
Add a module to set thread priorities without using rtkit.
2021-05-19 17:39:17 +02:00
Peter Hutterer
cdfd50e166 spa: add spa_atob() to convert a string to a boolean
This replaces the manual check for "true" and some (inconsistent) return value
of atoi. All those instances now require either "true" or "1" to parse as
true, any other value (including NULL) is boolean false.
2021-05-18 22:18:56 +10:00
Peter Hutterer
4e70799922 treewide: drop strzcmp implementations in favor of spa_streq 2021-05-18 22:10:27 +10:00
Peter Hutterer
92514d57e4 treewide: replace plain strcmp() calls with spa_streq 2021-05-18 22:10:27 +10:00
Peter Hutterer
522f87d5ea treewide: replace strcmp() != 0 with !spa_streq
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Peter Hutterer
95a84e797a treewide: replace !strcmp() with spa_streq()
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Peter Hutterer
7697ed0757 treewide: replace strcmp() == 0 with spa_streq()
This change is only done in source files for now, header files will be done
separately.
2021-05-18 22:10:27 +10:00
Wim Taymans
49644e4c79 media-session: load with-* files from confdatadir
Fixes #1193
2021-05-17 18:19:50 +02:00
Wim Taymans
1609126bcd conf: move config file to datadir
Install the config file in $PREFIX/share/pipewire so that a factory
reset can be done by wiping /etc and /home.
Add this new directory to the search path.
System wide config can still be done in /etc, user config in
$HOME/.config/pipewire/ by copying files from $PREFIX/share/pipewire

Fixes #1191
2021-05-17 16:22:31 +02:00
Wim Taymans
d9240bb766 adapter: name monitor ports of applications as "monitor"
See !668
2021-05-17 15:37:31 +02:00
Wim Taymans
78aae9cfdc Revert "adapter: set prefix for all monitor ports to "monitor""
This reverts commit 38a40949ec.

This is not quite right, virtual devices now have monitor ports
instead of capture ports.
2021-05-17 15:32:33 +02:00
Wim Taymans
ba544c8e36 media-session: handle dbus disconnect
Make a signal in media-session to signal dbus disconnect.
Get the DBusConnection when we need it in alsa and access-portal.
Remove device reservation if dbus disconnects and try again later
when needed.

See #1099
2021-05-17 15:17:54 +02:00
Wim Taymans
b6d803daa4 alsa-monitor: Improve device reserve
Handle the error from rd_device_reserve and when something is wrong,
disable device reservation and pretend we got the device.

This should work around the problem of the dbus connection being
closed and the device reservation callback never being called.

See #1099
2021-05-17 11:13:24 +02:00
Wim Taymans
88517fe24c reserve: return better error from rd_device_acquire
When we have the device, return 0
When the device is busy, return -EBUSY
When we can't send the message or something is wrong, return -EIO
2021-05-17 11:11:41 +02:00
Wim Taymans
34a2fb4b03 filter-chain: fix effect name 2021-05-16 20:08:54 +02:00
Wim Taymans
6ed32a74eb Clean up the filtet chains a bit
Add matrix-spatialiser to build, rename to remove _
Give effect a better name.
2021-05-16 19:50:14 +02:00
JP Guillemin
37b9cd191b Matrix Spatialiser sink 2021-05-16 17:16:53 +00:00
Dark
38a40949ec
adapter: set prefix for all monitor ports to "monitor" 2021-05-15 02:25:25 -04:00
Wim Taymans
170294d7ac pipewire-pulse: add zeroconf module 2021-05-14 11:39:44 +02:00
Wim Taymans
5c152bab23 zeroconf: improve stream properties 2021-05-14 11:19:02 +02:00
Wim Taymans
a428228ebf pulse-tunnel: handle holes in record stream
Holes in the stream return a NULL ptr. Write silence to the
ringbuffer in that case.
2021-05-14 09:51:51 +02:00
Wim Taymans
9b48c6f3ea filter-chain: make sure res is always set 2021-05-14 09:48:13 +02:00
Wim Taymans
0ff1d1e4cb zeroconf-discover: use pw_properties_serialize_dict 2021-05-14 09:09:48 +02:00