Update of /cvsroot/freevo/freevo/src/audio/plugins
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14434/src/audio/plugins

Modified Files:
        mpav.py 
Log Message:
Improvements and bug fixes:
  - now use path from freevo.conf;
  - support for new mpav render plugins;
  - be sure mplayer is playing, just start after 1 second music is playing. 
    It's still annoying, but avoids some locks.


Index: mpav.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/audio/plugins/mpav.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** mpav.py     19 Feb 2004 04:37:21 -0000      1.1
--- mpav.py     21 Feb 2004 03:19:54 -0000      1.2
***************
*** 9,12 ****
--- 9,20 ----
  #
  # -----------------------------------------------------------------------
+ # $Log$
+ # Revision 1.2  2004/02/21 03:19:54  gsbarbieri
+ # Improvements and bug fixes:
+ #   - now use path from freevo.conf;
+ #   - support for new mpav render plugins;
+ #   - be sure mplayer is playing, just start after 1 second music is playing.
+ #     It's still annoying, but avoids some locks.
+ #
  #
  # -----------------------------------------------------------------------
***************
*** 32,38 ****
  #endif
  
- mmap_file = '/tmp/mpav'
- app       = '/usr/local/bin/mpav'
- 
  import os
  import childapp   # Handle child applications
--- 40,43 ----
***************
*** 47,50 ****
--- 52,59 ----
  from event import *
  
+ mmap_file = '/tmp/mpav'
+ app       = config.CONF.mpav
+ 
+ 
  osd = osd.get_singleton()
  skin = skin.get_singleton()
***************
*** 55,59 ****
      class controlling the in and output from the mpav process
      """
!     def __init__( self, app, mplayer, size=None ):
          self.osd      = osd
          self.item     = mplayer.item
--- 64,68 ----
      class controlling the in and output from the mpav process
      """
!     def __init__( self, app, mplayer, size=None, rplugin=None ):
          self.osd      = osd
          self.item     = mplayer.item
***************
*** 61,64 ****
--- 70,76 ----
          self.lines    = []
          self.messages = []
+ 
+         if rplugin:
+             app += [ "-r", rplugin ]
          childapp.ChildApp2.__init__( self, app )
          
***************
*** 139,144 ****
      To activate it, just add to your local_conf.py:
  
!        plugin.activate( 'audio.mpav', args=( ( <width>, <height> ), ) )
  
  
      Notice:
--- 151,159 ----
      To activate it, just add to your local_conf.py:
  
!        plugin.activate( 'audio.mpav', args=( ( <width>, <height> ), <render_plugin>) 
)
  
+     where:
+        <width> and <height> are the MPAV window size (or resolution);
+        <render_plugin> is the render plugin, it must be in your LD_LIBRARY_PATH or 
you need to give the full path. Usually it's libmpav_goom.so.
  
      Notice:
***************
*** 149,161 ****
      """
  
!     def __init__( self, size=None ):
          """
          normal plugin init, but sets _type to 'mplayer_audio'
          """
          plugin.Plugin.__init__( self )
!         self.mpav   = None
!         self.player = None
!         self.size   = size
!         self._type  = "mplayer_audio"
          self.osd_view = 0
          self.messages = []
--- 164,178 ----
      """
  
!     def __init__( self, size=None, rplugin=None ):
          """
          normal plugin init, but sets _type to 'mplayer_audio'
          """
          plugin.Plugin.__init__( self )
!         self.start    = False
!         self.mpav     = None
!         self.player   = None
!         self.size     = size
!         self.rplugin  = rplugin
!         self._type    = "mplayer_audio"
          self.osd_view = 0
          self.messages = []
***************
*** 202,210 ****
          try:
              if line.find( "[export] Memory mapped to file: "+mmap_file ) == 0:
!                 self.start_mpav()
                  _debug_( "Detected MPlayer 'export' audio filter! Using MPAV." )
-                 return
          except:
!             pass        
      # stdout()
  
--- 219,235 ----
          try:
              if line.find( "[export] Memory mapped to file: "+mmap_file ) == 0:
!                 self.start = True
                  _debug_( "Detected MPlayer 'export' audio filter! Using MPAV." )
          except:
!             pass
! 
!     # stdout()
! 
! 
!     def elapsed( self, elapsed ):
!         # Be sure mplayer started playing, it need to setup mmap first.
!         if self.start and elapsed > 0:
!             self.start_mpav()
!             self.start = False
      # stdout()
  
***************
*** 213,220 ****
          """
          start mpav
!         """        
          if not self.mpav:
              command = [ app, "-s", "-f", mmap_file ]
!             self.mpav = MPAV( command, self.player, ( self.size ) )
              
              if self.osd_view == 1:
--- 238,245 ----
          """
          start mpav
!         """
          if not self.mpav:
              command = [ app, "-s", "-f", mmap_file ]
!             self.mpav = MPAV( command, self.player, self.size, self.rplugin )
              
              if self.osd_view == 1:



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to