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.
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.
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.
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
Let's add PipeWire and Socket into the description, the current messages
are not overly obvious:
Listening on Multimedia System.
Closing Multimedia System.
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.
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.
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");
}
```
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.
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.
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.
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.
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()`.