Author: duncan
Date: Fri Dec 1 13:05:44 2006
New Revision: 8685
Modified:
branches/rel-1/freevo/src/video/plugins/mplayer.py
Log:
[ 1606699 ] unichrome mpeg playback
Patch applied
Modified: branches/rel-1/freevo/src/video/plugins/mplayer.py
==============================================================================
--- branches/rel-1/freevo/src/video/plugins/mplayer.py (original)
+++ branches/rel-1/freevo/src/video/plugins/mplayer.py Fri Dec 1 13:05:44 2006
@@ -53,7 +53,8 @@
def __init__(self):
# create plugin structure
plugin.Plugin.__init__(self)
-
+ if not hasattr(config,'MPLAYER_HWACCEL_SUFFIX'):
+ config.MPLAYER_HWACCEL_SUFFIX=[]
# register mplayer as the object to play video
plugin.register(MPlayer(), plugin.VIDEO_PLAYER, True)
@@ -113,6 +114,12 @@
self.item_length = -1
self.item.elapsed = 0
+ VODEV=config.MPLAYER_VO_DEV
+ VODEVOPTS=config.MPLAYER_VO_DEV_OPTS
+ if item.mimetype in config.MPLAYER_HWACCEL_SUFFIX:
+ VODEV=config.MPLAYER_VO_DEV_HWACCEL
+ VODEVOPTS=config.MPLAYER_VO_DEV_OPTS_HWACCEL
+
if mode == 'file':
url = item.url[6:]
self.item_info = mmpython.parse(url)
@@ -149,6 +156,8 @@
additional_args = []
if mode == 'dvd':
+ VODEV=config.MPLAYER_VO_DEV_HWACCEL
+ VODEVOPTS=config.MPLAYER_VO_DEV_OPTS_HWACCEL
if config.DVD_LANG_PREF:
# There are some bad mastered DVDs out there. E.g. the
specials on
# the German Babylon 5 Season 2 disc claim they have more than
one
@@ -199,7 +208,8 @@
mode = 'default'
# Mplayer command and standard arguments
- command += [ '-v', '-vo', config.MPLAYER_VO_DEV +
config.MPLAYER_VO_DEV_OPTS ]
+ command += [ '-v', '-vo', VODEV]
+ command += VODEVOPTS.split(' ')
# mode specific args
command += config.MPLAYER_ARGS[mode].split(' ')
@@ -314,7 +324,7 @@
if event == VIDEO_MANUAL_SEEK:
self.seek = 0
rc.set_context('input')
- self.app.write('osd_show_text "input"\n')
+ self.app.write('osd_show_text "input"\n')
return True
if event.context == 'input':
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog