-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrender.hh
55 lines (35 loc) · 1.11 KB
/
render.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include "nodes/node.hh"
#include "nodes/node_system.hh"
#include <vector>
#include <tuple>
namespace doanimate {
class Manager {
std::vector<size_t> inputs;
std::vector<size_t> outputs;
public:
nodes::NodeSystem* system;
float frames_per_second;
size_t width;
size_t height;
size_t audio_chunk_length;
float audio_chunks_per_second;
size_t frames;
Manager(nodes::NodeSystem*);
};
struct Image {
std::vector<std::tuple<unsigned char, unsigned char, unsigned char>> data;
size_t width;
size_t height;
};
using AudioChunk = std::vector<float>;
void add_time_input(Manager&);
void audio_time_input(Manager&);
void add_info_input(Manager&);
void image_output(Manager&);
void audio_output(Manager&);
Image render_image(Manager&);
std::vector<Image> render_animation(Manager&);
AudioChunk render_audio_chunk(Manager&);
std::vector<AudioChunk> render_audio(Manager&);
std::pair<std::vector<Image>, std::vector<AudioChunk>> render_video(Manager&);
}