#include "bmusb/bmusb.h"
#include "ref_counted_frame.h"
+#include "tweaked_inputs.h"
+class FFmpegCapture;
+class LiveInputWrapper;
struct InputState;
namespace movit {
class Effect;
class EffectChain;
class ResourcePool;
-struct ImageFormat;
-struct YCbCrFormat;
} // namespace movit
-class NonBouncingYCbCrInput : public movit::YCbCrInput {
-public:
- NonBouncingYCbCrInput(const movit::ImageFormat &image_format,
- const movit::YCbCrFormat &ycbcr_format,
- unsigned width, unsigned height,
- movit::YCbCrInputSplitting ycbcr_input_splitting = movit::YCBCR_INPUT_PLANAR)
- : movit::YCbCrInput(image_format, ycbcr_format, width, height, ycbcr_input_splitting) {}
-
- bool override_disable_bounce() const override { return true; }
-};
-
class Theme {
public:
Theme(const std::string &filename, const std::vector<std::string> &search_dirs, movit::ResourcePool *resource_pool, unsigned num_cards);
movit::ResourcePool *get_resource_pool() const { return resource_pool; }
+ // Should be called as part of VideoInput.new() only.
+ void register_video_input(FFmpegCapture *capture)
+ {
+ video_inputs.push_back(capture);
+ }
+
+ std::vector<FFmpegCapture *> get_video_inputs() const
+ {
+ return video_inputs;
+ }
+
+ void register_signal_connection(LiveInputWrapper *live_input, FFmpegCapture *capture)
+ {
+ signal_connections.emplace_back(live_input, capture);
+ }
+
+ std::vector<std::pair<LiveInputWrapper *, FFmpegCapture *>> get_signal_connections() const
+ {
+ return signal_connections;
+ }
+
private:
void register_class(const char *class_name, const luaL_Reg *funcs);
std::mutex map_m;
std::map<int, int> signal_to_card_mapping; // Protected by <map_m>.
+ std::vector<FFmpegCapture *> video_inputs;
+ std::vector<std::pair<LiveInputWrapper *, FFmpegCapture *>> signal_connections;
+
friend class LiveInputWrapper;
};
LiveInputWrapper(Theme *theme, movit::EffectChain *chain, bmusb::PixelFormat pixel_format, bool override_bounce, bool deinterlace);
void connect_signal(int signal_num);
+ void connect_signal_raw(int signal_num);
movit::Effect *get_effect() const
{
if (deinterlace) {