mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-14 06:59:57 -05:00
rename core_proxy -> core
Rename core_proxy to core and move the introspect and interface contents to core.h In an effort to promote the proxy API.
This commit is contained in:
parent
8ea78c2e3f
commit
ecc6b27cd7
54 changed files with 1068 additions and 1059 deletions
|
|
@ -285,7 +285,7 @@ static void add_pending(GstPipeWireDeviceProvider *self, struct pending *p,
|
|||
p->callback = callback;
|
||||
p->data = data;
|
||||
pw_log_debug("add pending %d", p->seq);
|
||||
self->seq = p->seq = pw_core_proxy_sync(self->core_proxy, 0, self->seq);
|
||||
self->seq = p->seq = pw_core_sync(self->core, 0, self->seq);
|
||||
}
|
||||
|
||||
static void remove_pending(struct pending *p)
|
||||
|
|
@ -360,8 +360,8 @@ on_core_error(void *data, uint32_t id, int seq, int res, const char *message)
|
|||
pw_thread_loop_signal(self->main_loop, FALSE);
|
||||
}
|
||||
|
||||
static const struct pw_core_proxy_events core_events = {
|
||||
PW_VERSION_CORE_PROXY_EVENTS,
|
||||
static const struct pw_core_events core_events = {
|
||||
PW_VERSION_CORE_EVENTS,
|
||||
.info = on_core_info,
|
||||
.done = on_core_done,
|
||||
.error = on_core_error,
|
||||
|
|
@ -541,21 +541,21 @@ gst_pipewire_device_provider_probe (GstDeviceProvider * provider)
|
|||
spa_list_init(&data->ports);
|
||||
|
||||
spa_list_init(&self->pending);
|
||||
self->core_proxy = pw_context_connect (c, NULL, 0);
|
||||
if (self->core_proxy == NULL)
|
||||
self->core = pw_context_connect (c, NULL, 0);
|
||||
if (self->core == NULL)
|
||||
goto failed;
|
||||
|
||||
GST_DEBUG_OBJECT (self, "connected");
|
||||
pw_core_proxy_add_listener(self->core_proxy, &data->core_listener, &core_events, self);
|
||||
pw_core_add_listener(self->core, &data->core_listener, &core_events, self);
|
||||
|
||||
self->end = FALSE;
|
||||
self->list_only = TRUE;
|
||||
self->devices = NULL;
|
||||
|
||||
data->registry = pw_core_proxy_get_registry(self->core_proxy, PW_VERSION_REGISTRY_PROXY, 0);
|
||||
data->registry = pw_core_get_registry(self->core, PW_VERSION_REGISTRY_PROXY, 0);
|
||||
pw_registry_proxy_add_listener(data->registry, &data->registry_listener, ®istry_events, data);
|
||||
|
||||
pw_core_proxy_sync(self->core_proxy, 0, self->seq++);
|
||||
pw_core_sync(self->core, 0, self->seq++);
|
||||
|
||||
for (;;) {
|
||||
if (self->error < 0)
|
||||
|
|
@ -566,7 +566,7 @@ gst_pipewire_device_provider_probe (GstDeviceProvider * provider)
|
|||
}
|
||||
|
||||
GST_DEBUG_OBJECT (self, "disconnect");
|
||||
pw_core_proxy_disconnect (self->core_proxy);
|
||||
pw_core_disconnect (self->core);
|
||||
pw_context_destroy (c);
|
||||
pw_loop_destroy (l);
|
||||
|
||||
|
|
@ -606,7 +606,7 @@ gst_pipewire_device_provider_start (GstDeviceProvider * provider)
|
|||
|
||||
pw_thread_loop_lock (self->main_loop);
|
||||
|
||||
if ((self->core_proxy = pw_context_connect (self->context, NULL, 0)) == NULL) {
|
||||
if ((self->core = pw_context_connect (self->context, NULL, 0)) == NULL) {
|
||||
GST_ERROR_OBJECT (self, "Failed to connect");
|
||||
goto failed_connect;
|
||||
}
|
||||
|
|
@ -618,13 +618,13 @@ gst_pipewire_device_provider_start (GstDeviceProvider * provider)
|
|||
spa_list_init(&data->nodes);
|
||||
spa_list_init(&data->ports);
|
||||
|
||||
pw_core_proxy_add_listener(self->core_proxy, &data->core_listener, &core_events, self);
|
||||
pw_core_add_listener(self->core, &data->core_listener, &core_events, self);
|
||||
|
||||
self->registry = pw_core_proxy_get_registry(self->core_proxy, PW_VERSION_REGISTRY_PROXY, 0);
|
||||
self->registry = pw_core_get_registry(self->core, PW_VERSION_REGISTRY_PROXY, 0);
|
||||
data->registry = self->registry;
|
||||
pw_registry_proxy_add_listener(self->registry, &data->registry_listener, ®istry_events, data);
|
||||
|
||||
pw_core_proxy_sync(self->core_proxy, 0, self->seq++);
|
||||
pw_core_sync(self->core, 0, self->seq++);
|
||||
|
||||
for (;;) {
|
||||
if (self->error < 0)
|
||||
|
|
@ -661,9 +661,9 @@ gst_pipewire_device_provider_stop (GstDeviceProvider * provider)
|
|||
|
||||
GST_DEBUG_OBJECT (self, "stopping provider");
|
||||
|
||||
if (self->core_proxy) {
|
||||
pw_core_proxy_disconnect (self->core_proxy);
|
||||
self->core_proxy = NULL;
|
||||
if (self->core) {
|
||||
pw_core_disconnect (self->core);
|
||||
self->core = NULL;
|
||||
}
|
||||
if (self->context) {
|
||||
pw_context_destroy (self->context);
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ struct _GstPipeWireDeviceProvider {
|
|||
|
||||
struct pw_context *context;
|
||||
|
||||
struct pw_core_proxy *core_proxy;
|
||||
struct pw_core *core;
|
||||
struct spa_list pending;
|
||||
int seq;
|
||||
|
||||
|
|
|
|||
|
|
@ -665,7 +665,7 @@ gst_pipewire_sink_start (GstBaseSink * basesink)
|
|||
}
|
||||
|
||||
pw_thread_loop_lock (pwsink->main_loop);
|
||||
pwsink->stream = pw_stream_new (pwsink->core_proxy, pwsink->client_name, props);
|
||||
pwsink->stream = pw_stream_new (pwsink->core, pwsink->client_name, props);
|
||||
pwsink->pool->stream = pwsink->stream;
|
||||
|
||||
pw_stream_add_listener(pwsink->stream,
|
||||
|
|
@ -706,11 +706,11 @@ gst_pipewire_sink_open (GstPipeWireSink * pwsink)
|
|||
pw_thread_loop_lock (pwsink->main_loop);
|
||||
|
||||
if (pwsink->fd == -1)
|
||||
pwsink->core_proxy = pw_context_connect (pwsink->context, NULL, 0);
|
||||
pwsink->core = pw_context_connect (pwsink->context, NULL, 0);
|
||||
else
|
||||
pwsink->core_proxy = pw_context_connect_fd (pwsink->context, dup(pwsink->fd), NULL, 0);
|
||||
pwsink->core = pw_context_connect_fd (pwsink->context, dup(pwsink->fd), NULL, 0);
|
||||
|
||||
if (pwsink->core_proxy == NULL)
|
||||
if (pwsink->core == NULL)
|
||||
goto connect_error;
|
||||
|
||||
pw_thread_loop_unlock (pwsink->main_loop);
|
||||
|
|
@ -740,9 +740,9 @@ gst_pipewire_sink_close (GstPipeWireSink * pwsink)
|
|||
if (pwsink->stream) {
|
||||
pw_stream_disconnect (pwsink->stream);
|
||||
}
|
||||
if (pwsink->core_proxy) {
|
||||
pw_core_proxy_disconnect (pwsink->core_proxy);
|
||||
pwsink->core_proxy = NULL;
|
||||
if (pwsink->core) {
|
||||
pw_core_disconnect (pwsink->core);
|
||||
pwsink->core = NULL;
|
||||
}
|
||||
pw_thread_loop_unlock (pwsink->main_loop);
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ struct _GstPipeWireSink {
|
|||
struct pw_thread_loop *main_loop;
|
||||
|
||||
struct pw_context *context;
|
||||
struct pw_core_proxy *core_proxy;
|
||||
struct pw_core *core;
|
||||
|
||||
struct pw_stream *stream;
|
||||
struct spa_hook stream_listener;
|
||||
|
|
|
|||
|
|
@ -940,11 +940,11 @@ gst_pipewire_src_open (GstPipeWireSrc * pwsrc)
|
|||
pw_thread_loop_lock (pwsrc->main_loop);
|
||||
|
||||
if (pwsrc->fd == -1)
|
||||
pwsrc->core_proxy = pw_context_connect (pwsrc->context, NULL, 0);
|
||||
pwsrc->core = pw_context_connect (pwsrc->context, NULL, 0);
|
||||
else
|
||||
pwsrc->core_proxy = pw_context_connect_fd (pwsrc->context, dup(pwsrc->fd), NULL, 0);
|
||||
pwsrc->core = pw_context_connect_fd (pwsrc->context, dup(pwsrc->fd), NULL, 0);
|
||||
|
||||
if (pwsrc->core_proxy == NULL)
|
||||
if (pwsrc->core == NULL)
|
||||
goto connect_error;
|
||||
|
||||
if (pwsrc->properties) {
|
||||
|
|
@ -954,7 +954,7 @@ gst_pipewire_src_open (GstPipeWireSrc * pwsrc)
|
|||
props = NULL;
|
||||
}
|
||||
|
||||
if ((pwsrc->stream = pw_stream_new (pwsrc->core_proxy,
|
||||
if ((pwsrc->stream = pw_stream_new (pwsrc->core,
|
||||
pwsrc->client_name, props)) == NULL)
|
||||
goto no_stream;
|
||||
|
||||
|
|
@ -1010,8 +1010,8 @@ gst_pipewire_src_close (GstPipeWireSrc * pwsrc)
|
|||
pw_stream_destroy (pwsrc->stream);
|
||||
pwsrc->stream = NULL;
|
||||
|
||||
pw_core_proxy_disconnect (pwsrc->core_proxy);
|
||||
pwsrc->core_proxy = NULL;
|
||||
pw_core_disconnect (pwsrc->core);
|
||||
pwsrc->core = NULL;
|
||||
}
|
||||
|
||||
static GstStateChangeReturn
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ struct _GstPipeWireSrc {
|
|||
struct pw_thread_loop *main_loop;
|
||||
|
||||
struct pw_context *context;
|
||||
struct pw_core_proxy *core_proxy;
|
||||
struct pw_core *core;
|
||||
|
||||
struct pw_stream *stream;
|
||||
struct spa_hook stream_listener;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue