Assign half the latency to the internal ringbuffer and half on the
network and remote end.
Use a dll to calculate the drift from our target ringbuffer fill
level and use the stream rate property to driver the resampler.
This should reduce uncontrolled latency over the tunnel.
PulseAudio wants us to be a driver will pull requests from the remote
side. We would need to provide a clock based on the remote end and
also try to follow it when we are not a driver. It would be slightly
better because in the normal playback case we would be able to
avoid resampling. We might do this eventually.
For the modules that require a driver, don't add ourselves to
the pipewire.dummy group but instead just use the NODE_WANT_DRIVER
property to be assigned to a driver.
This makes it possible for the nodes to move to another driver than the
dummy driver (which has very high priority) and it avoids resampling in
cases where the nodes are linked to an audio source or sink.
Deprecate pw_stream_get_time() in favour of _get_time_n() that contains
the size of the pw_time structure. Make the old one fill in the fields
up to the buffered field. Make the new one use the size to decide how
much info to fill in.
Add a new buffered field in pw_time that contains the buffered data
inside the converter/resampler. This leaves the queued field with
purely the user provided size in the buffers.
Use get_time_n() in places.
And use this in spa_json_format_float() where we also avoid invalid
json floats.
Use json float format in some places where we serialize json floats.
Add a unit test.
See #2223
After dequeueing the buffer, the code immediately checks if it is NULL,
and never modifies the variable. Therefore there is no need to check
again when the buffer is enqueued.
Support setting extra properties on the sink and source with the
sink/source_properties.
Fix construction of the module arguments, the sink/source.props needs to
be inside the object..
Fixes #2201
When a particular AvahiWatch is being dispatched, it cannot
be freed because `watch_callback()` accesses it after
the callback.
Introduce a member (`dispatching`) to coordinate
the deferred freeing in that case.
The timeouts are not affected because the `AvahiTimeout`
object is not accessed after the callback is called.
In a dynamic builder we can only save the offsets in the array and
deref after we completed building everything.
Increase the control limits.
See #2179
Resizes the buffer dynamically. Be careful with getting the address
of a pod in the buffer, it might not be valid after building more stuff
with the builder.
Not all clients have an existing registry, and the registry generation
number will not be updated for them. However, we would like to check
for stale globals also elsewhere, eg. metadata, and it must work also
in this case.
To avoid failing to update client registry generation, on global
addition which the client would see if it had a registry, send done
message for the new global id instead.
Message footer should be handled before attempting to find the object
the main message is sent to / checking permissions, because it is not
aimed at a specific object. E.g. the registry generation updates should
be handled regardless of whether the main message is valid or not,
because the updates will not be re-sent.
Fixes registry generation updates sometimes going missing.
We now translate device.description to node.description when parsing
the properties so check for node.description and generate one when
it's not available.
Fixes#2166
We need to create fake channels when parsing the IEC958 format or
else we get an invalid format and IEC958 passthrough doesn't work.
Ignore the IEC958 formats when collecting formats for the device or else
the fake channels mess with the real channels of the device.
See #1442
PulseAudio will convert the samplespec/channelmap to a format_info
and omits the input format/rate/channels when the fix flags are set. It
does not use the input values at all.
Do the same in pipewire-pulse, make a single format description without
the requested fields.
This also needs a session manager fix to make it deal with those missing
fields.
See #876
Wait the reply to be sent and the sample to complete playback before
freeing the sample. Otherwise it might have been possible that the
sample completes before the reply can be sent.