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
22 #ifndef HUESATURATION_H
23 #define HUESATURATION_H
26 #include "bcdisplayinfo.h"
32 #include "loadbalance.h"
34 #include "playback3d.h"
35 #include "pluginvclient.h"
47 class SaturationSlider;
55 #define MINSATURATION -100
56 #define MAXSATURATION 100
71 void copy_from(HueConfig &src);
72 int equivalent(HueConfig &src);
73 void reset(int clear);
74 void interpolate(HueConfig &prev,
79 float hue, saturation, value;
82 class HueText : public BC_TumbleTextBox
85 HueText(HueEffect *plugin, HueWindow *gui, int x, int y);
92 class HueSlider : public BC_FSlider
95 HueSlider(HueEffect *plugin, HueWindow *gui, int x, int y, int w);
101 class SaturationText : public BC_TumbleTextBox
104 SaturationText(HueEffect *plugin, HueWindow *gui, int x, int y);
111 class SaturationSlider : public BC_FSlider
114 SaturationSlider(HueEffect *plugin, HueWindow *gui, int x, int y, int w);
119 char string[BCTEXTLEN];
122 class ValueText : public BC_TumbleTextBox
125 ValueText(HueEffect *plugin, HueWindow *gui, int x, int y);
133 class ValueSlider : public BC_FSlider
136 ValueSlider(HueEffect *plugin, HueWindow *gui, int x, int y, int w);
141 char string[BCTEXTLEN];
144 class HueReset : public BC_GenericButton
147 HueReset(HueEffect *plugin, HueWindow *gui, int x, int y);
154 class HueClr : public BC_Button
157 HueClr(HueEffect *plugin, HueWindow *gui, int x, int y, int clear);
165 class HueWindow : public PluginClientWindow
168 HueWindow(HueEffect *plugin);
169 void create_objects();
170 void update_gui(int clear);
174 HueSlider *hue_slider;
177 SaturationText *sat_text;
178 SaturationSlider *sat_slider;
181 ValueText *value_text;
182 ValueSlider *value_slider;
189 class HueEngine : public LoadServer
192 HueEngine(HueEffect *plugin, int cpus);
193 void init_packages();
194 LoadClient* new_client();
195 LoadPackage* new_package();
199 class HuePackage : public LoadPackage
206 class HueUnit : public LoadClient
209 HueUnit(HueEffect *plugin, HueEngine *server);
210 void process_package(LoadPackage *package);
214 class HueEffect : public PluginVClient
217 HueEffect(PluginServer *server);
221 PLUGIN_CLASS_MEMBERS(HueConfig);
222 int process_buffer(VFrame *frame,
223 int64_t start_position,
226 void save_data(KeyFrame *keyframe);
227 void read_data(KeyFrame *keyframe);
231 VFrame *input, *output;