mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-15 08:56:38 -05:00
plugins: fix warnings
This commit is contained in:
parent
44cb131269
commit
b95584c312
5 changed files with 27 additions and 16 deletions
|
|
@ -56,6 +56,7 @@ static void port_props_reset(struct port_props *props)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct buffer {
|
struct buffer {
|
||||||
|
uint32_t id;
|
||||||
struct spa_list link;
|
struct spa_list link;
|
||||||
bool outstanding;
|
bool outstanding;
|
||||||
|
|
||||||
|
|
@ -97,8 +98,8 @@ struct impl {
|
||||||
const struct spa_node_callbacks *callbacks;
|
const struct spa_node_callbacks *callbacks;
|
||||||
void *user_data;
|
void *user_data;
|
||||||
|
|
||||||
int port_count;
|
uint32_t port_count;
|
||||||
int last_port;
|
uint32_t last_port;
|
||||||
struct port in_ports[MAX_PORTS];
|
struct port in_ports[MAX_PORTS];
|
||||||
struct port out_ports[1];
|
struct port out_ports[1];
|
||||||
|
|
||||||
|
|
@ -216,7 +217,7 @@ impl_node_get_port_ids(struct spa_node *node,
|
||||||
uint32_t n_output_ids)
|
uint32_t n_output_ids)
|
||||||
{
|
{
|
||||||
struct impl *this;
|
struct impl *this;
|
||||||
int i, idx;
|
uint32_t i, idx;
|
||||||
|
|
||||||
spa_return_val_if_fail(node != NULL, -EINVAL);
|
spa_return_val_if_fail(node != NULL, -EINVAL);
|
||||||
|
|
||||||
|
|
@ -625,6 +626,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 = &port->buffers[i];
|
b = &port->buffers[i];
|
||||||
|
b->id = i;
|
||||||
b->outbuf = buffers[i];
|
b->outbuf = buffers[i];
|
||||||
b->outstanding = (direction == SPA_DIRECTION_INPUT);
|
b->outstanding = (direction == SPA_DIRECTION_INPUT);
|
||||||
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));
|
||||||
|
|
@ -780,20 +782,20 @@ add_port_data(struct impl *this, void *out, size_t outsize, struct port *port, i
|
||||||
|
|
||||||
if (port->queued_bytes == 0) {
|
if (port->queued_bytes == 0) {
|
||||||
spa_log_trace(this->log, NAME " %p: return buffer %d on port %d %zd",
|
spa_log_trace(this->log, NAME " %p: return buffer %d on port %d %zd",
|
||||||
this, b->outbuf->id, port->id, outsize);
|
this, b->id, port->id, outsize);
|
||||||
port->io->buffer_id = b->outbuf->id;
|
port->io->buffer_id = b->id;
|
||||||
spa_list_remove(&b->link);
|
spa_list_remove(&b->link);
|
||||||
b->outstanding = true;
|
b->outstanding = true;
|
||||||
} else {
|
} else {
|
||||||
spa_log_trace(this->log, NAME " %p: keeping buffer %d on port %d %zd %zd",
|
spa_log_trace(this->log, NAME " %p: keeping buffer %d on port %d %zd %zd",
|
||||||
this, b->outbuf->id, port->id, port->queued_bytes, outsize);
|
this, b->id, port->id, port->queued_bytes, outsize);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mix_output(struct impl *this, size_t n_bytes)
|
static int mix_output(struct impl *this, size_t n_bytes)
|
||||||
{
|
{
|
||||||
struct buffer *outbuf;
|
struct buffer *outbuf;
|
||||||
int i, layer;
|
uint32_t i, layer;
|
||||||
struct port *outport;
|
struct port *outport;
|
||||||
struct spa_io_buffers *outio;
|
struct spa_io_buffers *outio;
|
||||||
struct spa_data *od;
|
struct spa_data *od;
|
||||||
|
|
@ -823,7 +825,7 @@ static int mix_output(struct impl *this, size_t n_bytes)
|
||||||
len2 = n_bytes - len1;
|
len2 = n_bytes - len1;
|
||||||
|
|
||||||
spa_log_trace(this->log, NAME " %p: dequeue output buffer %d %zd %d %d %d",
|
spa_log_trace(this->log, NAME " %p: dequeue output buffer %d %zd %d %d %d",
|
||||||
this, outbuf->outbuf->id, n_bytes, offset, len1, len2);
|
this, outbuf->id, n_bytes, offset, len1, len2);
|
||||||
|
|
||||||
for (layer = 0, i = 0; i < this->last_port; i++) {
|
for (layer = 0, i = 0; i < this->last_port; i++) {
|
||||||
struct port *in_port = GET_IN_PORT(this, i);
|
struct port *in_port = GET_IN_PORT(this, i);
|
||||||
|
|
@ -846,7 +848,7 @@ static int mix_output(struct impl *this, size_t n_bytes)
|
||||||
od[0].chunk->size = n_bytes;
|
od[0].chunk->size = n_bytes;
|
||||||
od[0].chunk->stride = 0;
|
od[0].chunk->stride = 0;
|
||||||
|
|
||||||
outio->buffer_id = outbuf->outbuf->id;
|
outio->buffer_id = outbuf->id;
|
||||||
outio->status = SPA_STATUS_HAVE_BUFFER;
|
outio->status = SPA_STATUS_HAVE_BUFFER;
|
||||||
|
|
||||||
return SPA_STATUS_HAVE_BUFFER;
|
return SPA_STATUS_HAVE_BUFFER;
|
||||||
|
|
@ -857,7 +859,7 @@ static int impl_node_process(struct spa_node *node)
|
||||||
struct impl *this;
|
struct impl *this;
|
||||||
struct port *outport;
|
struct port *outport;
|
||||||
struct spa_io_buffers *outio;
|
struct spa_io_buffers *outio;
|
||||||
int i;
|
uint32_t i;
|
||||||
size_t min_queued = SIZE_MAX;
|
size_t min_queued = SIZE_MAX;
|
||||||
|
|
||||||
spa_return_val_if_fail(node != NULL, -EINVAL);
|
spa_return_val_if_fail(node != NULL, -EINVAL);
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ struct 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;
|
||||||
|
|
@ -238,7 +239,7 @@ static int consume_buffer(struct impl *this)
|
||||||
|
|
||||||
n_bytes = b->outbuf->datas[0].maxsize;
|
n_bytes = b->outbuf->datas[0].maxsize;
|
||||||
|
|
||||||
spa_log_trace(this->log, NAME " %p: dequeue buffer %d", this, b->outbuf->id);
|
spa_log_trace(this->log, NAME " %p: dequeue buffer %d", this, b->id);
|
||||||
|
|
||||||
render_buffer(this, b);
|
render_buffer(this, b);
|
||||||
|
|
||||||
|
|
@ -256,7 +257,7 @@ static int consume_buffer(struct impl *this)
|
||||||
this->elapsed_time = this->buffer_count;
|
this->elapsed_time = this->buffer_count;
|
||||||
set_timer(this, true);
|
set_timer(this, true);
|
||||||
|
|
||||||
io->buffer_id = b->outbuf->id;
|
io->buffer_id = b->id;
|
||||||
io->status = SPA_STATUS_NEED_BUFFER;
|
io->status = SPA_STATUS_NEED_BUFFER;
|
||||||
b->outstanding = true;
|
b->outstanding = true;
|
||||||
|
|
||||||
|
|
@ -600,6 +601,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 = true;
|
b->outstanding = true;
|
||||||
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));
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ struct 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;
|
||||||
|
|
@ -251,7 +252,7 @@ static int make_buffer(struct impl *this)
|
||||||
|
|
||||||
n_bytes = b->outbuf->datas[0].maxsize;
|
n_bytes = b->outbuf->datas[0].maxsize;
|
||||||
|
|
||||||
spa_log_trace(this->log, NAME " %p: dequeue buffer %d", this, b->outbuf->id);
|
spa_log_trace(this->log, NAME " %p: dequeue buffer %d", this, b->id);
|
||||||
|
|
||||||
fill_buffer(this, b);
|
fill_buffer(this, b);
|
||||||
|
|
||||||
|
|
@ -269,7 +270,7 @@ static int make_buffer(struct impl *this)
|
||||||
this->elapsed_time = this->buffer_count;
|
this->elapsed_time = this->buffer_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 SPA_STATUS_HAVE_BUFFER;
|
return SPA_STATUS_HAVE_BUFFER;
|
||||||
|
|
@ -615,6 +616,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));
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,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;
|
||||||
|
|
@ -237,6 +238,7 @@ static int impl_node_set_param(struct spa_node *node, uint32_t id, uint32_t flag
|
||||||
this->info.flags |= SPA_PORT_INFO_FLAG_LIVE;
|
this->info.flags |= SPA_PORT_INFO_FLAG_LIVE;
|
||||||
else
|
else
|
||||||
this->info.flags &= ~SPA_PORT_INFO_FLAG_LIVE;
|
this->info.flags &= ~SPA_PORT_INFO_FLAG_LIVE;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
@ -300,7 +302,7 @@ static int make_buffer(struct impl *this)
|
||||||
|
|
||||||
n_bytes = b->outbuf->datas[0].maxsize;
|
n_bytes = b->outbuf->datas[0].maxsize;
|
||||||
|
|
||||||
spa_log_trace(this->log, NAME " %p: dequeue buffer %d", this, b->outbuf->id);
|
spa_log_trace(this->log, NAME " %p: dequeue buffer %d", this, b->id);
|
||||||
|
|
||||||
fill_buffer(this, b);
|
fill_buffer(this, b);
|
||||||
|
|
||||||
|
|
@ -318,7 +320,7 @@ static int make_buffer(struct impl *this)
|
||||||
this->elapsed_time = FRAMES_TO_TIME(this, this->frame_count);
|
this->elapsed_time = FRAMES_TO_TIME(this, this->frame_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;
|
||||||
|
|
@ -714,6 +716,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));
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ static void reset_props(struct props *props)
|
||||||
#define MAX_BUFFERS 16
|
#define MAX_BUFFERS 16
|
||||||
|
|
||||||
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;
|
||||||
|
|
@ -572,6 +573,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 = &port->buffers[i];
|
b = &port->buffers[i];
|
||||||
|
b->id = i;
|
||||||
b->outbuf = buffers[i];
|
b->outbuf = buffers[i];
|
||||||
b->outstanding = direction == SPA_DIRECTION_INPUT;
|
b->outstanding = direction == SPA_DIRECTION_INPUT;
|
||||||
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));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue