Преглед на файлове

Add FFMPEG Configuration

JDierkse преди 4 години
родител
ревизия
e176383ffa

+ 9 - 9
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);
 	}

+ 2 - 2
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();

+ 2 - 2
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:

+ 2 - 2
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");
 

+ 2 - 2
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:

+ 2 - 2
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;
 };
 

+ 2 - 2
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");
 

+ 2 - 2
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:

+ 2 - 2
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");
 

+ 2 - 2
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:

+ 2 - 2
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();

+ 2 - 2
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: