mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
client-stream: add started variable
This commit is contained in:
parent
eb934dacef
commit
d8827e2109
1 changed files with 12 additions and 0 deletions
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue