buffer: add ptr_type to the data

We can give more info about the memory or fd that way and we can also
pass other structures as data later if we need to.
This commit is contained in:
Wim Taymans 2016-07-13 20:23:03 +02:00
parent 16d2a3a69c
commit 61caf0e19c
9 changed files with 44 additions and 31 deletions

View file

@ -232,7 +232,8 @@ pull_input (SpaALSASink *this, void *data, snd_pcm_uframes_t frames)
buffer->meta[0].size = sizeof (buffer->header);
buffer->data[0].type = SPA_DATA_TYPE_MEMPTR;
buffer->data[0].data = data;
buffer->data[0].ptr = data;
buffer->data[0].ptr_type = "sysmem";
buffer->data[0].size = frames * sizeof (uint16_t) * 2;
this->event_cb (&this->handle, &event,this->user_data);