allow separate configuration of aspect ratio
authorFelix Domke <tmbinc@elitedvb.net>
Mon, 26 Jan 2009 16:04:24 +0000 (17:04 +0100)
committerFelix Domke <tmbinc@elitedvb.net>
Mon, 26 Jan 2009 16:04:24 +0000 (17:04 +0100)
 - used when viewing >16:9 content on 16:9 TV,
 - used when viewing 4:3 content on 16:9 TV

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

index 02fdf9a..7149504 100644 (file)
@@ -293,6 +293,7 @@ class VideoHardware:
 
                is_widescreen = force_widescreen or config.av.aspect.value in ["16_9", "16_10"]
                is_auto = config.av.aspect.value == "auto"
+               policy2 = "policy" # use main policy
 
                if is_widescreen:
                        if force_widescreen:
@@ -300,6 +301,7 @@ class VideoHardware:
                        else:
                                aspect = {"16_9": "16:9", "16_10": "16:10"}[config.av.aspect.value]
                        policy = {"pillarbox": "panscan", "panscan": "letterbox", "nonlinear": "nonlinear", "scale": "bestfit"}[config.av.policy_43.value]
+                       policy2 = {"letterbox": "letterbox", "panscan": "panscan", "scale": "bestfit"}[config.av.policy_169.value]
                elif is_auto:
                        aspect = "any"
                        policy = "bestfit"
@@ -312,10 +314,14 @@ class VideoHardware:
                else:
                        wss = "auto"
 
-               print "-> setting aspect, policy, wss", aspect, policy, wss
+               print "-> setting aspect, policy, policy2, wss", aspect, policy, policy2, wss
                open("/proc/stb/video/aspect", "w").write(aspect)
                open("/proc/stb/video/policy", "w").write(policy)
                open("/proc/stb/denc/0/wss", "w").write(wss)
+               try:
+                       open("/proc/stb/video/policy2", "w").write(policy2)
+               except IOError:
+                       pass
                self.updateSlowblank()
                self.updateFastblank()
 
index ab7aad7..30bdf79 100644 (file)
@@ -78,6 +78,7 @@ class VideoSetup(Screen, ConfigListScreen):
 
                if force_wide or config.av.aspect.value in ["16_9", "16_10"]:
                        self.list.append(getConfigListEntry(_("Display 4:3 content as"), config.av.policy_43))
+                       self.list.append(getConfigListEntry(_("Display >16:9 content as"), config.av.policy_169))
                elif config.av.aspect.value == "4_3":
                        self.list.append(getConfigListEntry(_("Display 16:9 content as"), config.av.policy_169))