From 83b81e7911a365cbc79bf1fd7d2229a4c01da303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Wed, 2 Sep 2026 14:00:23 +0200 Subject: [PATCH 1/4] pipewire: notes on common parameters received from OBS --- plugins/PIPEWIRE/recordPIPEWIRE.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/PIPEWIRE/recordPIPEWIRE.cpp b/plugins/PIPEWIRE/recordPIPEWIRE.cpp index 182541fb8..6837b8b1a 100644 --- a/plugins/PIPEWIRE/recordPIPEWIRE.cpp +++ b/plugins/PIPEWIRE/recordPIPEWIRE.cpp @@ -432,6 +432,10 @@ void recordPIPEWIRE::on_param_changed(uint32_t id, const struct spa_pod *param) { //::post("%s:%d@%s", __FILE__, __LINE__, __FUNCTION__); if (param == NULL || id != SPA_PARAM_Format) { + // 4 SPA_PARAM_Format + // 15 SPA_PARAM_Latency + // 17 SPA_PARAM_Tag + // 20 SPA_PARAM_PeerCapability return; } struct spa_video_info format; From c793cf7898a3460727f186ef5d023d9349fb715c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Wed, 2 Sep 2026 14:02:01 +0200 Subject: [PATCH 2/4] pipewire: "Description" property for OBS OBS will only show the description (so it's hard to know which device to pick if there a multiple nodes without description). we still do not get any video into OBS though... --- plugins/PIPEWIRE/recordPIPEWIRE.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/PIPEWIRE/recordPIPEWIRE.cpp b/plugins/PIPEWIRE/recordPIPEWIRE.cpp index 6837b8b1a..bb3269a5f 100644 --- a/plugins/PIPEWIRE/recordPIPEWIRE.cpp +++ b/plugins/PIPEWIRE/recordPIPEWIRE.cpp @@ -181,6 +181,9 @@ bool recordPIPEWIRE :: start(const std::string&filename, gem::Properties&props) } else if (("PortName" == key) && (props.get(key, s)) && !s.empty()) { pw_properties_set(pwprops, PW_KEY_PORT_NAME, s.c_str()); #endif + } else if (("Description" == key) && (props.get(key, s)) && !s.empty()) { + /* OBS only accepts streams with descriptions */ + pw_properties_set(pwprops, PW_KEY_NODE_DESCRIPTION, s.c_str()); } else if (("autoconnect" == key) && (props.get(key, d))) { if((int)d) { flags |= PW_STREAM_FLAG_AUTOCONNECT; @@ -357,6 +360,7 @@ bool recordPIPEWIRE :: enumProperties(gem::Properties&props) props.set("MediaRole", std::string("Source")); props.set("AppName", std::string("Pd")); props.set("NodeName", std::string("Gem")); + props.set("Description", std::string("")); props.set("autoconnect", 0); return true; } From 42f7ae386c300a07abfede36dc283c560c1bdaf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Wed, 19 Aug 2026 19:28:52 +0200 Subject: [PATCH 3/4] pix_frei0r: sort paths - ~/ - /usr/local/lib - /usr/lib --- src/Pixes/pix_frei0r.cpp | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/src/Pixes/pix_frei0r.cpp b/src/Pixes/pix_frei0r.cpp index 90cc2306e..9326c59cb 100644 --- a/src/Pixes/pix_frei0r.cpp +++ b/src/Pixes/pix_frei0r.cpp @@ -80,33 +80,38 @@ namespace { } } else { /* no FREI0R_PATH...fall back to the defaults */ - static const char* const frei0r_pathlist[] = { - "/usr/local/lib/frei0r-1/", - "/usr/lib/frei0r-1/", + static const char *const frei0r_pathlist[] = { +#ifdef MULTIARCH_TRIPLET + /* Debian's multiarch */ + "/usr/local/lib/" MULTIARCH_TRIPLET "/frei0r-1", +#endif #if defined __SIZEOF_POINTER__ && (__SIZEOF_POINTER__ == 8) - /* these are only valid for 64bit archs */ - "/usr/local/lib64/frei0r-1/", - "/usr/lib64/frei0r-1/", + /* only valid for 64bit archs */ + "/usr/local/lib64/frei0r-1", #endif + "/usr/local/lib/frei0r-1", + #ifdef MULTIARCH_TRIPLET - /* Debian's multiarch */ - "/usr/local/lib/" MULTIARCH_TRIPLET "/frei0r-1/", - "/usr/lib/" MULTIARCH_TRIPLET "/frei0r-1/", + /* Debian's multiarch */ + "/usr/lib/" MULTIARCH_TRIPLET "/frei0r-1", +#endif +#if defined __SIZEOF_POINTER__ && (__SIZEOF_POINTER__ == 8) + /* only valid for 64bit archs */ + "/usr/lib64/frei0r-1", #endif - 0 - }; + "/usr/lib/frei0r-1", 0}; f0path = getenv("HOME"); - if(f0path) { + if (f0path) { std::string p(f0path); - paths.push_back(p + "/.frei0r-1/lib/"); - paths.push_back(p + "/.local/lib/frei0r-1/"); + paths.push_back(p + "/.frei0r-1/lib"); #ifdef MULTIARCH_TRIPLET /* Debian's multiarch */ - paths.push_back(p + "/.local/lib/" MULTIARCH_TRIPLET "/frei0r-1/"); + paths.push_back(p + "/.local/lib/" MULTIARCH_TRIPLET "/frei0r-1"); #endif + paths.push_back(p + "/.local/lib/frei0r-1"); } - for(int i=0; frei0r_pathlist[i]; i++) { + for (int i = 0; frei0r_pathlist[i]; i++) { paths.push_back(frei0r_pathlist[i]); } } From 40c7079ca9846aeebe11797e2d3c27bbda7cb7b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Wed, 19 Aug 2026 19:31:13 +0200 Subject: [PATCH 4/4] whitespace --- src/Pixes/pix_frei0r.cpp | 94 ++++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 48 deletions(-) diff --git a/src/Pixes/pix_frei0r.cpp b/src/Pixes/pix_frei0r.cpp index 9326c59cb..736af0bc1 100644 --- a/src/Pixes/pix_frei0r.cpp +++ b/src/Pixes/pix_frei0r.cpp @@ -42,16 +42,14 @@ #include "Gem/GemGL.h" - #ifndef HAVE_STRNLEN -#define strnlen f0r_strnlen -static size_t f0r_strnlen(const char* str, size_t maxlen) -{ - size_t len=0; - if(NULL==str) { +# define strnlen f0r_strnlen +static size_t f0r_strnlen(const char *str, size_t maxlen) { + size_t len = 0; + if (NULL == str) { return len; } - while(*str++ && lens_frei0r_paths; - void frei0r_paths_initialize(void) { - std::vectorpaths; - const char*f0path = getenv("FREI0R_PATH"); - if (f0path) { - std::string frei0r_path = f0path; +static std::vector s_frei0r_paths; +void frei0r_paths_initialize(void) { + std::vector paths; + const char *f0path = getenv("FREI0R_PATH"); + if (f0path) { + std::string frei0r_path = f0path; #ifdef _WIN32 - const char *separator = ";"; + const char *separator = ";"; #else - const char *separator = ":"; + const char *separator = ":"; #endif - size_t start; - size_t end = 0; - while ((start = frei0r_path.find_first_not_of(separator, end)) != std::string::npos) { - end = frei0r_path.find(separator, start); - paths.push_back(frei0r_path.substr(start, end - start)); - } - } else { - /* no FREI0R_PATH...fall back to the defaults */ - static const char *const frei0r_pathlist[] = { + size_t start; + size_t end = 0; + while ((start = frei0r_path.find_first_not_of(separator, end)) != + std::string::npos) { + end = frei0r_path.find(separator, start); + paths.push_back(frei0r_path.substr(start, end - start)); + } + } else { + /* no FREI0R_PATH...fall back to the defaults */ + static const char *const frei0r_pathlist[] = { #ifdef MULTIARCH_TRIPLET - /* Debian's multiarch */ - "/usr/local/lib/" MULTIARCH_TRIPLET "/frei0r-1", + /* Debian's multiarch */ + "/usr/local/lib/" MULTIARCH_TRIPLET "/frei0r-1", #endif #if defined __SIZEOF_POINTER__ && (__SIZEOF_POINTER__ == 8) - /* only valid for 64bit archs */ - "/usr/local/lib64/frei0r-1", + /* only valid for 64bit archs */ + "/usr/local/lib64/frei0r-1", #endif - "/usr/local/lib/frei0r-1", + "/usr/local/lib/frei0r-1", #ifdef MULTIARCH_TRIPLET - /* Debian's multiarch */ - "/usr/lib/" MULTIARCH_TRIPLET "/frei0r-1", + /* Debian's multiarch */ + "/usr/lib/" MULTIARCH_TRIPLET "/frei0r-1", #endif #if defined __SIZEOF_POINTER__ && (__SIZEOF_POINTER__ == 8) - /* only valid for 64bit archs */ - "/usr/lib64/frei0r-1", + /* only valid for 64bit archs */ + "/usr/lib64/frei0r-1", #endif - "/usr/lib/frei0r-1", 0}; + "/usr/lib/frei0r-1", 0}; - f0path = getenv("HOME"); - if (f0path) { - std::string p(f0path); - paths.push_back(p + "/.frei0r-1/lib"); + f0path = getenv("HOME"); + if (f0path) { + std::string p(f0path); + paths.push_back(p + "/.frei0r-1/lib"); #ifdef MULTIARCH_TRIPLET - /* Debian's multiarch */ - paths.push_back(p + "/.local/lib/" MULTIARCH_TRIPLET "/frei0r-1"); + /* Debian's multiarch */ + paths.push_back(p + "/.local/lib/" MULTIARCH_TRIPLET "/frei0r-1"); #endif - paths.push_back(p + "/.local/lib/frei0r-1"); - } - for (int i = 0; frei0r_pathlist[i]; i++) { - paths.push_back(frei0r_pathlist[i]); - } + paths.push_back(p + "/.local/lib/frei0r-1"); + } + for (int i = 0; frei0r_pathlist[i]; i++) { + paths.push_back(frei0r_pathlist[i]); } - - s_frei0r_paths = paths; } -}; + s_frei0r_paths = paths; +} +}; // namespace class pix_frei0r::F0RPlugin {