In a scenario where pw-link is called without a session manager running,
the output port on a node will not exist. In such a case, we broke out
of the for loop with all_links_exist set to true and returning EEXIST.
The return of EEXIST gives a confusing error message. Fix this.
uint32_t i;
for (i = 0; i < SPA_N_ELEMENTS(some_array); i++)
.. stuff with some_array[i].foo ...
becomes:
SPA_FOR_EACH_ELEMENT_VAR(some_array, p)
.. stuff with p->foo ..
In monitor mode, we only need one sync to get the prompt and then we
just wait until we need to stop. There is no need to keep on syncing
because it consumes a lot of CPU.
Patch by Hiero32
Fixes#2709
The stream only has one format/enumformat list for the one port it has
so also expose this on the node. We can then remove the adapter for
video.
We can also now show midi (control) streams as the format in pw-top.
Add a column with negotiated formats.
It requires an adapter that will enumerate the port formats so it does
not work for video streams yet.
Fixes#2566
With this commit, something like
`pw-link -d my-device alsa_output.headset` can be used to destroy
all links from output ports of `my-device` to input ports of
`alsa_output.headset`.
This allows to call pw-link with output and input nodes instead of
ports and pw-link will connect all output ports from the first node
to all input ports in the second node by port-id.
Note that the number of ports in each node isn't checked before
starting, so the ports will be connected until there's no matching
port to connect (i.e. if the output node has 2 output ports and
the input node has 5 ports, then only the first two ports will be
connected).
This commit allows to specify the port-ids as "*" in
create-link in order to connect all output ports from the
first node to all input ports from the second node (in
port-id order). For example, executing something like:
`create-link my-virtual-device * alsa_output.usb-headset *`
When the stream requests a 0 size buffer, don't start the drain but
simply queue a 0 size buffer.
Sometimes, switching quantums and drivers might request a 0 buffer
async and this should not cause a drain operation.
When we detect that no new profiler info has arrived for a node, assume
it was removed from the driver.
This avoids having idle nodes seemingly attached to an idle driver
when there is no activity.
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.
Library code generally shouldn't modify global state, so pw_init()
should not result to changing the C locale.
Instead, set the C locale in main() for tools and daemons.
We'll still setlocale for LC_MESSAGES, to get translated UI elements in
wireplumber. This workaround should be removed eventually...
This mode allows using a json file generated by pw-dump as input,
in order to visualize it.
Example usage:
pw-dump > dump.json
pw-dot -j dump.json -sL
This enables developers to easily visualize user dumps and at liberty switch
visualization modes (all, smart, detail, etc) without requiring the user
to do anything except for generating the initial dump.
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