2 * AtmoConfig.h: Class for holding all configuration values of AtmoWin
4 * See the README.txt file for copyright information and how to reach the author(s).
10 #define _AtmoConfig_h_
13 #include "AtmoZoneDefinition.h"
15 #if defined(_ATMO_VLC_PLUGIN_)
24 int m_IsShowConfigDialog;
25 #if defined(_ATMO_VLC_PLUGIN_)
30 enum AtmoConnectionType m_eAtmoConnectionType;
31 enum EffectMode m_eEffectMode;
34 ATMO_BOOL m_UseSoftwareWhiteAdj;
35 int m_WhiteAdjustment_Red;
36 int m_WhiteAdjustment_Green;
37 int m_WhiteAdjustment_Blue;
40 int m_IsSetShutdownColor;
41 int m_ShutdownColor_Red;
42 int m_ShutdownColor_Green;
43 int m_ShutdownColor_Blue;
46 /* Config Values for Color Changer */
47 int m_ColorChanger_iSteps;
48 int m_ColorChanger_iDelay;
51 /* Config values for the primitive Left Right Color Changer */
52 int m_LrColorChanger_iSteps;
53 int m_LrColorChanger_iDelay;
56 /* the static background color */
57 int m_StaticColor_Red;
58 int m_StaticColor_Green;
59 int m_StaticColor_Blue;
63 one for System + 9 for userdefined channel
64 assignments (will it be enough?)
66 tChannelAssignment *m_ChannelAssignments[10];
67 int m_CurrentChannelAssignment;
70 CAtmoZoneDefinition *m_ZoneDefinitions[ATMO_NUM_CHANNELS];
74 /* Live View Parameters (most interesting) */
75 AtmoFilterMode m_LiveViewFilterMode;
76 int m_LiveViewFilter_PercentNew;
77 int m_LiveViewFilter_MeanLength;
78 int m_LiveViewFilter_MeanThreshold;
80 // weighting of distance to edge
81 int m_LiveView_EdgeWeighting; // = 8;
82 // brightness correction
83 int m_LiveView_BrightCorrect; // = 100;
84 // darkness limit (pixels below this value will be ignored)
85 int m_LiveView_DarknessLimit; // = 5;
86 // Windowing size for hue histogram building
87 int m_LiveView_HueWinSize; // = 3;
88 // Windowing size for sat histogram building
89 int m_LiveView_SatWinSize; // = 3;
91 special (hack) for ignorning black borders durring
92 playback of letterboxed material on a 16:9 output device
94 int m_LiveView_WidescreenMode; // = 0
96 // border from source image which should be ignored
97 // the values are only used by the Win32 GDI Screen capture
98 int m_LiveView_HOverscanBorder;
99 int m_LiveView_VOverscanBorder;
100 int m_LiveView_DisplayNr;
103 a special delay to get the light in sync with the video
104 was required because the frames will pass my VLC filter some [ms]
105 before they become visible on screen with this delay - screenoutput
106 and light timing could be "synchronized"
108 int m_LiveView_FrameDelay;
111 /* values of the last hardware white adjustment (only for hardware with new firmware) */
112 int m_Hardware_global_gamma;
113 int m_Hardware_global_contrast;
114 int m_Hardware_contrast_red;
115 int m_Hardware_contrast_green;
116 int m_Hardware_contrast_blue;
117 int m_Hardware_gamma_red;
118 int m_Hardware_gamma_green;
119 int m_Hardware_gamma_blue;
123 virtual ~CAtmoConfig();
124 virtual void SaveSettings() {}
125 virtual void LoadSettings() {};
129 function to copy the values of one configuration object to another
130 will be used in windows settings dialog as backup if the user
133 void Assign(CAtmoConfig *pAtmoConfigSrc);
136 int isShowConfigDialog() { return m_IsShowConfigDialog; }
137 void setShowConfigDialog(int value) { m_IsShowConfigDialog = value; }
139 #if defined(_ATMO_VLC_PLUGIN_)
140 char *getSerialDevice() { return m_devicename; }
141 void setSerialDevice(char *newdevice) { if(m_devicename) free(m_devicename); if(newdevice) m_devicename = strdup(newdevice); else m_devicename = NULL; }
143 int getComport() { return m_Comport; }
144 void setComport(int value) { m_Comport = value; }
147 int getWhiteAdjustment_Red() { return m_WhiteAdjustment_Red; }
148 void setWhiteAdjustment_Red(int value) { m_WhiteAdjustment_Red = value; }
149 int getWhiteAdjustment_Green() { return m_WhiteAdjustment_Green; }
150 void setWhiteAdjustment_Green(int value) { m_WhiteAdjustment_Green = value; }
151 int getWhiteAdjustment_Blue() { return m_WhiteAdjustment_Blue; }
152 void setWhiteAdjustment_Blue(int value) { m_WhiteAdjustment_Blue = value; }
153 ATMO_BOOL isUseSoftwareWhiteAdj() { return m_UseSoftwareWhiteAdj; }
154 void setUseSoftwareWhiteAdj(ATMO_BOOL value) { m_UseSoftwareWhiteAdj = value; }
156 int isSetShutdownColor() { return m_IsSetShutdownColor; }
157 void SetSetShutdownColor(int value) { m_IsSetShutdownColor = value; }
158 int getShutdownColor_Red() { return m_ShutdownColor_Red; }
159 void setShutdownColor_Red(int value) { m_ShutdownColor_Red = value; }
160 int getShutdownColor_Green() { return m_ShutdownColor_Green; }
161 void setShutdownColor_Green(int value) { m_ShutdownColor_Green = value; }
162 int getShutdownColor_Blue() { return m_ShutdownColor_Blue; }
163 void setShutdownColor_Blue(int value) { m_ShutdownColor_Blue=value; }
165 int getColorChanger_iSteps() { return m_ColorChanger_iSteps; }
166 void setColorChanger_iSteps(int value) { m_ColorChanger_iSteps = value; }
167 int getColorChanger_iDelay() { return m_ColorChanger_iDelay; }
168 void setColorChanger_iDelay(int value) { m_ColorChanger_iDelay = value; }
170 int getLrColorChanger_iSteps() { return m_LrColorChanger_iSteps; }
171 void setLrColorChanger_iSteps(int value) { m_LrColorChanger_iSteps = value; }
172 int getLrColorChanger_iDelay() { return m_LrColorChanger_iDelay; }
173 void setLrColorChanger_iDelay(int value) { m_LrColorChanger_iDelay = value; }
175 int getStaticColor_Red() { return m_StaticColor_Red; }
176 void setStaticColor_Red(int value) { m_StaticColor_Red=value; }
177 int getStaticColor_Green() { return m_StaticColor_Green; }
178 void setStaticColor_Green(int value) { m_StaticColor_Green=value; }
179 int getStaticColor_Blue() { return m_StaticColor_Blue; }
180 void setStaticColor_Blue(int value) { m_StaticColor_Blue=value; }
183 AtmoConnectionType getConnectionType() { return m_eAtmoConnectionType; }
184 void setConnectionType(AtmoConnectionType value) { m_eAtmoConnectionType = value; }
186 EffectMode getEffectMode() { return m_eEffectMode; }
187 void setEffectMode(EffectMode value) { m_eEffectMode = value; }
189 AtmoFilterMode getLiveViewFilterMode() { return m_LiveViewFilterMode; }
190 void setLiveViewFilterMode(AtmoFilterMode value) { m_LiveViewFilterMode = value; }
192 int getLiveViewFilter_PercentNew() { return m_LiveViewFilter_PercentNew; }
193 void setLiveViewFilter_PercentNew(int value) { m_LiveViewFilter_PercentNew=value; }
194 int getLiveViewFilter_MeanLength() { return m_LiveViewFilter_MeanLength; }
195 void setLiveViewFilter_MeanLength(int value) { m_LiveViewFilter_MeanLength = value; }
196 int getLiveViewFilter_MeanThreshold() { return m_LiveViewFilter_MeanThreshold; }
197 void setLiveViewFilter_MeanThreshold(int value) { m_LiveViewFilter_MeanThreshold = value; }
199 int getLiveView_EdgeWeighting() { return m_LiveView_EdgeWeighting; }
200 void setLiveView_EdgeWeighting(int value) { m_LiveView_EdgeWeighting=value; }
202 int getLiveView_BrightCorrect() { return m_LiveView_BrightCorrect; }
203 void setLiveView_BrightCorrect(int value) { m_LiveView_BrightCorrect=value; }
205 int getLiveView_DarknessLimit() { return m_LiveView_DarknessLimit; }
206 void setLiveView_DarknessLimit(int value) { m_LiveView_DarknessLimit=value; }
208 int getLiveView_HueWinSize() { return m_LiveView_HueWinSize; }
209 void setLiveView_HueWinSize(int value) { m_LiveView_HueWinSize=value; }
211 int getLiveView_SatWinSize() { return m_LiveView_SatWinSize; }
212 void setLiveView_SatWinSize(int value) { m_LiveView_SatWinSize=value; }
214 int getLiveView_WidescreenMode() { return m_LiveView_WidescreenMode; }
215 void setLiveView_WidescreenMode(int value) { m_LiveView_WidescreenMode=value; }
217 int getLiveView_HOverscanBorder() { return m_LiveView_HOverscanBorder; }
218 void setLiveView_HOverscanBorder(int value) { m_LiveView_HOverscanBorder = value; }
220 int getLiveView_VOverscanBorder() { return m_LiveView_VOverscanBorder; }
221 void setLiveView_VOverscanBorder(int value) { m_LiveView_VOverscanBorder = value; }
223 int getLiveView_DisplayNr() { return m_LiveView_DisplayNr; }
224 void setLiveView_DisplayNr(int value) { m_LiveView_DisplayNr = value; }
226 int getLiveView_FrameDelay() { return m_LiveView_FrameDelay; }
227 void setLiveView_FrameDelay(int delay) { m_LiveView_FrameDelay = delay; }
229 int getHardware_global_gamma() { return m_Hardware_global_gamma ; }
230 void setHardware_global_gamma(int value) { m_Hardware_global_gamma=value; }
232 int getHardware_global_contrast() { return m_Hardware_global_contrast; }
233 void setHardware_global_contrast(int value) { m_Hardware_global_contrast=value; }
235 int getHardware_contrast_red() { return m_Hardware_contrast_red; }
236 void setHardware_contrast_red(int value) { m_Hardware_contrast_red=value; }
238 int getHardware_contrast_green() { return m_Hardware_contrast_green; }
239 void setHardware_contrast_green(int value) { m_Hardware_contrast_green=value; }
241 int getHardware_contrast_blue() { return m_Hardware_contrast_blue; }
242 void setHardware_contrast_blue(int value) { m_Hardware_contrast_blue=value; }
244 int getHardware_gamma_red() { return m_Hardware_gamma_red; }
245 void setHardware_gamma_red(int value) { m_Hardware_gamma_red=value; }
247 int getHardware_gamma_green() { return m_Hardware_gamma_green; }
248 void setHardware_gamma_green(int value) { m_Hardware_gamma_green=value; }
250 int getHardware_gamma_blue() { return m_Hardware_gamma_blue; }
251 void setHardware_gamma_blue(int value) { m_Hardware_gamma_blue=value; }
253 tChannelAssignment *getChannelAssignment(int nummer) {
254 return this->m_ChannelAssignments[nummer];
256 int getCurrentChannelAssignment() { return m_CurrentChannelAssignment; }
257 void setCurrentChannelAssignment(int index) { m_CurrentChannelAssignment = index; }
259 int getNumChannelAssignments();
260 void clearChannelMappings();
261 void clearAllChannelMappings();
262 void AddChannelAssignment(tChannelAssignment *ta);
263 void SetChannelAssignment(int index, tChannelAssignment *ta);
265 CAtmoZoneDefinition *getZoneDefinition(int zoneIndex);