Commit graph

6536 commits

Author SHA1 Message Date
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
Wim Taymans
fb55cc4786 0.3.28 2021-05-19 10:11:36 +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
Peter Hutterer
d8a9534a9a spa/string: add spa_streq() and spa_strneq() for string equality
Easier to use than strcmp() since their return value matches expectations. And
they do what is expected with NULL strings, two NULL pointers are equal, one
NULL pointer is not equal.
2021-05-18 22:10:27 +10:00
Peter Hutterer
9bbe5c7517 bluez: add a helper function for checking the message signature
strcmp() is easier to get wrong (or lack consistency) so let's abstract all
these calls with a little helper.
2021-05-18 22:10:26 +10:00
Peter Hutterer
65f5f2a6f8 alsa/v4l2: convdert udev's VID/PID from hex to decimal
udev's ID_MODEL_ID and ID_VENDOR_ID are inconsistent: always 4-digit hex but
sound devices are prefixed with 0x, v4l devices are not. Depending on the
actual ID, the value will look like decimal (1234) or hex (a234).

pw-dump will then print those as either decimal integers (i.e. 0x1234 becomes
decimal 1234) or double (i.e. a234 becomes 41524.00).

Make this consistent by converting the string from hex do decimal where we
get it.
2021-05-18 07:35:00 +00:00
Peter Hutterer
5aa15d10e9 spa: add a new string helper with spa_strtol()
Most of the time when we convert a string to an integer we only care about
success. Let's wrap this with a helper function that sets the value to the
result and returns true on success.
2021-05-18 07:35:00 +00:00
Peter Hutterer
0504ebffeb spa: prefix SPA_*_LAST enum values with an underscore
These are not part of the ABI, prefixing them makes this a bit more obvious
that they shouldn't be used.
2021-05-18 10:41:26 +10:00
Peter Hutterer
2ff7a8fba7 spa: fix an indentation issue 2021-05-18 10:38:01 +10:00
Anders Jonsson
a8f2501f57 po: Update Swedish translation 2021-05-17 18:45:59 +02:00
Wim Taymans
49644e4c79 media-session: load with-* files from confdatadir
Fixes #1193
2021-05-17 18:19:50 +02:00
Wim Taymans
a21c7f8457 acp: sync with pulseaudio
See #747
2021-05-17 17:26:25 +02:00
Evgeniy Khramtsov
ff70838dd3 cirrus: install alsa-lib from pkg on FreeBSD
alsa-lib >= 1.1.7 is now in FreeBSD ports,
install it from pkg instead of building locally
2021-05-17 17:37:04 +03: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
d8208c5c2d dbus: move connect to dbus in connection_get()
This way we can reset the dbus connection when we got a disconnect
and signal the event. This can then be used by the client to
do a new connection_get().
2021-05-17 13:17:27 +02:00
Wim Taymans
2dcdabd2af dbus: add events to the dbus connection
Add events to the dbus connection and notify about destroy and
disconnect.
2021-05-17 11:54:43 +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
212c2697e1 pw-uninstalled: print version to silence shellcheck 2021-05-17 10:21:47 +02:00
Wim Taymans
40fbabd9ed dbus: listen for disconnect signal
And log a warning when our connection is lost.

See #1099
2021-05-17 10:20:28 +02:00
Wim Taymans
3d2945c641 uninstalled: support -v option
to make 'make shell' work again
2021-05-17 09:42:31 +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
Yuri Chornoivan
3b2d8fc0bb po: Update Ukrainian translation 2021-05-16 19:23:15 +02:00
JP Guillemin
37b9cd191b Matrix Spatialiser sink 2021-05-16 17:16:53 +00:00
Piotr Drąg
741ba47305 Update Polish translation 2021-05-16 13:42:43 +00:00
Barnabás Pőcze
c73ef2b9a1 spa: ffmpeg: use av_codec_iterate() when available
av_codec_next() was deprecated on 2018-02-06,
in lavc 58.10.100 (36c85d6e77). It was then later
removed on 2021-04-27 (4b2be3f8d). `av_codec_iterate()`
was added in lavc 58.10.100, so use that when available.

Fixes #1138.
2021-05-16 13:10:59 +00:00
Barnabás Pőcze
3baf3fcfec spa: ffmpeg: remove libavformat dependency
`av_register_all()` is the only thing used from libavformat,
but that doesn't seem to be needed for codec enumeration,
so remove it, and call `avcodec_register_all()` instead
when libavcodec < 58.10.100.
2021-05-16 13:10:59 +00:00
Barnabás Pőcze
3f567eeb56 spa: ffmpeg: fix FFmpeg name
ffmpeg.c had 'Spa V4l2 Support' in it, fix that to say
FFmpeg. Furthermore, change 'FFMpeg' to 'FFmpeg' in
ffmpeg-{enc,dec}.c as that is how it's referred to
in official texts.
2021-05-16 13:10:59 +00:00
Barnabás Pőcze
5a14e3970a spa: ffmpeg: remove hard-coded values
Use `sizeof` to query the size of the array instead of
hard coding it.
2021-05-16 13:10:59 +00:00
Piotr Drąg
dca37d4e08 Update POTFILES.in 2021-05-16 13:09:31 +00:00
Dark
38a40949ec
adapter: set prefix for all monitor ports to "monitor" 2021-05-15 02:25:25 -04:00
Hugo Carvalho
7065a450f8 Replace pt.po 2021-05-14 15:15:48 +02:00
Wim Taymans
31d79f4c9b Clarify license
fixes #1174
2021-05-14 12:09:33 +02: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
Wim Taymans
6744934734 zeroconf: add avahi zerconf discover module
Discovers remote sinks and sources and load the tunnel module to
make a local sink and source for them.
2021-05-14 09:09:48 +02:00
Wim Taymans
59842b3bd6 make and use pw_properties_serialize_dict()
Remove the multiple other variants and make a better one. Flags are for
future options for escaping and formatting.
2021-05-14 09:08:46 +02:00
Wim Taymans
577ad0c73a conf: improve config error handling
Make the config parser return the amount of parsed items.
Fail to create a context when parsing the config fails.
Log the number of items parsed from the config.
2021-05-13 15:09:57 +02:00