4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 class ShapeWipeConfig;
27 class ShapeWipeWindow;
30 class ShapeWipeTumble;
31 class ShapeWipeFeather;
33 class ShapeWipePreserveAspectRatio;
38 #include "overlayframe.inc"
39 #include "pluginvclient.h"
42 class ShapeWipeW2B : public BC_Radial
45 ShapeWipeW2B(ShapeWipeMain *plugin,
46 ShapeWipeWindow *window,
50 ShapeWipeMain *plugin;
51 ShapeWipeWindow *window;
54 class ShapeWipeB2W : public BC_Radial
57 ShapeWipeB2W(ShapeWipeMain *plugin,
58 ShapeWipeWindow *window,
62 ShapeWipeMain *plugin;
63 ShapeWipeWindow *window;
67 class ShapeWipeTumble : public BC_Tumbler
70 ShapeWipeTumble(ShapeWipeMain *client,
71 ShapeWipeWindow *window,
75 int handle_up_event();
76 int handle_down_event();
78 ShapeWipeMain *client;
79 ShapeWipeWindow *window;
82 class ShapeWipeFeather : public BC_FSlider
85 ShapeWipeFeather(ShapeWipeMain *client,
86 ShapeWipeWindow *window, int x, int y);
90 ShapeWipeMain *client;
91 ShapeWipeWindow *window;
94 class ShapeWipeShape : public BC_PopupTextBox
97 ShapeWipeShape(ShapeWipeMain *client, ShapeWipeWindow *window,
98 int x, int y, int text_w, int list_h);
100 ShapeWipeMain *client;
101 ShapeWipeWindow *window;
104 class ShapeWipePreserveAspectRatio : public BC_CheckBox
107 ShapeWipePreserveAspectRatio(ShapeWipeMain *plugin,
108 ShapeWipeWindow *window,
112 ShapeWipeMain *plugin;
113 ShapeWipeWindow *window;
117 class ShapeWipeWindow : public PluginClientWindow
120 ShapeWipeWindow(ShapeWipeMain *plugin);
122 void create_objects();
126 ShapeWipeMain *plugin;
129 ShapeWipeTumble *shape_tumbler;
130 ShapeWipeShape *shape_text;
131 ShapeWipeFeather *shape_feather;
132 ArrayList<BC_ListBoxItem*> shapes;
135 class ShapeWipeConfig
140 void read_xml(KeyFrame *keyframe);
141 void save_xml(KeyFrame *keyframe);
146 char shape_name[BCTEXTLEN];
149 class ShapeWipeMain : public PluginVClient
152 ShapeWipeMain(PluginServer *server);
155 PLUGIN_CLASS_MEMBERS(ShapeWipeConfig)
156 int process_realtime(VFrame *input, VFrame *output);
159 void read_data(KeyFrame *keyframe);
160 void save_data(KeyFrame *keyframe);
162 int read_pattern_image(char *shape_name,
163 int new_frame_width, int new_frame_height);
164 void reset_pattern_image();
167 VFrame *input, *output;
169 ArrayList<char*> shape_paths;
170 ArrayList<char*> shape_titles;
172 int shapes_initialized;
174 char current_filename[BCTEXTLEN];
175 char current_name[BCTEXTLEN];
176 unsigned char **pattern_image;
177 unsigned char min_value;
178 unsigned char max_value;
182 int last_preserve_aspect;
186 class ShapePackage : public LoadPackage
193 class ShapeUnit : public LoadClient
196 ShapeUnit(ShapeEngine *server);
198 void process_package(LoadPackage *package);
200 unsigned char threshold;
203 class ShapeEngine : public LoadServer
206 ShapeEngine(ShapeWipeMain *plugin,
207 int total_clients, int total_packages);
210 void init_packages();
211 LoadClient *new_client();
212 LoadPackage *new_package();
213 ShapeWipeMain *plugin;