summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2019-07-29 17:07:37 +0200
committerWim Taymans <wtaymans@redhat.com>2019-07-29 17:07:37 +0200
commit5aba40752d6c4b8156413d50c38944434adcfab2 (patch)
treed48a9de4251cfad189daa4de408c7aaa5e76012e
parent796d0133bf47e9a02a4b7a9120eeab3d4ad68ebb (diff)
node: use activation to check for completed graph
The driver node is not scheduled on the server side and so we only know if it finished by checking the activation.
-rw-r--r--src/pipewire/node.c4
-rw-r--r--src/pipewire/private.h1
2 files changed, 1 insertions, 4 deletions
diff --git a/src/pipewire/node.c b/src/pipewire/node.c
index 093ebbca..aecdbd76 100644
--- a/src/pipewire/node.c
+++ b/src/pipewire/node.c
@@ -795,7 +795,6 @@ static inline int process_node(void *data)
a->status = FINISHED;
a->signal_time = a->finish_time;
a->finish_time = SPA_TIMESPEC_TO_NSEC(&ts);
- a->running = false;
pw_log_trace_fp("node %p: graph completed wait:%"PRIu64" run:%"PRIu64, this,
a->awake_time - a->signal_time,
a->finish_time - a->awake_time);
@@ -1128,7 +1127,7 @@ static int node_ready(void *data, int status)
node->driver, node->exported, driver, status);
if (node == driver) {
- if (node->rt.activation->running) {
+ if (node->rt.activation->state[0].pending != 0) {
pw_log_warn("node %p: graph not finished", node);
dump_states(node);
node->rt.target.signal(node->rt.target.data);
@@ -1137,7 +1136,6 @@ static int node_ready(void *data, int status)
pw_node_activation_state_reset(&t->activation->state[0]);
t->activation->status = NOT_TRIGGERED;
}
- node->rt.activation->running = true;
}
if (node->driver && !node->master)
return 0;
diff --git a/src/pipewire/private.h b/src/pipewire/private.h
index 5eb4deea..70e8d3a4 100644
--- a/src/pipewire/private.h
+++ b/src/pipewire/private.h
@@ -356,7 +356,6 @@ struct pw_node_activation {
#define AWAKE 2
#define FINISHED 3
int status;
- int running;
uint64_t signal_time;
uint64_t awake_time;