#include <lauxlib.h>
#include <lua.h>
#include <movit/effect_chain.h>
+#include <movit/deinterlace_effect.h>
#include <movit/ycbcr_input.h>
#include <stdbool.h>
#include <stdio.h>
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);
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];
+ }
}
- // Of last connected signal number (see connect_signal()).
- // Only valid during get_chain() or the setup callback.
- unsigned get_width() const;
- unsigned get_height() const;
-
private:
Theme *theme; // Not owned by us.
- movit::YCbCrInput *input; // Owned by the chain.
- int last_connected_signal_num = -1;
+ std::vector<movit::YCbCrInput *> inputs; // Multiple ones if deinterlacing. Owned by the chain.
+ movit::Effect *deinterlace_effect = nullptr; // Owned by the chain.
+ bool deinterlace;
};
#endif // !defined(_THEME_H)