mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
audioadapter: improve state check
Update the started and ready state after we suspend/pause the node so that we don't complain if scheduling happens between setting the fields and actually stopping the follower. Also only complain when the scheduling happens when the node is not ready. It is possible that the node is scheduled before we manage to set the started field.
This commit is contained in:
parent
41e88b1267
commit
c07bef13be
1 changed files with 7 additions and 7 deletions
|
|
@ -927,15 +927,9 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
|
|||
this->warned = false;
|
||||
break;
|
||||
case SPA_NODE_COMMAND_Suspend:
|
||||
this->started = false;
|
||||
this->ready = false;
|
||||
this->warned = false;
|
||||
spa_log_debug(this->log, "%p: suspending", this);
|
||||
break;
|
||||
case SPA_NODE_COMMAND_Pause:
|
||||
this->started = false;
|
||||
this->ready = false;
|
||||
this->warned = false;
|
||||
spa_log_debug(this->log, "%p: pausing", this);
|
||||
break;
|
||||
case SPA_NODE_COMMAND_Flush:
|
||||
|
|
@ -972,9 +966,15 @@ static int impl_node_send_command(void *object, const struct spa_command *comman
|
|||
break;
|
||||
case SPA_NODE_COMMAND_Suspend:
|
||||
configure_format(this, 0, NULL);
|
||||
this->started = false;
|
||||
this->warned = false;
|
||||
this->ready = false;
|
||||
spa_log_debug(this->log, "%p: suspended", this);
|
||||
break;
|
||||
case SPA_NODE_COMMAND_Pause:
|
||||
this->started = false;
|
||||
this->warned = false;
|
||||
this->ready = false;
|
||||
spa_log_debug(this->log, "%p: paused", this);
|
||||
break;
|
||||
case SPA_NODE_COMMAND_Flush:
|
||||
|
|
@ -1572,7 +1572,7 @@ static int impl_node_process(void *object)
|
|||
struct impl *this = object;
|
||||
int status = 0, fstatus, retry = 8;
|
||||
|
||||
if (!this->started) {
|
||||
if (!this->ready) {
|
||||
if (!this->warned)
|
||||
spa_log_warn(this->log, "%p: scheduling stopped node", this);
|
||||
this->warned = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue