7 #include "colorpicker.h"
9 #include "loadbalance.h"
10 #include "pluginvclient.h"
15 class ChromaKeyWindow
;
22 void copy_from(ChromaKeyConfig
&src
);
23 int equivalent(ChromaKeyConfig
&src
);
24 void interpolate(ChromaKeyConfig
&prev
,
25 ChromaKeyConfig
&next
,
28 int64_t current_frame
);
39 class ChromaKeyColor
: public BC_GenericButton
42 ChromaKeyColor(ChromaKey
*plugin
,
53 class ChromaKeyThreshold
: public BC_FSlider
56 ChromaKeyThreshold(ChromaKey
*plugin
, int x
, int y
);
60 class ChromaKeySlope
: public BC_FSlider
63 ChromaKeySlope(ChromaKey
*plugin
, int x
, int y
);
67 class ChromaKeyUseValue
: public BC_CheckBox
70 ChromaKeyUseValue(ChromaKey
*plugin
, int x
, int y
);
75 class ChromaKeyUseColorPicker
: public BC_GenericButton
78 ChromaKeyUseColorPicker(ChromaKey
*plugin
, ChromaKeyWindow
*gui
, int x
, int y
);
85 class ChromaKeyColorThread
: public ColorThread
88 ChromaKeyColorThread(ChromaKey
*plugin
, ChromaKeyWindow
*gui
);
89 int handle_new_color(int output
, int alpha
);
95 class ChromaKeyWindow
: public BC_Window
98 ChromaKeyWindow(ChromaKey
*plugin
, int x
, int y
);
101 void create_objects();
103 void update_sample();
105 ChromaKeyColor
*color
;
106 ChromaKeyThreshold
*threshold
;
107 ChromaKeyUseValue
*use_value
;
108 ChromaKeyUseColorPicker
*use_colorpicker
;
109 ChromaKeySlope
*slope
;
110 BC_SubWindow
*sample
;
112 ChromaKeyColorThread
*color_thread
;
117 PLUGIN_THREAD_HEADER(ChromaKey
, ChromaKeyThread
, ChromaKeyWindow
)
120 class ChromaKeyServer
: public LoadServer
123 ChromaKeyServer(ChromaKey
*plugin
);
124 void init_packages();
125 LoadClient
* new_client();
126 LoadPackage
* new_package();
130 class ChromaKeyPackage
: public LoadPackage
137 class ChromaKeyUnit
: public LoadClient
140 ChromaKeyUnit(ChromaKey
*plugin
, ChromaKeyServer
*server
);
141 void process_package(LoadPackage
*package
);
148 class ChromaKey
: public PluginVClient
151 ChromaKey(PluginServer
*server
);
154 int process_realtime(VFrame
*input
, VFrame
*output
);
156 char* plugin_title();
158 int load_configuration();
161 void save_data(KeyFrame
*keyframe
);
162 void read_data(KeyFrame
*keyframe
);
168 ChromaKeyConfig config
;
169 VFrame
*input
, *output
;
170 ChromaKeyServer
*engine
;
171 ChromaKeyThread
*thread
;