Virtual Testbed
Ship dynamics simulator for extreme conditions
src
vtestbed
gui
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
14
class
TheoraRecorder
:
public
ScreenRecorder
{
15
16
private
:
17
thx::theora_encoder _encoder;
18
std::vector<unsigned char>
_rgba;
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
vtb::gui::ScreenRecorder
Definition:
ScreenRecorder.hh:8
std::string
vtb::gui::TheoraRecorder
Definition:
TheoraRecorder.hh:14
vtb
Main namespace.
Definition:
convert.hh:9
std::vector< unsigned char >
Generated by
1.8.15