client-stream: add started variable

This commit is contained in:
Wim Taymans 2018-10-04 15:53:49 +02:00
parent eb934dacef
commit d8827e2109

View file

@ -72,6 +72,7 @@ struct impl {
struct pw_core *core; struct pw_core *core;
struct node node; struct node node;
bool started;
struct spa_hook node_listener; struct spa_hook node_listener;
struct spa_hook client_node_listener; struct spa_hook client_node_listener;
@ -126,6 +127,17 @@ static int impl_node_send_command(struct spa_node *node, const struct spa_comman
this = SPA_CONTAINER_OF(node, struct node, node); this = SPA_CONTAINER_OF(node, struct node, node);
impl = this->impl; impl = this->impl;
switch (SPA_NODE_COMMAND_ID(command)) {
case SPA_NODE_COMMAND_Start:
impl->started = true;
break;
case SPA_NODE_COMMAND_Pause:
impl->started = false;
break;
default:
break;
}
if ((res = spa_node_send_command(impl->adapter, command)) < 0) if ((res = spa_node_send_command(impl->adapter, command)) < 0)
return res; return res;