VStarCamRecorder.h 1.2 KB

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