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
|
|
@ -21,6 +21,7 @@
|
|||
#include <errno.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
#include <spa/utils/ringbuffer.h>
|
||||
#include <pipewire/log.h>
|
||||
#include <extensions/client-node.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -305,7 +305,9 @@ static int driver_process_output(struct spa_node *node)
|
|||
in_io->status = SPA_STATUS_NEED_BUFFER;
|
||||
}
|
||||
|
||||
spa_ringbuffer_set_avail(&out->outbuf->datas[0].chunk->area, ctrl->buffer_size * sizeof(int16_t) * 2);
|
||||
out->outbuf->datas[0].chunk->offset = 0;
|
||||
out->outbuf->datas[0].chunk->size = ctrl->buffer_size * sizeof(int16_t) * 2;
|
||||
out->outbuf->datas[0].chunk->stride = 0;
|
||||
|
||||
spa_hook_list_call(&nd->listener_list, struct pw_jack_node_events, push);
|
||||
gn->ready[SPA_DIRECTION_INPUT] = gn->required[SPA_DIRECTION_OUTPUT] = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue