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()`.
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>
In Meson, string.contains() is a substring check but array.contains() is
a full string check. Let's use 'foo in bar' style instead to avoid
confusion.
Supported since meson 0.49.0
count the number of changes and then when there are any, flip the
SERIAL bit in the param info so that the server can detect a
change. Without this, 2 updated params would not flip the bit and the
param changes would not be noticed.
You are only supposed to use _insert_new()/_remove() or _insert_at()
on the map, If we detect a _insert_at() to a removed item,
return an error because else we might corrupt the free list.
Update unit test accordingly.
Both wireplumber and media-session have a meson variable now that
represents the -uninstalled script, complete with filled-in BUILDDIR
etc.
Let's use those variables for pipewire-uninstalled.conf so we don't have
to fill in the paths here.
Regression introduced in 3560f3ba2d
MEDIA_SESSION_CONFIG_PATH expects the actual directory while
PIPEWIRE_CONFIG_PATH and the built-in fallback both expect the files to
reside within the SESSION_PREFIX subdirectory.
Fixes#1725
config_dir is the new MEDIA_SESSION_CONFIG_DIR environment variable (if
set), impl.config_dir is that or the fallback, whichever applies.
Fixes 00bd3b5b59Fixes#1725
The link might have been made using the node name/nick/description but
we always want to place the id in the properties to make it easier for
apps to handle the relations between objects.
See #1723
The media session modules need to load config files through
sm_media_session_load_conf() and that must be the same config dir as our
main configuration file's directory.
For buffers on the 'dequeued' list, the busy counter was already
incremented in impl_node_process_input(). So it must be decremented again
when these buffers are removed.