mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
buffer: don't use ringbuffer in chunk
We can't use a ringbuffer on the chunk because it implies the consumer would write to it to update the read position, which we can't do because the chunk is read-only and might even be shared. Go back to offset/size pairs, which can sortof do the same thing if we want later when we keep a non-shared read pointer in the consumer. Keep alsa timestamp around and filled state for future. mmap the input port meta/data/chunk as read-only. Only do clock update requests when asked.
This commit is contained in:
parent
2ad722b579
commit
4288a634f4
25 changed files with 165 additions and 126 deletions
|
|
@ -526,8 +526,8 @@ do_send_buffer (GstPipeWireSink *pwsink)
|
|||
for (i = 0; i < data->buf->n_datas; i++) {
|
||||
struct spa_data *d = &data->buf->datas[i];
|
||||
GstMemory *mem = gst_buffer_peek_memory (buffer, i);
|
||||
d->chunk->area.readindex = mem->offset - data->offset;
|
||||
d->chunk->area.writeindex = d->chunk->area.readindex + mem->size;
|
||||
d->chunk->offset = mem->offset - data->offset;
|
||||
d->chunk->size = mem->size;
|
||||
}
|
||||
|
||||
if (!(res = pw_stream_send_buffer (pwsink->stream, data->id))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue