Implement the device reservation DBus API.
When we acquire the device name, set our device profile to 'On'. This
adds our sources and sinks to the graph.
When we lose the name, switch back to 'Off' and remove our nodes
again.
Move the session mamager stuff in a directory.
Fixes#191
Remove the monitor API, we can use the device API for it. Make sure
we support creating devices (like alsa) from another device (udev).
Use new object.id to store the object id in the object properties. Use
the port.id/node.id etc to make relations to other objects.
start with a completely filled resampler so that the first
input byte immediately gives an output sample. When then have
n_taps/2 leading (almost) 0 samples.
Also make the passthrough resampler act like the real resampler
by introducing an n_taps/2 delay.
For very small buffer sizes, don't try to attempt to compensate
for the rate matching because we would come dangerously close to
the read/write pointers and cause dropouts. Instead this latency
should be reported on the ports later.
This makes it easier to keep track of who is responsible for what.
Also remove the valid fields and move them to flags in the segment
info. That way, the owner can update the flags without having to
worry about concurrency.
Keep separate info for the reposition information. We need to do this
to make it possible to seek in other formats than the frame.
Clear out the owner field when the node is destroyed or removed from
the driver.
Move fields from the io_position to io_segment. The segment contains
the mapping between raw clock time and stream time in various
formats. We keep an array of pending segments available in the
io_position field so clients can anticipate changes.
Make looping a flag in the segment instead of a state.
Prepare for segment masters. These will be registered clients that
are responsible for updating parts of the extended segment info.
Add namespace to some defines.
Move some things around. Move the duration of the current cycle
to the clock. Also add the estimated next timeout to the clock.
Add a generic media specific counter to the clock.
Clean up the position_bar info. We can do with only a double beat
value and make the signature in floats.
Flesh out the io_position info. This has now the information needed
to convert a raw clock time into a stream time. It basically has
the same kind of features as GStreamer segments such as looping,
variable rate playback etc.. It also contains the state of the
timeline (paused/playing) and it can be used to update the position
and state from clients.
There is also extended information in the position field that
clients can update when they can.
Plugins basically only update the clock info they get (and use
the position info to check if they are slaved or not).
Before each cycle, check if there is a pending position update and
apply it.
clean_convert() removes the internally negotiated formats but
it does not set the format (or buffers) of the externally visible
ports. Therefore, don't clear the buffers_set flags.
Instead, clear the buffers_set flag when we explicitly reconfigure
the ports, when we also clear the format.
Also clear the port buffers when we set a NULL format.
Fixes#178
Makes a device with a source and sink that automatically
proxies all physical ports from jack. Jack then drives our
PipeWire pipeline from its own thread.