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"
49 #define MINSATURATION -100
50 #define MAXSATURATION 100
65 void copy_from(HueConfig &src);
66 int equivalent(HueConfig &src);
67 void reset(int clear);
68 void interpolate(HueConfig &prev,
73 float hue, saturation, value;
76 class HueSlider : public BC_FSlider
79 HueSlider(HueEffect *plugin, int x, int y, int w);
84 class SaturationSlider : public BC_FSlider
87 SaturationSlider(HueEffect *plugin, int x, int y, int w);
91 char string[BCTEXTLEN];
94 class ValueSlider : public BC_FSlider
97 ValueSlider(HueEffect *plugin, int x, int y, int w);
101 char string[BCTEXTLEN];
104 class HueReset : public BC_GenericButton
107 HueReset(HueEffect *plugin, HueWindow *gui, int x, int y);
114 class HueSliderClr : public BC_Button
117 HueSliderClr(HueEffect *plugin, HueWindow *gui, int x, int y, int w, int clear);
125 class HueWindow : public PluginClientWindow
128 HueWindow(HueEffect *plugin);
129 void create_objects();
130 void update_gui(int clear);
133 SaturationSlider *saturation;
136 HueSliderClr *hueClr;
137 HueSliderClr *satClr;
138 HueSliderClr *valClr;
142 class HueEngine : public LoadServer
145 HueEngine(HueEffect *plugin, int cpus);
146 void init_packages();
147 LoadClient* new_client();
148 LoadPackage* new_package();
152 class HuePackage : public LoadPackage
159 class HueUnit : public LoadClient
162 HueUnit(HueEffect *plugin, HueEngine *server);
163 void process_package(LoadPackage *package);
167 class HueEffect : public PluginVClient
170 HueEffect(PluginServer *server);
174 PLUGIN_CLASS_MEMBERS(HueConfig);
175 int process_buffer(VFrame *frame,
176 int64_t start_position,
179 void save_data(KeyFrame *keyframe);
180 void read_data(KeyFrame *keyframe);
184 VFrame *input, *output;