From 438409722785dda80b5c2d42e1456e8a0bc6143b Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 19 Jan 2018 13:37:24 +0100 Subject: [PATCH] factory: set fixed properties as global properties --- src/pipewire/factory.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pipewire/factory.c b/src/pipewire/factory.c index efa5d9106..5bf2d05d7 100644 --- a/src/pipewire/factory.c +++ b/src/pipewire/factory.c @@ -125,6 +125,16 @@ int pw_factory_register(struct pw_factory *factory, spa_list_append(&core->factory_list, &factory->link); + if (properties == NULL) + properties = pw_properties_new(NULL, NULL); + if (properties == NULL) + return -ENOMEM; + + pw_properties_set(properties, "factory.name", factory->info.name); + pw_properties_setf(properties, "factory.type.name", "%s", + spa_type_map_get_type(core->type.map, factory->info.type)); + pw_properties_setf(properties, "factory.type.version", "%d", factory->info.version); + factory->global = pw_global_new(core, core->type.factory, PW_VERSION_FACTORY, properties,