videotestsrc: remove threads

Remove the threads from the element and use timerfd to schedule timeouts
Propagate live flag between node links
This commit is contained in:
Wim Taymans 2016-09-19 19:17:59 +02:00
parent 1e565a5f65
commit 4b83d6cfc8
9 changed files with 809 additions and 802 deletions

View file

@ -570,7 +570,7 @@ spa_alsa_sink_node_port_push_input (SpaNode *node,
have_enough = true;
continue;
}
SPA_QUEUE_PUSH_TAIL (&this->ready, SpaALSABuffer, &this->alloc_buffers[info[i].buffer_id]);
SPA_QUEUE_PUSH_TAIL (&this->ready, SpaALSABuffer, next, &this->alloc_buffers[info[i].buffer_id]);
}
info[i].status = SPA_RESULT_OK;
}

View file

@ -301,7 +301,7 @@ mmap_read (SpaALSAState *state)
snd_pcm_status_get_htstamp (status, &htstamp);
now = (int64_t)htstamp.tv_sec * 1000000000ll + (int64_t)htstamp.tv_nsec;
SPA_QUEUE_POP_HEAD (&state->free, SpaALSABuffer, b);
SPA_QUEUE_POP_HEAD (&state->free, SpaALSABuffer, next, b);
if (b == NULL) {
fprintf (stderr, "no more buffers\n");
} else {
@ -346,7 +346,7 @@ mmap_read (SpaALSAState *state)
d = SPA_BUFFER_DATAS (b->outbuf);
d[0].mem.size = avail * state->frame_size;
SPA_QUEUE_PUSH_TAIL (&state->ready, SpaALSABuffer, b);
SPA_QUEUE_PUSH_TAIL (&state->ready, SpaALSABuffer, next, b);
event.type = SPA_NODE_EVENT_TYPE_HAVE_OUTPUT;
event.size = sizeof (ho);