From 6b2d6f1d24af4d81fda1e9ebc4d11a5df3e8110a Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Thu, 27 Jan 2011 17:04:02 +0100 Subject: experimentally enable AudioSelection Dialog for DVDPlayer (#440) --- lib/python/Plugins/Extensions/DVDPlayer/plugin.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/python/Plugins/Extensions/DVDPlayer/plugin.py') diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py index e1ab3ef4..259e52b8 100755 --- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py @@ -4,7 +4,7 @@ from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.ChoiceBox import ChoiceBox from Screens.HelpMenu import HelpableScreen -from Screens.InfoBarGenerics import InfoBarSeek, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarShowHide, InfoBarNotifications +from Screens.InfoBarGenerics import InfoBarSeek, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarShowHide, InfoBarNotifications, InfoBarAudioSelection, InfoBarSubtitleSupport from Components.ActionMap import ActionMap, NumberActionMap, HelpableActionMap from Components.Label import Label from Components.Sources.StaticText import StaticText @@ -195,7 +195,7 @@ class ChapterZap(Screen): self.Timer.callback.append(self.keyOK) self.Timer.start(3000, True) -class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarPVRState, InfoBarShowHide, HelpableScreen, InfoBarCueSheetSupport): +class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarPVRState, InfoBarShowHide, HelpableScreen, InfoBarCueSheetSupport, InfoBarAudioSelection, InfoBarSubtitleSupport): ALLOW_SUSPEND = Screen.SUSPEND_PAUSES ENABLE_RESUME_SUPPORT = True @@ -275,6 +275,8 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP InfoBarNotifications.__init__(self) InfoBarCueSheetSupport.__init__(self, actionmap = "MediaPlayerCueSheetActions") InfoBarShowHide.__init__(self) + InfoBarAudioSelection.__init__(self) + InfoBarSubtitleSupport.__init__(self) HelpableScreen.__init__(self) self.save_infobar_seek_config() self.change_infobar_seek_config() @@ -553,7 +555,8 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP self.sendKey(iServiceKeys.keyUser+1) def enterDVDAudioMenu(self): - self.sendKey(iServiceKeys.keyUser+2) + self.audioSelection() + #self.sendKey(iServiceKeys.keyUser+2) def nextChapter(self): self.sendKey(iServiceKeys.keyUser+3) -- cgit v1.2.3 From f3060d26bbb98713b901794b6e47bf7f064a9073 Mon Sep 17 00:00:00 2001 From: Fraxinas Date: Fri, 28 Jan 2011 11:29:51 +0100 Subject: DVDPlayer: AudioSelection integration (#441) --- lib/python/Plugins/Extensions/DVDPlayer/keymap.xml | 3 ++- lib/python/Plugins/Extensions/DVDPlayer/plugin.py | 7 +++++-- lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) (limited to 'lib/python/Plugins/Extensions/DVDPlayer/plugin.py') diff --git a/lib/python/Plugins/Extensions/DVDPlayer/keymap.xml b/lib/python/Plugins/Extensions/DVDPlayer/keymap.xml index 7b7f2054..bf57e753 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/keymap.xml +++ b/lib/python/Plugins/Extensions/DVDPlayer/keymap.xml @@ -8,7 +8,8 @@ - + + diff --git a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py index 259e52b8..d14a6238 100755 --- a/lib/python/Plugins/Extensions/DVDPlayer/plugin.py +++ b/lib/python/Plugins/Extensions/DVDPlayer/plugin.py @@ -356,6 +356,7 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP "prevTitle": (self.prevTitle, _("jump back to the previous title")), "tv": (self.askLeavePlayer, _("exit DVD player or return to file browser")), "dvdAudioMenu": (self.enterDVDAudioMenu, _("(show optional DVD audio menu)")), + "AudioSelection": (self.enterAudioSelection, _("Select audio track")), "nextAudioTrack": (self.nextAudioTrack, _("switch to the next audio track")), "nextSubtitleTrack": (self.nextSubtitleTrack, _("switch to the next subtitle language")), "nextAngle": (self.nextAngle, _("switch to the next angle")), @@ -548,6 +549,9 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP keys.keyPressed(key) return keys + def enterAudioSelection(self): + self.audioSelection() + def nextAudioTrack(self): self.sendKey(iServiceKeys.keyUser) @@ -555,8 +559,7 @@ class DVDPlayer(Screen, InfoBarBase, InfoBarNotifications, InfoBarSeek, InfoBarP self.sendKey(iServiceKeys.keyUser+1) def enterDVDAudioMenu(self): - self.audioSelection() - #self.sendKey(iServiceKeys.keyUser+2) + self.sendKey(iServiceKeys.keyUser+2) def nextChapter(self): self.sendKey(iServiceKeys.keyUser+3) diff --git a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp index b960ed67..ccacf3c0 100644 --- a/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp +++ b/lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp @@ -685,7 +685,7 @@ RESULT eServiceDVD::enableSubtitles(eWidget *parent, ePyObject tuple) m_subtitle_widget = new eSubtitleWidget(parent); m_subtitle_widget->resize(parent->size()); - + int pid = -1; if ( tuple != Py_None ) @@ -702,6 +702,7 @@ RESULT eServiceDVD::enableSubtitles(eWidget *parent, ePyObject tuple) pid = PyInt_AsLong(entry)-1; ddvd_set_spu(m_ddvdconfig, pid); + m_event(this, evUser+7); } eDebug("eServiceDVD::enableSubtitles %i", pid); -- cgit v1.2.3