32 std::lock_guard lock(recorderMapMutex_);
33 recorderMap_.erase(path);
40 throw std::invalid_argument(
"Unable to insert null recorder");
43 std::lock_guard lock(recorderMapMutex_);
44 auto ret = recorderMap_.emplace(path, std::move(
rec));
47 throw std::invalid_argument(
48 "Unable to insert recorder (passed path is already used as key)");
55 auto rec = recorderMap_.find(path);
56 return (
rec == recorderMap_.end()) ?
nullptr :
rec->second.get();
62 for (
auto it = recorderMap_.begin();
it != recorderMap_.end(); ++
it) {
63 if (
it->second->isRecording())
void insertRecorder(const std::string &path, std::unique_ptr< LocalRecorder > rec)
Insert passed local recorder into the map.
bool hasRunningRecorders()
Return true if the manager owns at least one currently running local recorder.
static LocalRecorderManager & instance()
LocalRecorder * getRecorderByPath(const std::string &path)
Get local recorder instance with passed path as key.
void removeRecorderByPath(const std::string &path)
Remove given local recorder instance from the map.
void emitSignal(Args... args)