Add MultiSnapshot
This commit is contained in:
+41
-34
@@ -1,34 +1,41 @@
|
||||
#ifndef RECORDER_WATCHBOTRECORDER_H
|
||||
#define RECORDER_WATCHBOTRECORDER_H
|
||||
|
||||
#include "Recorder.h"
|
||||
#include "Settings.h"
|
||||
|
||||
|
||||
namespace Http {
|
||||
|
||||
class HttpClient;
|
||||
|
||||
} // namespace Http
|
||||
|
||||
namespace CameraRecorder {
|
||||
namespace Recorder {
|
||||
|
||||
class WatchBotRecorder : public virtual Recorder
|
||||
{
|
||||
public:
|
||||
WatchBotRecorder(Http::HttpClient* pHttpClient, const Settings& settings);
|
||||
~WatchBotRecorder();
|
||||
|
||||
virtual std::string Snapshot(ctpl::thread_pool* pThreadPool) override;
|
||||
virtual std::string Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override;
|
||||
|
||||
private:
|
||||
Http::HttpClient* m_pHttpClient;
|
||||
Settings m_settings;
|
||||
};
|
||||
|
||||
} // namespace Recorder
|
||||
} // namespace CameraRecorder
|
||||
|
||||
#endif // RECORDER_WATCHBOTRECORDER_H
|
||||
#ifndef RECORDER_WATCHBOTRECORDER_H
|
||||
#define RECORDER_WATCHBOTRECORDER_H
|
||||
|
||||
#include "Recorder.h"
|
||||
#include "Settings.h"
|
||||
#include <JpegImage.h>
|
||||
|
||||
|
||||
namespace Http {
|
||||
|
||||
class HttpClient;
|
||||
|
||||
} // namespace Http
|
||||
|
||||
namespace CameraRecorder {
|
||||
namespace Recorder {
|
||||
|
||||
class WatchBotRecorder : public virtual Recorder
|
||||
{
|
||||
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 Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override;
|
||||
|
||||
private:
|
||||
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_WATCHBOTRECORDER_H
|
||||
|
||||
Reference in New Issue
Block a user