]> git.sesse.net Git - nageru/blob - image_input.h
Make audio input source selectable.
[nageru] / image_input.h
1 #ifndef _IMAGE_INPUT_H
2 #define _IMAGE_INPUT_H 1
3
4 #include <map>
5 #include <memory>
6 #include <string>
7
8 #include <movit/flat_input.h>
9
10 // An output that takes its input from a static image, loaded with ffmpeg.
11 // comes from a single 2D array with chunky pixels.
12 class ImageInput : public movit::FlatInput {
13 public:
14         ImageInput(const std::string &filename);
15
16         std::string effect_type_id() const override { return "ImageInput"; }
17
18 private:
19         static const uint8_t *load_image(const std::string &filename);
20         static std::map<std::string, std::unique_ptr<uint8_t[]>> all_images;
21 };
22
23 #endif // !defined(_IMAGE_INPUT_H)