This reverts commit 1b94b66924.
It causes problems with qemu.
Without this patch, paplay --latency-msec=1 /some.wav hangs when
forcing the quantum to 8192. A different fix will be needed.
Use the new TRIGGER flag on the stream to ensure that the source and
playback streams only get scheduled after we process their input
streams, the sink and capture.
The trigger flag adds an extra dependency on the node so that it does
not automatically get scheduled. A manual scheduling is required with,
for example pw_stream_trigger_process().
This can be used to create an artificial dependency between a sink
stream and a source stream, like when using loopback or filter-chain.
Normally those streams are not linked in the graph but they have an
internal dependency. Without any such dependency, the source part of the
chain will be scheduled first and then the sink part and we get a
cycle of delay (with possible quantum change etc).
With this patch, the sink part will be scheduled first and its process
function will trigger the 'downstream' source stream explicitly. The
sink and source stream will stay in sync and will use the same quantum.
This reduces the latency and glitches because of quantum changes.
Fixes#1873
Don't directly update the quantum and rate in the driver position
when recalculating the graph or else clients might see different values
during one cycle.
Instead update another variable and copy this into the position when
we start a new cycle.
Given that 10-bit colour is now becoming supported on Wayland, PipeWire
should be able to represent all the possible colour formats in order
for screen capture to work.
This commit adds all possible orderings of 10-bit RGB channels and 2
extra bits used for nothing or alpha in little endian to enum
spa_video_format. Note that Wayland only uses little endian for its
10-bit colour formats, and these are not the same as the big endian
formats in reverse order.
Move some warnings when a wakeup was missed to info messages. The
warning can repeat a lot and is otherwise quite useless and already
reported elsewhere.
When we increase the quantum past the tlength, we need to be able to
ask for more bytes than the tlength or else we will never exit this
underrun state. Look at the last required bytes and use that if it's
larger then tlength.
0 is a valid min latency so we can't use it as an unset value. Use
some large value instead and when nothing was configured, assume it
is 0.
Fixes#1839
Allow clients to bind to different versions of the server object.
When the server object is newer, it will adapt to the older version.
If the server object is older and the client tries to call a newer
method, it will receive an error. The right thing for the client is to
then ignore this and not call the method again. It should also probably
first check the server version before calling newer methods.
If we are underrun, don't update the read pointer and let the write
pointer catch up.
If we don't have enough data to fill a buffer, skip all the available
data and wait for the new request to arrive.
Fixes#1857
If one of the link ports is remote, enforce shared memory for the
buffer data. We must not use MemPtr because it will not be possible
to transfer this to the remote client.
If none of the sides selected any buffer type but we need shared
memory for the data, select MemFd as the fallback. This avoids using
DmaBuf, that the client did not explicitly select.
For MemPtr memory, we use the fd of the buffer metadata and chunk
info. Check that the memory is also in this block.
Check that all the memory of the buffer fits in the memory block.
See #1859
Make a method to return or allocate the serial for a global.
When the global is unregistered, a new serial is calculated.
Place the serial in the object info and the global info.
Make sure the lower 32 bits of the serial are never SPA_ID_INVALID. This
makes it possible for applications that need a unique 32 bits number to
use the lower bits while still having an invalid 32 bit serial number.
Make the pulseaudio layer set the PW_KEY_STREAM_CAPTURE_SINK property
when a monitor device is selected as a source to make it easier for the
session manager to find the right source.
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.
Let's add PipeWire and Socket into the description, the current messages
are not overly obvious:
Listening on Multimedia System.
Closing Multimedia System.