Author: duncan
Date: Sun Apr 15 20:13:57 2007
New Revision: 9460

Modified:
   branches/rel-1/freevo/src/video/configure.py
   branches/rel-1/freevo/src/video/plugins/mplayer.py
   branches/rel-1/freevo/src/video/videoitem.py

Log:
[ 1694186 ] xvmc
Patch from Valera Koval applied


Modified: branches/rel-1/freevo/src/video/configure.py
==============================================================================
--- branches/rel-1/freevo/src/video/configure.py        (original)
+++ branches/rel-1/freevo/src/video/configure.py        Sun Apr 15 20:13:57 2007
@@ -234,7 +234,9 @@
     if item.mode in ('dvd', 'vcd') or \
            (item.filename and item.info.has_key('type') and \
             item.info['type'] and item.info['type'].lower().find('mpeg') != 
-1):
-        items += [ add_toogle(_('deinterlacing'), item, 'deinterlace') ]
+        items += [ add_toogle(_('Deinterlacing'), item, 'deinterlace') ]
+        items += [ add_toogle(_('X-Video Motion Compensation (xvmc)'), item, 
'xvmc') ]
+        items += [ add_toogle(_('Bottom field first'), item, 
'field-dominance') ]
     return items
 
         

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  Sun Apr 15 20:13:57 2007
@@ -140,6 +140,9 @@
             # try to play the next subitem
             return '%s\nnot found' % os.path.basename(url)
        
+        set_vcodec = False
+        if item['xvmc'] and item['type'][:6] in ['MPEG-1','MPEG-2']:
+            set_vcodec = True
 
         # Build the MPlayer command
         command = [ '--prio=%s' % config.MPLAYER_NICE, config.MPLAYER_CMD ]
@@ -196,20 +199,33 @@
             elif item.selected_language == 'right':
                 additional_args += [ '-af', 'pan=2:0:0:1:1' ]
 
-        if item['deinterlace'] and config.MPLAYER_VF_INTERLACED:
-            additional_args += [ '-vf', config.MPLAYER_VF_INTERLACED ]
-        elif config.MPLAYER_VF_PROGRESSIVE:
-            additional_args += [ '-vf', config.MPLAYER_VF_PROGRESSIVE ]
+        if not set_vcodec:
+            if item['deinterlace'] and config.MPLAYER_VF_INTERLACED:
+                additional_args += [ '-vf', config.MPLAYER_VF_INTERLACED ]
+            elif config.MPLAYER_VF_PROGRESSIVE:
+                additional_args += [ '-vf', config.MPLAYER_VF_PROGRESSIVE ]
+
+        additional_args += [ '-field-dominance', '%d' % 
int(item['field-dominance']) ]
 
         if os.path.isfile(os.path.splitext(item.filename)[0]+'.edl'):
-           additional_args += [ '-edl', 
str(os.path.splitext(item.filename)[0]+'.edl') ]
+            additional_args += [ '-edl', 
str(os.path.splitext(item.filename)[0]+'.edl') ]
                 
         mode = item.mimetype
         if not config.MPLAYER_ARGS.has_key(mode):
             mode = 'default'
 
+        if config.CHILDAPP_DEBUG:
+            command += [ '-v' ]
+
         # Mplayer command and standard arguments
-        command += [ '-vo', config.MPLAYER_VO_DEV + config.MPLAYER_VO_DEV_OPTS 
]
+        if set_vcodec:
+            if item['deinterlace']:
+                bobdeint='bobdeint'
+            else:
+                bobdeint='nobobdeint'
+            command += [ '-vo', 'xvmc:%s' % bobdeint, '-vc', 'ffmpeg12mc' ]
+        else:
+            command += [ '-vo', config.MPLAYER_VO_DEV + 
config.MPLAYER_VO_DEV_OPTS ]
 
         # mode specific args
         command += config.MPLAYER_ARGS[mode].split(' ')

Modified: branches/rel-1/freevo/src/video/videoitem.py
==============================================================================
--- branches/rel-1/freevo/src/video/videoitem.py        (original)
+++ branches/rel-1/freevo/src/video/videoitem.py        Sun Apr 15 20:13:57 2007
@@ -52,7 +52,8 @@
 class VideoItem(Item):
 
     def __init__(self, url, parent, info=None, parse=True):
-        self.autovars = [ ('deinterlace', 0) ]
+        #self.autovars = [ ('deinterlace', 0), ('xvmc', config.USE_XVMC), 
('field-dominance', config.FIELD_DOMINANCE) ]
+        self.autovars = [ ('deinterlace', 0), ('xvmc', 0), ('field-dominance', 
0) ]
         Item.__init__(self, parent)
 
         self.type = 'video'

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to