diff --git a/plugins/PIPEWIRE/recordPIPEWIRE.cpp b/plugins/PIPEWIRE/recordPIPEWIRE.cpp index 182541fb8..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; } @@ -432,6 +436,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; diff --git a/src/Pixes/pix_frei0r.cpp b/src/Pixes/pix_frei0r.cpp index 90cc2306e..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[] = { +#ifdef MULTIARCH_TRIPLET + /* Debian's multiarch */ + "/usr/local/lib/" MULTIARCH_TRIPLET "/frei0r-1", #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[] = { - "/usr/local/lib/frei0r-1/", - "/usr/lib/frei0r-1/", #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/", + "/usr/lib/" MULTIARCH_TRIPLET "/frei0r-1", #endif - 0 - }; - - f0path = getenv("HOME"); - if(f0path) { - std::string p(f0path); - paths.push_back(p + "/.frei0r-1/lib/"); - paths.push_back(p + "/.local/lib/frei0r-1/"); +#if defined __SIZEOF_POINTER__ && (__SIZEOF_POINTER__ == 8) + /* only valid for 64bit archs */ + "/usr/lib64/frei0r-1", +#endif + "/usr/lib/frei0r-1", 0}; + + 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 - } - 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 {