diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c53ece0..32f10174 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -208,7 +208,7 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) # ADD SOURCE DIRECTORIES # recursively add libraries to be compiled -execute_process(COMMAND bash -c "find ${PROJECT_SOURCE_DIR}/plugins -mindepth 2 -maxdepth 2 -type d| grep -v .git| grep -v .vscode" +execute_process(COMMAND bash -c "find ${PROJECT_SOURCE_DIR}/plugins -mindepth 2 -maxdepth 2 -type d | grep -v .git | grep -v .vscode" OUTPUT_VARIABLE libextradir) string(REGEX REPLACE "\n" "; " libextradir "${libextradir}") diff --git a/python_module/pyFps.hpp b/python_module/pyFps.hpp index 8c3420c8..f65556c3 100644 --- a/python_module/pyFps.hpp +++ b/python_module/pyFps.hpp @@ -58,6 +58,15 @@ enum FPS_type : uint32_t FPSNAME = FPTYPE_FPSNAME, }; +enum FPS_flags : uint64_t +{ + // There are many more + DEFAULT_INPUT = FPFLAG_DEFAULT_INPUT, + DEFAULT_OUTPUT = FPFLAG_DEFAULT_OUTPUT, + DEFAULT_INPUT_STREAM = FPFLAG_DEFAULT_INPUT_STREAM, + DEFAULT_OUTPUT_STREAM = FPFLAG_DEFAULT_OUTPUT_STREAM, +} + class pyFps { std::string name_; @@ -217,6 +226,25 @@ class pyFps FPFLAG_DEFAULT_INPUT, nullptr, nullptr); } + /** + * @brief Add parameter to database with generic settings + * + * If entry already exists, do not modify it + * + * @param entry_name : entry name + * @param entry_desc : entry description + * @param fptype : entry type ("int","double","float","string") + * @return int + */ + int add_entry(std::string entry_name, std::string entry_desc, + uint32_t fptype, uint64_t fpflag) + { + keys_[entry_name] = static_cast(fptype); + return function_parameter_add_entry(&fps_, entry_name.c_str(), + entry_desc.c_str(), fptype, + fpflag, nullptr, nullptr); + } + /** * @brief Get the status object *