Skip to content

Commit

Permalink
vcap/pipewire: Set node description, name and icon
Browse files Browse the repository at this point in the history
  • Loading branch information
mpiatka committed Oct 18, 2023
1 parent cef4b21 commit 9fe0996
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/video_capture/pipewire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()){
Expand Down

0 comments on commit 9fe0996

Please sign in to comment.