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_
15 #include "AtmoZoneDefinition.h"
16 #include "AtmoChannelAssignment.h"
18 #if defined(_ATMO_VLC_PLUGIN_)
26 int m_IsShowConfigDialog;
27 #if defined(_ATMO_VLC_PLUGIN_)
29 char *m_devicenames[3]; // additional Devices ?
32 int m_Comports[3]; // additional Comports
34 enum AtmoConnectionType m_eAtmoConnectionType;
35 enum EffectMode m_eEffectMode;
37 ATMO_BOOL m_IgnoreConnectionErrorOnStartup;
40 ATMO_BOOL m_UseSoftwareWhiteAdj;
41 int m_WhiteAdjustment_Red;
42 int m_WhiteAdjustment_Green;
43 int m_WhiteAdjustment_Blue;
46 int m_IsSetShutdownColor;
47 int m_ShutdownColor_Red;
48 int m_ShutdownColor_Green;
49 int m_ShutdownColor_Blue;
52 /* Config Values for Color Changer */
53 int m_ColorChanger_iSteps;
54 int m_ColorChanger_iDelay;
57 /* Config values for the primitive Left Right Color Changer */
58 int m_LrColorChanger_iSteps;
59 int m_LrColorChanger_iDelay;
62 /* the static background color */
63 int m_StaticColor_Red;
64 int m_StaticColor_Green;
65 int m_StaticColor_Blue;
69 one for System + 9 for userdefined channel
70 assignments (will it be enough?)
72 CAtmoChannelAssignment *m_ChannelAssignments[10];
73 int m_CurrentChannelAssignment;
76 CAtmoZoneDefinition **m_ZoneDefinitions;
77 int m_AtmoZoneDefCount;
81 zone layout description for generating the default Zone weightning
83 // count of zone on the top of the screen
85 // count of zone on the bottom of the screen
86 int m_ZonesBottomCount;
87 // count of zones on left and right (the same count)
90 // does a summary Zone exists (Fullscreen)
91 int m_computed_zones_count;
92 ATMO_BOOL m_ZoneSummary;
99 /* Live View Parameters (most interesting) */
100 AtmoFilterMode m_LiveViewFilterMode;
101 int m_LiveViewFilter_PercentNew;
102 int m_LiveViewFilter_MeanLength;
103 int m_LiveViewFilter_MeanThreshold;
105 ATMO_BOOL m_show_statistics;
107 // weighting of distance to edge
108 int m_LiveView_EdgeWeighting; // = 8;
109 // brightness correction
110 int m_LiveView_BrightCorrect; // = 100;
111 // darkness limit (pixels below this value will be ignored)
112 int m_LiveView_DarknessLimit; // = 5;
113 // Windowing size for hue histogram building
114 int m_LiveView_HueWinSize; // = 3;
115 // Windowing size for sat histogram building
116 int m_LiveView_SatWinSize; // = 3;
118 special (hack) for ignorning black borders durring
119 playback of letterboxed material on a 16:9 output device
121 int m_LiveView_WidescreenMode; // = 0
123 // border from source image which should be ignored
124 // the values are only used by the Win32 GDI Screen capture
125 int m_LiveView_HOverscanBorder;
126 int m_LiveView_VOverscanBorder;
127 int m_LiveView_DisplayNr;
130 a special delay to get the light in sync with the video
131 was required because the frames will pass my VLC filter some [ms]
132 before they become visible on screen with this delay - screenoutput
133 and light timing could be "synchronized"
135 int m_LiveView_FrameDelay;
137 int m_LiveView_GDI_FrameRate;
140 /* values of the last hardware white adjustment (only for hardware with new firmware) */
141 int m_Hardware_global_gamma;
142 int m_Hardware_global_contrast;
143 int m_Hardware_contrast_red;
144 int m_Hardware_contrast_green;
145 int m_Hardware_contrast_blue;
146 int m_Hardware_gamma_red;
147 int m_Hardware_gamma_green;
148 int m_Hardware_gamma_blue;
151 char *m_DMX_BaseChannels;
152 int m_DMX_RGB_Channels;
158 AtmoGammaCorrect m_Software_gamma_mode;
160 int m_Software_gamma_red;
161 int m_Software_gamma_green;
162 int m_Software_gamma_blue;
164 int m_Software_gamma_global;
166 volatile int m_UpdateEdgeWeightningFlag;
171 virtual ~CAtmoConfig();
172 virtual void SaveSettings() {}
173 virtual void LoadSettings() {};
177 function to copy the values of one configuration object to another
178 will be used in windows settings dialog as backup if the user
181 void Assign(CAtmoConfig *pAtmoConfigSrc);
183 void UpdateZoneDefinitionCount();
186 int isShowConfigDialog() { return m_IsShowConfigDialog; }
187 void setShowConfigDialog(int value) { m_IsShowConfigDialog = value; }
189 #if defined(_ATMO_VLC_PLUGIN_)
190 char *getSerialDevice() { return m_devicename; }
191 void setSerialDevice(const char *newdevice) { free(m_devicename); if(newdevice) m_devicename = strdup(newdevice); else m_devicename = NULL; }
192 char *getSerialDevice(int i);
193 void setSerialDevice(int i,const char *pszNewDevice);
195 int getComport() { return m_Comport; }
196 void setComport(int value) { m_Comport = value; }
197 int getComport(int i);
198 void setComport(int i, int nr);
201 ATMO_BOOL getIgnoreConnectionErrorOnStartup() { return m_IgnoreConnectionErrorOnStartup; }
202 void setIgnoreConnectionErrorOnStartup(ATMO_BOOL ignore) { m_IgnoreConnectionErrorOnStartup = ignore; }
204 int getWhiteAdjustment_Red() { return m_WhiteAdjustment_Red; }
205 void setWhiteAdjustment_Red(int value) { m_WhiteAdjustment_Red = value; }
206 int getWhiteAdjustment_Green() { return m_WhiteAdjustment_Green; }
207 void setWhiteAdjustment_Green(int value) { m_WhiteAdjustment_Green = value; }
208 int getWhiteAdjustment_Blue() { return m_WhiteAdjustment_Blue; }
209 void setWhiteAdjustment_Blue(int value) { m_WhiteAdjustment_Blue = value; }
210 ATMO_BOOL isUseSoftwareWhiteAdj() { return m_UseSoftwareWhiteAdj; }
211 void setUseSoftwareWhiteAdj(ATMO_BOOL value) { m_UseSoftwareWhiteAdj = value; }
213 int isSetShutdownColor() { return m_IsSetShutdownColor; }
214 void SetSetShutdownColor(int value) { m_IsSetShutdownColor = value; }
215 int getShutdownColor_Red() { return m_ShutdownColor_Red; }
216 void setShutdownColor_Red(int value) { m_ShutdownColor_Red = value; }
217 int getShutdownColor_Green() { return m_ShutdownColor_Green; }
218 void setShutdownColor_Green(int value) { m_ShutdownColor_Green = value; }
219 int getShutdownColor_Blue() { return m_ShutdownColor_Blue; }
220 void setShutdownColor_Blue(int value) { m_ShutdownColor_Blue=value; }
222 int getColorChanger_iSteps() { return m_ColorChanger_iSteps; }
223 void setColorChanger_iSteps(int value) { m_ColorChanger_iSteps = value; }
224 int getColorChanger_iDelay() { return m_ColorChanger_iDelay; }
225 void setColorChanger_iDelay(int value) { m_ColorChanger_iDelay = value; }
227 int getLrColorChanger_iSteps() { return m_LrColorChanger_iSteps; }
228 void setLrColorChanger_iSteps(int value) { m_LrColorChanger_iSteps = value; }
229 int getLrColorChanger_iDelay() { return m_LrColorChanger_iDelay; }
230 void setLrColorChanger_iDelay(int value) { m_LrColorChanger_iDelay = value; }
232 int getStaticColor_Red() { return m_StaticColor_Red; }
233 void setStaticColor_Red(int value) { m_StaticColor_Red=value; }
234 int getStaticColor_Green() { return m_StaticColor_Green; }
235 void setStaticColor_Green(int value) { m_StaticColor_Green=value; }
236 int getStaticColor_Blue() { return m_StaticColor_Blue; }
237 void setStaticColor_Blue(int value) { m_StaticColor_Blue=value; }
240 AtmoConnectionType getConnectionType() { return m_eAtmoConnectionType; }
241 void setConnectionType(AtmoConnectionType value) { m_eAtmoConnectionType = value; }
243 EffectMode getEffectMode() { return m_eEffectMode; }
244 void setEffectMode(EffectMode value) { m_eEffectMode = value; }
246 ATMO_BOOL getShow_statistics() { return m_show_statistics; }
248 AtmoFilterMode getLiveViewFilterMode() { return m_LiveViewFilterMode; }
249 void setLiveViewFilterMode(AtmoFilterMode value) { m_LiveViewFilterMode = value; }
251 int getLiveViewFilter_PercentNew() { return m_LiveViewFilter_PercentNew; }
252 void setLiveViewFilter_PercentNew(int value) { m_LiveViewFilter_PercentNew=value; }
253 int getLiveViewFilter_MeanLength() { return m_LiveViewFilter_MeanLength; }
254 void setLiveViewFilter_MeanLength(int value) { m_LiveViewFilter_MeanLength = value; }
255 int getLiveViewFilter_MeanThreshold() { return m_LiveViewFilter_MeanThreshold; }
256 void setLiveViewFilter_MeanThreshold(int value) { m_LiveViewFilter_MeanThreshold = value; }
258 int getLiveView_EdgeWeighting() { return m_LiveView_EdgeWeighting; }
259 void setLiveView_EdgeWeighting(int value) { m_LiveView_EdgeWeighting=value; }
261 int getLiveView_BrightCorrect() { return m_LiveView_BrightCorrect; }
262 void setLiveView_BrightCorrect(int value) { m_LiveView_BrightCorrect=value; }
264 int getLiveView_DarknessLimit() { return m_LiveView_DarknessLimit; }
265 void setLiveView_DarknessLimit(int value) { m_LiveView_DarknessLimit=value; }
267 int getLiveView_HueWinSize() { return m_LiveView_HueWinSize; }
268 void setLiveView_HueWinSize(int value) { m_LiveView_HueWinSize=value; }
270 int getLiveView_SatWinSize() { return m_LiveView_SatWinSize; }
271 void setLiveView_SatWinSize(int value) { m_LiveView_SatWinSize=value; }
273 int getLiveView_WidescreenMode() { return m_LiveView_WidescreenMode; }
274 void setLiveView_WidescreenMode(int value) { m_LiveView_WidescreenMode=value; }
276 int getLiveView_HOverscanBorder() { return m_LiveView_HOverscanBorder; }
277 void setLiveView_HOverscanBorder(int value) { m_LiveView_HOverscanBorder = value; }
279 int getLiveView_VOverscanBorder() { return m_LiveView_VOverscanBorder; }
280 void setLiveView_VOverscanBorder(int value) { m_LiveView_VOverscanBorder = value; }
282 int getLiveView_DisplayNr() { return m_LiveView_DisplayNr; }
283 void setLiveView_DisplayNr(int value) { m_LiveView_DisplayNr = value; }
285 int getLiveView_FrameDelay() { return m_LiveView_FrameDelay; }
286 void setLiveView_FrameDelay(int delay) { m_LiveView_FrameDelay = delay; }
288 int getLiveView_GDI_FrameRate() { return m_LiveView_GDI_FrameRate; }
289 void setLiveView_GDI_FrameRate(int value) { m_LiveView_GDI_FrameRate=value; }
291 int getHardware_global_gamma() { return m_Hardware_global_gamma ; }
292 void setHardware_global_gamma(int value) { m_Hardware_global_gamma=value; }
294 int getHardware_global_contrast() { return m_Hardware_global_contrast; }
295 void setHardware_global_contrast(int value) { m_Hardware_global_contrast=value; }
297 int getHardware_contrast_red() { return m_Hardware_contrast_red; }
298 void setHardware_contrast_red(int value) { m_Hardware_contrast_red=value; }
300 int getHardware_contrast_green() { return m_Hardware_contrast_green; }
301 void setHardware_contrast_green(int value) { m_Hardware_contrast_green=value; }
303 int getHardware_contrast_blue() { return m_Hardware_contrast_blue; }
304 void setHardware_contrast_blue(int value) { m_Hardware_contrast_blue=value; }
306 int getHardware_gamma_red() { return m_Hardware_gamma_red; }
307 void setHardware_gamma_red(int value) { m_Hardware_gamma_red=value; }
309 int getHardware_gamma_green() { return m_Hardware_gamma_green; }
310 void setHardware_gamma_green(int value) { m_Hardware_gamma_green=value; }
312 int getHardware_gamma_blue() { return m_Hardware_gamma_blue; }
313 void setHardware_gamma_blue(int value) { m_Hardware_gamma_blue=value; }
316 AtmoGammaCorrect getSoftware_gamma_mode() { return m_Software_gamma_mode; }
317 int getSoftware_gamma_red() { return m_Software_gamma_red; }
318 int getSoftware_gamma_green() { return m_Software_gamma_green; }
319 int getSoftware_gamma_blue() { return m_Software_gamma_blue; }
320 int getSoftware_gamma_global() { return m_Software_gamma_global; }
322 void setSoftware_gamma_mode(AtmoGammaCorrect value) { m_Software_gamma_mode = value; }
323 void setSoftware_gamma_red(int value) { m_Software_gamma_red = value; }
324 void setSoftware_gamma_green(int value) { m_Software_gamma_green = value; }
325 void setSoftware_gamma_blue(int value) { m_Software_gamma_blue = value; }
326 void setSoftware_gamma_global(int value) { m_Software_gamma_global = value; }
328 CAtmoChannelAssignment *getChannelAssignment(int nummer) {
329 return this->m_ChannelAssignments[nummer];
331 int getCurrentChannelAssignment() { return m_CurrentChannelAssignment; }
332 void setCurrentChannelAssignment(int index) { m_CurrentChannelAssignment = index; }
334 int getNumChannelAssignments();
335 void clearChannelMappings();
336 void clearAllChannelMappings();
337 void AddChannelAssignment(CAtmoChannelAssignment *ta);
338 void SetChannelAssignment(int index, CAtmoChannelAssignment *ta);
340 CAtmoZoneDefinition *getZoneDefinition(int zoneIndex);
342 void UpdateZoneCount();
344 void setZonesTopCount(int zones) { m_ZonesTopCount = zones; UpdateZoneCount(); };
345 int getZonesTopCount() { return m_ZonesTopCount; }
346 void setZonesBottomCount(int zones) { m_ZonesBottomCount = zones; UpdateZoneCount(); };
347 int getZonesBottomCount() { return m_ZonesBottomCount; }
348 void setZonesLRCount(int zones) { m_ZonesLRCount = zones; UpdateZoneCount(); };
349 int getZonesLRCount() { return m_ZonesLRCount; }
350 ATMO_BOOL getZoneSummary() { return m_ZoneSummary; }
351 void setZoneSummary(ATMO_BOOL summary) { m_ZoneSummary = summary; UpdateZoneCount(); }
353 char *getDMX_BaseChannels() { return m_DMX_BaseChannels; }
354 void setDMX_BaseChannels(char *channels);
356 int getDMX_RGB_Channels() { return m_DMX_RGB_Channels; }
357 void setDMX_RGB_Channels(int ch) { m_DMX_RGB_Channels = ch; }
359 int getMoMo_Channels() { return m_MoMo_Channels; }
360 void setMoMo_Channels(int chCount) { m_MoMo_Channels = chCount; }