Update of /cvsroot/freevo/freevo/src/video/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv15040/video/plugins

Modified Files:
        mplayer.py xine.py 
Log Message:
make it possible to bypass version checking

Index: mplayer.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/plugins/mplayer.py,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** mplayer.py  10 Dec 2003 19:06:06 -0000      1.49
--- mplayer.py  10 Dec 2003 19:47:49 -0000      1.50
***************
*** 10,13 ****
--- 10,16 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.50  2003/12/10 19:47:49  dischi
+ # make it possible to bypass version checking
+ #
  # Revision 1.49  2003/12/10 19:06:06  dischi
  # move to new ChildApp2 and remove the internal thread
***************
*** 98,120 ****
          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:                
!                 _debug_("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
!                 _debug_("MPlayer version set to: %s" % mplayer_version)
!                     
!         child.wait()
  
          # register mplayer as the object to play video
!         plugin.register(MPlayer(mplayer_version), plugin.VIDEO_PLAYER, True)
  
  
--- 101,123 ----
          plugin.Plugin.__init__(self)
  
!         if not hasattr(config, 'MPLAYER_VERSION'):
!             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:                
!                     _debug_("MPlayer version is: %s" % data.group( "version" ))
!                     data = data.group( "version" )
!                     if data[ 0 ] == "1":
!                         config.MPLAYER_VERSION = 1.0
!                     elif data[ 0 ] == "0":
!                         config.MPLAYER_VERSION = 0.9
!                     elif data[ 0 : 7 ] == "dev-CVS":
!                         config.MPLAYER_VERSION = 9999
!                     _debug_("MPlayer version set to: %s" % config.MPLAYER_VERSION)
!             child.wait()
  
          # register mplayer as the object to play video
!         plugin.register(MPlayer(config.MPLAYER_VERSION), plugin.VIDEO_PLAYER, True)
  
  

Index: xine.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/plugins/xine.py,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** xine.py     10 Dec 2003 19:06:06 -0000      1.31
--- xine.py     10 Dec 2003 19:47:49 -0000      1.32
***************
*** 18,21 ****
--- 18,24 ----
  # -----------------------------------------------------------------------
  # $Log$
+ # Revision 1.32  2003/12/10 19:47:49  dischi
+ # make it possible to bypass version checking
+ #
  # Revision 1.31  2003/12/10 19:06:06  dischi
  # move to new ChildApp2 and remove the internal thread
***************
*** 78,83 ****
  
  
! import time, os
! import popen2, re
  import copy
  
--- 81,85 ----
  
  
! import time, os, re
  import copy
  
***************
*** 85,88 ****
--- 87,91 ----
  import childapp   # Handle child applications
  import rc         # The RemoteControl class.
+ import util.popen3
  
  from event import *
***************
*** 110,134 ****
              type = 'X'
  
!         xine_version = 0
!         xine_cvs     = 0
!         
!         child = popen2.Popen3('%s --version' % config.XINE_COMMAND, 1, 100)
!         while(1):
!             data = child.fromchild.readline()
!             if not data:
!                 break
!             m = re.match('^.* v?([0-9])\.([0-9]+)\.([0-9]*).*', data)
!             if m:
!                 if data.find('cvs') >= 0:
!                     xine_cvs = 1
!                 xine_version =int('%02d%02d%02d' % (int(m.group(1)), int(m.group(2)),
!                                                     int(m.group(3))))
! 
!         child.wait()
  
!         if xine_cvs:
!             xine_version += 1
              
!         if xine_version < 922:
              if type == 'fb':
                  print _( 'ERROR' ) + ': ' + \
--- 113,130 ----
              type = 'X'
  
!         if not hasattr(config, 'XINE_VERSION'):
!             config.XINE_VERSION = 0
!             for data in util.popen3.stdout('%s --version' % config.XINE_COMMAND):
!                 m = re.match('^.* v?([0-9])\.([0-9]+)\.([0-9]*).*', data)
!                 if m:
!                     config.XINE_VERSION = int('%02d%02d%02d' % (int(m.group(1)),
!                                                                   int(m.group(2)),
!                                                                   int(m.group(3))))
!                     if data.find('cvs') >= 0:
!                         config.XINE_VERSION += 1
  
!             _debug_('detect xine version %s' % config.XINE_VERSION)
              
!         if config.XINE_VERSION < 922:
              if type == 'fb':
                  print _( 'ERROR' ) + ': ' + \
***************
*** 142,146 ****
              
          # register xine as the object to play
!         plugin.register(Xine(type, xine_version), plugin.VIDEO_PLAYER, True)
  
  
--- 138,142 ----
              
          # register xine as the object to play
!         plugin.register(Xine(type, config.XINE_VERSION), plugin.VIDEO_PLAYER, True)
  
  




-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to