7 #include <movit/effect_chain.h>
8 #include <movit/ycbcr_input.h>
19 #include "ref_counted_frame.h"
27 class NonBouncingYCbCrInput : public movit::YCbCrInput {
29 NonBouncingYCbCrInput(const movit::ImageFormat &image_format,
30 const movit::YCbCrFormat &ycbcr_format,
31 unsigned width, unsigned height,
32 movit::YCbCrInputSplitting ycbcr_input_splitting = movit::YCBCR_INPUT_PLANAR)
33 : movit::YCbCrInput(image_format, ycbcr_format, width, height, ycbcr_input_splitting) {}
35 bool override_disable_bounce() const override { return true; }
40 Theme(const char *filename, movit::ResourcePool *resource_pool, unsigned num_cards);
43 movit::EffectChain *chain;
44 std::function<void()> setup_chain;
46 // May have duplicates.
47 std::vector<RefCountedFrame> input_frames;
50 Chain get_chain(unsigned num, float t, unsigned width, unsigned height);
52 int get_num_channels() const { return num_channels; }
53 int map_signal(int signal_num);
54 std::string get_channel_name(unsigned channel);
55 bool get_supports_set_wb(unsigned channel);
56 void set_wb(unsigned channel, double r, double g, double b);
58 std::vector<std::string> get_transition_names(float t);
60 void connect_signal(movit::YCbCrInput *input, int signal_num);
61 void transition_clicked(int transition_num, float t);
62 void channel_clicked(int preview_num);
65 void register_class(const char *class_name, const luaL_Reg *funcs);
69 movit::ResourcePool *resource_pool;
72 std::set<int> signals_warned_about;
74 // All input frames needed for the current chain. Filled during call to get_chain(),
75 // as inputs get connected.
76 std::vector<RefCountedFrame> *used_input_frames_collector;
77 friend class LiveInputWrapper;
80 class LiveInputWrapper {
82 LiveInputWrapper(Theme *theme, movit::EffectChain *chain, bool override_bounce);
84 void connect_signal(int signal_num);
85 movit::YCbCrInput *get_input() const
91 Theme *theme; // Not owned by us.
92 movit::YCbCrInput *input; // Owned by the chain.
93 int connected_signal_num = 0;
96 #endif // !defined(_THEME_H)