media-session: warn if WirePlumber is running on startup

Matches WirePlumber commit 2bc999594 but here we merely print an error
messages instead of failing to start.
This commit is contained in:
Peter Hutterer 2021-09-30 09:30:10 +10:00 committed by Wim Taymans
parent 0aa09ec801
commit 8352e47878

View file

@ -1393,6 +1393,7 @@ registry_global(void *data, uint32_t id,
struct impl *impl = data; struct impl *impl = data;
const struct object_info *info; const struct object_info *info;
struct registry_event *re = NULL; struct registry_event *re = NULL;
static bool warned_about_wireplumber = false;
info = get_object_info(impl, type); info = get_object_info(impl, type);
if (info == NULL) if (info == NULL)
@ -1400,6 +1401,16 @@ registry_global(void *data, uint32_t id,
pw_log_debug("%p: registry event (policy) for new global '%d'", impl, id); pw_log_debug("%p: registry event (policy) for new global '%d'", impl, id);
if (!warned_about_wireplumber && props &&
spa_streq(info->type, PW_TYPE_INTERFACE_Client)) {
const char *name = spa_dict_lookup(props, PW_KEY_APP_NAME);
if (spa_streq(name, "WirePlumber")) {
pw_log_error("WirePlumber appears to be running; "
"please stop it before starting pipewire-media-session");
warned_about_wireplumber = true;
}
}
/* /*
* Handle policy core events after monitor core ones. * Handle policy core events after monitor core ones.
* *