Virtual Testbed
Ship dynamics simulator for extreme conditions
TheoraRecorder.hh
1 #ifndef VTESTBED_GUI_THEORARECORDER_HH
2 #define VTESTBED_GUI_THEORARECORDER_HH
3 
4 #include <string>
5 #include <vector>
6 
7 #include <theorax/theora_encoder.hh>
8 #include <vtestbed/gui/ScreenRecorder.hh>
9 
10 namespace vtb {
11 
12  namespace gui {
13 
15 
16  private:
17  thx::theora_encoder _encoder;
19  int _width = 0, _height = 0;
20  std::string _filename = "out.ogv";
21 
22  public:
23  TheoraRecorder(int width, int height);
24  ~TheoraRecorder();
25  void recordFrame() override;
26  void flush(bool last);
27  inline void filename(const std::string& rhs) { this->_filename = rhs; }
28  inline const std::string& filename() const { return this->_filename; }
29 
30  };
31 
32  }
33 
34 }
35 
36 #endif // vim:filetype=cpp
Main namespace.
Definition: convert.hh:9