mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-16 08:56:45 -05:00
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:
parent
49d8f6792e
commit
2923b623b3
27 changed files with 199 additions and 374 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue