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()`.
When a global is removed, also remove the proxies. We can have multiple
proxies to a global otherwise when a client has a sequence of events
queued from the server like this:
Global 1 added
Global 1 removed
Global 1 added
The proxy we added in the firt event would not be destroyed because the
server did not know about it when global 1 was removed and then a
second one would be made.
Sort ports per node and then per node-specific port_id. This will
keep related ports together and will sort them based on when they
were created.
Fixes#1780
Simplify the key-value pair parsing for AT+IPHONEACCEV commands,
and move the handling of {key,indicator}-value pairs into
dedicated functions. Furthermore, fix a comment.
Reorganize the latency setup in one place, return a desired device
latency for use as quantum.
PulseAudio assigns half of the (tlength - minreq) latency to the sink
but we can't do that because our sinks have a max-quantum of latency.
Fix this by clamping our calculated sink latency to the quantum
PulseAudio subtracts the sink latency from the tlength in adjust latency
mode, so we need to do the same.
This makes PULSE_LATENCY_MSEC values bahave more like pulseaudio.
See #1769
Keep track of the negotiated parameters and use those to construct
the Buffers param.
Use the FrameAllocator to allocate buffer memory. Keep a request for
each buffer and queue them.
In requestComplete, put the request metadata info into the buffer and
header and write the finished buffer id to a ringbuffer. Then wake up
the data thread to pop the finished buffer_id and push it in the
graph.
Remove some old files.