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.
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 proxies and remove them when the global is removed.
Otherwise we might end up in a case where the have 2 proxies when
an add/remove/add sequence of messages was queued.
When an object is created, it is marked creating until all roundtrips
complete. If the object is removed in between, we don't remove it
because find_object does not return creating objects.
Make find_object also return the creating objects to fix this.
The current compile-time-check only tests for the getrandom() syscall
wrapper of libc. The presence of this wrapper however does not relate to
the presence of the actual syscall at runtime.
Add a jack.show-monitor option (default true) that makes it possible
to hide the monitor ports.
Monitor ports are not enabled by default on JACK and maybe they also
should not for PipeWire. Or maybe we need some tweaks for some apps.
See #1760
You are supposed to allocate with _insert_new()/_remove() or use
someone elses allocated number with _insert_at(), never mix the
two or it will give an error.
Sami Farin pointed out on #833 that on Linux kernels older than 5.6,
/dev/random blocks when entropy estimates are too low, whereas
/dev/urandom does not.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Let video-src unconditionally call _trigger_process() when it is
ready. This will either start the graph when it is the driver or emit
a RequestProcess event to the driver.
Let video-play-pull intercept the RequestProcess command and use it
to do a trigger_process(). Otherwise use a timer to pull in the next
frame.
This commit uses the video-src-alloc and video-play-reneg templates to create
examples for manual fixation at the format negotiation phase. These
clients simulate modifier negotiation done by clients handling DmaBufs.
Note: Neither client is capable of proper DmaBuf handling!
video-play-fixate can be used to test if a producer is capable to
fallback to shm buffer transport, while video-src-fixate can only be
used with the former example!
Send unfixed Format to nodes but don't proceed to the next state.
When EnumFormat is emited, change the link state back to INIT to restart
the negotiation.
Fixes#1732
Commit 42d8b2b1 "Remove legacy FreeBSD compatibility code" removed
compatibility with old versions of FreeBSD, but also removed
compatibility with old versions of Linux and glibc, which was requested
in #833.
This partially reverts commit 42d8b2b167.
Resolves: #833
Signed-off-by: Simon McVittie <smcv@collabora.com>