]> git.sesse.net Git - nageru/blob - mixer.h
Hook up the cut button to something that is not really cut, but is more useful than...
[nageru] / mixer.h
1 #ifndef _MIXER_H
2 #define _MIXER_H 1
3
4 #include "ref_counted_gl_sync.h"
5
6 class QSurface;
7 void start_mixer(QSurface *surface, QSurface *surface2, QSurface *surface3, QSurface *surface4);
8 void mixer_quit();
9
10 enum Source {
11         SOURCE_INPUT1,
12         SOURCE_INPUT2,
13         SOURCE_SBS,
14 };
15 void mixer_cut(Source source);
16
17 struct DisplayFrame {
18         GLuint texnum;
19         RefCountedGLsync ready_fence;  // Asserted when the texture is done rendering.
20 };
21 bool mixer_get_display_frame(DisplayFrame *frame);  // Implicitly frees the previous one if there's a new frame available.
22
23 typedef std::function<void()> new_frame_ready_callback_t;
24 void set_frame_ready_fallback(new_frame_ready_callback_t callback);
25
26 #endif  // !defined(_MIXER_H)