Add RecorderMutex
This commit is contained in:
+7
-7
@@ -30,7 +30,7 @@ WebAPI::~WebAPI()
|
||||
{
|
||||
}
|
||||
|
||||
Http::HttpServer::HttpReply WebAPI::ProcessQuery(ctpl::thread_pool* pThreadPool, Http::HttpClient* pHttpClient, const std::string& path, const std::string& ffmpeg, const std::string& uri, const std::vector<Http::HttpPostData>& postData)
|
||||
Http::HttpServer::HttpReply WebAPI::ProcessQuery(ctpl::thread_pool* pThreadPool, Http::HttpClient* pHttpClient, Util::RecorderMutexPointer pRecorderMutex, const std::string& path, const std::string& ffmpeg, const std::string& uri, const std::vector<Http::HttpPostData>& postData)
|
||||
{
|
||||
if (!StringAlgorithm::iequals(uri, "/api") && !StringAlgorithm::istarts_with(uri, "/api/"))
|
||||
{
|
||||
@@ -69,7 +69,7 @@ Http::HttpServer::HttpReply WebAPI::ProcessQuery(ctpl::thread_pool* pThreadPool,
|
||||
reply.status = Http::HttpServer::HttpReply::Status::Ok;
|
||||
if (StringAlgorithm::iequals("Digoo", brand))
|
||||
{
|
||||
auto recorder = Recorder::DigooRecorder(pHttpClient, settings);
|
||||
auto recorder = Recorder::DigooRecorder(pHttpClient, settings, pRecorderMutex);
|
||||
if (StringAlgorithm::iequals("Snapshot", action))
|
||||
reply.content = recorder.Snapshot(pThreadPool, ffmpeg);
|
||||
else if (StringAlgorithm::iequals("MultiSnapshot", action))
|
||||
@@ -79,7 +79,7 @@ Http::HttpServer::HttpReply WebAPI::ProcessQuery(ctpl::thread_pool* pThreadPool,
|
||||
}
|
||||
else if (StringAlgorithm::iequals("Foscam", brand))
|
||||
{
|
||||
auto recorder = Recorder::FoscamRecorder(pHttpClient, settings);
|
||||
auto recorder = Recorder::FoscamRecorder(pHttpClient, settings, pRecorderMutex);
|
||||
if (StringAlgorithm::iequals("Snapshot", action))
|
||||
reply.content = recorder.Snapshot(pThreadPool, ffmpeg);
|
||||
else if (StringAlgorithm::iequals("MultiSnapshot", action))
|
||||
@@ -89,7 +89,7 @@ Http::HttpServer::HttpReply WebAPI::ProcessQuery(ctpl::thread_pool* pThreadPool,
|
||||
}
|
||||
else if (StringAlgorithm::iequals("RTSP", brand))
|
||||
{
|
||||
auto recorder = Recorder::RTSPRecorder(pHttpClient, settings);
|
||||
auto recorder = Recorder::RTSPRecorder(pHttpClient, settings, pRecorderMutex);
|
||||
if (StringAlgorithm::iequals("Snapshot", action))
|
||||
reply.content = recorder.Snapshot(pThreadPool, ffmpeg);
|
||||
else if (StringAlgorithm::iequals("MultiSnapshot", action))
|
||||
@@ -99,7 +99,7 @@ Http::HttpServer::HttpReply WebAPI::ProcessQuery(ctpl::thread_pool* pThreadPool,
|
||||
}
|
||||
else if (StringAlgorithm::iequals("VStarCam", brand))
|
||||
{
|
||||
auto recorder = Recorder::VStarCamRecorder(pHttpClient, settings);
|
||||
auto recorder = Recorder::VStarCamRecorder(pHttpClient, settings, pRecorderMutex);
|
||||
if (StringAlgorithm::iequals("Snapshot", action))
|
||||
reply.content = recorder.Snapshot(pThreadPool, ffmpeg);
|
||||
else if (StringAlgorithm::iequals("MultiSnapshot", action))
|
||||
@@ -109,7 +109,7 @@ Http::HttpServer::HttpReply WebAPI::ProcessQuery(ctpl::thread_pool* pThreadPool,
|
||||
}
|
||||
else if (StringAlgorithm::iequals("WatchBot", brand))
|
||||
{
|
||||
auto recorder = Recorder::WatchBotRecorder(pHttpClient, settings);
|
||||
auto recorder = Recorder::WatchBotRecorder(pHttpClient, settings, pRecorderMutex);
|
||||
if (StringAlgorithm::iequals("Snapshot", action))
|
||||
reply.content = recorder.Snapshot(pThreadPool, ffmpeg);
|
||||
else if (StringAlgorithm::iequals("MultiSnapshot", action))
|
||||
@@ -119,7 +119,7 @@ Http::HttpServer::HttpReply WebAPI::ProcessQuery(ctpl::thread_pool* pThreadPool,
|
||||
}
|
||||
else if (StringAlgorithm::iequals("ZModo", brand))
|
||||
{
|
||||
auto recorder = Recorder::ZModoRecorder(pHttpClient, settings);
|
||||
auto recorder = Recorder::ZModoRecorder(pHttpClient, settings, pRecorderMutex);
|
||||
if (StringAlgorithm::iequals("Snapshot", action))
|
||||
reply.content = recorder.Snapshot(pThreadPool, ffmpeg);
|
||||
else if (StringAlgorithm::iequals("MultiSnapshot", action))
|
||||
|
||||
Reference in New Issue
Block a user