From 9fe099666a4c0591f3cfa18d554673c545462bd0 Mon Sep 17 00:00:00 2001 From: Martin Piatka Date: Wed, 18 Oct 2023 15:22:58 +0200 Subject: [PATCH] vcap/pipewire: Set node description, name and icon --- src/video_capture/pipewire.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/video_capture/pipewire.cpp b/src/video_capture/pipewire.cpp index db9c4c39d..9542af109 100644 --- a/src/video_capture/pipewire.cpp +++ b/src/video_capture/pipewire.cpp @@ -392,10 +392,21 @@ static int start_pipewire(vcap_pw_state *s) assert(core != nullptr); + std::string node_name = "ultragrid_in_"; + { + char buf[32]; + snprintf(buf, sizeof(buf), "%ld", (long) getpid()); + node_name += buf; + } + auto props = pw_properties_new( PW_KEY_MEDIA_TYPE, "Video", PW_KEY_MEDIA_CATEGORY, "Capture", - PW_KEY_MEDIA_ROLE, "Screen", + PW_KEY_MEDIA_ROLE, "Communication", + PW_KEY_APP_NAME, "UltraGrid", + PW_KEY_APP_ICON_NAME, "ultragrid", + PW_KEY_NODE_NAME, node_name.c_str(), + PW_KEY_NODE_DESCRIPTION, "UltraGrid capture", nullptr); if(!s->user_options.target.empty()){