Commit 759aa450 authored by Julian Bouzas's avatar Julian Bouzas

remove remote-endpoints and use the new pipewire API

parent 7d4c9fa6
......@@ -141,9 +141,6 @@ registry_global(void *data, uint32_t id, uint32_t parent_id,
case PW_TYPE_INTERFACE_Device:
detail = signal_detail_device_quark ();
break;
case PW_TYPE_INTERFACE_Endpoint:
detail = signal_detail_endpoint_quark ();
break;
default:
break;
}
......@@ -172,7 +169,7 @@ registry_init (WpRemotePipewire *self)
/* Registry */
self->registry_proxy = pw_core_proxy_get_registry (self->core_proxy,
PW_TYPE_INTERFACE_Registry, PW_VERSION_REGISTRY, 0);
PW_VERSION_REGISTRY_PROXY, 0);
pw_registry_proxy_add_listener(self->registry_proxy, &self->registry_listener,
&registry_proxy_events, self);
}
......
......@@ -29,7 +29,6 @@ shared_library(
'wireplumber-module-pipewire',
[
'module-pipewire.c',
'module-pipewire/remote-endpoint.c',
'module-pipewire/simple-endpoint-link.c',
'module-pipewire/simple-endpoint.c',
],
......
......@@ -15,8 +15,6 @@
#include <wp/wp.h>
#include <pipewire/pipewire.h>
void remote_endpoint_init (WpCore * core, struct pw_core * pw_core,
struct pw_remote * remote);
void simple_endpoint_factory (WpFactory * factory, GType type,
GVariant * properties, GAsyncReadyCallback ready, gpointer user_data);
void simple_endpoint_link_factory (WpFactory * factory, GType type,
......@@ -25,22 +23,6 @@ void simple_endpoint_link_factory (WpFactory * factory, GType type,
void
wireplumber__module_init (WpModule * module, WpCore * core, GVariant * args)
{
WpRemotePipewire *rp;
struct pw_core *pw_core;
struct pw_remote *pw_remote;
/* Make sure the remote pipewire is valid */
rp = wp_core_get_global (core, WP_GLOBAL_REMOTE_PIPEWIRE);
if (!rp) {
g_critical ("module-pipewire cannot be loaded without a registered "
"WpRemotePipewire object");
return;
}
/* Init remoted endpoint */
g_object_get (rp, "pw-core", &pw_core, "pw-remote", &pw_remote, NULL);
remote_endpoint_init (core, pw_core, pw_remote);
/* Register simple-endpoint and simple-endpoint-link */
wp_factory_new (core, "pipewire-simple-endpoint",
simple_endpoint_factory);
......
This diff is collapsed.
......@@ -237,10 +237,10 @@ simple_endpoint_link_create (WpEndpointLink * epl, GVariant * src_data,
/* Create the properties */
props = pw_properties_new(NULL, NULL);
pw_properties_setf(props, PW_LINK_OUTPUT_NODE_ID, "%d", output_node_id);
pw_properties_setf(props, PW_LINK_OUTPUT_PORT_ID, "%d", out_id);
pw_properties_setf(props, PW_LINK_INPUT_NODE_ID, "%d", input_node_id);
pw_properties_setf(props, PW_LINK_INPUT_PORT_ID, "%d", in_id);
pw_properties_setf(props, PW_KEY_LINK_OUTPUT_NODE, "%d", output_node_id);
pw_properties_setf(props, PW_KEY_LINK_OUTPUT_PORT, "%d", out_id);
pw_properties_setf(props, PW_KEY_LINK_INPUT_NODE, "%d", input_node_id);
pw_properties_setf(props, PW_KEY_LINK_INPUT_PORT, "%d", in_id);
/* Create the link */
proxy = wp_remote_pipewire_create_object(remote_pipewire, "link-factory",
......
......@@ -284,17 +284,17 @@ on_audio_dsp_running(WpPwAudioDsp *self)
props = pw_properties_new(NULL, NULL);
/* Set the new properties */
pw_properties_set(props, PW_LINK_PROP_PASSIVE, "true");
pw_properties_set(props, PW_KEY_LINK_PASSIVE, "true");
if (self->direction == PW_DIRECTION_OUTPUT) {
pw_properties_setf(props, PW_LINK_OUTPUT_NODE_ID, "%d", dsp_info->id);
pw_properties_setf(props, PW_LINK_OUTPUT_PORT_ID, "%d", -1);
pw_properties_setf(props, PW_LINK_INPUT_NODE_ID, "%d", self->target->id);
pw_properties_setf(props, PW_LINK_INPUT_PORT_ID, "%d", -1);
pw_properties_setf(props, PW_KEY_LINK_OUTPUT_NODE, "%d", dsp_info->id);
pw_properties_setf(props, PW_KEY_LINK_OUTPUT_PORT, "%d", -1);
pw_properties_setf(props, PW_KEY_LINK_INPUT_NODE, "%d", self->target->id);
pw_properties_setf(props, PW_KEY_LINK_INPUT_PORT, "%d", -1);
} else {
pw_properties_setf(props, PW_LINK_OUTPUT_NODE_ID, "%d", self->target->id);
pw_properties_setf(props, PW_LINK_OUTPUT_PORT_ID, "%d", -1);
pw_properties_setf(props, PW_LINK_INPUT_NODE_ID, "%d", dsp_info->id);
pw_properties_setf(props, PW_LINK_INPUT_PORT_ID, "%d", -1);
pw_properties_setf(props, PW_KEY_LINK_OUTPUT_NODE, "%d", self->target->id);
pw_properties_setf(props, PW_KEY_LINK_OUTPUT_PORT, "%d", -1);
pw_properties_setf(props, PW_KEY_LINK_INPUT_NODE, "%d", dsp_info->id);
pw_properties_setf(props, PW_KEY_LINK_INPUT_PORT, "%d", -1);
}
g_debug ("%p linking DSP to node", self);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment