aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorFraxinas <andreas.frisch@multimedia-labs.de>2008-12-04 11:18:35 +0100
committerFraxinas <andreas.frisch@multimedia-labs.de>2008-12-04 11:18:35 +0100
commite61975a7c2d349bcc5c372c3ca472ce8da28f6fc (patch)
treec34b5a464aaa4870280698d35ccced3ae1188796 /lib/python
parentbf85c027880227646227e9f4ffc658e81eae5c69 (diff)
downloadenigma2-e61975a7c2d349bcc5c372c3ca472ce8da28f6fc.tar.gz
enigma2-e61975a7c2d349bcc5c372c3ca472ce8da28f6fc.zip
allow grabbing still frames from movies using seddis AiO Screengrabber V0.8 (needs package aio-grab) for graphical dvd menus
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Plugins/Extensions/CutListEditor/plugin.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/python/Plugins/Extensions/CutListEditor/plugin.py b/lib/python/Plugins/Extensions/CutListEditor/plugin.py
index 0d2454e4..c80bff18 100644
--- a/lib/python/Plugins/Extensions/CutListEditor/plugin.py
+++ b/lib/python/Plugins/Extensions/CutListEditor/plugin.py
@@ -12,6 +12,7 @@ from Components.GUIComponent import GUIComponent
from enigma import eListboxPythonMultiContent, eListbox, gFont, iPlayableService, RT_HALIGN_RIGHT
from Screens.FixedMenu import FixedMenu
from Screens.HelpMenu import HelpableScreen
+from ServiceReference import ServiceReference
import bisect
def CutListEntry(where, what):
@@ -42,6 +43,7 @@ class CutListContextMenu(FixedMenu):
RET_DELETEMARK = 4
RET_REMOVEBEFORE = 5
RET_REMOVEAFTER = 6
+ RET_GRABFRAME = 7
SHOW_STARTCUT = 0
SHOW_ENDCUT = 1
@@ -75,6 +77,7 @@ class CutListContextMenu(FixedMenu):
else:
menu.append((_("remove this mark"), self.removeMark))
+ menu.append((("grab this frame as bitmap"), self.grabFrame))
FixedMenu.__init__(self, session, _("Cut"), menu)
self.skinName = "Menu"
@@ -99,6 +102,8 @@ class CutListContextMenu(FixedMenu):
def removeAfter(self):
self.close(self.RET_REMOVEAFTER)
+ def grabFrame(self):
+ self.close(self.RET_GRABFRAME)
class CutList(GUIComponent):
def __init__(self, list):
@@ -390,6 +395,8 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He
# add 'out' point
bisect.insort(self.cut_list, (self.context_position, 1))
self.uploadCuesheet()
+ elif result == CutListContextMenu.RET_GRABFRAME:
+ self.grabFrame()
# we modify the "play" behavior a bit:
# if we press pause while being in slowmotion, we will pause (and not play)
@@ -399,6 +406,14 @@ class CutListEditor(Screen, InfoBarBase, InfoBarSeek, InfoBarCueSheetSupport, He
else:
self.pauseService()
+ def grabFrame(self):
+ path = self.session.nav.getCurrentlyPlayingServiceReference().getPath()
+ from Components.Console import Console
+ grabConsole = Console()
+ cmd = 'grab -vblpr%d "%s"' % (180, path.rsplit('.',1)[0] + ".png")
+ grabConsole.ePopen(cmd)
+ self.playpauseService()
+
def main(session, service, **kwargs):
session.open(CutListEditor, service)