AtmoConfig.h

Go to the documentation of this file.
00001 /*
00002  * AtmoConfig.h: Class for holding all configuration values of AtmoWin
00003  *
00004  * See the README.txt file for copyright information and how to reach the author(s).
00005  *
00006  * $Id: 656c20ed72135e350d9b6c1973dee29fb036dc03 $
00007  */
00008 
00009 #ifndef _AtmoConfig_h_
00010 #define _AtmoConfig_h_
00011 
00012 #include <stdlib.h>
00013 
00014 #include "AtmoDefs.h"
00015 #include "AtmoZoneDefinition.h"
00016 #include "AtmoChannelAssignment.h"
00017 
00018 #if defined(_ATMO_VLC_PLUGIN_)
00019 #   include <string.h>
00020 #endif
00021 
00022 
00023 class CAtmoConfig {
00024 
00025     protected:
00026        int m_IsShowConfigDialog;    
00027 #if defined(_ATMO_VLC_PLUGIN_)
00028        char *m_devicename;
00029        char *m_devicenames[3]; // additional Devices ?
00030 #else
00031        int m_Comport;
00032        int m_Comports[3]; // additional Comports
00033 #endif
00034        enum AtmoConnectionType m_eAtmoConnectionType;
00035        enum EffectMode m_eEffectMode;
00036 
00037        ATMO_BOOL m_IgnoreConnectionErrorOnStartup;
00038 
00039     protected:
00040        ATMO_BOOL m_UseSoftwareWhiteAdj;
00041        int m_WhiteAdjustment_Red;
00042        int m_WhiteAdjustment_Green;
00043        int m_WhiteAdjustment_Blue;
00044 
00045     protected:
00046        int m_IsSetShutdownColor;
00047        int m_ShutdownColor_Red;
00048        int m_ShutdownColor_Green;
00049        int m_ShutdownColor_Blue;
00050 
00051     protected:
00052        /* Config Values for Color Changer */
00053        int m_ColorChanger_iSteps;
00054        int m_ColorChanger_iDelay;
00055 
00056     protected:
00057         /* Config  values for the primitive Left Right Color Changer */
00058        int m_LrColorChanger_iSteps;
00059        int m_LrColorChanger_iDelay;
00060 
00061     protected:
00062        /* the static background color */
00063        int m_StaticColor_Red;
00064        int m_StaticColor_Green;
00065        int m_StaticColor_Blue;
00066 
00067     protected:
00068         /*
00069            one for System + 9 for userdefined channel
00070            assignments (will it be enough?)
00071         */
00072         CAtmoChannelAssignment *m_ChannelAssignments[10];
00073         int m_CurrentChannelAssignment;
00074 
00075     protected:
00076         CAtmoZoneDefinition **m_ZoneDefinitions;
00077         int m_AtmoZoneDefCount;
00078 
00079 
00080         /*
00081           zone layout description for generating the default Zone weightning
00082         */
00083         // count of zone on the top of the screen
00084         int m_ZonesTopCount;
00085         // count of zone on the bottom of the screen
00086         int m_ZonesBottomCount;
00087         // count of zones on left and right (the same count)
00088         int m_ZonesLRCount;
00089 
00090         // does a summary Zone exists (Fullscreen)
00091         int m_computed_zones_count;
00092         ATMO_BOOL m_ZoneSummary;
00093 
00094     public:
00095         int getZoneCount();
00096 
00097 
00098     protected:
00099         /* Live View Parameters (most interesting) */
00100         AtmoFilterMode m_LiveViewFilterMode;
00101         int m_LiveViewFilter_PercentNew;
00102         int m_LiveViewFilter_MeanLength;
00103         int m_LiveViewFilter_MeanThreshold;
00104 
00105         ATMO_BOOL m_show_statistics;
00106 
00107         // weighting of distance to edge
00108         int m_LiveView_EdgeWeighting; //  = 8;
00109         // brightness correction
00110         int m_LiveView_BrightCorrect; //  = 100;
00111         // darkness limit (pixels below this value will be ignored)
00112         int m_LiveView_DarknessLimit; //  = 5;
00113         // Windowing size for hue histogram building
00114         int m_LiveView_HueWinSize;    //  = 3;
00115         // Windowing size for sat histogram building
00116         int m_LiveView_SatWinSize;    //  = 3;
00117         /*
00118           special (hack) for ignorning black borders durring
00119           playback of letterboxed material on a 16:9 output device
00120         */
00121         int m_LiveView_WidescreenMode; // = 0
00122 
00123         // border from source image which should be ignored
00124         // the values are only used by the Win32 GDI Screen capture
00125         int m_LiveView_HOverscanBorder;
00126         int m_LiveView_VOverscanBorder;
00127         int m_LiveView_DisplayNr;
00128 
00129         /*
00130            a special delay to get the light in sync with the video
00131            was required because the frames will pass my VLC filter some [ms]
00132            before they become visible on screen with this delay - screenoutput
00133            and light timing could be "synchronized"
00134         */
00135         int m_LiveView_FrameDelay;
00136 
00137         int m_LiveView_GDI_FrameRate;
00138 
00139     protected:
00140          /* values of the last hardware white adjustment (only for hardware with new firmware) */
00141          int m_Hardware_global_gamma;
00142          int m_Hardware_global_contrast;
00143          int m_Hardware_contrast_red;
00144          int m_Hardware_contrast_green;
00145          int m_Hardware_contrast_blue;
00146          int m_Hardware_gamma_red;
00147          int m_Hardware_gamma_green;
00148          int m_Hardware_gamma_blue;
00149 
00150     protected:
00151          char *m_DMX_BaseChannels;
00152          int m_DMX_RGB_Channels;
00153 
00154     protected:
00155          int m_MoMo_Channels;
00156 
00157     protected:
00158          AtmoGammaCorrect m_Software_gamma_mode;
00159 
00160          int m_Software_gamma_red;
00161          int m_Software_gamma_green;
00162          int m_Software_gamma_blue;
00163 
00164          int m_Software_gamma_global;
00165     public:
00166         volatile int m_UpdateEdgeWeightningFlag;
00167 
00168 
00169     public:
00170        CAtmoConfig();
00171        virtual ~CAtmoConfig();
00172        virtual void SaveSettings() {}
00173        virtual void LoadSettings() {};
00174        void LoadDefaults();
00175 
00176        /*
00177          function to copy  the values of one configuration object to another
00178          will be used in windows settings dialog as backup if the user
00179          presses cancel
00180        */
00181        void Assign(CAtmoConfig *pAtmoConfigSrc);
00182 
00183        void UpdateZoneDefinitionCount();
00184 
00185     public:
00186         int isShowConfigDialog()            { return m_IsShowConfigDialog; }
00187         void setShowConfigDialog(int value) { m_IsShowConfigDialog = value; }
00188 
00189 #if defined(_ATMO_VLC_PLUGIN_)
00190         char *getSerialDevice()               { return m_devicename; }
00191         void setSerialDevice(const char *newdevice) { free(m_devicename); if(newdevice) m_devicename = strdup(newdevice); else m_devicename = NULL; }
00192         char *getSerialDevice(int i);
00193         void setSerialDevice(int i,const char *pszNewDevice);
00194 #else
00195         int getComport()                    { return m_Comport; }
00196         void setComport(int value)          { m_Comport = value; }
00197         int getComport(int i);
00198         void setComport(int i, int nr);
00199 #endif
00200 
00201         ATMO_BOOL getIgnoreConnectionErrorOnStartup() { return m_IgnoreConnectionErrorOnStartup; }
00202         void setIgnoreConnectionErrorOnStartup(ATMO_BOOL ignore) { m_IgnoreConnectionErrorOnStartup = ignore; }
00203 
00204         int getWhiteAdjustment_Red() { return m_WhiteAdjustment_Red;  }
00205         void setWhiteAdjustment_Red(int value) { m_WhiteAdjustment_Red = value; }
00206         int getWhiteAdjustment_Green() { return m_WhiteAdjustment_Green;  }
00207         void setWhiteAdjustment_Green(int value) { m_WhiteAdjustment_Green = value; }
00208         int getWhiteAdjustment_Blue() { return m_WhiteAdjustment_Blue;  }
00209         void setWhiteAdjustment_Blue(int value) { m_WhiteAdjustment_Blue = value; }
00210         ATMO_BOOL isUseSoftwareWhiteAdj() { return m_UseSoftwareWhiteAdj; }
00211         void setUseSoftwareWhiteAdj(ATMO_BOOL value) { m_UseSoftwareWhiteAdj = value; }
00212 
00213         int isSetShutdownColor()     { return m_IsSetShutdownColor; }
00214         void SetSetShutdownColor(int value) { m_IsSetShutdownColor = value; }
00215         int getShutdownColor_Red()   { return m_ShutdownColor_Red; }
00216         void setShutdownColor_Red(int value) { m_ShutdownColor_Red = value; }
00217         int getShutdownColor_Green() { return m_ShutdownColor_Green; }
00218         void setShutdownColor_Green(int value) { m_ShutdownColor_Green = value; }
00219         int getShutdownColor_Blue()  { return m_ShutdownColor_Blue; }
00220         void setShutdownColor_Blue(int value) { m_ShutdownColor_Blue=value; }
00221 
00222         int getColorChanger_iSteps() { return m_ColorChanger_iSteps; }
00223         void setColorChanger_iSteps(int value) { m_ColorChanger_iSteps = value; }
00224         int getColorChanger_iDelay() { return m_ColorChanger_iDelay; }
00225         void setColorChanger_iDelay(int value) { m_ColorChanger_iDelay = value; }
00226 
00227         int getLrColorChanger_iSteps() { return m_LrColorChanger_iSteps; }
00228         void setLrColorChanger_iSteps(int value) { m_LrColorChanger_iSteps = value; }
00229         int getLrColorChanger_iDelay() { return m_LrColorChanger_iDelay; }
00230         void setLrColorChanger_iDelay(int value) { m_LrColorChanger_iDelay = value; }
00231 
00232         int getStaticColor_Red()   { return m_StaticColor_Red;   }
00233         void setStaticColor_Red(int value)  { m_StaticColor_Red=value; }
00234         int getStaticColor_Green() { return m_StaticColor_Green; }
00235         void setStaticColor_Green(int value) { m_StaticColor_Green=value; }
00236         int getStaticColor_Blue()  { return m_StaticColor_Blue;  }
00237         void  setStaticColor_Blue(int value) { m_StaticColor_Blue=value; }
00238 
00239 
00240         AtmoConnectionType getConnectionType() { return m_eAtmoConnectionType; }
00241         void setConnectionType(AtmoConnectionType value) { m_eAtmoConnectionType = value; }
00242 
00243         EffectMode getEffectMode() { return m_eEffectMode; }
00244         void setEffectMode(EffectMode value) { m_eEffectMode = value; }
00245 
00246         ATMO_BOOL getShow_statistics() { return m_show_statistics; }
00247 
00248         AtmoFilterMode getLiveViewFilterMode() { return m_LiveViewFilterMode; }
00249         void setLiveViewFilterMode(AtmoFilterMode value) { m_LiveViewFilterMode = value; }
00250 
00251         int getLiveViewFilter_PercentNew() { return m_LiveViewFilter_PercentNew; }
00252         void setLiveViewFilter_PercentNew(int value) { m_LiveViewFilter_PercentNew=value; }
00253         int getLiveViewFilter_MeanLength() { return m_LiveViewFilter_MeanLength; }
00254         void setLiveViewFilter_MeanLength(int value) { m_LiveViewFilter_MeanLength = value; }
00255         int getLiveViewFilter_MeanThreshold() { return m_LiveViewFilter_MeanThreshold; }
00256         void setLiveViewFilter_MeanThreshold(int value) { m_LiveViewFilter_MeanThreshold = value; }
00257 
00258         int getLiveView_EdgeWeighting() { return m_LiveView_EdgeWeighting; }
00259         void setLiveView_EdgeWeighting(int value) { m_LiveView_EdgeWeighting=value; }
00260 
00261         int getLiveView_BrightCorrect() { return m_LiveView_BrightCorrect; }
00262         void setLiveView_BrightCorrect(int value) { m_LiveView_BrightCorrect=value; }
00263 
00264         int getLiveView_DarknessLimit() { return m_LiveView_DarknessLimit; }
00265         void setLiveView_DarknessLimit(int value) { m_LiveView_DarknessLimit=value; }
00266 
00267         int getLiveView_HueWinSize() { return m_LiveView_HueWinSize; }
00268         void setLiveView_HueWinSize(int value) { m_LiveView_HueWinSize=value; }
00269 
00270         int getLiveView_SatWinSize() { return m_LiveView_SatWinSize; }
00271         void setLiveView_SatWinSize(int value) { m_LiveView_SatWinSize=value; }
00272 
00273         int getLiveView_WidescreenMode() { return m_LiveView_WidescreenMode; }
00274         void setLiveView_WidescreenMode(int value) { m_LiveView_WidescreenMode=value; }
00275 
00276         int getLiveView_HOverscanBorder() { return m_LiveView_HOverscanBorder; }
00277         void setLiveView_HOverscanBorder(int value) { m_LiveView_HOverscanBorder = value; }
00278 
00279         int getLiveView_VOverscanBorder() { return m_LiveView_VOverscanBorder; }
00280         void setLiveView_VOverscanBorder(int value) { m_LiveView_VOverscanBorder = value; }
00281 
00282         int getLiveView_DisplayNr() { return m_LiveView_DisplayNr; }
00283         void setLiveView_DisplayNr(int value) { m_LiveView_DisplayNr = value; }
00284 
00285         int getLiveView_FrameDelay() { return m_LiveView_FrameDelay; }
00286         void setLiveView_FrameDelay(int delay) { m_LiveView_FrameDelay = delay; }
00287 
00288         int getLiveView_GDI_FrameRate() { return m_LiveView_GDI_FrameRate; }
00289         void setLiveView_GDI_FrameRate(int value) { m_LiveView_GDI_FrameRate=value; }
00290 
00291         int getHardware_global_gamma() { return m_Hardware_global_gamma ; }
00292         void setHardware_global_gamma(int value) { m_Hardware_global_gamma=value; }
00293 
00294         int getHardware_global_contrast() { return m_Hardware_global_contrast; }
00295         void setHardware_global_contrast(int value) { m_Hardware_global_contrast=value; }
00296 
00297         int getHardware_contrast_red() { return m_Hardware_contrast_red; }
00298         void setHardware_contrast_red(int value) { m_Hardware_contrast_red=value; }
00299 
00300         int getHardware_contrast_green() { return m_Hardware_contrast_green; }
00301         void setHardware_contrast_green(int value) { m_Hardware_contrast_green=value; }
00302 
00303         int getHardware_contrast_blue() { return m_Hardware_contrast_blue; }
00304         void setHardware_contrast_blue(int value) { m_Hardware_contrast_blue=value; }
00305 
00306         int getHardware_gamma_red() { return m_Hardware_gamma_red; }
00307         void setHardware_gamma_red(int value) { m_Hardware_gamma_red=value; }
00308 
00309         int getHardware_gamma_green() { return m_Hardware_gamma_green; }
00310         void setHardware_gamma_green(int value) { m_Hardware_gamma_green=value; }
00311 
00312         int getHardware_gamma_blue() { return m_Hardware_gamma_blue; }
00313         void setHardware_gamma_blue(int value) { m_Hardware_gamma_blue=value; }
00314 
00315 
00316         AtmoGammaCorrect getSoftware_gamma_mode() { return m_Software_gamma_mode; }
00317         int getSoftware_gamma_red() { return m_Software_gamma_red; }
00318         int getSoftware_gamma_green() { return m_Software_gamma_green; }
00319         int getSoftware_gamma_blue() { return m_Software_gamma_blue; }
00320         int getSoftware_gamma_global() { return m_Software_gamma_global; }
00321 
00322         void setSoftware_gamma_mode(AtmoGammaCorrect value) { m_Software_gamma_mode = value; }
00323         void setSoftware_gamma_red(int value)    { m_Software_gamma_red = value; }
00324         void setSoftware_gamma_green(int value)  { m_Software_gamma_green = value; }
00325         void setSoftware_gamma_blue(int value)   { m_Software_gamma_blue = value; }
00326         void setSoftware_gamma_global(int value) { m_Software_gamma_global = value; }
00327 
00328         CAtmoChannelAssignment *getChannelAssignment(int nummer) {
00329             return this->m_ChannelAssignments[nummer];
00330         }
00331         int getCurrentChannelAssignment() { return m_CurrentChannelAssignment; }
00332         void setCurrentChannelAssignment(int index) { m_CurrentChannelAssignment = index; }
00333 
00334         int getNumChannelAssignments();
00335         void clearChannelMappings();
00336         void clearAllChannelMappings();
00337         void AddChannelAssignment(CAtmoChannelAssignment *ta);
00338         void SetChannelAssignment(int index, CAtmoChannelAssignment *ta);
00339 
00340         CAtmoZoneDefinition *getZoneDefinition(int zoneIndex);
00341 
00342         void UpdateZoneCount();
00343 
00344         void setZonesTopCount(int zones) { m_ZonesTopCount = zones; UpdateZoneCount(); };
00345         int getZonesTopCount() { return m_ZonesTopCount; }
00346         void setZonesBottomCount(int zones) { m_ZonesBottomCount = zones; UpdateZoneCount(); };
00347         int getZonesBottomCount() { return m_ZonesBottomCount; }
00348         void setZonesLRCount(int zones) { m_ZonesLRCount = zones; UpdateZoneCount(); };
00349         int getZonesLRCount() { return m_ZonesLRCount; }
00350         ATMO_BOOL getZoneSummary() { return m_ZoneSummary; }
00351         void setZoneSummary(ATMO_BOOL summary) { m_ZoneSummary = summary; UpdateZoneCount(); }
00352 
00353         char *getDMX_BaseChannels() { return m_DMX_BaseChannels; }
00354         void setDMX_BaseChannels(char *channels);
00355 
00356         int getDMX_RGB_Channels() { return m_DMX_RGB_Channels; }
00357         void setDMX_RGB_Channels(int ch) { m_DMX_RGB_Channels = ch; }
00358 
00359         int getMoMo_Channels() { return m_MoMo_Channels; }
00360         void setMoMo_Channels(int chCount) { m_MoMo_Channels = chCount; }
00361 
00362 };
00363 
00364 #endif

Generated on Tue May 25 08:04:59 2010 for VLC by  doxygen 1.5.6