WatchBotRecorder.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef RECORDER_WATCHBOTRECORDER_H
  2. #define RECORDER_WATCHBOTRECORDER_H
  3. #include "Recorder.h"
  4. #include "Settings.h"
  5. #include <JpegImage.h>
  6. namespace Http {
  7. class HttpClient;
  8. } // namespace Http
  9. namespace CameraRecorder {
  10. namespace Recorder {
  11. class WatchBotRecorder : public virtual Recorder
  12. {
  13. public:
  14. WatchBotRecorder(Http::HttpClient* pHttpClient, const Settings& settings, Util::RecorderMutexPointer pRecorderMutex);
  15. ~WatchBotRecorder();
  16. virtual std::string Snapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override;
  17. virtual std::string MultiSnapshot(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg, int numberOfImages) override;
  18. virtual std::string Video(ctpl::thread_pool* pThreadPool, const std::string& ffmpeg) override;
  19. private:
  20. static std::string GetFolderName(const Settings& settings);
  21. static std::string GetFileName(const Settings& settings, const std::string& extension, const std::string& dateTimeString);
  22. static void Snapshots(Http::HttpClient* pHttpClient, const Settings& settings, std::string dateTimeString, int numberOfImages);
  23. static Image::JpegImage Snapshot(Http::HttpClient* pHttpClient, const Settings& settings);
  24. private:
  25. Http::HttpClient* m_pHttpClient;
  26. Settings m_settings;
  27. };
  28. } // namespace Recorder
  29. } // namespace CameraRecorder
  30. #endif // RECORDER_WATCHBOTRECORDER_H