From e176383ffa908120777ccfaabed0101095e70730 Mon Sep 17 00:00:00 2001 From: JDierkse Date: Wed, 28 Jul 2021 15:54:41 +0200 Subject: [PATCH] Add FFMPEG Configuration --- API/WebAPI.cpp | 18 +++++++++--------- Recorder/DigooRecorder.cpp | 4 ++-- Recorder/DigooRecorder.h | 4 ++-- Recorder/FoscamRecorder.cpp | 4 ++-- Recorder/FoscamRecorder.h | 4 ++-- Recorder/Recorder.h | 4 ++-- Recorder/VStarCamRecorder.cpp | 4 ++-- Recorder/VStarCamRecorder.h | 4 ++-- Recorder/WatchBotRecorder.cpp | 4 ++-- Recorder/WatchBotRecorder.h | 4 ++-- Recorder/ZModoRecorder.cpp | 4 ++-- Recorder/ZModoRecorder.h | 4 ++-- 12 files changed, 31 insertions(+), 31 deletions(-) diff --git a/API/WebAPI.cpp b/API/WebAPI.cpp index 45f9a34..b1f3034 100644 --- a/API/WebAPI.cpp +++ b/API/WebAPI.cpp @@ -66,9 +66,9 @@ Http::HttpServer::HttpReply WebAPI::ProcessQuery(ctpl::thread_pool* pThreadPool, { auto recorder = Recorder::DigooRecorder(pHttpClient, settings); if (StringAlgorithm::iequals("Snapshot", action)) - reply.content = recorder.Snapshot(pThreadPool); + reply.content = recorder.Snapshot(pThreadPool, ffmpeg); else if (StringAlgorithm::iequals("MultiSnapshot", action)) - reply.content = recorder.MultiSnapshot(pThreadPool, numberOfImages); + reply.content = recorder.MultiSnapshot(pThreadPool, ffmpeg, numberOfImages); else if (StringAlgorithm::iequals("Video", action)) reply.content = recorder.Video(pThreadPool, ffmpeg); } @@ -76,7 +76,7 @@ Http::HttpServer::HttpReply WebAPI::ProcessQuery(ctpl::thread_pool* pThreadPool, { auto recorder = Recorder::FoscamRecorder(pHttpClient, settings); if (StringAlgorithm::iequals("Snapshot", action)) - reply.content = recorder.Snapshot(pThreadPool); + reply.content = recorder.Snapshot(pThreadPool, ffmpeg); else if (StringAlgorithm::iequals("MultiSnapshot", action)) reply.content = recorder.MultiSnapshot(pThreadPool, numberOfImages); else if (StringAlgorithm::iequals("Video", action)) @@ -86,9 +86,9 @@ Http::HttpServer::HttpReply WebAPI::ProcessQuery(ctpl::thread_pool* pThreadPool, { auto recorder = Recorder::VStarCamRecorder(pHttpClient, settings); if (StringAlgorithm::iequals("Snapshot", action)) - reply.content = recorder.Snapshot(pThreadPool); + reply.content = recorder.Snapshot(pThreadPool, ffmpeg); else if (StringAlgorithm::iequals("MultiSnapshot", action)) - reply.content = recorder.MultiSnapshot(pThreadPool, numberOfImages); + reply.content = recorder.MultiSnapshot(pThreadPool, ffmpeg, numberOfImages); else if (StringAlgorithm::iequals("Video", action)) reply.content = recorder.Video(pThreadPool, ffmpeg); } @@ -96,9 +96,9 @@ Http::HttpServer::HttpReply WebAPI::ProcessQuery(ctpl::thread_pool* pThreadPool, { auto recorder = Recorder::WatchBotRecorder(pHttpClient, settings); if (StringAlgorithm::iequals("Snapshot", action)) - reply.content = recorder.Snapshot(pThreadPool); + reply.content = recorder.Snapshot(pThreadPool, ffmpeg); else if (StringAlgorithm::iequals("MultiSnapshot", action)) - reply.content = recorder.MultiSnapshot(pThreadPool, numberOfImages); + reply.content = recorder.MultiSnapshot(pThreadPool, ffmpeg, numberOfImages); else if (StringAlgorithm::iequals("Video", action)) reply.content = recorder.Video(pThreadPool, ffmpeg); } @@ -106,9 +106,9 @@ Http::HttpServer::HttpReply WebAPI::ProcessQuery(ctpl::thread_pool* pThreadPool, { auto recorder = Recorder::ZModoRecorder(pHttpClient, settings); if (StringAlgorithm::iequals("Snapshot", action)) - reply.content = recorder.Snapshot(pThreadPool); + reply.content = recorder.Snapshot(pThreadPool, ffmpeg); else if (StringAlgorithm::iequals("MultiSnapshot", action)) - reply.content = recorder.MultiSnapshot(pThreadPool, numberOfImages); + reply.content = recorder.MultiSnapshot(pThreadPool, ffmpeg, numberOfImages); else if (StringAlgorithm::iequals("Video", action)) reply.content = recorder.Video(pThreadPool, ffmpeg); } diff --git a/Recorder/DigooRecorder.cpp b/Recorder/DigooRecorder.cpp index 42652fa..57cb07e 100644 --- a/Recorder/DigooRecorder.cpp +++ b/Recorder/DigooRecorder.cpp @@ -16,13 +16,13 @@ DigooRecorder::~DigooRecorder() { } -std::string DigooRecorder::Snapshot(ctpl::thread_pool* pThreadPool) +std::string DigooRecorder::Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) { Logging::Log(Logging::Severity::Debug, "DigooRecorder Snapshot"); return std::string(); } -std::string DigooRecorder::MultiSnapshot(ctpl::thread_pool* pThreadPool, int numberOfImages) +std::string DigooRecorder::MultiSnapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg, int numberOfImages) { Logging::Log(Logging::Severity::Debug, "DigooRecorder MultiSnapshot"); return std::string(); diff --git a/Recorder/DigooRecorder.h b/Recorder/DigooRecorder.h index 6ad0c15..4b75470 100644 --- a/Recorder/DigooRecorder.h +++ b/Recorder/DigooRecorder.h @@ -20,8 +20,8 @@ public: DigooRecorder(Http::HttpClient* pHttpClient, const Settings& settings); ~DigooRecorder(); - virtual std::string Snapshot(ctpl::thread_pool* pThreadPool) override; - virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, int numberOfImages) override; + virtual std::string Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override; + virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg, int numberOfImages) override; virtual std::string Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override; private: diff --git a/Recorder/FoscamRecorder.cpp b/Recorder/FoscamRecorder.cpp index e005128..8b97e33 100644 --- a/Recorder/FoscamRecorder.cpp +++ b/Recorder/FoscamRecorder.cpp @@ -22,7 +22,7 @@ FoscamRecorder::~FoscamRecorder() { } -std::string FoscamRecorder::Snapshot(ctpl::thread_pool* pThreadPool) +std::string FoscamRecorder::Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) { Logging::Log(Logging::Severity::Debug, "FoscamRecorder Snapshot"); @@ -36,7 +36,7 @@ std::string FoscamRecorder::Snapshot(ctpl::thread_pool* pThreadPool) return fileName; } -std::string FoscamRecorder::MultiSnapshot(ctpl::thread_pool* pThreadPool, int numberOfImages) +std::string FoscamRecorder::MultiSnapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg, int numberOfImages) { Logging::Log(Logging::Severity::Debug, "FoscamRecorder MultiSnapshot"); diff --git a/Recorder/FoscamRecorder.h b/Recorder/FoscamRecorder.h index ba5199b..023a83b 100644 --- a/Recorder/FoscamRecorder.h +++ b/Recorder/FoscamRecorder.h @@ -21,8 +21,8 @@ public: FoscamRecorder(Http::HttpClient* pHttpClient, const Settings& settings); ~FoscamRecorder(); - virtual std::string Snapshot(ctpl::thread_pool* pThreadPool) override; - virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, int numberOfImages) override; + virtual std::string Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override; + virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg, int numberOfImages) override; virtual std::string Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override; private: diff --git a/Recorder/Recorder.h b/Recorder/Recorder.h index 8da6784..ba0554e 100644 --- a/Recorder/Recorder.h +++ b/Recorder/Recorder.h @@ -14,8 +14,8 @@ public: Recorder(); ~Recorder(); - virtual std::string Snapshot(ctpl::thread_pool* pThreadPool) = 0; - virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, int numberOfImages) = 0; + virtual std::string Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) = 0; + virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg, int numberOfImages) = 0; virtual std::string Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) = 0; }; diff --git a/Recorder/VStarCamRecorder.cpp b/Recorder/VStarCamRecorder.cpp index 1f983e5..0475735 100644 --- a/Recorder/VStarCamRecorder.cpp +++ b/Recorder/VStarCamRecorder.cpp @@ -19,7 +19,7 @@ VStarCamRecorder::~VStarCamRecorder() { } -std::string VStarCamRecorder::Snapshot(ctpl::thread_pool* pThreadPool) +std::string VStarCamRecorder::Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) { Logging::Log(Logging::Severity::Debug, "VStarCamRecorder Snapshot"); @@ -33,7 +33,7 @@ std::string VStarCamRecorder::Snapshot(ctpl::thread_pool* pThreadPool) return fileName; } -std::string VStarCamRecorder::MultiSnapshot(ctpl::thread_pool* pThreadPool, int numberOfImages) +std::string VStarCamRecorder::MultiSnapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg, int numberOfImages) { Logging::Log(Logging::Severity::Debug, "VStarCamRecorder MultiSnapshot"); diff --git a/Recorder/VStarCamRecorder.h b/Recorder/VStarCamRecorder.h index e10fa7a..e5f9084 100644 --- a/Recorder/VStarCamRecorder.h +++ b/Recorder/VStarCamRecorder.h @@ -21,8 +21,8 @@ public: VStarCamRecorder(Http::HttpClient* pHttpClient, const Settings& settings); ~VStarCamRecorder(); - virtual std::string Snapshot(ctpl::thread_pool* pThreadPool) override; - virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, int numberOfImages) override; + virtual std::string Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override; + virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg, int numberOfImages) override; virtual std::string Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override; private: diff --git a/Recorder/WatchBotRecorder.cpp b/Recorder/WatchBotRecorder.cpp index 26e37de..8b2a657 100644 --- a/Recorder/WatchBotRecorder.cpp +++ b/Recorder/WatchBotRecorder.cpp @@ -22,7 +22,7 @@ WatchBotRecorder::~WatchBotRecorder() { } -std::string WatchBotRecorder::Snapshot(ctpl::thread_pool* pThreadPool) +std::string WatchBotRecorder::Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) { Logging::Log(Logging::Severity::Debug, "WatchBotRecorder Snapshot"); @@ -36,7 +36,7 @@ std::string WatchBotRecorder::Snapshot(ctpl::thread_pool* pThreadPool) return fileName; } -std::string WatchBotRecorder::MultiSnapshot(ctpl::thread_pool* pThreadPool, int numberOfImages) +std::string WatchBotRecorder::MultiSnapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg, int numberOfImages) { Logging::Log(Logging::Severity::Debug, "WatchBotRecorder MultiSnapshot"); diff --git a/Recorder/WatchBotRecorder.h b/Recorder/WatchBotRecorder.h index b7f6992..6d73813 100644 --- a/Recorder/WatchBotRecorder.h +++ b/Recorder/WatchBotRecorder.h @@ -21,8 +21,8 @@ public: WatchBotRecorder(Http::HttpClient* pHttpClient, const Settings& settings); ~WatchBotRecorder(); - virtual std::string Snapshot(ctpl::thread_pool* pThreadPool) override; - virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, int numberOfImages) override; + virtual std::string Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override; + virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg, int numberOfImages) override; virtual std::string Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override; private: diff --git a/Recorder/ZModoRecorder.cpp b/Recorder/ZModoRecorder.cpp index c9f9bd8..7846834 100644 --- a/Recorder/ZModoRecorder.cpp +++ b/Recorder/ZModoRecorder.cpp @@ -16,13 +16,13 @@ ZModoRecorder::~ZModoRecorder() { } -std::string ZModoRecorder::Snapshot(ctpl::thread_pool* pThreadPool) +std::string ZModoRecorder::Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) { Logging::Log(Logging::Severity::Debug, "ZModoRecorder Snapshot"); return std::string(); } -std::string ZModoRecorder::MultiSnapshot(ctpl::thread_pool* pThreadPool, int numberOfImages) +std::string ZModoRecorder::MultiSnapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg, int numberOfImages) { Logging::Log(Logging::Severity::Debug, "ZModoRecorder MultiSnapshot"); return std::string(); diff --git a/Recorder/ZModoRecorder.h b/Recorder/ZModoRecorder.h index 670860d..ff73687 100644 --- a/Recorder/ZModoRecorder.h +++ b/Recorder/ZModoRecorder.h @@ -20,8 +20,8 @@ public: ZModoRecorder(Http::HttpClient* pHttpClient, const Settings& settings); ~ZModoRecorder(); - virtual std::string Snapshot(ctpl::thread_pool* pThreadPool) override; - virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, int numberOfImages) override; + virtual std::string Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override; + virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg, int numberOfImages) override; virtual std::string Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override; private: