aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2008-11-17 21:17:34 +0100
committerghost <andreas.monzner@multimedia-labs.de>2008-11-17 21:17:34 +0100
commit9ccb92fb3eaca35ec60c1a596db9620f9f302044 (patch)
treef4a248e012ab24ab869e862212eb0643ed4a77d6 /lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
parent5eb41508927a7f48d09d52e158e136fa07252dac (diff)
downloadenigma2-9ccb92fb3eaca35ec60c1a596db9620f9f302044.tar.gz
enigma2-9ccb92fb3eaca35ec60c1a596db9620f9f302044.zip
more changes for async picture decode support
Diffstat (limited to 'lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py')
-rw-r--r--lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py b/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
index 2422475e..5e38f3e6 100644
--- a/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
+++ b/lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py
@@ -59,6 +59,34 @@ class VideoHardware:
widescreen_modes = set(["720p", "1080i"])
+ def getOutputAspect(self):
+ ret = 1.777777778 # 16:9
+ port = config.av.videoport.value
+ if port not in config.av.videomode:
+ print "current port not available in getOutputAspect!!! force 16:9"
+ else:
+ mode = config.av.videomode[port].value
+ force_widescreen = self.isWidescreenMode(port, mode)
+ is_widescreen = force_widescreen or config.av.aspect.value in ["16_9", "16_10"]
+ is_auto = config.av.aspect.value == "auto"
+ if is_widescreen:
+ if force_widescreen:
+ pass
+ else:
+ aspect = {"16_9": "16:9", "16_10": "16:10"}[config.av.aspect.value]
+ if aspect == "16:10":
+ ret = 1.6
+ elif is_auto:
+ try:
+ aspect_str = open("/proc/stb/vmpeg/0/aspect", "r").read()
+ if aspect_str == "1": # 4:3
+ ret = 1.333333333
+ except IOError:
+ pass
+ else: # 4:3
+ ret = 1.333333333
+ return ret
+
def __init__(self):
self.last_modes_preferred = [ ]
self.on_hotplug = CList()
@@ -80,6 +108,7 @@ class VideoHardware:
config.av.tvsystem.notifiers = [ ]
config.av.wss.notifiers = [ ]
AVSwitch.setInput = self.AVSwitchSetInput
+ AVSwitch.getOutputAspect = self.getOutputAspect
config.av.aspect.addNotifier(self.updateAspect)
config.av.wss.addNotifier(self.updateAspect)