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

@ -930,8 +930,7 @@ static int mmap_read(struct impl *this)
}
d = b->outbuf->datas;
d[0].chunk->offset = 0;
d[0].chunk->size = buf.bytesused;
spa_ringbuffer_set_avail(&d[0].chunk->area, buf.bytesused);
d[0].chunk->stride = port->fmt.fmt.pix.bytesperline;
b->outstanding = true;
@ -1091,8 +1090,7 @@ mmap_init(struct impl *this,
d = buffers[i]->datas;
d[0].mapoffset = 0;
d[0].maxsize = b->v4l2_buffer.length;
d[0].chunk->offset = 0;
d[0].chunk->size = b->v4l2_buffer.length;
spa_ringbuffer_set_avail(&d[0].chunk->area, 0);
d[0].chunk->stride = state->fmt.fmt.pix.bytesperline;
if (state->export_buf) {