Meta: rework ringbuffer meta

ringbuffer: remove size and mask from the ringbuffer, we have that
elsewhere in the user of the ringbuffer.
Remove the buffer data offset and size fields and replace with a
ringbuffer. We then have a ringbuffer in all buffer data, which
simplifies things.
We can now remove the ringbuffer metadata.
This commit is contained in:
Wim Taymans 2017-11-15 17:25:36 +01:00
parent 49d8f6792e
commit 2923b623b3
27 changed files with 199 additions and 374 deletions

View file

@ -267,8 +267,7 @@ static int consume_buffer(struct impl *this)
render_buffer(this, b);
b->outbuf->datas[0].chunk->offset = 0;
b->outbuf->datas[0].chunk->size = n_bytes;
spa_ringbuffer_set_avail(&b->outbuf->datas[0].chunk->area, n_bytes);
b->outbuf->datas[0].chunk->stride = n_bytes;
if (b->h) {

View file

@ -279,8 +279,7 @@ static int make_buffer(struct impl *this)
fill_buffer(this, b);
b->outbuf->datas[0].chunk->offset = 0;
b->outbuf->datas[0].chunk->size = n_bytes;
spa_ringbuffer_set_avail(&b->outbuf->datas[0].chunk->area, n_bytes);
b->outbuf->datas[0].chunk->stride = n_bytes;
if (b->h) {