X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=theme.h;h=48039734a840f58f90924b514eeaaf27f1f61657;hb=c667195e19ec9898b21cc5ebfa29dc8804ec96ad;hp=b60df1490190059fb0a0900ed543aab6fa0b7266;hpb=2b806ed340112b4b464b6f2b9c34e4873de5f1c5;p=nageru diff --git a/theme.h b/theme.h index b60df14..4803973 100644 --- a/theme.h +++ b/theme.h @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include @@ -39,6 +40,7 @@ public: class Theme { public: Theme(const char *filename, movit::ResourcePool *resource_pool, unsigned num_cards); + ~Theme(); struct Chain { movit::EffectChain *chain; @@ -62,6 +64,8 @@ public: void transition_clicked(int transition_num, float t); void channel_clicked(int preview_num); + movit::ResourcePool *get_resource_pool() const { return resource_pool; } + private: void register_class(const char *class_name, const luaL_Reg *funcs); @@ -78,17 +82,23 @@ private: class LiveInputWrapper { public: - LiveInputWrapper(Theme *theme, movit::EffectChain *chain, bool override_bounce); + LiveInputWrapper(Theme *theme, movit::EffectChain *chain, bool override_bounce, bool deinterlace); void connect_signal(int signal_num); - movit::YCbCrInput *get_input() const + movit::Effect *get_effect() const { - return input; + if (deinterlace) { + return deinterlace_effect; + } else { + return inputs[0]; + } } private: Theme *theme; // Not owned by us. - movit::YCbCrInput *input; // Owned by the chain. + std::vector inputs; // Multiple ones if deinterlacing. Owned by the chain. + movit::Effect *deinterlace_effect = nullptr; // Owned by the chain. + bool deinterlace; }; #endif // !defined(_THEME_H)