core: simply load the dbus interface in core

This commit is contained in:
Wim Taymans 2019-05-17 17:33:15 +02:00
parent 4be788962e
commit da9f0ed160
3 changed files with 2 additions and 15 deletions

View file

@ -469,12 +469,12 @@ struct pw_core *pw_core_new(struct pw_loop *main_loop,
pw_map_init(&this->globals, 128, 32);
impl->dbus_iface = pw_load_spa_dbus_interface(this->main_loop);
this->support[0] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_DataLoop, this->data_loop->loop);
this->support[1] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_MainLoop, this->main_loop->loop);
this->support[2] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_LoopUtils, this->main_loop->utils);
this->support[3] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_Log, pw_log_get());
impl->dbus_iface = pw_load_spa_interface("support/libspa-dbus",
"dbus", SPA_TYPE_INTERFACE_DBus, NULL, 4, this->support);
this->support[4] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_DBus, impl->dbus_iface);
this->support[5] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_CPU,
pw_get_support_interface(SPA_TYPE_INTERFACE_CPU));

View file

@ -34,7 +34,6 @@
#include <errno.h>
#include <dlfcn.h>
#include <spa/support/dbus.h>
#include <spa/support/cpu.h>
#include "pipewire.h"
@ -392,15 +391,6 @@ int pw_unload_spa_interface(void *iface)
return 0;
}
SPA_EXPORT
void *pw_load_spa_dbus_interface(struct pw_loop *loop)
{
struct spa_support support = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_LoopUtils, loop->utils);
return pw_load_spa_interface("support/libspa-dbus", "dbus", SPA_TYPE_INTERFACE_DBus,
NULL, 1, &support);
}
/** Initialize PipeWire
*
* \param argc pointer to argc

View file

@ -144,11 +144,8 @@ void *pw_load_spa_interface(const char *lib, const char *factory_name, uint32_t
uint32_t n_support,
const struct spa_support support[]);
void *pw_load_spa_dbus_interface(struct pw_loop *loop);
int pw_unload_spa_interface(void *iface);
const struct spa_handle_factory *
pw_get_support_factory(const char *factory_name);