Update of /cvsroot/freevo/freevo/WIP/Aubin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11589
Modified Files:
mplayer.py
Log Message:
Updated the plugin to match current Freevo CVS
Index: mplayer.py
===================================================================
RCS file: /cvsroot/freevo/freevo/WIP/Aubin/mplayer.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** mplayer.py 31 Jan 2004 16:33:01 -0000 1.3
--- mplayer.py 17 May 2004 04:21:51 -0000 1.4
***************
*** 6,33 ****
#
# Notes:
- # A version of the mp3 audio plugin which gives perfect seeking on VBR
- # and other mp3 files...
- #
- # One major problem:
- #
- # o If you seek right to the end of a file, mplayer will go crazy and print
- # "Seek Failed" and never quit.
- #
- # But it works very nicely if you ever skip through files.
- #
- # It does two things.
- #
- # 1) Pass '-hr-mp3-seek' for mp3 files
- # 2) Send a 'seek -1' which worksaround a bug in mplayers time display when using
hr-mp3-seek.
- #
# Todo:
#
# -----------------------------------------------------------------------
# $Log$
! # Revision 1.3 2004/01/31 16:33:01 outlyer
! # Merged the latest changes..
#
! # Has anyone tried this plugin? It's remarkably better when playing and
! # seeking through music.
#
# Revision 1.34 2004/01/31 12:39:47 dischi
--- 6,19 ----
#
# Notes:
# Todo:
#
# -----------------------------------------------------------------------
# $Log$
! # Revision 1.4 2004/05/17 04:21:51 outlyer
! # Updated the plugin to match current Freevo CVS
#
! # Revision 1.35 2004/02/19 04:37:21 gsbarbieri
! # MPlayer Audio Visualization support.
! # Get mpav from http://gsbarbieri.sytes.net/mpav/
#
# Revision 1.34 2004/01/31 12:39:47 dischi
***************
*** 143,146 ****
--- 129,133 ----
return 2
+
def get_demuxer(self, filename):
DEMUXER_MP3 = 17
***************
*** 206,210 ****
command.append(filename)
!
if plugin.getbyname('MIXER'):
plugin.getbyname('MIXER').reset()
--- 193,201 ----
command.append(filename)
!
! self.plugins = plugin.get('mplayer_audio')
! for p in self.plugins:
! command = p.play(command, self)
!
if plugin.getbyname('MIXER'):
plugin.getbyname('MIXER').reset()
***************
*** 225,228 ****
--- 216,222 ----
self.app.stop('quit\n')
+ for p in self.plugins:
+ command = p.stop()
+
def is_playing(self):
***************
*** 240,243 ****
--- 234,241 ----
"""
+ for p in self.plugins:
+ if p.eventhandler(event):
+ return True
+
if event == PLAY_END and event.arg:
self.stop()
***************
*** 279,282 ****
--- 277,289 ----
self.RE_TIME = re.compile("^A: *([0-9]+)").match
self.RE_TIME_NEW = re.compile("^A: *([0-9]+):([0-9]+)").match
+
+ # check for mplayer plugins
+ self.stdout_plugins = []
+ self.elapsed_plugins = []
+ for p in plugin.get('mplayer_audio'):
+ if hasattr(p, 'stdout'):
+ self.stdout_plugins.append(p)
+ if hasattr(p, 'elapsed'):
+ self.elapsed_plugins.append(p)
childapp.ChildApp2.__init__(self, app, stop_osd=0)
***************
*** 317,320 ****
--- 324,335 ----
self.player.refresh()
self.elapsed = self.item.elapsed
+
+ for p in self.elapsed_plugins:
+ p.elapsed(self.elapsed)
+
+ elif not self.item.elapsed:
+ for p in self.stdout_plugins:
+ p.stdout(line)
+
***************
*** 323,324 ****
--- 338,341 ----
if line.startswith('Failed to open'):
self.stop_reason = 1
+ for p in self.stdout_plugins:
+ p.stdout(line)
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog