Update of /cvsroot/freevo/freevo/src/video/plugins
In directory sc8-pr-cvs1:/tmp/cvs-serv9836
Modified Files:
mplayer.py xine.py
Log Message:
cleanup
Index: mplayer.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/plugins/mplayer.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** mplayer.py 21 Nov 2003 18:04:27 -0000 1.40
--- mplayer.py 22 Nov 2003 15:57:47 -0000 1.41
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.41 2003/11/22 15:57:47 dischi
+ # cleanup
+ #
# Revision 1.40 2003/11/21 18:04:27 dischi
# remove debug
***************
*** 23,55 ****
# bmovl.
#
- # Revision 1.37 2003/11/01 20:51:49 dischi
- # fix bug in delay
- #
- # Revision 1.36 2003/10/21 21:17:42 gsbarbieri
- # Some more i18n improvements.
- #
- # Revision 1.35 2003/10/20 13:36:42 outlyer
- # Remove double-quit
- #
- # Revision 1.34 2003/10/19 09:51:41 dischi
- # move from str command to list, resort some stuff
- #
- # Revision 1.33 2003/10/17 21:30:02 rshortt
- # We need self.osdfont set before calling childapp's init. This was crashing
- # for me on network play.
- #
- # Revision 1.32 2003/10/14 16:58:48 dischi
- # fix mode detection, MPLAYER_ARGS never worked
- #
- # Revision 1.31 2003/10/08 02:04:04 outlyer
- # BUGFIX: For some reason, I was seeing a lot of 'killing with signal 9' in
- # my log files when I played certain video files. Adding the 'double' quit here
- # seems to cause it to quit cleanly, and immediately instead of an annoying
- # two seconds later.
- #
- # Revision 1.30 2003/10/04 14:38:10 dischi
- # Try to auto-correct av sync problems. Set MPLAYER_SET_AUDIO_DELAY to
- # enable it. You need mmpython > 0.2 to make it work.
- #
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
--- 26,29 ----
***************
*** 90,96 ****
import re
- import osd
- osd = osd.get_singleton()
-
class PluginInterface(plugin.Plugin):
"""
--- 64,67 ----
***************
*** 135,139 ****
the main class to control mplayer
"""
-
def __init__(self, version):
self.name = 'mplayer'
--- 106,109 ----
***************
*** 169,173 ****
play a videoitem with mplayer
"""
-
self.parameter = (options, item)
--- 139,142 ----
***************
*** 311,315 ****
self.thread.start(MPlayerApp, (command, self, item, network_play))
- _debug_('MPlayer.play(): Starting thread, cmd=%s' % command)
return None
--- 280,283 ----
***************
*** 442,445 ****
--- 410,415 ----
# ======================================================================
+ import osd
+
class MPlayerApp(childapp.ChildApp):
"""
***************
*** 448,465 ****
def __init__(self, (app, mplayer, item, network_play)):
- if config.MPLAYER_DEBUG:
- fname_out = os.path.join(config.LOGDIR, 'mplayer_stdout.log')
- fname_err = os.path.join(config.LOGDIR, 'mplayer_stderr.log')
- try:
- self.log_stdout = open(fname_out, 'w')
- self.log_stderr = open(fname_err, 'w')
- print _( 'MPlayer logging to "%s" and "%s"' ) % (fname_out,
fname_err)
- except IOError:
- print
- print ( _('ERROR') + ': ' + _('Cannot open "%s" and "%s" for ' \
- 'MPlayer logging!')
- ) % (fname_out, fname_err)
- config.MPLAYER_DEBUG = 0
-
# DVD items also store mplayer_audio_broken to check if you can
# start them with -alang or not
--- 418,421 ----
***************
*** 476,481 ****
self.mplayer = mplayer
self.exit_type = None
! self.osdfont = osd.getfont(config.OSD_DEFAULT_FONTNAME,
! config.OSD_DEFAULT_FONTSIZE)
# check for mplayer plugins
--- 432,438 ----
self.mplayer = mplayer
self.exit_type = None
! self.osd = osd.get_singleton()
! self.osdfont = self.osd.getfont(config.OSD_DEFAULT_FONTNAME,
! config.OSD_DEFAULT_FONTSIZE)
# check for mplayer plugins
***************
*** 493,508 ****
- def kill(self):
- # Use SIGINT instead of SIGKILL to make sure MPlayer shuts
- # down properly and releases all resources before it gets
- # reaped by childapp.kill().wait()
- childapp.ChildApp.kill(self, signal.SIGINT)
- _debug_('Killing mplayer')
-
- if config.MPLAYER_DEBUG:
- self.log_stdout.close()
- self.log_stderr.close()
-
-
def stopped(self):
if self.exit_type == "End of file":
--- 450,453 ----
***************
*** 519,533 ****
parse the stdout of the mplayer process
"""
- if config.MPLAYER_DEBUG:
- try:
- self.log_stdout.write(line + '\n')
- except ValueError:
- pass
-
# show connection status for network play
if self.network_play:
if line.find('Opening audio decoder') == 0:
! osd.clearscreen(osd.COL_BLACK)
! osd.update()
elif (line.find('Resolving ') == 0 or line.find('Connecting to server')
== 0 or \
line.find('Cache fill:') == 0) and \
--- 464,472 ----
parse the stdout of the mplayer process
"""
# show connection status for network play
if self.network_play:
if line.find('Opening audio decoder') == 0:
! self.osd.clearscreen(self.osd.COL_BLACK)
! self.osd.update()
elif (line.find('Resolving ') == 0 or line.find('Connecting to server')
== 0 or \
line.find('Cache fill:') == 0) and \
***************
*** 535,543 ****
if line.find('Connecting to server') == 0:
line = 'Connecting to server'
! osd.clearscreen(osd.COL_BLACK)
! osd.drawstringframed(line, config.OVERSCAN_X+10,
config.OVERSCAN_Y+10,
! osd.width - 2 * (config.OVERSCAN_X+10), -1,
! self.osdfont, osd.COL_WHITE)
! osd.update()
--- 474,482 ----
if line.find('Connecting to server') == 0:
line = 'Connecting to server'
! self.osd.clearscreen(self.osd.COL_BLACK)
! self.osd.drawstringframed(line, config.OVERSCAN_X+10,
config.OVERSCAN_Y+10,
! self.osd.width - 2 *
(config.OVERSCAN_X+10), -1,
! self.osdfont, self.osd.COL_WHITE)
! self.osd.update()
***************
*** 582,591 ****
parse the stderr of the mplayer process
"""
- if config.MPLAYER_DEBUG:
- try:
- self.log_stderr.write(line + '\n')
- except ValueError:
- pass # File closed
-
for p in self.stdout_plugins:
p.stdout(line)
--- 521,524 ----
Index: xine.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/video/plugins/xine.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** xine.py 21 Nov 2003 17:56:50 -0000 1.21
--- xine.py 22 Nov 2003 15:57:47 -0000 1.22
***************
*** 13,27 ****
# to use this.
#
- # This plugin can also be used for VCD playback with menus. Install
- # xine-vcdnav and set XINE_USE_VCDNAV = 1
- #
- # WARNING:
- # xine-vcdnav has some problems. Some VCDs won't play at all, some one
- # in some drives. It also can take up to 10 secs until the video
- # starts. When nothing happens and you press STOP, it can also take up
- # to 10 secs until xine dies (better: xine will be killed). This could
- # also crash Freevo (python segfault).
- #
- #
# Todo:
#
--- 13,16 ----
***************
*** 29,32 ****
--- 18,24 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.22 2003/11/22 15:57:47 dischi
+ # cleanup
+ #
# Revision 1.21 2003/11/21 17:56:50 dischi
# Plugins now 'rate' if and how good they can play an item. Based on that
***************
*** 36,65 ****
# add subtitle selection and osd info support for xine (needs current xine-ui cvs
#
- # Revision 1.19 2003/11/01 19:54:18 dischi
- # port to new xine-lib
- #
- # Revision 1.18 2003/10/21 21:17:42 gsbarbieri
- # Some more i18n improvements.
- #
- # Revision 1.17 2003/09/19 22:09:16 dischi
- # use new childapp thread function
- #
- # Revision 1.16 2003/09/14 20:09:37 dischi
- # removed some TRUE=1 and FALSE=0 add changed some debugs to _debug_
- #
- # Revision 1.15 2003/09/01 19:46:03 dischi
- # add menuw to eventhandler, it may be needed
- #
- # Revision 1.14 2003/09/01 16:41:37 dischi
- # send PLAY_START event
- #
- # Revision 1.13 2003/08/30 18:52:53 dischi
- # Aubin, don't do that :-)
- # Make a nice ItemPlugin do set the color values. Take a look at
- # bookmarker.py how.
- #
- # Revision 1.12 2003/08/28 03:46:13 outlyer
- # Support for Chapter-by-chapter navigation in DVDs using the CH+ and CH- keys.
- #
# -----------------------------------------------------------------------
# Freevo - A Home Theater PC framework
--- 28,31 ----
***************
*** 185,190 ****
command = '%s --no-lirc' % command
! self.command = '%s -V %s -A %s' % (command, config.XINE_VO_DEV,
config.XINE_AO_DEV)
!
def rate(self, item):
--- 151,156 ----
command = '%s --no-lirc' % command
! self.command = '--prio=%s %s -V %s -A %s' % (config.MPLAYER_NICE, command,
! config.XINE_VO_DEV,
config.XINE_AO_DEV)
def rate(self, item):
***************
*** 214,218 ****
play a dvd with xine
"""
-
self.app_mode = item.mode # dvd or vcd keymap
self.item = item
--- 180,183 ----
***************
*** 260,264 ****
elif item.mime_type == 'cue':
command.append('vcd://%s' % item.filename)
!
else:
command.append(item.url)
--- 225,230 ----
elif item.mime_type == 'cue':
command.append('vcd://%s' % item.filename)
! self.app_mode = 'vcd'
!
else:
command.append(item.url)
***************
*** 316,319 ****
--- 282,297 ----
return True
+ if event == TOGGLE_OSD:
+ self.thread.app.write('OSDStreamInfos\n')
+ return True
+
+ if event == NEXT:
+ self.thread.app.write('EventNext\n')
+ return True
+
+ if event == PREV:
+ self.thread.app.write('EventPrior\n')
+ return True
+
# DVD NAVIGATION
if event == DVDNAV_LEFT:
***************
*** 345,361 ****
return True
- if event == NEXT:
- self.thread.app.write('EventNext\n')
- return True
-
- if event == PREV:
- self.thread.app.write('EventPrior\n')
- return True
-
- if event == TOGGLE_OSD:
- self.thread.app.write('OSDStreamInfos\n')
- return True
-
-
# VCD NAVIGATION
if event in INPUT_ALL_NUMBERS:
--- 323,326 ----
***************
*** 370,373 ****
--- 335,339 ----
+ # DVD/VCD language settings
if event == VIDEO_NEXT_AUDIOLANG and self.max_audio:
if self.current_audio < self.max_audio - 1:
-------------------------------------------------------
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