Update of /cvsroot/freevo/freevo/src/video/plugins In directory sc8-pr-cvs1:/tmp/cvs-serv7975/src/video/plugins
Modified Files: mplayer.py Log Message: Faster version detection + handle for CVS versions. Index: mplayer.py =================================================================== RCS file: /cvsroot/freevo/freevo/src/video/plugins/mplayer.py,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** mplayer.py 14 Sep 2003 20:09:37 -0000 1.21 --- mplayer.py 18 Sep 2003 17:09:54 -0000 1.22 *************** *** 21,24 **** --- 21,27 ---- # ----------------------------------------------------------------------- # $Log$ + # Revision 1.22 2003/09/18 17:09:54 gsbarbieri + # Faster version detection + handle for CVS versions. + # # Revision 1.21 2003/09/14 20:09:37 dischi # removed some TRUE=1 and FALSE=0 add changed some debugs to _debug_ *************** *** 115,129 **** plugin.Plugin.__init__(self) ! child = popen2.Popen3('%s --version' % config.MPLAYER_CMD, 1, 100) ! while(1): ! data = child.fromchild.readline() ! if not data: ! break ! if data.find('MPlayer 1') == 0: ! mplayer_version = 1.0 ! if data.find('MPlayer 0') == 0: ! mplayer_version = 0.9 child.wait() - mplayer = util.SynchronizedObject(MPlayer()) --- 118,137 ---- plugin.Plugin.__init__(self) ! child = popen2.Popen3( "%s -v" % config.MPLAYER_CMD, 1, 100 ) ! data = child.fromchild.readline() # Just need the first line ! if data: ! data = re.search( "^MPlayer (?P<version>\S+)", data ) ! if data: ! if DEBUG: ! print "MPlayer version is: %s" % data.group( "version" ) ! data = data.group( "version" ) ! if data[ 0 ] == "1": ! mplayer_version = 1.0 ! elif data[ 0 ] == "0": ! mplayer_version = 0.9 ! elif data[ 0 : 7 ] == "dev-CVS": ! mplayer_version = 9999 ! child.wait() mplayer = util.SynchronizedObject(MPlayer()) *************** *** 153,157 **** if vop: ! if mplayer_version == 1: return '%s -vf %s' % (ret,vop[1:]) return '%s -vop %s' % (ret,vop[1:]) --- 161,165 ---- if vop: ! if mplayer_version >= 1: return '%s -vf %s' % (ret,vop[1:]) return '%s -vop %s' % (ret,vop[1:]) ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Freevo-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-cvslog