cpu: add force cpu flags

Use PIPEWIRE_CPU to force cpu flags.
This commit is contained in:
Wim Taymans 2019-01-07 15:02:18 +01:00
parent 1ca7704d64
commit 9573b24e52
3 changed files with 23 additions and 0 deletions

View file

@ -35,6 +35,7 @@
#include <dlfcn.h>
#include <spa/support/dbus.h>
#include <spa/support/cpu.h>
#include "pipewire.h"
#include "private.h"
@ -445,6 +446,10 @@ void pw_init(int *argc, char **argv[])
iface = load_interface(plugin, "cpu", SPA_TYPE_INTERFACE_CPU, &info,
support->n_support, support->support);
if (iface != NULL) {
struct spa_cpu *cpu = iface->iface;
if ((str = getenv("PIPEWIRE_CPU")))
spa_cpu_force_flags(cpu, strtoul(str, NULL, 0));
support->support[support->n_support++] =
SPA_SUPPORT_INIT(SPA_TYPE_INTERFACE_CPU, iface->iface);
}