]> git.sesse.net Git - vlc/blobdiff - modules/video_filter/atmo/AtmoConfig.h
enhanced & corrected AtmoLight filter module
[vlc] / modules / video_filter / atmo / AtmoConfig.h
index 52c57f3fd9e346cb5917e9b8c3f8e53f1aed05ff..656c20ed72135e350d9b6c1973dee29fb036dc03 100644 (file)
@@ -9,11 +9,13 @@
 #ifndef _AtmoConfig_h_
 #define _AtmoConfig_h_
 
+#include <stdlib.h>
+
 #include "AtmoDefs.h"
 #include "AtmoZoneDefinition.h"
+#include "AtmoChannelAssignment.h"
 
 #if defined(_ATMO_VLC_PLUGIN_)
-#   include <stdlib.h>
 #   include <string.h>
 #endif
 
@@ -24,12 +26,16 @@ class CAtmoConfig {
           int m_IsShowConfigDialog;    
 #if defined(_ATMO_VLC_PLUGIN_)
        char *m_devicename;
+       char *m_devicenames[3]; // additional Devices ?
 #else
           int m_Comport;
+       int m_Comports[3]; // additional Comports
 #endif
        enum AtmoConnectionType m_eAtmoConnectionType;
        enum EffectMode m_eEffectMode;
 
+       ATMO_BOOL m_IgnoreConnectionErrorOnStartup;
+
     protected:
        ATMO_BOOL m_UseSoftwareWhiteAdj;
        int m_WhiteAdjustment_Red;
@@ -63,11 +69,30 @@ class CAtmoConfig {
            one for System + 9 for userdefined channel
            assignments (will it be enough?)
         */
-        tChannelAssignment *m_ChannelAssignments[10];
+        CAtmoChannelAssignment *m_ChannelAssignments[10];
         int m_CurrentChannelAssignment;
 
     protected:
-        CAtmoZoneDefinition *m_ZoneDefinitions[ATMO_NUM_CHANNELS];
+        CAtmoZoneDefinition **m_ZoneDefinitions;
+        int m_AtmoZoneDefCount;
+
+
+        /*
+          zone layout description for generating the default Zone weightning
+        */
+        // count of zone on the top of the screen
+        int m_ZonesTopCount;
+        // count of zone on the bottom of the screen
+        int m_ZonesBottomCount;
+        // count of zones on left and right (the same count)
+        int m_ZonesLRCount;
+
+        // does a summary Zone exists (Fullscreen)
+        int m_computed_zones_count;
+        ATMO_BOOL m_ZoneSummary;
+
+    public:
+        int getZoneCount();
 
 
     protected:
@@ -77,6 +102,8 @@ class CAtmoConfig {
         int m_LiveViewFilter_MeanLength;
         int m_LiveViewFilter_MeanThreshold;
 
+        ATMO_BOOL m_show_statistics;
+
         // weighting of distance to edge
         int m_LiveView_EdgeWeighting; //  = 8;
         // brightness correction
@@ -107,6 +134,8 @@ class CAtmoConfig {
         */
         int m_LiveView_FrameDelay;
 
+        int m_LiveView_GDI_FrameRate;
+
     protected:
          /* values of the last hardware white adjustment (only for hardware with new firmware) */
          int m_Hardware_global_gamma;
@@ -118,6 +147,25 @@ class CAtmoConfig {
          int m_Hardware_gamma_green;
          int m_Hardware_gamma_blue;
 
+    protected:
+         char *m_DMX_BaseChannels;
+         int m_DMX_RGB_Channels;
+
+    protected:
+         int m_MoMo_Channels;
+
+    protected:
+         AtmoGammaCorrect m_Software_gamma_mode;
+
+         int m_Software_gamma_red;
+         int m_Software_gamma_green;
+         int m_Software_gamma_blue;
+
+         int m_Software_gamma_global;
+    public:
+        volatile int m_UpdateEdgeWeightningFlag;
+
+
     public:
        CAtmoConfig();
        virtual ~CAtmoConfig();
@@ -132,18 +180,27 @@ class CAtmoConfig {
        */
        void Assign(CAtmoConfig *pAtmoConfigSrc);
 
+       void UpdateZoneDefinitionCount();
+
     public:
         int isShowConfigDialog()            { return m_IsShowConfigDialog; }
         void setShowConfigDialog(int value) { m_IsShowConfigDialog = value; }
 
 #if defined(_ATMO_VLC_PLUGIN_)
         char *getSerialDevice()               { return m_devicename; }
-        void setSerialDevice(char *newdevice) { free( m_devicename ); if(newdevice) m_devicename = strdup(newdevice); else m_devicename = NULL; }
+        void setSerialDevice(const char *newdevice) { free(m_devicename); if(newdevice) m_devicename = strdup(newdevice); else m_devicename = NULL; }
+        char *getSerialDevice(int i);
+        void setSerialDevice(int i,const char *pszNewDevice);
 #else
         int getComport()                    { return m_Comport; }
         void setComport(int value)          { m_Comport = value; }
+        int getComport(int i);
+        void setComport(int i, int nr);
 #endif
 
+        ATMO_BOOL getIgnoreConnectionErrorOnStartup() { return m_IgnoreConnectionErrorOnStartup; }
+        void setIgnoreConnectionErrorOnStartup(ATMO_BOOL ignore) { m_IgnoreConnectionErrorOnStartup = ignore; }
+
         int getWhiteAdjustment_Red() { return m_WhiteAdjustment_Red;  }
         void setWhiteAdjustment_Red(int value) { m_WhiteAdjustment_Red = value; }
         int getWhiteAdjustment_Green() { return m_WhiteAdjustment_Green;  }
@@ -186,6 +243,8 @@ class CAtmoConfig {
         EffectMode getEffectMode() { return m_eEffectMode; }
         void setEffectMode(EffectMode value) { m_eEffectMode = value; }
 
+        ATMO_BOOL getShow_statistics() { return m_show_statistics; }
+
         AtmoFilterMode getLiveViewFilterMode() { return m_LiveViewFilterMode; }
         void setLiveViewFilterMode(AtmoFilterMode value) { m_LiveViewFilterMode = value; }
 
@@ -226,6 +285,9 @@ class CAtmoConfig {
         int getLiveView_FrameDelay() { return m_LiveView_FrameDelay; }
         void setLiveView_FrameDelay(int delay) { m_LiveView_FrameDelay = delay; }
 
+        int getLiveView_GDI_FrameRate() { return m_LiveView_GDI_FrameRate; }
+        void setLiveView_GDI_FrameRate(int value) { m_LiveView_GDI_FrameRate=value; }
+
         int getHardware_global_gamma() { return m_Hardware_global_gamma ; }
         void setHardware_global_gamma(int value) { m_Hardware_global_gamma=value; }
 
@@ -250,7 +312,20 @@ class CAtmoConfig {
         int getHardware_gamma_blue() { return m_Hardware_gamma_blue; }
         void setHardware_gamma_blue(int value) { m_Hardware_gamma_blue=value; }
 
-        tChannelAssignment *getChannelAssignment(int nummer) {
+
+        AtmoGammaCorrect getSoftware_gamma_mode() { return m_Software_gamma_mode; }
+        int getSoftware_gamma_red() { return m_Software_gamma_red; }
+        int getSoftware_gamma_green() { return m_Software_gamma_green; }
+        int getSoftware_gamma_blue() { return m_Software_gamma_blue; }
+        int getSoftware_gamma_global() { return m_Software_gamma_global; }
+
+        void setSoftware_gamma_mode(AtmoGammaCorrect value) { m_Software_gamma_mode = value; }
+        void setSoftware_gamma_red(int value)    { m_Software_gamma_red = value; }
+        void setSoftware_gamma_green(int value)  { m_Software_gamma_green = value; }
+        void setSoftware_gamma_blue(int value)   { m_Software_gamma_blue = value; }
+        void setSoftware_gamma_global(int value) { m_Software_gamma_global = value; }
+
+        CAtmoChannelAssignment *getChannelAssignment(int nummer) {
             return this->m_ChannelAssignments[nummer];
         }
         int getCurrentChannelAssignment() { return m_CurrentChannelAssignment; }
@@ -259,11 +334,31 @@ class CAtmoConfig {
         int getNumChannelAssignments();
         void clearChannelMappings();
         void clearAllChannelMappings();
-        void AddChannelAssignment(tChannelAssignment *ta);
-        void SetChannelAssignment(int index, tChannelAssignment *ta);
+        void AddChannelAssignment(CAtmoChannelAssignment *ta);
+        void SetChannelAssignment(int index, CAtmoChannelAssignment *ta);
 
         CAtmoZoneDefinition *getZoneDefinition(int zoneIndex);
 
+        void UpdateZoneCount();
+
+        void setZonesTopCount(int zones) { m_ZonesTopCount = zones; UpdateZoneCount(); };
+        int getZonesTopCount() { return m_ZonesTopCount; }
+        void setZonesBottomCount(int zones) { m_ZonesBottomCount = zones; UpdateZoneCount(); };
+        int getZonesBottomCount() { return m_ZonesBottomCount; }
+        void setZonesLRCount(int zones) { m_ZonesLRCount = zones; UpdateZoneCount(); };
+        int getZonesLRCount() { return m_ZonesLRCount; }
+        ATMO_BOOL getZoneSummary() { return m_ZoneSummary; }
+        void setZoneSummary(ATMO_BOOL summary) { m_ZoneSummary = summary; UpdateZoneCount(); }
+
+        char *getDMX_BaseChannels() { return m_DMX_BaseChannels; }
+        void setDMX_BaseChannels(char *channels);
+
+        int getDMX_RGB_Channels() { return m_DMX_RGB_Channels; }
+        void setDMX_RGB_Channels(int ch) { m_DMX_RGB_Channels = ch; }
+
+        int getMoMo_Channels() { return m_MoMo_Channels; }
+        void setMoMo_Channels(int chCount) { m_MoMo_Channels = chCount; }
+
 };
 
 #endif