Add FFMPEG Configuration

This commit is contained in:
2021-07-28 15:54:41 +02:00
parent 1401fff529
commit e176383ffa
12 changed files with 31 additions and 31 deletions
+9 -9
View File
@@ -66,9 +66,9 @@ Http::HttpServer::HttpReply WebAPI::ProcessQuery(ctpl::thread_pool* pThreadPool,
{ {
auto recorder = Recorder::DigooRecorder(pHttpClient, settings); auto recorder = Recorder::DigooRecorder(pHttpClient, settings);
if (StringAlgorithm::iequals("Snapshot", action)) if (StringAlgorithm::iequals("Snapshot", action))
reply.content = recorder.Snapshot(pThreadPool); reply.content = recorder.Snapshot(pThreadPool, ffmpeg);
else if (StringAlgorithm::iequals("MultiSnapshot", action)) 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)) else if (StringAlgorithm::iequals("Video", action))
reply.content = recorder.Video(pThreadPool, ffmpeg); 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); auto recorder = Recorder::FoscamRecorder(pHttpClient, settings);
if (StringAlgorithm::iequals("Snapshot", action)) if (StringAlgorithm::iequals("Snapshot", action))
reply.content = recorder.Snapshot(pThreadPool); reply.content = recorder.Snapshot(pThreadPool, ffmpeg);
else if (StringAlgorithm::iequals("MultiSnapshot", action)) else if (StringAlgorithm::iequals("MultiSnapshot", action))
reply.content = recorder.MultiSnapshot(pThreadPool, numberOfImages); reply.content = recorder.MultiSnapshot(pThreadPool, numberOfImages);
else if (StringAlgorithm::iequals("Video", action)) 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); auto recorder = Recorder::VStarCamRecorder(pHttpClient, settings);
if (StringAlgorithm::iequals("Snapshot", action)) if (StringAlgorithm::iequals("Snapshot", action))
reply.content = recorder.Snapshot(pThreadPool); reply.content = recorder.Snapshot(pThreadPool, ffmpeg);
else if (StringAlgorithm::iequals("MultiSnapshot", action)) 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)) else if (StringAlgorithm::iequals("Video", action))
reply.content = recorder.Video(pThreadPool, ffmpeg); 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); auto recorder = Recorder::WatchBotRecorder(pHttpClient, settings);
if (StringAlgorithm::iequals("Snapshot", action)) if (StringAlgorithm::iequals("Snapshot", action))
reply.content = recorder.Snapshot(pThreadPool); reply.content = recorder.Snapshot(pThreadPool, ffmpeg);
else if (StringAlgorithm::iequals("MultiSnapshot", action)) 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)) else if (StringAlgorithm::iequals("Video", action))
reply.content = recorder.Video(pThreadPool, ffmpeg); 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); auto recorder = Recorder::ZModoRecorder(pHttpClient, settings);
if (StringAlgorithm::iequals("Snapshot", action)) if (StringAlgorithm::iequals("Snapshot", action))
reply.content = recorder.Snapshot(pThreadPool); reply.content = recorder.Snapshot(pThreadPool, ffmpeg);
else if (StringAlgorithm::iequals("MultiSnapshot", action)) 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)) else if (StringAlgorithm::iequals("Video", action))
reply.content = recorder.Video(pThreadPool, ffmpeg); reply.content = recorder.Video(pThreadPool, ffmpeg);
} }
+2 -2
View File
@@ -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"); Logging::Log(Logging::Severity::Debug, "DigooRecorder Snapshot");
return std::string(); 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"); Logging::Log(Logging::Severity::Debug, "DigooRecorder MultiSnapshot");
return std::string(); return std::string();
+2 -2
View File
@@ -20,8 +20,8 @@ public:
DigooRecorder(Http::HttpClient* pHttpClient, const Settings& settings); DigooRecorder(Http::HttpClient* pHttpClient, const Settings& settings);
~DigooRecorder(); ~DigooRecorder();
virtual std::string Snapshot(ctpl::thread_pool* pThreadPool) override; virtual std::string Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override;
virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, int numberOfImages) 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; virtual std::string Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override;
private: private:
+2 -2
View File
@@ -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"); Logging::Log(Logging::Severity::Debug, "FoscamRecorder Snapshot");
@@ -36,7 +36,7 @@ std::string FoscamRecorder::Snapshot(ctpl::thread_pool* pThreadPool)
return fileName; 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"); Logging::Log(Logging::Severity::Debug, "FoscamRecorder MultiSnapshot");
+2 -2
View File
@@ -21,8 +21,8 @@ public:
FoscamRecorder(Http::HttpClient* pHttpClient, const Settings& settings); FoscamRecorder(Http::HttpClient* pHttpClient, const Settings& settings);
~FoscamRecorder(); ~FoscamRecorder();
virtual std::string Snapshot(ctpl::thread_pool* pThreadPool) override; virtual std::string Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override;
virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, int numberOfImages) 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; virtual std::string Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override;
private: private:
+2 -2
View File
@@ -14,8 +14,8 @@ public:
Recorder(); Recorder();
~Recorder(); ~Recorder();
virtual std::string Snapshot(ctpl::thread_pool* pThreadPool) = 0; virtual std::string Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) = 0;
virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, int numberOfImages) = 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; virtual std::string Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) = 0;
}; };
+2 -2
View File
@@ -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"); Logging::Log(Logging::Severity::Debug, "VStarCamRecorder Snapshot");
@@ -33,7 +33,7 @@ std::string VStarCamRecorder::Snapshot(ctpl::thread_pool* pThreadPool)
return fileName; 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"); Logging::Log(Logging::Severity::Debug, "VStarCamRecorder MultiSnapshot");
+2 -2
View File
@@ -21,8 +21,8 @@ public:
VStarCamRecorder(Http::HttpClient* pHttpClient, const Settings& settings); VStarCamRecorder(Http::HttpClient* pHttpClient, const Settings& settings);
~VStarCamRecorder(); ~VStarCamRecorder();
virtual std::string Snapshot(ctpl::thread_pool* pThreadPool) override; virtual std::string Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override;
virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, int numberOfImages) 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; virtual std::string Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override;
private: private:
+2 -2
View File
@@ -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"); Logging::Log(Logging::Severity::Debug, "WatchBotRecorder Snapshot");
@@ -36,7 +36,7 @@ std::string WatchBotRecorder::Snapshot(ctpl::thread_pool* pThreadPool)
return fileName; 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"); Logging::Log(Logging::Severity::Debug, "WatchBotRecorder MultiSnapshot");
+2 -2
View File
@@ -21,8 +21,8 @@ public:
WatchBotRecorder(Http::HttpClient* pHttpClient, const Settings& settings); WatchBotRecorder(Http::HttpClient* pHttpClient, const Settings& settings);
~WatchBotRecorder(); ~WatchBotRecorder();
virtual std::string Snapshot(ctpl::thread_pool* pThreadPool) override; virtual std::string Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override;
virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, int numberOfImages) 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; virtual std::string Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override;
private: private:
+2 -2
View File
@@ -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"); Logging::Log(Logging::Severity::Debug, "ZModoRecorder Snapshot");
return std::string(); 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"); Logging::Log(Logging::Severity::Debug, "ZModoRecorder MultiSnapshot");
return std::string(); return std::string();
+2 -2
View File
@@ -20,8 +20,8 @@ public:
ZModoRecorder(Http::HttpClient* pHttpClient, const Settings& settings); ZModoRecorder(Http::HttpClient* pHttpClient, const Settings& settings);
~ZModoRecorder(); ~ZModoRecorder();
virtual std::string Snapshot(ctpl::thread_pool* pThreadPool) override; virtual std::string Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override;
virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, int numberOfImages) 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; virtual std::string Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override;
private: private: