src, modules: set PW_KEY_APP_NAME on all cores

This commit is contained in:
George Kiagiadakis
2020-06-15 17:56:05 +03:00
parent 7668f4c6c9
commit 926ee5ce9f
3 changed files with 11 additions and 2 deletions

View File

@@ -7,6 +7,7 @@
*/
#include <wp/wp.h>
#include <pipewire/keys.h>
#include "parser-device.h"
#include "parser-node.h"
@@ -152,6 +153,9 @@ wp_config_static_objects_context_activate (WpPlugin * plugin)
/* Create and connect the local core */
self->local_core = wp_core_clone (core);
wp_core_update_properties (self->local_core, wp_properties_new (
PW_KEY_APP_NAME, "WirePlumber (static-objects)",
NULL));
if (!wp_core_connect (self->local_core)) {
wp_warning_object (self, "failed to connect local core");
return;

View File

@@ -494,7 +494,10 @@ wireplumber__module_init (WpModule * module, WpCore * core, GVariant * args)
/* All monitors will share a new core for local objects */
local_core = wp_core_clone (core);
g_return_if_fail (local_core);
wp_core_update_properties (local_core, wp_properties_new (
PW_KEY_APP_NAME, "WirePlumber (monitor)",
NULL));
if (!wp_core_connect (local_core)) {
wp_warning ("failed to connect local core");
return;

View File

@@ -378,7 +378,9 @@ main (gint argc, gchar **argv)
/* init wireplumber */
data.core = core = wp_core_new (NULL, NULL);
data.core = core = wp_core_new (NULL, wp_properties_new (
PW_KEY_APP_NAME, "WirePlumber",
NULL));
g_signal_connect (core, "connected", G_CALLBACK (on_connected), &data);
g_signal_connect (core, "disconnected", (GCallback) on_disconnected, &data);