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"
48 #define MINSATURATION -100
49 #define MAXSATURATION 100
63 void copy_from(HueConfig &src);
64 int equivalent(HueConfig &src);
66 void interpolate(HueConfig &prev,
71 float hue, saturation, value;
74 class HueSlider : public BC_FSlider
77 HueSlider(HueEffect *plugin, int x, int y, int w);
82 class SaturationSlider : public BC_FSlider
85 SaturationSlider(HueEffect *plugin, int x, int y, int w);
89 char string[BCTEXTLEN];
92 class ValueSlider : public BC_FSlider
95 ValueSlider(HueEffect *plugin, int x, int y, int w);
99 char string[BCTEXTLEN];
102 class HueReset : public BC_GenericButton
105 HueReset(HueEffect *plugin, HueWindow *gui, int x, int y);
112 class HueWindow : public PluginClientWindow
115 HueWindow(HueEffect *plugin);
116 void create_objects();
120 SaturationSlider *saturation;
126 class HueEngine : public LoadServer
129 HueEngine(HueEffect *plugin, int cpus);
130 void init_packages();
131 LoadClient* new_client();
132 LoadPackage* new_package();
136 class HuePackage : public LoadPackage
143 class HueUnit : public LoadClient
146 HueUnit(HueEffect *plugin, HueEngine *server);
147 void process_package(LoadPackage *package);
151 class HueEffect : public PluginVClient
154 HueEffect(PluginServer *server);
158 PLUGIN_CLASS_MEMBERS(HueConfig);
159 int process_buffer(VFrame *frame,
160 int64_t start_position,
163 void save_data(KeyFrame *keyframe);
164 void read_data(KeyFrame *keyframe);
168 VFrame *input, *output;