diff options
| author | Fraxinas <andreas.frisch@multimedia-labs.de> | 2008-11-17 23:34:25 +0100 |
|---|---|---|
| committer | Fraxinas <andreas.frisch@multimedia-labs.de> | 2008-11-17 23:34:25 +0100 |
| commit | 9f233a55dbc640a9dd8d1aa46c1291d28fdea3b4 (patch) | |
| tree | 5e9f785a51127fadf1c96df875c992a67d5cdc23 /lib/python/Plugins/SystemPlugins | |
| parent | f38670a4ea4d6dc6206e6bd99ad25943d0bf3602 (diff) | |
| parent | 9ca172f45cc02fe5cb693e7d35aade7d2233d448 (diff) | |
| download | enigma2-9f233a55dbc640a9dd8d1aa46c1291d28fdea3b4.tar.gz enigma2-9f233a55dbc640a9dd8d1aa46c1291d28fdea3b4.zip | |
Merge branch 'master' of fraxinas@git.opendreambox.org:/git/enigma2
Diffstat (limited to 'lib/python/Plugins/SystemPlugins')
| -rw-r--r-- | lib/python/Plugins/SystemPlugins/Videomode/VideoHardware.py | 29 |
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) |
