Commit graph

7825 commits

Author SHA1 Message Date
Wim Taymans 2e87127700 jack: keep object cache
Keep per type free_lists so that we can't reuse an old port object for
a link/node. This makes it more likely that ports are still available
after being freed.

Keep all allocated objects indexed in a global cache map. Use the global
cache index as the jack_port_id_t in connection and port registration
callbacks. Since the port_id is unique per allocated object and since
the objects types are never changed, we can always find a port with the
given port_id in the cache.

This vastly improves tools like catia that insist on querying objects
after they have been removed/destroyed.
2021-11-18 12:14:38 +01:00
Wim Taymans c387e83c65 pipewire-v4l2: avoid overflow in id calculation 2021-11-17 13:16:27 +01:00
Wim Taymans f5f66d1718 alsa: free card on error 2021-11-17 12:55:51 +01:00
Wim Taymans 5bc95234e8 filter-chain: fix memory leaks 2021-11-17 12:53:32 +01:00
Wim Taymans cf66400035 filter-chain: clean up on errors 2021-11-17 12:49:00 +01:00
Wim Taymans 1b88e0023b filter-chain: free plugin when load fails 2021-11-17 12:45:26 +01:00
Wim Taymans 6d492db948 impl-module: don't leak filename
When dlopen fails, don't leak the filename.
Fix indentation.
2021-11-17 12:43:46 +01:00
Wim Taymans 947ee152d3 bluez: check dbus service before enumerating objects
First check if the bluez dbus service is active before doing a
GetManagedObjects() call.

Else we might try to activate the bluetooth dbus service, which
should normally only be activated during bootup.
2021-11-17 12:00:00 +01:00
Wim Taymans 7eee45ff41 alsa: remove stray log line 2021-11-17 10:52:43 +01:00
Wim Taymans 23ac9e5f3c module-access: improve pipewire.client.access handling
If a client (pipewire-pulse) has performed the access check and creates
a client with a specific access path, it will set this in the
pipewire.client.access property. For example, when a flatpak client
connects to pipewire-pulse, it will create a client with the flatpak
pipewire.client.access property.

Check the property after reading it so that we don't blindly grant
complete access to the flatpak client. Instead let the session
manager to assign the permissions.

This fixes a problem where flatpak clients entering pipewire-pulse would
initially get full access and then be downgraded by the session manager.
This would result in the pulse client thinking that it has access to
objects while failing later.
2021-11-16 17:27:05 +01:00
Wim Taymans a0e0a4d9d2 protocol-native: improve permission debug 2021-11-16 17:26:46 +01:00
Wim Taymans af2e7b630a pulse-server: turn error into info
Receiving a message from an already removed stream should not result in
an error message.

See #1812
2021-11-16 12:33:23 +01:00
Wim Taymans f10b872733 resample: improve buffer size calculations
Scale the buffer size with the rate conversion ratio. Also make sure
that we can at least produce a maximum quantum of samples.

If we have large upconversion (8KH -> 48KHz) and small input
buffers, we would not allocate enough space for the output buffer
and cause xruns in the sink.

Fixes #1809
2021-11-16 11:48:02 +01:00
Peter Hutterer 34847f117f systemd: extend the description for the socket files
Let's add PipeWire and Socket into the description, the current messages
are not overly obvious:
   Listening on Multimedia System.
   Closing Multimedia System.
2021-11-15 10:17:39 +10:00
Wim Taymans c03d10296b raop: connect TCP socket
Connect to the server TCP socket in TCP mode.
Use getaddrinfo to resolve hostname.
2021-11-13 21:00:24 +01:00
Niklāvs Koļesņikovs ceeaf6c2f9 meson: add -Draop switch for OpenSSL dep control
Even though OpenSSL is very common, automagic dependencies
are still not great, so let's have a raop switch to control
that.
2021-11-13 12:07:33 +00:00
Wim Taymans a9fbc8a88d impl-core: use PW_ID_CLIENT to make things clearer 2021-11-13 13:05:31 +01:00
Wim Taymans e52f9f513e raop: add user agent 2021-11-13 10:13:55 +01:00
Wim Taymans 0573944e59 raop: add authentication 2021-11-13 10:00:50 +01:00
Wim Taymans 5d6690ebe7 raop: only encrypt when enabled 2021-11-12 18:10:39 +01:00
Wim Taymans 4695bd32c4 raop: move some info to debug 2021-11-12 17:56:04 +01:00
Wim Taymans 6ce9260980 pulse-server: implement module-raop-discover 2021-11-12 17:53:24 +01:00
Wim Taymans fa1f556d93 module-raop-sink: handle 0 block_size 2021-11-12 16:58:27 +01:00
Wim Taymans 3e659d01b8 doc: add raop sink to docs 2021-11-12 16:58:27 +01:00
Wim Taymans ac92f584ab raop: remove duplicate define 2021-11-12 16:58:27 +01:00
Wim Taymans 7ed9c790e2 raop: More improvements
Handle control source io. We don't yet implement retransmission,
though.
Handle latency by exposing the server latency on the stream ports.
Use the Format param event to connect/announce and teardown.
Use the stream state to record/flush.
Fix some leaks.
Remove the state from rtsp-client, we don't need it.
Strip whitespace from header values.
2021-11-12 16:58:27 +01:00
Wim Taymans 27bc5e9ae5 raop: more improvements
Create sync and timing packets, reply to timing requests.
Send the right amount of data.
Parse protocol/encryption/codec parameters and use them.
2021-11-12 16:58:27 +01:00
Wim Taymans 9223fc2885 raop: add beginnings of RAOP protocol 2021-11-12 16:58:27 +01:00
KangJing Huang (Chaserhkj) c21536eec8 module-echo-cancel: Remove intelligibility param with no effect 2021-11-11 16:52:58 +00:00
KangJing Huang (Chaserhkj) a9a0b0466a module-echo-cancel: wireup voice detection 2021-11-11 16:52:58 +00:00
Wim Taymans 7afd80052b 0.3.40 2021-11-11 13:21:29 +01:00
Jonas Ådahl 15b4c58e80 gst: Don't ask for DMA buffers
Gstreamer simply mmap()s the DMA buffers. This can be very very slow on
some hardware, so don't ask for it. For gstreamer to support DMA
buffers, it will need to support a proper way of transferring the
buffers from the GPU to the CPU, e.g. using EGL/OpenGL.
2021-11-11 10:22:37 +00:00
Wim Taymans 263adb45f4 audioconvert: fix compilation on armv7 2021-11-11 11:21:07 +01:00
Wim Taymans b75796054c spa: include dict.h
It causes a compiler warning on armv7
2021-11-11 10:59:23 +01:00
Peter Hutterer 671410b3bf pw-mon: add support for colored output
Same CLI as pw-dump, i.e. -N, --no-colors, --color=always etc are
supported.

This uses a for-loop macro hack to automatically print prefixes and
suffixes, the with_prefix() macro resolves into the correct printf
statements to insert either just the marker "*" or the ansi sequences
for color/reset. Use of the macro is simply:
```
   with_prefix(true, stderr) {
	fprintf(stderr, "this will be prefixed\n");
   }
```
2021-11-11 08:21:58 +00:00
Peter Hutterer cafe94efc2 pw-mon: switch the changed marker from single char to string
Prep work for coloured output where the prefix/suffix may be multiple
characters if ANSI sequences are used.
2021-11-11 08:21:58 +00:00
Peter Hutterer 2531ab0acd pw-mon: switch to use stderr everywhere
Most of pwmon's output uses spa_debug() or some related helper which
prints to stderr. Let's switch our explicit printfs over so we can
redirect the whole thing in one go.
2021-11-11 08:21:58 +00:00
Peter Hutterer eb688a9f57 man: add a man page for pipewire-pulse 2021-11-11 08:19:51 +00:00
Peter Hutterer 82e321da14 ci: use FDO_CI_CONCURRENT to determine the ninja job count 2021-11-11 08:19:28 +00:00
columbarius 06b0512b22 examples: video-play-fixate.c add fallback for older PipeWire versions
The posibility to drop single modifier was added in this development
circle (after 0.3.39 release). To have clients work with older versions
of PipeWire dropping all modifiers can be an option.
2021-11-10 22:23:30 +00:00
columbarius 1c922958bc examples: video-src-fixate.c cleanup example
Cleanup printed messages and rename memfd.
2021-11-10 22:23:30 +00:00
columbarius 2c10894970 docs: Update fixation on DmaBuf-docs 2021-11-10 22:23:30 +00:00
columbarius ed3be2114c examples: video-play-fixate.c remove fixated check 2021-11-10 22:23:30 +00:00
Nicolai Syvertsen a84cfac28a Only handle -EPIPE eerrors. 2021-11-10 19:26:03 +00:00
Nicolai Syvertsen 7b773433f4 pipewire-pulse: add manager disconnect event
Drop client connections when pipewire goes away. pipewire-pulse daemon can remain running and pulseaudio clients will be able to connect again once pipewire is up and running.
2021-11-10 19:26:03 +00:00
Barnabás Pőcze df3ea8dafa pipewire: module-profiler: destroy event source
Even though all event sources are kept in a list in the current
implementation of the event loop in the SPA support plugin, relying
on it freeing all sources could lead to unbounded memory use
if the profiler module is loaded and unloaded over and over again.
2021-11-10 14:05:35 +00:00
Barnabás Pőcze d4e4b5df98 pipewire: module-profiler: handle global's destroy event
Handle if the global is destroyed (e.g. `pw-cli destroy X`) to
avoid a use-after-free in `pw_global_destroy()` when it is called
with a dangling pointer from `module_destroy()`.
2021-11-10 14:05:35 +00:00
Barnabás Pőcze 336e4d5f03 pipewire: module-echo-cancel: aec-webrtc: use unique_ptr
Use `std::unique_ptr<>` to clean up memory in the destructor
instead of manually freeing resources in the destroy callback
and error code paths.
2021-11-09 22:27:31 +01:00
Barnabás Pőcze 5896083545 pipewire: module-echo-cancel: aec-webrtc: use appropriate casts
Use the suitable C++ cast instead of C-style casts.
2021-11-09 22:27:03 +01:00
Barnabás Pőcze 144face6ad pipewire: module-echo-cancel: aec-webrtc: use getters with default
Instead of get-check-parse, use `pw_properties_get_bool()`
which does all three in one convenient function.
2021-11-09 22:27:01 +01:00