mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
stream: remove client_reuse
We can't have client-reuse with the client-node interface.
This commit is contained in:
parent
8b74a3c0d2
commit
b07c4932cd
2 changed files with 12 additions and 17 deletions
|
|
@ -136,8 +136,6 @@ struct node {
|
|||
struct impl {
|
||||
struct pw_client_node this;
|
||||
|
||||
bool client_reuse;
|
||||
|
||||
struct pw_core *core;
|
||||
struct pw_type *t;
|
||||
|
||||
|
|
@ -1314,7 +1312,6 @@ struct pw_client_node *pw_client_node_new(struct pw_resource *resource,
|
|||
const struct spa_support *support;
|
||||
uint32_t n_support;
|
||||
const char *name;
|
||||
const char *str;
|
||||
|
||||
impl = calloc(1, sizeof(struct impl));
|
||||
if (impl == NULL)
|
||||
|
|
@ -1352,9 +1349,6 @@ struct pw_client_node *pw_client_node_new(struct pw_resource *resource,
|
|||
|
||||
this->node->remote = true;
|
||||
|
||||
str = pw_properties_get(properties, "pipewire.client.reuse");
|
||||
impl->client_reuse = str && pw_properties_parse_bool(str);
|
||||
|
||||
pw_resource_add_listener(this->resource,
|
||||
&impl->resource_listener,
|
||||
&resource_events,
|
||||
|
|
|
|||
|
|
@ -108,7 +108,6 @@ struct stream {
|
|||
|
||||
struct spa_pod *format;
|
||||
|
||||
bool client_reuse;
|
||||
uint32_t pending_seq;
|
||||
bool disconnecting;
|
||||
|
||||
|
|
@ -692,13 +691,17 @@ static int impl_node_process_input(struct spa_node *node)
|
|||
if ((b = get_buffer(stream, io->buffer_id)) == NULL)
|
||||
goto done;
|
||||
|
||||
push_queue(impl, &impl->dequeued, b);
|
||||
call_process(impl);
|
||||
|
||||
if (impl->client_reuse)
|
||||
io->buffer_id = SPA_ID_INVALID;
|
||||
/* push new buffer */
|
||||
if (push_queue(impl, &impl->dequeued, b) == 0)
|
||||
call_process(impl);
|
||||
|
||||
done:
|
||||
/* pop buffer to recycle */
|
||||
if ((b = pop_queue(impl, &impl->queued)) != NULL)
|
||||
io->buffer_id = b->id;
|
||||
else
|
||||
io->buffer_id = SPA_ID_INVALID;
|
||||
|
||||
io->status = SPA_STATUS_NEED_BUFFER;
|
||||
return SPA_STATUS_HAVE_BUFFER;
|
||||
}
|
||||
|
|
@ -760,7 +763,6 @@ struct pw_stream * pw_stream_new(struct pw_remote *remote, const char *name,
|
|||
{
|
||||
struct stream *impl;
|
||||
struct pw_stream *this;
|
||||
const char *str;
|
||||
|
||||
impl = calloc(1, sizeof(struct stream));
|
||||
if (impl == NULL)
|
||||
|
|
@ -784,9 +786,6 @@ struct pw_stream * pw_stream_new(struct pw_remote *remote, const char *name,
|
|||
|
||||
init_type(&impl->type, remote->core->type.map);
|
||||
|
||||
str = pw_properties_get(props, "pipewire.client.reuse");
|
||||
impl->client_reuse = str && pw_properties_parse_bool(str);
|
||||
|
||||
spa_ringbuffer_init(&impl->dequeued.ring);
|
||||
spa_ringbuffer_init(&impl->queued.ring);
|
||||
|
||||
|
|
@ -1169,6 +1168,7 @@ int pw_stream_queue_buffer(struct pw_stream *stream, struct pw_buffer *buffer)
|
|||
{
|
||||
struct stream *impl = SPA_CONTAINER_OF(stream, struct stream, this);
|
||||
struct buffer *b;
|
||||
int res;
|
||||
|
||||
if ((b = get_buffer(stream, buffer->buffer->id)) == NULL) {
|
||||
pw_log_error("stream %p: invalid buffer %d", stream, buffer->buffer->id);
|
||||
|
|
@ -1176,7 +1176,8 @@ int pw_stream_queue_buffer(struct pw_stream *stream, struct pw_buffer *buffer)
|
|||
}
|
||||
|
||||
pw_log_trace("stream %p: queue buffer %d", stream, b->id);
|
||||
push_queue(impl, &impl->queued, b);
|
||||
if ((res = push_queue(impl, &impl->queued, b)) < 0)
|
||||
return res;
|
||||
|
||||
if (SPA_FLAG_CHECK(impl->flags, PW_STREAM_FLAG_DRIVER)) {
|
||||
pw_loop_invoke(impl->core->data_loop,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue