do a sync when starting up client and sync when creating a new proxy so
that we get all the proxy updates before the client is opened.
This ensures all ports are enumerated correctly.
Fixes#3618
Support an array for the node.group and node.link-group properties.
This makes it possible to make a node member of multiple groups and
link-groups.
See #3612
When the device has not configured a format, remove the properties that
depend on the format so that they don't limit what we can configure the
device with next.
See #3613
Usually, the max-latency is calculated by the device when it is
configured based on the maximum buffer size and limits the latency
change that can be done.
When we are forcing a rate/quantum and we are going to reconfigure the
device, this limit should not apply because the current buffer settings
and latency are going to change because of the reconfigure.
See #3613
For encoded formats, buffer size is the size of the actual data in the
buffer and may change for each frame depending on the content. Thus,
configuring the buffer pool of the pipewiresrc with the size of the
first buffer may be insufficient for later buffers.
Configure the buffer pool to the maximum size of the first upstream
buffer and assume that the following buffers will be allocated with the
same size as the first buffer.
For encoded formats, p->video_info.size will be 0. If the pipewiresrc
handles an encoded format, the bufferpool will be configured to allocate
buffers of size 0. This will cause errors later when trying to copy the
frames into the pipewire buffers.
Update the bufferpool size only if video_info defines an actual buffer
size.
If the pipewiresink needs to copy the GStreamer buffers to the PipeWire
buffers, because the upstream element didn't use the pipewirepool, the
metadata must be copied, too. Otherwise the pipewire datas will be
filled with the metadata from the buffer during the initialization and
not the currently used buffer.
For example, without copying the metadata the buffer timestamp will be
missing on the pipewire buffers.
In JSON, the colon actually is used for assignment, but in spa_type_info
the colon is used as a separator. To properly parse and pass the
properties to the videotestsrc, the key has to be enclosed by quotation
marks to prevent splitting by the JSON parser.
Commit 9b29bcd4e8 ("conf: set description for test nodes") set the
description only for the minimal.conf and pipewire.conf and skipped the
pipewire-vulkan.conf.
Set the description for pipewire-vulkan.conf, too.
In pw_context_recalc_graph, PipeWire takes the currently configured
clock target duration from the position as target rate. The position is
not set for the videotestsrc since the set_io function is not
implemented. This leads to a segfault when the videotestsrc is
configured and loaded.
Add the same dummy implementation of set_io as in the v4l2-source and
the libcamera-source to prevent the segfault.
Allow PIPEWIRE_REMOTE / PW_KEY_REMOTE_NAME to contain a JSON array of
sockets to try to connect to, in order, instead of just one name.
JSON is restricted to utf-8 encoding. Also, this forces using JSON
syntax for paths that start with '['. This probably will not usually
cause much problem.
In bluez5-dbus.c:impl_init, the info is passed to spa_bt_quirks_create,
which expects info to be non-null. But in this example, info is null, so
it will cause quirk table parse failure. Add an empty dict here to prevent
this error.
BlueZ now requires endpoints to set Locations/Context, so set them to
some sensible default values. These could in principle be made
configurable later.
We can only increment or decrement the busy_count with a valid busy_id.
In complete_ready and complete_paused, the id can be INVALID and if
there was no pending busy_id, it would decrement the busy_count below 0.
This would block the link from progressing its state change.
See #3547
Also add the queued buffers in the converter to the pw_time.queued_buffers
field. This means that queued_buffers + avail_buffers always equal the
total amount of allocated buffers, which makes more sense.
Fixes#3592
Don't set the port io to NEED_DATA in prepare_output because this
might be called when we get the data from an input port that is linked
to out output port.
See #3514
We can directly use the port io, which is always available. This ensures
the mix->io status is set to NEED_DATA even when there is no global
mix.
This reverts part of 56786aedc4
See #3514
Destroy the node and device in the global free event. This way, the
global resources are already destroyed and we have removed their ref to
the spa node before we destroy that.
Fixes#3588
We calculate the available frames in read_sync but add another
check in read_frames so that we don't attempt to read more frames
than we have available to avoid xruns.
Make a function to recalculate the headroom and call it whenever the
resample state of the node can change.
When we are IRQ based scheduling but need to resample, we are actually
not driving the graph whit IRQ and need to adjust our period size and
headroom as if we are using timers.