/* MediaMtx (C++) - path manager (MediaMTX: internal/core/path_manager.go) */ #pragma once #include #include #include #include #include #include "../conf/conf.h" #include "path.h" namespace mtx { class PathManager : public LogParent, public PathProvider { public: explicit PathManager(const Conf & global); ~PathManager(); // Starts new paths, stops removed ones, restarts changed ones void applyPaths(const std::vector & paths); void closeAll(); std::shared_ptr find(const std::string & name) const; // PathProvider (WebRTC server) std::shared_ptr findPath(const std::string & name) const override { return find(name); } std::vector list() const; std::vector confs() const; private: Conf m_global; mutable std::mutex m_mutex; std::map> m_paths; }; } // namespace mtx