mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
stream: prepare output before signaling ready
Just prepare the output on the port and signal ready. When the graph completes we will be signaled again to recycle the buffer and prepare more output if we can. Improve the bookkeeping a little when activating nodes. Fix race with moving nodes between drivers.
This commit is contained in:
parent
94ce6d528c
commit
1d3ce5a9d9
5 changed files with 112 additions and 74 deletions
|
|
@ -980,14 +980,13 @@ static int impl_node_process(struct spa_node *node)
|
|||
struct impl *impl = this->impl;
|
||||
struct pw_node *n = impl->this.node;
|
||||
struct timespec ts;
|
||||
uint64_t cmd = 1, nsec;
|
||||
uint64_t cmd = 1;
|
||||
|
||||
spa_log_trace(this->log, "%p: send process %p", this, impl->this.node->driver_node);
|
||||
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
nsec = SPA_TIMESPEC_TO_NSEC(&ts);
|
||||
n->rt.activation->status = TRIGGERED;
|
||||
n->rt.activation->signal_time = nsec;
|
||||
n->rt.activation->signal_time = SPA_TIMESPEC_TO_NSEC(&ts);
|
||||
|
||||
if (write(this->writefd, &cmd, sizeof(cmd)) != sizeof(cmd))
|
||||
spa_log_warn(this->log, "node %p: error %m", this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue