From da3bc860f66d34f233028e819beee32dd1c43dd8 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 18 Jan 2018 16:49:54 -0500 Subject: Modernized project This rewrite brings the codebase of this project more in line with the format of the other bots, including things like C++ randomization, better abstraction, use of exceptions, etc. Notably, any FFMPEG objects that get allocated are wrapped in simple objects so that they get properly destroyed if an exception is thrown. Some more error detection and cleanliness stuff can probably be done but my wrists really hurt. Also updated librawr, and thus also removed the yaml-cpp submodule. --- director.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 director.h (limited to 'director.h') diff --git a/director.h b/director.h new file mode 100644 index 0000000..f00f2ee --- /dev/null +++ b/director.h @@ -0,0 +1,31 @@ +#ifndef DIRECTOR_H_9DFD929C +#define DIRECTOR_H_9DFD929C + +#include +#include +#include +#include +#include + +class ffmpeg_error : public std::runtime_error { +public: + + ffmpeg_error(std::string msg) : std::runtime_error(msg) + { + } +}; + +class director { +public: + + director(std::string videosPath); + + Magick::Image generate(std::mt19937& rng) const; + +private: + + std::string videosPath_; + std::vector videos_; +}; + +#endif /* end of include guard: DIRECTOR_H_9DFD929C */ -- cgit 1.4.1