mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
Improve pull on client-node
When we pull from the client-node, use any previously queued buffers.
This commit is contained in:
parent
9831786eb7
commit
c59bc457d4
3 changed files with 8 additions and 58 deletions
|
|
@ -775,7 +775,7 @@ static int spa_proxy_node_process_output(struct spa_node *node)
|
|||
{
|
||||
struct proxy *this;
|
||||
struct impl *impl;
|
||||
int i;
|
||||
int i, res = SPA_RESULT_OK;
|
||||
|
||||
this = SPA_CONTAINER_OF(node, struct proxy, node);
|
||||
impl = this->impl;
|
||||
|
|
@ -783,19 +783,23 @@ static int spa_proxy_node_process_output(struct spa_node *node)
|
|||
pw_log_trace("process output");
|
||||
|
||||
for (i = 0; i < MAX_OUTPUTS; i++) {
|
||||
struct spa_port_io *io = this->out_ports[i].io;
|
||||
struct spa_port_io *io = this->out_ports[i].io, tmp;
|
||||
|
||||
if (!io)
|
||||
continue;
|
||||
|
||||
tmp = impl->transport->outputs[i];
|
||||
impl->transport->outputs[i] = *io;
|
||||
if (tmp.status == SPA_RESULT_HAVE_BUFFER)
|
||||
res = SPA_RESULT_HAVE_BUFFER;
|
||||
*io = tmp;
|
||||
pw_log_trace("%d %d %d", io->status, io->buffer_id, io->status);
|
||||
}
|
||||
pw_transport_add_event(impl->transport,
|
||||
&SPA_EVENT_INIT(impl->core->type.event_transport.ProcessOutput));
|
||||
do_flush(this);
|
||||
|
||||
return SPA_RESULT_OK;
|
||||
return res;
|
||||
}
|
||||
|
||||
static int handle_node_event(struct proxy *this, struct spa_event *event)
|
||||
|
|
|
|||
|
|
@ -374,7 +374,6 @@ static void handle_rtnode_event(struct pw_proxy *proxy, struct spa_event *event)
|
|||
struct node_data *data = proxy->user_data;
|
||||
struct pw_remote *remote = proxy->remote;
|
||||
struct spa_graph_node *n = &data->node->rt.node;
|
||||
int res;
|
||||
|
||||
if (SPA_EVENT_TYPE(event) == remote->core->type.event_transport.ProcessInput) {
|
||||
struct spa_list ready;
|
||||
|
|
@ -388,7 +387,7 @@ static void handle_rtnode_event(struct pw_proxy *proxy, struct spa_event *event)
|
|||
spa_graph_scheduler_chain(data->node->rt.sched, &ready);
|
||||
}
|
||||
else if (SPA_EVENT_TYPE(event) == remote->core->type.event_transport.ProcessOutput) {
|
||||
res = n->methods->process_output(n, n->user_data);
|
||||
n->methods->process_output(n, n->user_data);
|
||||
}
|
||||
else if (SPA_EVENT_TYPE(event) == remote->core->type.event_transport.ReuseBuffer) {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,53 +0,0 @@
|
|||
pipewirecore_headers = [
|
||||
'client.h',
|
||||
'command.h',
|
||||
'core.h',
|
||||
'data-loop.h',
|
||||
'link.h',
|
||||
'main-loop.h',
|
||||
'module.h',
|
||||
'node.h',
|
||||
'node-factory.h',
|
||||
'port.h',
|
||||
'remote.h',
|
||||
'resource.h',
|
||||
'work-queue.h',
|
||||
]
|
||||
|
||||
pipewirecore_sources = [
|
||||
'client.c',
|
||||
'command.c',
|
||||
'core.c',
|
||||
'data-loop.c',
|
||||
'link.c',
|
||||
'main-loop.c',
|
||||
'module.c',
|
||||
'node.c',
|
||||
'node-factory.c',
|
||||
'port.c',
|
||||
'remote.c',
|
||||
'resource.c',
|
||||
'work-queue.c',
|
||||
]
|
||||
|
||||
install_headers(pipewirecore_headers, subdir : 'pipewire/server')
|
||||
|
||||
libpipewirecore_c_args = [
|
||||
'-DHAVE_CONFIG_H',
|
||||
'-D_GNU_SOURCE',
|
||||
]
|
||||
|
||||
libpipewirecore = shared_library('pipewirecore-@0@'.format(apiversion), pipewirecore_sources,
|
||||
version : libversion,
|
||||
soversion : soversion,
|
||||
c_args : libpipewirecore_c_args,
|
||||
include_directories : [configinc, spa_inc],
|
||||
link_with : spalib,
|
||||
install : true,
|
||||
dependencies : [mathlib, dl_lib, pipewire_dep],
|
||||
)
|
||||
|
||||
pipewirecore_dep = declare_dependency(link_with : libpipewirecore,
|
||||
include_directories : [configinc, spa_inc],
|
||||
dependencies : [pipewire_dep],
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue