r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / plugins / chromakey / chromakey.h
blob445bad16ca7a61f4fa0f3b4c514dc1e57a8e5f30
1 #ifndef CHROMAKEY_H
2 #define CHROMAKEY_H
7 #include "guicast.h"
8 #include "loadbalance.h"
9 #include "pluginvclient.h"
12 class ChromaKey;
13 class ChromaKeyWindow;
16 class ChromaKeyConfig
18 public:
19 ChromaKeyConfig();
21 void copy_from(ChromaKeyConfig &src);
22 int equivalent(ChromaKeyConfig &src);
23 void interpolate(ChromaKeyConfig &prev,
24 ChromaKeyConfig &next,
25 int64_t prev_frame,
26 int64_t next_frame,
27 int64_t current_frame);
29 float hue;
30 float threshold;
31 float value;
32 float slope;
33 int use_value;
36 class ChromaKeyHue : public BC_FSlider
38 public:
39 ChromaKeyHue(ChromaKey *plugin, int x, int y);
40 int handle_event();
41 ChromaKey *plugin;
43 class ChromaKeyThreshold : public BC_FSlider
45 public:
46 ChromaKeyThreshold(ChromaKey *plugin, int x, int y);
47 int handle_event();
48 ChromaKey *plugin;
50 class ChromaKeyValue : public BC_FSlider
52 public:
53 ChromaKeyValue(ChromaKey *plugin, int x, int y);
54 int handle_event();
55 ChromaKey *plugin;
57 class ChromaKeySlope : public BC_FSlider
59 public:
60 ChromaKeySlope(ChromaKey *plugin, int x, int y);
61 int handle_event();
62 ChromaKey *plugin;
64 class ChromaKeyUseValue : public BC_CheckBox
66 public:
67 ChromaKeyUseValue(ChromaKey *plugin, int x, int y);
68 int handle_event();
69 ChromaKey *plugin;
72 class ChromaKeyWindow : public BC_Window
74 public:
75 ChromaKeyWindow(ChromaKey *plugin, int x, int y);
76 ~ChromaKeyWindow();
77 void create_objects();
78 int close_event();
79 ChromaKeyHue *hue;
80 ChromaKeyValue *value;
81 ChromaKeyThreshold *threshold;
82 ChromaKeyUseValue *use_value;
83 ChromaKeySlope *slope;
84 ChromaKey *plugin;
88 PLUGIN_THREAD_HEADER(ChromaKey, ChromaKeyThread, ChromaKeyWindow)
91 class ChromaKeyServer : public LoadServer
93 public:
94 ChromaKeyServer(ChromaKey *plugin);
95 void init_packages();
96 LoadClient* new_client();
97 LoadPackage* new_package();
98 ChromaKey *plugin;
101 class ChromaKeyPackage : public LoadPackage
103 public:
104 ChromaKeyPackage();
105 int y1, y2;
108 class ChromaKeyUnit : public LoadClient
110 public:
111 ChromaKeyUnit(ChromaKey *plugin, ChromaKeyServer *server);
112 void process_package(LoadPackage *package);
113 ChromaKey *plugin;
119 class ChromaKey : public PluginVClient
121 public:
122 ChromaKey(PluginServer *server);
123 ~ChromaKey();
125 int process_realtime(VFrame *input, VFrame *output);
126 int is_realtime();
127 char* plugin_title();
128 VFrame* new_picon();
129 int load_configuration();
130 int load_defaults();
131 int save_defaults();
132 void save_data(KeyFrame *keyframe);
133 void read_data(KeyFrame *keyframe);
134 int show_gui();
135 int set_string();
136 void raise_window();
137 void update_gui();
139 ChromaKeyConfig config;
140 VFrame *input, *output;
141 ChromaKeyServer *engine;
142 ChromaKeyThread *thread;
143 Defaults *defaults;
153 #endif