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_)
25 int m_IsShowConfigDialog;
26 #if defined(_ATMO_VLC_PLUGIN_)
28 char *m_devicenames[3]; // additional Devices ?
31 int m_Comports[3]; // additional Comports
33 enum AtmoConnectionType m_eAtmoConnectionType;
34 enum EffectMode m_eEffectMode;
36 ATMO_BOOL m_IgnoreConnectionErrorOnStartup;
39 ATMO_BOOL m_UseSoftwareWhiteAdj;
40 int m_WhiteAdjustment_Red;
41 int m_WhiteAdjustment_Green;
42 int m_WhiteAdjustment_Blue;
44 ATMO_BOOL m_WhiteAdjPerChannel;
45 int m_chWhiteAdj_Count;
46 int *m_chWhiteAdj_Red;
47 int *m_chWhiteAdj_Green;
48 int *m_chWhiteAdj_Blue;
51 int m_IsSetShutdownColor;
52 int m_ShutdownColor_Red;
53 int m_ShutdownColor_Green;
54 int m_ShutdownColor_Blue;
57 /* Config Values for Color Changer */
58 int m_ColorChanger_iSteps;
59 int m_ColorChanger_iDelay;
62 /* Config values for the primitive Left Right Color Changer */
63 int m_LrColorChanger_iSteps;
64 int m_LrColorChanger_iDelay;
67 /* the static background color */
68 int m_StaticColor_Red;
69 int m_StaticColor_Green;
70 int m_StaticColor_Blue;
74 one for System + 9 for userdefined channel
75 assignments (will it be enough?)
77 CAtmoChannelAssignment *m_ChannelAssignments[10];
78 int m_CurrentChannelAssignment;
81 CAtmoZoneDefinition **m_ZoneDefinitions;
82 int m_AtmoZoneDefCount;
85 zone layout description for generating the default Zone weightning
87 // count of zone on the top of the screen
89 // count of zone on the bottom of the screen
90 int m_ZonesBottomCount;
91 // count of zones on left and right (the same count)
94 // does a summary Zone exists (Fullscreen)
95 int m_computed_zones_count;
96 ATMO_BOOL m_ZoneSummary;
102 /* Live View Parameters (most interesting) */
103 AtmoFilterMode m_LiveViewFilterMode;
104 int m_LiveViewFilter_PercentNew;
105 int m_LiveViewFilter_MeanLength;
106 int m_LiveViewFilter_MeanThreshold;
108 ATMO_BOOL m_show_statistics;
110 // number of rows to process each frame
111 int m_LiveView_RowsPerFrame;
113 // weighting of distance to edge
114 int m_LiveView_EdgeWeighting; // = 8;
115 // brightness correction
116 int m_LiveView_BrightCorrect; // = 100;
117 // darkness limit (pixels below this value will be ignored)
118 int m_LiveView_DarknessLimit; // = 5;
119 // Windowing size for hue histogram building
120 int m_LiveView_HueWinSize; // = 3;
121 // Windowing size for sat histogram building
122 int m_LiveView_SatWinSize; // = 3;
124 special (hack) for ignorning black borders durring
125 playback of letterboxed material on a 16:9 output device
127 int m_LiveView_WidescreenMode; // = 0
129 // border from source image which should be ignored
130 // the values are only used by the Win32 GDI Screen capture
131 int m_LiveView_HOverscanBorder;
132 int m_LiveView_VOverscanBorder;
133 int m_LiveView_DisplayNr;
136 a special delay to get the light in sync with the video
137 was required because the frames will pass my VLC filter some [ms]
138 before they become visible on screen with this delay - screenoutput
139 and light timing could be "synchronized"
141 int m_LiveView_FrameDelay;
143 int m_LiveView_GDI_FrameRate;
146 /* values of the last hardware white adjustment (only for hardware with new firmware) */
147 int m_Hardware_global_gamma;
148 int m_Hardware_global_contrast;
149 int m_Hardware_contrast_red;
150 int m_Hardware_contrast_green;
151 int m_Hardware_contrast_blue;
152 int m_Hardware_gamma_red;
153 int m_Hardware_gamma_green;
154 int m_Hardware_gamma_blue;
157 char *m_DMX_BaseChannels;
158 int m_DMX_RGB_Channels;
164 int m_Fnordlicht_Amount;
167 AtmoGammaCorrect m_Software_gamma_mode;
169 int m_Software_gamma_red;
170 int m_Software_gamma_green;
171 int m_Software_gamma_blue;
173 int m_Software_gamma_global;
175 volatile int m_UpdateEdgeWeightningFlag;
179 virtual ~CAtmoConfig();
180 virtual void SaveSettings() {}
181 virtual void LoadSettings() {};
185 function to copy the values of one configuration object to another
186 will be used in windows settings dialog as backup if the user
189 void Assign(CAtmoConfig *pAtmoConfigSrc);
191 void UpdateZoneDefinitionCount();
194 int isShowConfigDialog() { return m_IsShowConfigDialog; }
195 void setShowConfigDialog(int value) { m_IsShowConfigDialog = value; }
197 #if defined(_ATMO_VLC_PLUGIN_)
198 char *getSerialDevice() { return m_devicename; }
199 void setSerialDevice(const char *newdevice) { free(m_devicename); if(newdevice) m_devicename = strdup(newdevice); else m_devicename = NULL; }
200 char *getSerialDevice(int i);
201 void setSerialDevice(int i,const char *pszNewDevice);
203 int getComport() { return m_Comport; }
204 void setComport(int value) { m_Comport = value; }
205 int getComport(int i);
206 void setComport(int i, int nr);
209 ATMO_BOOL getIgnoreConnectionErrorOnStartup() { return m_IgnoreConnectionErrorOnStartup; }
210 void setIgnoreConnectionErrorOnStartup(ATMO_BOOL ignore) { m_IgnoreConnectionErrorOnStartup = ignore; }
212 int getWhiteAdjustment_Red() { return m_WhiteAdjustment_Red; }
213 void setWhiteAdjustment_Red(int value) { m_WhiteAdjustment_Red = value; }
214 int getWhiteAdjustment_Green() { return m_WhiteAdjustment_Green; }
215 void setWhiteAdjustment_Green(int value) { m_WhiteAdjustment_Green = value; }
216 int getWhiteAdjustment_Blue() { return m_WhiteAdjustment_Blue; }
217 void setWhiteAdjustment_Blue(int value) { m_WhiteAdjustment_Blue = value; }
218 ATMO_BOOL isUseSoftwareWhiteAdj() { return m_UseSoftwareWhiteAdj; }
219 void setUseSoftwareWhiteAdj(ATMO_BOOL value) { m_UseSoftwareWhiteAdj = value; }
221 /* White ADJ per Channel settings */
222 ATMO_BOOL isWhiteAdjPerChannel() { return m_WhiteAdjPerChannel; }
223 void setWhiteAdjPerChannel( ATMO_BOOL value) { m_WhiteAdjPerChannel = value; }
225 void setChannelWhiteAdj(int channel,int red,int green,int blue);
226 void getChannelWhiteAdj(int channel,int &red,int &green,int &blue);
228 int isSetShutdownColor() { return m_IsSetShutdownColor; }
229 void SetSetShutdownColor(int value) { m_IsSetShutdownColor = value; }
230 int getShutdownColor_Red() { return m_ShutdownColor_Red; }
231 void setShutdownColor_Red(int value) { m_ShutdownColor_Red = value; }
232 int getShutdownColor_Green() { return m_ShutdownColor_Green; }
233 void setShutdownColor_Green(int value) { m_ShutdownColor_Green = value; }
234 int getShutdownColor_Blue() { return m_ShutdownColor_Blue; }
235 void setShutdownColor_Blue(int value) { m_ShutdownColor_Blue=value; }
237 int getColorChanger_iSteps() { return m_ColorChanger_iSteps; }
238 void setColorChanger_iSteps(int value) { m_ColorChanger_iSteps = value; }
239 int getColorChanger_iDelay() { return m_ColorChanger_iDelay; }
240 void setColorChanger_iDelay(int value) { m_ColorChanger_iDelay = value; }
242 int getLrColorChanger_iSteps() { return m_LrColorChanger_iSteps; }
243 void setLrColorChanger_iSteps(int value) { m_LrColorChanger_iSteps = value; }
244 int getLrColorChanger_iDelay() { return m_LrColorChanger_iDelay; }
245 void setLrColorChanger_iDelay(int value) { m_LrColorChanger_iDelay = value; }
247 int getStaticColor_Red() { return m_StaticColor_Red; }
248 void setStaticColor_Red(int value) { m_StaticColor_Red=value; }
249 int getStaticColor_Green() { return m_StaticColor_Green; }
250 void setStaticColor_Green(int value) { m_StaticColor_Green=value; }
251 int getStaticColor_Blue() { return m_StaticColor_Blue; }
252 void setStaticColor_Blue(int value) { m_StaticColor_Blue=value; }
254 AtmoConnectionType getConnectionType() { return m_eAtmoConnectionType; }
255 void setConnectionType(AtmoConnectionType value) { m_eAtmoConnectionType = value; }
257 EffectMode getEffectMode() { return m_eEffectMode; }
258 void setEffectMode(EffectMode value) { m_eEffectMode = value; }
260 ATMO_BOOL getShow_statistics() { return m_show_statistics; }
262 AtmoFilterMode getLiveViewFilterMode() { return m_LiveViewFilterMode; }
263 void setLiveViewFilterMode(AtmoFilterMode value) { m_LiveViewFilterMode = value; }
265 int getLiveViewFilter_PercentNew() { return m_LiveViewFilter_PercentNew; }
266 void setLiveViewFilter_PercentNew(int value) { m_LiveViewFilter_PercentNew=value; }
267 int getLiveViewFilter_MeanLength() { return m_LiveViewFilter_MeanLength; }
268 void setLiveViewFilter_MeanLength(int value) { m_LiveViewFilter_MeanLength = value; }
269 int getLiveViewFilter_MeanThreshold() { return m_LiveViewFilter_MeanThreshold; }
270 void setLiveViewFilter_MeanThreshold(int value) { m_LiveViewFilter_MeanThreshold = value; }
272 int getLiveView_EdgeWeighting() { return m_LiveView_EdgeWeighting; }
273 void setLiveView_EdgeWeighting(int value) { m_LiveView_EdgeWeighting=value; }
275 int getLiveView_RowsPerFrame() { return m_LiveView_RowsPerFrame; }
276 void setLiveView_RowsPerFrame(int value) { m_LiveView_RowsPerFrame=value; }
278 int getLiveView_BrightCorrect() { return m_LiveView_BrightCorrect; }
279 void setLiveView_BrightCorrect(int value) { m_LiveView_BrightCorrect=value; }
281 int getLiveView_DarknessLimit() { return m_LiveView_DarknessLimit; }
282 void setLiveView_DarknessLimit(int value) { m_LiveView_DarknessLimit=value; }
284 int getLiveView_HueWinSize() { return m_LiveView_HueWinSize; }
285 void setLiveView_HueWinSize(int value) { m_LiveView_HueWinSize=value; }
287 int getLiveView_SatWinSize() { return m_LiveView_SatWinSize; }
288 void setLiveView_SatWinSize(int value) { m_LiveView_SatWinSize=value; }
290 int getLiveView_WidescreenMode() { return m_LiveView_WidescreenMode; }
291 void setLiveView_WidescreenMode(int value) { m_LiveView_WidescreenMode=value; }
293 int getLiveView_HOverscanBorder() { return m_LiveView_HOverscanBorder; }
294 void setLiveView_HOverscanBorder(int value) { m_LiveView_HOverscanBorder = value; }
296 int getLiveView_VOverscanBorder() { return m_LiveView_VOverscanBorder; }
297 void setLiveView_VOverscanBorder(int value) { m_LiveView_VOverscanBorder = value; }
299 int getLiveView_DisplayNr() { return m_LiveView_DisplayNr; }
300 void setLiveView_DisplayNr(int value) { m_LiveView_DisplayNr = value; }
302 int getLiveView_FrameDelay() { return m_LiveView_FrameDelay; }
303 void setLiveView_FrameDelay(int delay) { m_LiveView_FrameDelay = delay; }
305 int getLiveView_GDI_FrameRate() { return m_LiveView_GDI_FrameRate; }
306 void setLiveView_GDI_FrameRate(int value) { m_LiveView_GDI_FrameRate=value; }
308 int getHardware_global_gamma() { return m_Hardware_global_gamma ; }
309 void setHardware_global_gamma(int value) { m_Hardware_global_gamma=value; }
311 int getHardware_global_contrast() { return m_Hardware_global_contrast; }
312 void setHardware_global_contrast(int value) { m_Hardware_global_contrast=value; }
314 int getHardware_contrast_red() { return m_Hardware_contrast_red; }
315 void setHardware_contrast_red(int value) { m_Hardware_contrast_red=value; }
317 int getHardware_contrast_green() { return m_Hardware_contrast_green; }
318 void setHardware_contrast_green(int value) { m_Hardware_contrast_green=value; }
320 int getHardware_contrast_blue() { return m_Hardware_contrast_blue; }
321 void setHardware_contrast_blue(int value) { m_Hardware_contrast_blue=value; }
323 int getHardware_gamma_red() { return m_Hardware_gamma_red; }
324 void setHardware_gamma_red(int value) { m_Hardware_gamma_red=value; }
326 int getHardware_gamma_green() { return m_Hardware_gamma_green; }
327 void setHardware_gamma_green(int value) { m_Hardware_gamma_green=value; }
329 int getHardware_gamma_blue() { return m_Hardware_gamma_blue; }
330 void setHardware_gamma_blue(int value) { m_Hardware_gamma_blue=value; }
332 AtmoGammaCorrect getSoftware_gamma_mode() { return m_Software_gamma_mode; }
333 int getSoftware_gamma_red() { return m_Software_gamma_red; }
334 int getSoftware_gamma_green() { return m_Software_gamma_green; }
335 int getSoftware_gamma_blue() { return m_Software_gamma_blue; }
336 int getSoftware_gamma_global() { return m_Software_gamma_global; }
338 void setSoftware_gamma_mode(AtmoGammaCorrect value) { m_Software_gamma_mode = value; }
339 void setSoftware_gamma_red(int value) { m_Software_gamma_red = value; }
340 void setSoftware_gamma_green(int value) { m_Software_gamma_green = value; }
341 void setSoftware_gamma_blue(int value) { m_Software_gamma_blue = value; }
342 void setSoftware_gamma_global(int value) { m_Software_gamma_global = value; }
344 CAtmoChannelAssignment *getChannelAssignment(int nummer) {
345 return this->m_ChannelAssignments[nummer];
347 int getCurrentChannelAssignment() { return m_CurrentChannelAssignment; }
348 void setCurrentChannelAssignment(int index) { m_CurrentChannelAssignment = index; }
350 int getNumChannelAssignments();
351 void clearChannelMappings();
352 void clearAllChannelMappings();
353 void AddChannelAssignment(CAtmoChannelAssignment *ta);
354 void SetChannelAssignment(int index, CAtmoChannelAssignment *ta);
356 CAtmoZoneDefinition *getZoneDefinition(int zoneIndex);
358 void UpdateZoneCount();
360 void setZonesTopCount(int zones) { m_ZonesTopCount = zones; UpdateZoneCount(); };
361 int getZonesTopCount() { return m_ZonesTopCount; }
362 void setZonesBottomCount(int zones) { m_ZonesBottomCount = zones; UpdateZoneCount(); };
363 int getZonesBottomCount() { return m_ZonesBottomCount; }
364 void setZonesLRCount(int zones) { m_ZonesLRCount = zones; UpdateZoneCount(); };
365 int getZonesLRCount() { return m_ZonesLRCount; }
366 ATMO_BOOL getZoneSummary() { return m_ZoneSummary; }
367 void setZoneSummary(ATMO_BOOL summary) { m_ZoneSummary = summary; UpdateZoneCount(); }
369 char *getDMX_BaseChannels() { return m_DMX_BaseChannels; }
370 void setDMX_BaseChannels(char *channels);
372 int getDMX_RGB_Channels() { return m_DMX_RGB_Channels; }
373 void setDMX_RGB_Channels(int ch) { m_DMX_RGB_Channels = ch; }
375 int getMoMo_Channels() { return m_MoMo_Channels; }
376 void setMoMo_Channels(int chCount) { m_MoMo_Channels = chCount; }
378 int getFnordlicht_Amount() { return m_Fnordlicht_Amount; }
379 void setFnordlicht_Amount(int fnordlichtAmount) { m_Fnordlicht_Amount = fnordlichtAmount; }