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
32 #include "bcdisplayinfo.h"
38 #include "loadbalance.h"
39 #include "pluginvclient.h"
42 #define RESET_DEFAULT_SETTINGS 10
44 #define RESET_XSLIDER 1
45 #define RESET_YSLIDER 2
50 class RadialBlurWindow;
51 class RadialBlurEngine;
52 class RadialBlurReset;
53 class RadialBlurDefaultSettings;
54 class RadialBlurSliderClr;
58 class RadialBlurConfig
63 void reset(int clear);
64 int equivalent(RadialBlurConfig &that);
65 void copy_from(RadialBlurConfig &that);
66 void interpolate(RadialBlurConfig &prev,
67 RadialBlurConfig &next,
84 class RadialBlurSize : public BC_ISlider
87 RadialBlurSize(RadialBlurMain *plugin,
94 RadialBlurMain *plugin;
98 class RadialBlurToggle : public BC_CheckBox
101 RadialBlurToggle(RadialBlurMain *plugin,
107 RadialBlurMain *plugin;
111 class RadialBlurReset : public BC_GenericButton
114 RadialBlurReset(RadialBlurMain *plugin, RadialBlurWindow *gui, int x, int y);
117 RadialBlurMain *plugin;
118 RadialBlurWindow *gui;
121 class RadialBlurDefaultSettings : public BC_GenericButton
124 RadialBlurDefaultSettings(RadialBlurMain *plugin, RadialBlurWindow *gui, int x, int y, int w);
125 ~RadialBlurDefaultSettings();
127 RadialBlurMain *plugin;
128 RadialBlurWindow *gui;
131 class RadialBlurSliderClr : public BC_GenericButton
134 RadialBlurSliderClr(RadialBlurMain *plugin, RadialBlurWindow *gui, int x, int y, int w, int clear);
135 ~RadialBlurSliderClr();
137 RadialBlurMain *plugin;
138 RadialBlurWindow *gui;
142 class RadialBlurWindow : public PluginClientWindow
145 RadialBlurWindow(RadialBlurMain *plugin);
148 void create_objects();
149 void update_gui(int clear);
151 RadialBlurSize *x, *y, *steps, *angle;
152 RadialBlurToggle *r, *g, *b, *a;
153 RadialBlurMain *plugin;
154 RadialBlurReset *reset;
155 RadialBlurDefaultSettings *default_settings;
156 RadialBlurSliderClr *xClr;
157 RadialBlurSliderClr *yClr;
158 RadialBlurSliderClr *angleClr;
159 RadialBlurSliderClr *stepsClr;
167 class RadialBlurMain : public PluginVClient
170 RadialBlurMain(PluginServer *server);
173 int process_buffer(VFrame *frame,
174 int64_t start_position,
177 void save_data(KeyFrame *keyframe);
178 void read_data(KeyFrame *keyframe);
182 PLUGIN_CLASS_MEMBERS(RadialBlurConfig)
184 VFrame *input, *output, *temp;
185 RadialBlurEngine *engine;
186 // Rotate engine only used for OpenGL
187 AffineEngine *rotate;
190 class RadialBlurPackage : public LoadPackage
197 class RadialBlurUnit : public LoadClient
200 RadialBlurUnit(RadialBlurEngine *server, RadialBlurMain *plugin);
201 void process_package(LoadPackage *package);
202 RadialBlurEngine *server;
203 RadialBlurMain *plugin;
206 class RadialBlurEngine : public LoadServer
209 RadialBlurEngine(RadialBlurMain *plugin,
212 void init_packages();
213 LoadClient* new_client();
214 LoadPackage* new_package();
215 RadialBlurMain *plugin;