mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
core: load and add cpu detection support
This commit is contained in:
parent
9ca9fda253
commit
e984c19f6c
2 changed files with 9 additions and 1 deletions
|
|
@ -433,7 +433,9 @@ struct pw_core *pw_core_new(struct pw_loop *main_loop, struct pw_properties *pro
|
||||||
this->support[2] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_LoopUtils, this->main_loop->utils);
|
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());
|
this->support[3] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_Log, pw_log_get());
|
||||||
this->support[4] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_DBus, impl->dbus_iface);
|
this->support[4] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_DBus, impl->dbus_iface);
|
||||||
this->n_support = 5;
|
this->support[5] = SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_CPU,
|
||||||
|
pw_get_support_interface(SPA_TYPE_INTERFACE_CPU));
|
||||||
|
this->n_support = 6;
|
||||||
|
|
||||||
pw_data_loop_start(this->data_loop_impl);
|
pw_data_loop_start(this->data_loop_impl);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -442,6 +442,12 @@ void pw_init(int *argc, char **argv[])
|
||||||
SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_Log, iface->iface);
|
SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_Log, iface->iface);
|
||||||
pw_log_set(iface->iface);
|
pw_log_set(iface->iface);
|
||||||
}
|
}
|
||||||
|
iface = load_interface(plugin, "cpu", SPA_TYPE_INTERFACE_CPU, &info,
|
||||||
|
support->n_support, support->support);
|
||||||
|
if (iface != NULL) {
|
||||||
|
support->support[support->n_support++] =
|
||||||
|
SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_CPU, iface->iface);
|
||||||
|
}
|
||||||
pw_log_info("version %s", pw_get_library_version());
|
pw_log_info("version %s", pw_get_library_version());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue