mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-17 08:56:49 -05:00
node: Add ParamBegin/End
Use these commands to mark the begin and end of a series of Param enumerations and configuration, like when doing format negotiation. The idea is that the device can remain open while we do this. Use this in adapter when negotiating a format.
This commit is contained in:
parent
ccfe439786
commit
4e7be858e4
8 changed files with 55 additions and 10 deletions
|
|
@ -241,6 +241,16 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
|
|||
spa_return_val_if_fail(command != NULL, -EINVAL);
|
||||
|
||||
switch (SPA_NODE_COMMAND_ID(command)) {
|
||||
case SPA_NODE_COMMAND_ParamBegin:
|
||||
if ((res = spa_alsa_open(this)) < 0)
|
||||
return res;
|
||||
break;
|
||||
case SPA_NODE_COMMAND_ParamEnd:
|
||||
if (this->have_format)
|
||||
return 0;
|
||||
if ((res = spa_alsa_close(this)) < 0)
|
||||
return res;
|
||||
break;
|
||||
case SPA_NODE_COMMAND_Start:
|
||||
if (!this->have_format)
|
||||
return -EIO;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue