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"
43 #define RESET_DEFAULT_SETTINGS 10
45 #define RESET_XSLIDER 1
46 #define RESET_YSLIDER 2
51 class RadialBlurWindow;
52 class RadialBlurEngine;
53 class RadialBlurReset;
54 class RadialBlurDefaultSettings;
55 class RadialBlurSliderClr;
59 class RadialBlurConfig
64 void reset(int clear);
65 int equivalent(RadialBlurConfig &that);
66 void copy_from(RadialBlurConfig &that);
67 void interpolate(RadialBlurConfig &prev,
68 RadialBlurConfig &next,
85 class RadialBlurSize : public BC_ISlider
88 RadialBlurSize(RadialBlurMain *plugin,
95 RadialBlurMain *plugin;
99 class RadialBlurToggle : public BC_CheckBox
102 RadialBlurToggle(RadialBlurMain *plugin,
108 RadialBlurMain *plugin;
112 class RadialBlurReset : public BC_GenericButton
115 RadialBlurReset(RadialBlurMain *plugin, RadialBlurWindow *gui, int x, int y);
118 RadialBlurMain *plugin;
119 RadialBlurWindow *gui;
122 class RadialBlurDefaultSettings : public BC_GenericButton
125 RadialBlurDefaultSettings(RadialBlurMain *plugin, RadialBlurWindow *gui, int x, int y, int w);
126 ~RadialBlurDefaultSettings();
128 RadialBlurMain *plugin;
129 RadialBlurWindow *gui;
132 class RadialBlurSliderClr : public BC_Button
135 RadialBlurSliderClr(RadialBlurMain *plugin, RadialBlurWindow *gui, int x, int y, int w, int clear);
136 ~RadialBlurSliderClr();
138 RadialBlurMain *plugin;
139 RadialBlurWindow *gui;
143 class RadialBlurWindow : public PluginClientWindow
146 RadialBlurWindow(RadialBlurMain *plugin);
149 void create_objects();
150 void update_gui(int clear);
152 RadialBlurSize *x, *y, *steps, *angle;
153 RadialBlurToggle *r, *g, *b, *a;
154 RadialBlurMain *plugin;
155 RadialBlurReset *reset;
156 RadialBlurDefaultSettings *default_settings;
157 RadialBlurSliderClr *xClr;
158 RadialBlurSliderClr *yClr;
159 RadialBlurSliderClr *angleClr;
160 RadialBlurSliderClr *stepsClr;
168 class RadialBlurMain : public PluginVClient
171 RadialBlurMain(PluginServer *server);
174 int process_buffer(VFrame *frame,
175 int64_t start_position,
178 void save_data(KeyFrame *keyframe);
179 void read_data(KeyFrame *keyframe);
183 PLUGIN_CLASS_MEMBERS(RadialBlurConfig)
185 VFrame *input, *output, *temp;
186 RadialBlurEngine *engine;
187 // Rotate engine only used for OpenGL
188 AffineEngine *rotate;
191 class RadialBlurPackage : public LoadPackage
198 class RadialBlurUnit : public LoadClient
201 RadialBlurUnit(RadialBlurEngine *server, RadialBlurMain *plugin);
202 void process_package(LoadPackage *package);
203 RadialBlurEngine *server;
204 RadialBlurMain *plugin;
207 class RadialBlurEngine : public LoadServer
210 RadialBlurEngine(RadialBlurMain *plugin,
213 void init_packages();
214 LoadClient* new_client();
215 LoadPackage* new_package();
216 RadialBlurMain *plugin;