]> git.sesse.net Git - movit/blob - input.h
Make init_movit() return a true/false error value.
[movit] / input.h
1 #ifndef _MOVIT_INPUT_H
2 #define _MOVIT_INPUT_H 1
3
4 #include <assert.h>
5
6 #include "effect.h"
7 #include "image_format.h"
8
9 // An input is a degenerate case of an effect; it represents the picture data
10 // that comes from the user. As such, it has zero “inputs” itself.
11 //
12 // An input is, like any other effect, required to be able to output a GLSL
13 // fragment giving a RGBA value (although that GLSL fragment will have zero
14 // inputs itself), and set the required OpenGL state on set_gl_state(),
15 // including possibly uploading the texture if so required.
16 class Input : public Effect {
17 public:
18         virtual unsigned num_inputs() const { return 0; }
19
20         // Whether this input can deliver linear gamma directly if it's
21         // asked to. (If so, set the parameter “output_linear_gamma”
22         // to activate it.)
23         virtual bool can_output_linear_gamma() const = 0;
24
25         virtual unsigned get_width() const = 0;
26         virtual unsigned get_height() const = 0;
27         virtual Colorspace get_color_space() const = 0;
28         virtual GammaCurve get_gamma_curve() const = 0;
29 };
30
31 #endif // !defined(_MOVIT_INPUT_H)