#ifndef _THEME_H
#define _THEME_H 1
-#include <epoxy/gl.h>
#include <lua.hpp>
-#include <movit/effect_chain.h>
-#include <movit/deinterlace_effect.h>
#include <movit/ycbcr_input.h>
#include <stdbool.h>
-#include <stdio.h>
#include <functional>
+#include <map>
#include <mutex>
-#include <set>
#include <string>
-#include <utility>
#include <vector>
-#include "defs.h"
-#include "input_state.h"
#include "ref_counted_frame.h"
+struct InputState;
+
namespace movit {
class ResourcePool;
+class Effect;
+class EffectChain;
struct ImageFormat;
struct YCbCrFormat;
} // namespace movit
class Theme {
public:
- Theme(const char *filename, movit::ResourcePool *resource_pool, unsigned num_cards);
+ Theme(const std::string &filename, const std::vector<std::string> &search_dirs, movit::ResourcePool *resource_pool, unsigned num_cards);
~Theme();
struct Chain {
int get_channel_signal(unsigned channel);
bool get_supports_set_wb(unsigned channel);
void set_wb(unsigned channel, double r, double g, double b);
+ std::string get_channel_color(unsigned channel);
std::vector<std::string> get_transition_names(float t);
friend class LiveInputWrapper;
};
+// LiveInputWrapper is a facade on top of an YCbCrInput, exposed to
+// the Lua code. It contains a function (connect_signal()) intended
+// to be called during chain setup, that picks out the current frame
+// (in the form of a set of textures) from the input state given by
+// the mixer, and communicates that state over to the actual YCbCrInput.
class LiveInputWrapper {
public:
LiveInputWrapper(Theme *theme, movit::EffectChain *chain, bool override_bounce, bool deinterlace);