Files
2023-03-16 13:41:53 +01:00

43 lines
1.3 KiB
C++

#ifndef RECORDER_FOSCAMRECORDER_H
#define RECORDER_FOSCAMRECORDER_H
#include "Recorder.h"
#include "Settings.h"
#include <JpegImage.h>
namespace Http {
class HttpClient;
} // namespace Http
namespace CameraRecorder {
namespace Recorder {
class FoscamRecorder : public virtual Recorder
{
public:
FoscamRecorder(Http::HttpClient* pHttpClient, const Settings& settings, Util::RecorderMutexPointer pRecorderMutex);
~FoscamRecorder();
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:
static std::string GetFolderName(const Settings& settings);
static std::string GetFileName(const Settings& settings, const std::string& extension, const std::string& dateTimeString);
static void Snapshots(Http::HttpClient* pHttpClient, const Settings& settings, std::string dateTimeString, int numberOfImages);
static Image::JpegImage Snapshot(Http::HttpClient* pHttpClient, const Settings& settings);
private:
Http::HttpClient* m_pHttpClient;
Settings m_settings;
};
} // namespace Recorder
} // namespace CameraRecorder
#endif // RECORDER_FOSCAMRECORDER_H