cleanup PC Modes
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 23 May 2008 17:30:46 +0000 (17:30 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 23 May 2008 17:30:46 +0000 (17:30 +0000)
add 480p and 576p to DVI and YPbPr

lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
lib/python/Plugins/SystemPlugins/Videomode/plugin.py
lib/python/Plugins/SystemPlugins/Videomode/videowizard.xml

index 43543bb1bd4d5bd1ea82ba293c39da3f579aa924..d3389a75c0e386923637f2145ebb595bcdc0ba76 100644 (file)
@@ -22,17 +22,26 @@ class VideoHardware:
 
        modes = { }  # a list of (high-level) modes for a certain port.
 
 
        modes = { }  # a list of (high-level) modes for a certain port.
 
-       rates["PAL"] =                  { "50Hz":               { 50: "pal", 60: "pal"},
-                                                                                               "60Hz":         { 50: "pal60", 60: "pal60"},
-                                                                                               "multi":        { 50: "pal", 60: "pal60"} }
-       rates["NTSC"] =                 { "60Hz":       { 50: "ntsc", 60: "ntsc"} }
-       rates["Multi"] =                { "multi":      { 50: "pal", 60: "ntsc"} }
-       rates["720p"] =                 {       "50Hz":         { 50: "720p50", 60: "720p50"},
-                                                                                               "60Hz":         { 50: "720p", 60: "720p"},
-                                                                                               "multi":        { 50: "720p50", 60: "720p"} }
-       rates["1080i"] =                { "50Hz":               { 50: "1080i50", 60: "1080i50"},
-                                                                                               "60Hz":         { 50: "1080i", 60: "1080i"},
-                                                                                               "multi":        { 50: "1080i50", 60: "1080i"} }
+       rates["PAL"] =                  { "50Hz":               { 50: "pal" },
+                                                               "60Hz":         { 60: "pal60" },
+                                                               "multi":        { 50: "pal", 60: "pal60" } }
+
+       rates["NTSC"] =                 { "60Hz":       { 60: "ntsc" } }
+
+       rates["Multi"] =                { "multi":      { 50: "pal", 60: "ntsc" } }
+
+       rates["480p"] =                 { "60Hz":       { 60: "480p" } }
+
+       rates["576p"] =                 { "50Hz":       { 50: "576p" } }
+
+       rates["720p"] =                 { "50Hz":       { 50: "720p50", 60: "720p50" },
+                                                               "60Hz":         { 60: "720p" },
+                                                               "multi":        { 50: "720p50" } }
+
+       rates["1080i"] =                { "50Hz":               { 50: "1080i50" },
+                                                               "60Hz":         { 60: "1080i" },
+                                                               "multi":        { 50: "1080i50", 60: "1080i" } }
+
        rates["PC"] = { 
                "1024x768": { 60: "1024x768"}, # not possible on DM7025
                "800x600" : { 60: "800x600"},  # also not possible
        rates["PC"] = { 
                "1024x768": { 60: "1024x768"}, # not possible on DM7025
                "800x600" : { 60: "800x600"},  # also not possible
@@ -50,8 +59,8 @@ class VideoHardware:
        }
 
        modes["Scart"] = ["PAL", "NTSC", "Multi"]
        }
 
        modes["Scart"] = ["PAL", "NTSC", "Multi"]
-       modes["YPbPr"] = ["720p", "1080i"]
-       modes["DVI"] = ["720p", "1080i", "PC"]
+       modes["YPbPr"] = ["720p", "1080i", "576p", "480p"]
+       modes["DVI"] = ["720p", "1080i", "576p", "480p"]
        modes["DVI-PC"] = ["PC"]
 
        widescreen_modes = set(["720p", "1080i"])
        modes["DVI-PC"] = ["PC"]
 
        widescreen_modes = set(["720p", "1080i"])
index 115e81f77a38f887611b0391857fef18aa8ce8b3..eb58568e0563b9ea8bcd6cc8475e413dc1e544fe 100644 (file)
@@ -59,7 +59,10 @@ class VideoSetup(Screen, ConfigListScreen):
                if config.av.videoport.value in config.av.videomode:
                        # add mode- and rate-selection:
                        self.list.append(getConfigListEntry(_("Mode"), config.av.videomode[config.av.videoport.value]))
                if config.av.videoport.value in config.av.videomode:
                        # add mode- and rate-selection:
                        self.list.append(getConfigListEntry(_("Mode"), config.av.videomode[config.av.videoport.value]))
-                       self.list.append(getConfigListEntry(_("Refresh Rate"), config.av.videorate[config.av.videomode[config.av.videoport.value].value]))
+                       if config.av.videomode[config.av.videoport.value].value == 'PC':
+                               self.list.append(getConfigListEntry(_("Resolution"), config.av.videorate[config.av.videomode[config.av.videoport.value].value]))
+                       else:
+                               self.list.append(getConfigListEntry(_("Refresh Rate"), config.av.videorate[config.av.videomode[config.av.videoport.value].value]))
 
                port = config.av.videoport.value
                if port not in config.av.videomode:
 
                port = config.av.videoport.value
                if port not in config.av.videomode:
index df04086819f73f4c1a0463aee7ba304e75b441cd..48a5ad00ad2aa555af423bd7c4727d36778c666c 100644 (file)
@@ -49,7 +49,7 @@ self["rc"].startMoving()
        </step>
        <step id="dvirateintroduction" nextstep="dvirateselection">
                <condition>
        </step>
        <step id="dvirateintroduction" nextstep="dvirateselection">
                <condition>
-self.condition = (self.port == "DVI" and self.mode != "PC")
+self.condition = (self.port == "DVI" and self.mode in ["720p", "1080i"])
                </condition>
                <text value="We will now test if your TV can also display this resolution at 50hz. If your screen goes black, wait 20 seconds and it will switch back to 60hz.\nPlease press OK to begin." />
                <displaytext value="Please follow the instructions on the TV" />
                </condition>
                <text value="We will now test if your TV can also display this resolution at 50hz. If your screen goes black, wait 20 seconds and it will switch back to 60hz.\nPlease press OK to begin." />
                <displaytext value="Please follow the instructions on the TV" />
@@ -65,7 +65,7 @@ self.rateSelect("60Hz")
        </step>
        <step id="dvirateselection" timeout="10" timeoutaction="changestep" timeoutstep="notworking50Hz">
                <condition>
        </step>
        <step id="dvirateselection" timeout="10" timeoutaction="changestep" timeoutstep="notworking50Hz">
                <condition>
-self.condition = (self.port == "DVI" and self.mode != "PC")
+self.condition = (self.port == "DVI" and self.mode in ["720p", "1080i"])
                </condition>
                <text value="If you can see this page, please press OK." />
                <displaytext value="" />
                </condition>
                <text value="If you can see this page, please press OK." />
                <displaytext value="" />
@@ -87,7 +87,7 @@ self.rateSelect("60Hz")
        </step>
        <step id="notworking50Hz" nextstep="end">
                <condition>
        </step>
        <step id="notworking50Hz" nextstep="end">
                <condition>
-self.condition = (self.port == "DVI" and self.mode != "PC")
+self.condition = (self.port == "DVI" and self.mode in ["720p", "1080i"])
                </condition>
                <text value="No 50 Hz, sorry. :(" />
                <displaytext value="" />
                </condition>
                <text value="No 50 Hz, sorry. :(" />
                <displaytext value="" />
@@ -102,7 +102,7 @@ self["rc"].startMoving()
        </step>
        <step id="working50Hz" nextstep="end" timeout="10" timeoutaction="nextstep">
                <condition>
        </step>
        <step id="working50Hz" nextstep="end" timeout="10" timeoutaction="nextstep">
                <condition>
-self.condition = (self.port == "DVI" and self.mode != "PC")
+self.condition = (self.port == "DVI" and self.mode in ["720p", "1080i"])
                </condition>
                <text value="Your TV works with 50 Hz. Good!" />
                <displaytext value="" />
                </condition>
                <text value="Your TV works with 50 Hz. Good!" />
                <displaytext value="" />