aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-05-16 14:58:11 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2006-05-16 14:58:11 +0000
commit4e8cae716ad3fdf29a7b2a45e5eec0a530f93277 (patch)
tree33cc04ae9577a5dd03dd4a52c9205fcc957236ee /lib/python
parent193333b7bc72ab13d4dee5750b31c3c33041c696 (diff)
downloadenigma2-4e8cae716ad3fdf29a7b2a45e5eec0a530f93277.tar.gz
enigma2-4e8cae716ad3fdf29a7b2a45e5eec0a530f93277.zip
add ability to selecte the audio channel (mono left, stereo, mono right) from python
store the current selected audio channel then per service in servicelist TODO: extend the audio track selection screen to make audio channel selection usable :)
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Components/ChoiceList.py2
-rw-r--r--lib/python/Screens/InfoBarGenerics.py17
2 files changed, 14 insertions, 5 deletions
diff --git a/lib/python/Components/ChoiceList.py b/lib/python/Components/ChoiceList.py
index ca58ecd6..fe3e6008 100644
--- a/lib/python/Components/ChoiceList.py
+++ b/lib/python/Components/ChoiceList.py
@@ -18,7 +18,7 @@ RT_VALIGN_BOTTOM = 16
def ChoiceEntryComponent(key, text):
res = [ text ]
- res.append((eListboxPythonMultiContent.TYPE_TEXT, 32, 00, 800,25, 0, RT_HALIGN_LEFT, text[0]))
+ res.append((eListboxPythonMultiContent.TYPE_TEXT, 32, 00, 800, 25, 0, RT_HALIGN_LEFT, text[0]))
png = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "key_" + key + "-fs8.png"))
if png is not None:
diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py
index c3c6e21a..67212656 100644
--- a/lib/python/Screens/InfoBarGenerics.py
+++ b/lib/python/Screens/InfoBarGenerics.py
@@ -13,7 +13,7 @@ from Components.PluginComponent import plugins
from Components.ProgressBar import *
from Components.ServiceEventTracker import ServiceEventTracker
from Components.ServiceName import ServiceName
-from Components.config import config, configElement, ConfigSubsection, configSequence, configElementBoolean
+from Components.config import config, configElement, ConfigSubsection, configSequence, configElementBoolean, configSelection, configElement_nonSave, getConfigListEntry
from Components.config import configfile, configsequencearg
from Components.TimerList import TimerEntryComponent
from Components.TunerInfo import TunerInfo
@@ -1192,9 +1192,11 @@ class InfoBarAudioSelection:
def audioSelection(self):
service = self.session.nav.getCurrentService()
audio = service.audioTracks()
- self.audio = audio
+ self.audioTracks = audio
n = audio.getNumberOfTracks()
if n > 0:
+# self.audioChannel = service.audioChannel()
+# config.audio.audiochannel = configElement_nonSave("config.audio.audiochannel", configSelection, self.audioChannel.getCurrentChannel(), (("left", _("Left >")), ("stereo", _("< Stereo >")), ("right", _("< Right"))))
tlist = []
for x in range(n):
i = audio.getTrackInfo(x)
@@ -1214,6 +1216,9 @@ class InfoBarAudioSelection:
selectedAudio = tlist[0][1]
tlist.sort(lambda x,y : cmp(x[0], y[0]))
+
+# tlist.insert(0, getConfigListEntry(_("Audio Channel"), config.audio.audiochannel))
+
selection = 0
for x in tlist:
if x[1] != selectedAudio:
@@ -1222,11 +1227,15 @@ class InfoBarAudioSelection:
break
self.session.openWithCallback(self.audioSelected, ChoiceBox, title=_("Select audio track"), list = tlist, selection = selection)
+ else:
+ del self.audioTracks
def audioSelected(self, audio):
if audio is not None:
- self.audio.selectTrack(audio[1])
- del self.audio
+ self.audioTracks.selectTrack(audio[1])
+ del self.audioTracks
+# del self.audioChannel
+# del config.audio.audiochannel
class InfoBarSubserviceSelection:
def __init__(self):