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
26 class TimeFrontEngine;
27 class TimeFrontThread;
28 class TimeFrontWindow;
29 class TimeFrontServer;
33 #include "filexml.inc"
35 #include "loadbalance.h"
36 #include "overlayframe.inc"
38 #include "pluginvclient.h"
47 int equivalent(TimeFrontConfig &that);
48 void copy_from(TimeFrontConfig &that);
49 void interpolate(TimeFrontConfig &prev,
50 TimeFrontConfig &next,
54 // Int to hex triplet conversion
60 // LINEAR or LOG or SQUARE
90 class TimeFrontShape : public BC_PopupMenu
93 TimeFrontShape(TimeFrontMain *plugin,
97 void create_objects();
98 static char* to_text(int shape);
99 static int from_text(char *text);
101 TimeFrontMain *plugin;
102 TimeFrontWindow *gui;
105 class TimeFrontTrackUsage : public BC_PopupMenu
108 TimeFrontTrackUsage(TimeFrontMain *plugin,
109 TimeFrontWindow *gui,
112 void create_objects();
113 static char* to_text(int track_usage);
114 static int from_text(char *text);
116 TimeFrontMain *plugin;
117 TimeFrontWindow *gui;
121 class TimeFrontRate : public BC_PopupMenu
124 TimeFrontRate(TimeFrontMain *plugin,
127 void create_objects();
128 static char* to_text(int shape);
129 static int from_text(char *text);
131 TimeFrontMain *plugin;
132 TimeFrontWindow *gui;
135 class TimeFrontCenterX : public BC_FPot
138 TimeFrontCenterX(TimeFrontMain *plugin, int x, int y);
140 TimeFrontMain *plugin;
143 class TimeFrontCenterY : public BC_FPot
146 TimeFrontCenterY(TimeFrontMain *plugin, int x, int y);
148 TimeFrontMain *plugin;
151 class TimeFrontAngle : public BC_FPot
154 TimeFrontAngle(TimeFrontMain *plugin, int x, int y);
156 TimeFrontMain *plugin;
159 class TimeFrontInRadius : public BC_FSlider
162 TimeFrontInRadius(TimeFrontMain *plugin, int x, int y);
164 TimeFrontMain *plugin;
167 class TimeFrontOutRadius : public BC_FSlider
170 TimeFrontOutRadius(TimeFrontMain *plugin, int x, int y);
172 TimeFrontMain *plugin;
175 class TimeFrontFrameRange : public BC_ISlider
178 TimeFrontFrameRange(TimeFrontMain *plugin, int x, int y);
180 TimeFrontMain *plugin;
184 class TimeFrontInvert : public BC_CheckBox
187 TimeFrontInvert(TimeFrontMain *plugin, int x, int y);
189 TimeFrontMain *plugin;
192 class TimeFrontShowGrayscale : public BC_CheckBox
195 TimeFrontShowGrayscale(TimeFrontMain *plugin, int x, int y);
197 TimeFrontMain *plugin;
201 class TimeFrontWindow : public PluginClientWindow
204 TimeFrontWindow(TimeFrontMain *plugin);
207 void create_objects();
210 TimeFrontMain *plugin;
211 BC_Title *angle_title;
212 BC_Title *rate_title, *in_radius_title, *out_radius_title, *track_usage_title;
213 TimeFrontAngle *angle;
214 TimeFrontInRadius *in_radius;
215 TimeFrontOutRadius *out_radius;
216 TimeFrontFrameRange *frame_range;
217 TimeFrontShape *shape;
218 TimeFrontTrackUsage *track_usage;
219 BC_Title *shape_title;
220 TimeFrontCenterX *center_x;
221 BC_Title *center_x_title;
222 BC_Title *center_y_title;
223 TimeFrontCenterY *center_y;
225 TimeFrontShowGrayscale *show_grayscale;
226 TimeFrontInvert *invert;
227 int frame_range_x, frame_range_y;
228 int shape_x, shape_y;
236 class TimeFrontMain : public PluginVClient
239 TimeFrontMain(PluginServer *server);
242 int process_buffer(VFrame **frame,
243 int64_t start_position,
247 int is_multichannel();
248 void save_data(KeyFrame *keyframe);
249 void read_data(KeyFrame *keyframe);
253 PLUGIN_CLASS_MEMBERS(TimeFrontConfig)
255 int need_reconfigure;
257 OverlayFrame *overlayer;
259 VFrame *input, *output;
260 TimeFrontServer *engine;
263 class TimeFrontPackage : public LoadPackage
271 class TimeFrontUnit : public LoadClient
274 TimeFrontUnit(TimeFrontServer *server, TimeFrontMain *plugin);
275 void process_package(LoadPackage *package);
276 TimeFrontServer *server;
277 TimeFrontMain *plugin;
280 class TimeFrontServer : public LoadServer
283 TimeFrontServer(TimeFrontMain *plugin, int total_clients, int total_packages);
284 void init_packages();
285 LoadClient* new_client();
286 LoadPackage* new_package();
287 TimeFrontMain *plugin;