[videomode] support VusoloSE
authorsmlee <smlee@dev3>
Wed, 14 May 2014 09:34:58 +0000 (18:34 +0900)
committersmlee <smlee@dev3>
Wed, 14 May 2014 09:34:58 +0000 (18:34 +0900)
lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py

index aef9d8d..fb07cf3 100644 (file)
@@ -56,8 +56,10 @@ class VideoHardware:
        }
 
        widescreen_modes = set(["720p", "1080i", "1080p"])
        }
 
        widescreen_modes = set(["720p", "1080i", "1080p"])
-       hdmi_hw_types = set(["dm500", "dm800se", "dm7020hd", "bm750", "solo", "uno", "ultimo", "solo2", "duo2"])
-       hdmi_pc_hw_types = set(["dm500", "dm800se", "dm7020hd", "bm750", "solo", "uno", "ultimo", "solo2", "duo2"])
+       hdmi_hw_types = set(["dm500", "dm800se", "dm7020hd", "bm750", "solo", "uno", "ultimo", "solo2", "duo2", "solose"])
+       hdmi_pc_hw_types = set(["dm500", "dm800se", "dm7020hd", "bm750", "solo", "uno", "ultimo", "solo2", "duo2", "solose"])
+       noscart_hw_types = set(["solose"])
+       noypbpr_hw_types = set(["solose"])
 
        def getDeviceName(self):
                device_name = "unknown"
 
        def getDeviceName(self):
                device_name = "unknown"
@@ -72,7 +74,7 @@ class VideoHardware:
                return device_name
 
        def isVumodel(self, hw_type):
                return device_name
 
        def isVumodel(self, hw_type):
-               return hw_type in set(["bm750", "solo", "uno", "ultimo", "solo2", "duo2"])
+               return hw_type in set(["bm750", "solo", "uno", "ultimo", "solo2", "duo2", "solose"])
 
        # re-define AVSwitch.getOutputAspect
        def getOutputAspect(self):
 
        # re-define AVSwitch.getOutputAspect
        def getOutputAspect(self):
@@ -110,6 +112,16 @@ class VideoHardware:
                        print "remove DVI-PC because it does not exist."
                        del self.modes["DVI-PC"]
 
                        print "remove DVI-PC because it does not exist."
                        del self.modes["DVI-PC"]
 
+               if self.isNoScart(self.getDeviceName()):
+                       if self.modes.has_key("Scart"):
+                               print "remove Scart because it does not exist."
+                               del self.modes["Scart"]
+
+               if self.isNoYPbPr(self.getDeviceName()):
+                       if self.modes.has_key("YPbPr"):
+                               print "remove YPbPr because it does not exist."
+                               del self.modes["YPbPr"]
+
                self.createConfig()
 
                self.readPreferredModes()
                self.createConfig()
 
                self.readPreferredModes()
@@ -168,6 +180,14 @@ class VideoHardware:
        def isWidescreenMode(self, mode):
                return mode in self.widescreen_modes
 
        def isWidescreenMode(self, mode):
                return mode in self.widescreen_modes
 
+       # check if Scart is not available
+       def isNoScart(self, hw_type):
+               return hw_type in self.noscart_hw_types
+
+       # check if YPbPr is not available
+       def isNoYPbPr(self, hw_type):
+               return hw_type in self.noypbpr_hw_types
+
        # check if rate is available for mode
        def isModeAvailable(self, port, mode, rate):
                rate = self.rates[mode][rate]
        # check if rate is available for mode
        def isModeAvailable(self, port, mode, rate):
                rate = self.rates[mode][rate]