![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /proc/self/root/usr/local/lib/node_modules/mediasoup/worker/include/ |
Upload File : |
#ifndef MS_SETTINGS_HPP #define MS_SETTINGS_HPP #include "common.hpp" #include "LogLevel.hpp" #include "Channel/Request.hpp" #include <map> #include <string> #include <vector> class Settings { public: struct LogTags { bool info{ false }; bool ice{ false }; bool dtls{ false }; bool rtp{ false }; bool srtp{ false }; bool rtcp{ false }; bool rtx{ false }; bool bwe{ false }; bool score{ false }; bool simulcast{ false }; bool svc{ false }; bool sctp{ false }; bool message{ false }; }; public: // Struct holding the configuration. struct Configuration { LogLevel logLevel{ LogLevel::LOG_ERROR }; struct LogTags logTags; uint16_t rtcMinPort{ 10000u }; uint16_t rtcMaxPort{ 59999u }; std::string dtlsCertificateFile; std::string dtlsPrivateKeyFile; }; public: static void SetConfiguration(int argc, char* argv[]); static void PrintConfiguration(); static void HandleRequest(Channel::Request* request); private: static void SetLogLevel(std::string& level); static void SetLogTags(const std::vector<std::string>& tags); static void SetDtlsCertificateAndPrivateKeyFiles(); public: static struct Configuration configuration; private: static std::map<std::string, LogLevel> string2LogLevel; static std::map<LogLevel, std::string> logLevel2String; }; #endif