mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-20 08:56:56 -05:00
buffer: remove buffer id
The buffer id is not needed/used, we use the index of the buffer in the buffer array when configuring the port.
This commit is contained in:
parent
e918f9f77c
commit
5b7ddb0105
33 changed files with 167 additions and 65 deletions
|
|
@ -39,6 +39,7 @@
|
|||
#define BUFFER_SAMPLES 128
|
||||
|
||||
struct buffer {
|
||||
uint32_t id;
|
||||
struct spa_buffer *buffer;
|
||||
struct spa_list link;
|
||||
void *ptr;
|
||||
|
|
@ -359,6 +360,7 @@ static int impl_port_use_buffers(struct spa_node *node, enum spa_direction direc
|
|||
pw_log_error("invalid buffer mem");
|
||||
return -EINVAL;
|
||||
}
|
||||
b->id = i;
|
||||
b->buffer = buffers[i];
|
||||
pw_log_info("got buffer %d size %d", i, datas[0].maxsize);
|
||||
spa_list_append(&d->empty, &b->link);
|
||||
|
|
@ -464,7 +466,7 @@ static int impl_node_process(struct spa_node *node)
|
|||
od[0].chunk->size = avail;
|
||||
od[0].chunk->stride = 0;
|
||||
|
||||
io->buffer_id = b->buffer->id;
|
||||
io->buffer_id = b->id;
|
||||
io->status = SPA_STATUS_HAVE_BUFFER;
|
||||
|
||||
update_volume(d);
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ on_process(void *_data)
|
|||
|
||||
buf = b->buffer;
|
||||
|
||||
pw_log_trace("new buffer %d", buf->id);
|
||||
pw_log_trace("new buffer %p", buf);
|
||||
|
||||
handle_events(data);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue