Send create_object error messages to the new resource id so that
the client can better know what proxy is failing.
Use resource_remove when create_object fails because the core will
already send a remove_id on failure.
Try to send other errors to the proxy that made the request if
possible.
Sending the errors to the proxy id allows the client to know something
is wrong with the proxy and deal with it better.
Use the port global id in the error message.
Make a function to send an error to another resource. This can be
used to send errors to proxies that now have a resource associated
with them, like in error cases.
We only need to sync clients when start/stop has been issued otherwise
we simply write the new position values in the driver segment.
Don't overwrite bar/video position info with invalid values.
When the client uploads a buffer, copy all data fields except for
the chunk memory that we configured before.
If we overwrite the chunk memory, the users of the buffer would not
be able to find the chunk memory anymore and crash or fail.
The change_mask string generation was buggy and confusing.
Fix it with something more usable.
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
A missing XDG_RUNTIME_DIR results in ENOENT, like on the server
side.
A too long name results in ENAMETOOLONG, like on the server side.
When we can't find the socket, return EHOSTDOWN to make it more
obvious what is going.
Log an error when we send an error to the client so that we don't need
to log and error anymore.
Improve the error messages when we can
Move some warnings and errors to debug
Until now there was no method to display parameters along with
information of their parent object.
This patchset stores parameter info in the global object so
that it may displayed along with its parent object.
This is a necessary step to be able to display and modify parameters
in a simple form like the following
pipewire-0>> set 12 volume=0.7
pipewire-0>> get 12 volume
0.7
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
The socket call does not terminate the string with '\0' so
we have to use the length explicitly.
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Using the short name of a type without the base part is common enough
that a common utility method is warranted.
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Return 0 when there are no more events, 1 when we have an event and
< 0 for errors. Use this to correctly push the last set of events on
EOS and then return 0 and stop without an error.
There is a use case where you may want to use audioconvert with
both input & output sides configured in dsp mode, for altering
the stream volume. When it is configured like that, the
IS_MONITOR_PORT macro wrongly thinks that all output ports except
the first one are monitor ports, originating in the merger instead
of the splitter.
This change fixes that and it also completely disables exposing
monitor ports, even if they are enabled, when both sides are in
dsp mode (fmt_input_port_info() also uses the same macro to check
if the monitor ports are to be exposed)
Monitor the device reservation objects and mark the device available.
Don't select nodes from devices that are not available.
Acquire the device reservation when a device starts.
Release the device reservation when we suspend the device again.