Work on sink

Remove _remove from properties, we can do the same with set of a NULL
value.
Add signals to the stream API to manage the buffers. Wrap those buffers
in a GstBuffer in the pinossrc and pinossink elements and pool them in a
bufferpool.
Remove SPA_EVENT_TYPE_PULL_INPUT, we can do the same with NEED_INPUT and
by using a ringbuffer.
Do more complete allocation of buffers in the link. Use the buffer
allocator if none of the nodes can allocate.
Follow the node state to trigger negotiation and allocation.
Remove offset and size when refering to buffers, we want to always deal
with the complete buffer and use a ringbuffer for ranges or change the
offset/size in the buffer data when needed.
Serialize port_info structures as part of the port_update
Print both the enum number and the name when debuging properties or
formats.
This commit is contained in:
Wim Taymans 2016-08-24 16:26:58 +02:00
parent a03352353f
commit ca7d08c406
45 changed files with 1614 additions and 570 deletions

View file

@ -225,17 +225,11 @@ static void
pull_input (SpaALSASink *this, void *data, snd_pcm_uframes_t frames)
{
SpaEvent event;
SpaEventPullInput pi;
event.type = SPA_EVENT_TYPE_PULL_INPUT;
event.type = SPA_EVENT_TYPE_NEED_INPUT;
event.port_id = 0;
event.size = frames * sizeof (uint16_t) * 2;
event.data = π
pi.buffer_id = this->buffer.buffer.id;
pi.offset = 0;
pi.size = frames * sizeof (uint16_t) * 2;
event.size = 0;
event.data = NULL;
this->event_cb (&this->node, &event, this->user_data);
}
@ -373,6 +367,9 @@ spa_alsa_stop (SpaALSASink *this)
SpaALSAState *state = &this->state;
SpaEvent event;
if (!state->opened)
return 0;
snd_pcm_drop (state->handle);
event.type = SPA_EVENT_TYPE_REMOVE_POLL;