mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
fix compilation
This commit is contained in:
parent
b95584c312
commit
7f0d5a1c10
2 changed files with 9 additions and 7 deletions
|
|
@ -74,6 +74,7 @@ static void reset_props(struct props *props)
|
||||||
#define MAX_PORTS 1
|
#define MAX_PORTS 1
|
||||||
|
|
||||||
struct buffer {
|
struct buffer {
|
||||||
|
uint32_t id;
|
||||||
struct spa_buffer *outbuf;
|
struct spa_buffer *outbuf;
|
||||||
bool outstanding;
|
bool outstanding;
|
||||||
struct spa_meta_header *h;
|
struct spa_meta_header *h;
|
||||||
|
|
@ -345,7 +346,7 @@ static int make_buffer(struct impl *this)
|
||||||
n_bytes = range->max_size;
|
n_bytes = range->max_size;
|
||||||
}
|
}
|
||||||
|
|
||||||
spa_log_trace(this->log, NAME " %p: dequeue buffer %d %d %d", this, b->outbuf->id,
|
spa_log_trace(this->log, NAME " %p: dequeue buffer %d %d %d", this, b->id,
|
||||||
maxsize, n_bytes);
|
maxsize, n_bytes);
|
||||||
|
|
||||||
filled = 0;
|
filled = 0;
|
||||||
|
|
@ -378,7 +379,7 @@ static int make_buffer(struct impl *this)
|
||||||
this->elapsed_time = SAMPLES_TO_TIME(this, this->sample_count);
|
this->elapsed_time = SAMPLES_TO_TIME(this, this->sample_count);
|
||||||
set_timer(this, true);
|
set_timer(this, true);
|
||||||
|
|
||||||
io->buffer_id = b->outbuf->id;
|
io->buffer_id = b->id;
|
||||||
io->status = SPA_STATUS_HAVE_BUFFER;
|
io->status = SPA_STATUS_HAVE_BUFFER;
|
||||||
|
|
||||||
return io->status;
|
return io->status;
|
||||||
|
|
@ -814,6 +815,7 @@ impl_node_port_use_buffers(struct spa_node *node,
|
||||||
struct spa_data *d = buffers[i]->datas;
|
struct spa_data *d = buffers[i]->datas;
|
||||||
|
|
||||||
b = &this->buffers[i];
|
b = &this->buffers[i];
|
||||||
|
b->id = i;
|
||||||
b->outbuf = buffers[i];
|
b->outbuf = buffers[i];
|
||||||
b->outstanding = false;
|
b->outstanding = false;
|
||||||
b->h = spa_buffer_find_meta_data(buffers[i], SPA_META_Header, sizeof(*b->h));
|
b->h = spa_buffer_find_meta_data(buffers[i], SPA_META_Header, sizeof(*b->h));
|
||||||
|
|
|
||||||
|
|
@ -685,7 +685,7 @@ impl_node_port_send_command(struct spa_node *node,
|
||||||
return -ENOTSUP;
|
return -ENOTSUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct spa_buffer *find_free_buffer(struct impl *this, struct port *port)
|
static struct buffer *find_free_buffer(struct impl *this, struct port *port)
|
||||||
{
|
{
|
||||||
struct buffer *b;
|
struct buffer *b;
|
||||||
|
|
||||||
|
|
@ -696,7 +696,7 @@ static struct spa_buffer *find_free_buffer(struct impl *this, struct port *port)
|
||||||
spa_list_remove(&b->link);
|
spa_list_remove(&b->link);
|
||||||
b->outstanding = true;
|
b->outstanding = true;
|
||||||
|
|
||||||
return b->outbuf;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void do_volume(struct impl *this, struct spa_buffer *dbuf, struct spa_buffer *sbuf)
|
static void do_volume(struct impl *this, struct spa_buffer *dbuf, struct spa_buffer *sbuf)
|
||||||
|
|
@ -750,7 +750,7 @@ static int impl_node_process(struct spa_node *node)
|
||||||
struct impl *this;
|
struct impl *this;
|
||||||
struct port *in_port, *out_port;
|
struct port *in_port, *out_port;
|
||||||
struct spa_io_buffers *input, *output;
|
struct spa_io_buffers *input, *output;
|
||||||
struct spa_buffer *dbuf, *sbuf;
|
struct buffer *dbuf, *sbuf;
|
||||||
|
|
||||||
spa_return_val_if_fail(node != NULL, -EINVAL);
|
spa_return_val_if_fail(node != NULL, -EINVAL);
|
||||||
|
|
||||||
|
|
@ -786,10 +786,10 @@ static int impl_node_process(struct spa_node *node)
|
||||||
return -EPIPE;
|
return -EPIPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
sbuf = in_port->buffers[input->buffer_id].outbuf;
|
sbuf = &in_port->buffers[input->buffer_id];
|
||||||
|
|
||||||
spa_log_trace(this->log, NAME " %p: do volume %d -> %d", this, sbuf->id, dbuf->id);
|
spa_log_trace(this->log, NAME " %p: do volume %d -> %d", this, sbuf->id, dbuf->id);
|
||||||
do_volume(this, dbuf, sbuf);
|
do_volume(this, dbuf->outbuf, sbuf->outbuf);
|
||||||
|
|
||||||
output->buffer_id = dbuf->id;
|
output->buffer_id = dbuf->id;
|
||||||
output->status = SPA_STATUS_HAVE_BUFFER;
|
output->status = SPA_STATUS_HAVE_BUFFER;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue