mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
client-node: don't misuse ASYNC flag
When the client is explicitly going to send reuse_buffer messages, set the consumed buffer to INVALID so it doesn't automatically get reused. ASYNC is for when the node emits events to signal input and output it has nothing to do with reuse_buffer Remove weird PROCESS_INPUT code.
This commit is contained in:
parent
28bf6137d3
commit
9706c191b9
2 changed files with 15 additions and 38 deletions
|
|
@ -31,13 +31,11 @@
|
|||
#include "spa/node.h"
|
||||
#include "spa/format-builder.h"
|
||||
#include "spa/lib/format.h"
|
||||
#include "spa/graph.h"
|
||||
|
||||
#include "pipewire/pipewire.h"
|
||||
#include "pipewire/interfaces.h"
|
||||
|
||||
#include "pipewire/core.h"
|
||||
#include "pipewire/private.h"
|
||||
#include "modules/spa/spa-node.h"
|
||||
#include "client-node.h"
|
||||
#include "transport.h"
|
||||
|
|
@ -767,18 +765,14 @@ static int spa_proxy_node_process_input(struct spa_node *node)
|
|||
|
||||
impl->transport->inputs[i] = *io;
|
||||
|
||||
if (impl->client_reuse) {
|
||||
io->status = SPA_RESULT_OK;
|
||||
if (impl->client_reuse)
|
||||
io->buffer_id = SPA_ID_INVALID;
|
||||
} else {
|
||||
io->status = SPA_RESULT_NEED_BUFFER;
|
||||
}
|
||||
}
|
||||
pw_client_node_transport_add_message(impl->transport,
|
||||
&PW_CLIENT_NODE_MESSAGE_INIT(PW_CLIENT_NODE_MESSAGE_PROCESS_INPUT));
|
||||
do_flush(this);
|
||||
|
||||
if (this->callbacks->need_input || impl->client_reuse)
|
||||
if (this->callbacks->need_input)
|
||||
return SPA_RESULT_OK;
|
||||
else
|
||||
return SPA_RESULT_NEED_BUFFER;
|
||||
|
|
@ -1190,11 +1184,7 @@ struct pw_client_node *pw_client_node_new(struct pw_resource *resource,
|
|||
goto error_no_node;
|
||||
|
||||
str = pw_properties_get(properties, "pipewire.client.reuse");
|
||||
impl->client_reuse = str && strcmp(str, "1") == 0;
|
||||
if (impl->client_reuse)
|
||||
this->node->rt.node.flags |= SPA_GRAPH_NODE_FLAG_ASYNC;
|
||||
else
|
||||
this->node->rt.node.flags &= ~SPA_GRAPH_NODE_FLAG_ASYNC;
|
||||
impl->client_reuse = str && pw_properties_parse_bool(str);
|
||||
|
||||
pw_resource_add_listener(this->resource,
|
||||
&impl->resource_listener,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue