Author: duncan
Date: Wed Oct 24 02:32:57 2007
New Revision: 10041
Log:
Added debug messages for the rate function
Modified:
branches/rel-1-7/freevo/src/audio/plugins/fxmms.py
branches/rel-1-7/freevo/src/audio/plugins/mplayer.py
branches/rel-1-7/freevo/src/audio/plugins/mplayervbr.py
branches/rel-1-7/freevo/src/audio/plugins/radioplayer.py
branches/rel-1-7/freevo/src/audio/plugins/xine.py
branches/rel-1-7/freevo/src/video/plugins/mplayer.py
branches/rel-1-7/freevo/src/video/plugins/vlc.py
branches/rel-1-7/freevo/src/video/plugins/xine.py
branches/rel-1/freevo/src/audio/plugins/fxmms.py
branches/rel-1/freevo/src/audio/plugins/mplayer.py
branches/rel-1/freevo/src/audio/plugins/mplayervbr.py
branches/rel-1/freevo/src/audio/plugins/radioplayer.py
branches/rel-1/freevo/src/audio/plugins/xine.py
branches/rel-1/freevo/src/video/plugins/mplayer.py
branches/rel-1/freevo/src/video/plugins/vlc.py
branches/rel-1/freevo/src/video/plugins/xine.py
Modified: branches/rel-1-7/freevo/src/audio/plugins/fxmms.py
==============================================================================
--- branches/rel-1-7/freevo/src/audio/plugins/fxmms.py (original)
+++ branches/rel-1-7/freevo/src/audio/plugins/fxmms.py Wed Oct 24 02:32:57 2007
@@ -116,18 +116,31 @@
1 = possible, but not good
0 = unplayable
"""
+ try:
+ _debug_('url=%r' % (item.url), 2)
+ _debug_('mode=%r' % (item.mode), 2)
+ _debug_('mimetype=%r' % (item.mimetype), 2)
+ except Exception, e:
+ print e
if item.url and item.url.startswith('radio://'):
+ _debug_('%r unplayable' % (item.url))
return 0
if item.url and item.url.startswith('mms://'):
+ _debug_('%r unplayable' % (item.url))
return 0
if item.url and item.url.startswith('rtsp://'):
+ _debug_('%r unplayable' % (item.url))
return 0
if item.url and not config.FXMMS_NETRADIO and
item.url.startswith('https://'):
+ _debug_('%r unplayable' % (item.url))
return 0
if item.url and not config.FXMMS_NETRADIO and
item.url.startswith('http://'):
+ _debug_('%r unplayable' % (item.url))
return 0
if item.filename and not util.match_suffix(item.filename,
config.FXMMS_SUFFIX):
+ _debug_('%r unplayable' % (item.url))
return 0
+ _debug_('%r good' % (item.url))
return 2
def play(self, item, playerGUI):
Modified: branches/rel-1-7/freevo/src/audio/plugins/mplayer.py
==============================================================================
--- branches/rel-1-7/freevo/src/audio/plugins/mplayer.py (original)
+++ branches/rel-1-7/freevo/src/audio/plugins/mplayer.py Wed Oct 24
02:32:57 2007
@@ -73,10 +73,19 @@
1 = possible, but not good
0 = unplayable
"""
+ try:
+ _debug_('url=%r' % (item.url), 2)
+ _debug_('mode=%r' % (item.mode), 2)
+ _debug_('mimetype=%r' % (item.mimetype), 2)
+ except Exception, e:
+ print e
if item.url.startswith('radio://'):
+ _debug_('%r unplayable' % (item.url))
return 0
if item.url.startswith('cdda://'):
+ _debug_('%r possible' % (item.url))
return 1
+ _debug_('%r good' % (item.url))
return 2
Modified: branches/rel-1-7/freevo/src/audio/plugins/mplayervbr.py
==============================================================================
--- branches/rel-1-7/freevo/src/audio/plugins/mplayervbr.py (original)
+++ branches/rel-1-7/freevo/src/audio/plugins/mplayervbr.py Wed Oct 24
02:32:57 2007
@@ -81,10 +81,19 @@
1 = possible, but not good
0 = unplayable
"""
+ try:
+ _debug_('url=%r' % (item.url), 2)
+ _debug_('mode=%r' % (item.mode), 2)
+ _debug_('mimetype=%r' % (item.mimetype), 2)
+ except Exception, e:
+ print e
if item.url.startswith('radio://'):
+ _debug_('%r unplayable' % (item.url))
return 0
if item.url.startswith('cdda://'):
+ _debug_('%r possible' % (item.url))
return 1
+ _debug_('%r good' % (item.url))
return 2
Modified: branches/rel-1-7/freevo/src/audio/plugins/radioplayer.py
==============================================================================
--- branches/rel-1-7/freevo/src/audio/plugins/radioplayer.py (original)
+++ branches/rel-1-7/freevo/src/audio/plugins/radioplayer.py Wed Oct 24
02:32:57 2007
@@ -71,8 +71,16 @@
1 = possible, but not good
0 = unplayable
"""
+ try:
+ _debug_('url=%r' % (item.url), 2)
+ _debug_('mode=%r' % (item.mode), 2)
+ _debug_('mimetype=%r' % (item.mimetype), 2)
+ except Exception, e:
+ print e
if item.url.startswith('radio://'):
+ _debug_('%r good' % (item.url))
return 2
+ _debug_('%r unplayable' % (item.url))
return 0
Modified: branches/rel-1-7/freevo/src/audio/plugins/xine.py
==============================================================================
--- branches/rel-1-7/freevo/src/audio/plugins/xine.py (original)
+++ branches/rel-1-7/freevo/src/audio/plugins/xine.py Wed Oct 24 02:32:57 2007
@@ -83,8 +83,16 @@
1 = possible, but not good
0 = unplayable
"""
+ try:
+ _debug_('url=%r' % (item.url), 2)
+ _debug_('mode=%r' % (item.mode), 2)
+ _debug_('mimetype=%r' % (item.mimetype), 2)
+ except Exception, e:
+ print e
if item.url.startswith('radio://'):
+ _debug_('%r unplayable' % (item.url))
return 0
+ _debug_('%r good' % (item.url))
return 2
Modified: branches/rel-1-7/freevo/src/video/plugins/mplayer.py
==============================================================================
--- branches/rel-1-7/freevo/src/video/plugins/mplayer.py (original)
+++ branches/rel-1-7/freevo/src/video/plugins/mplayer.py Wed Oct 24
02:32:57 2007
@@ -83,20 +83,27 @@
1 = possible, but not good
0 = unplayable
"""
+ try:
+ _debug_('url=%r' % (item.url), 2)
+ _debug_('mode=%r' % (item.mode), 2)
+ _debug_('mimetype=%r' % (item.mimetype), 2)
+ _debug_('network_play=%r' % (item.network_play), 2)
+ except Exception, e:
+ print e
# this seems strange that it is 'possible' for dvd:// and 'good' for
dvd
if item.url[:6] in ('dvd://', 'vcd://') and item.url.endswith('/'):
+ _debug_('%r possible' % (item.url))
return 1
if item.mode in ('dvd', 'vcd'):
+ _debug_('%r good' % (item.url))
return 2
if item.mimetype in config.VIDEO_MPLAYER_SUFFIX:
- if config.DEBUG >= 4:
- for d in dir(item):
- print '%s: %s' % (d, eval('item.%s' % d))
- for d in dir(item.info):
- print '%s: %s' % (d, eval('item.info.%s' % d))
+ _debug_('%r good' % (item.url))
return 2
if item.network_play:
+ _debug_('%r possible' % (item.url))
return 1
+ _debug_('%r unplayable' % (item.url))
return 0
Modified: branches/rel-1-7/freevo/src/video/plugins/vlc.py
==============================================================================
--- branches/rel-1-7/freevo/src/video/plugins/vlc.py (original)
+++ branches/rel-1-7/freevo/src/video/plugins/vlc.py Wed Oct 24 02:32:57 2007
@@ -50,8 +50,17 @@
1 = possible, but not good
0 = unplayable
"""
+ try:
+ _debug_('url=%r' % (item.url), 2)
+ _debug_('mode=%r' % (item.mode), 2)
+ _debug_('mimetype=%r' % (item.mimetype), 2)
+ _debug_('network_play=%r' % (item.network_play), 2)
+ except Exception, e:
+ print e
if item.url[:7] == 'rtsp://':
+ _debug_('%r good' % (item.url))
return 2
+ _debug_('%r unplayable' % (item.url))
return 0
Modified: branches/rel-1-7/freevo/src/video/plugins/xine.py
==============================================================================
--- branches/rel-1-7/freevo/src/video/plugins/xine.py (original)
+++ branches/rel-1-7/freevo/src/video/plugins/xine.py Wed Oct 24 02:32:57 2007
@@ -86,11 +86,12 @@
class Xine:
- '''the main class to control xine
- '''
+ """the main class to control xine
+ """
def __init__(self, type):
- '''Xine contructor
- '''
+ """
+ Xine contructor
+ """
self.name = 'xine'
self.app_mode = 'video'
@@ -105,30 +106,42 @@
def rate(self, item):
- '''
+ """
How good can this player play the file:
2 = good
1 = possible, but not good
0 = unplayable
- '''
+ """
+ try:
+ _debug_('url=%r' % (item.url), 2)
+ _debug_('mode=%r' % (item.mode), 2)
+ _debug_('mimetype=%r' % (item.mimetype), 2)
+ _debug_('network_play=%r' % (item.network_play), 2)
+ except Exception, e:
+ print e
if item.url.startswith('dvd://'):
+ _debug_('%r good' % (item.url))
return 2
if item.url.startswith('vcd://'):
if item.url == 'vcd://':
+ _debug_('%r good' % (item.url))
return 2
+ _debug_('%r unplayable' % (item.url))
return 0
-
if item.mimetype in config.VIDEO_XINE_SUFFIX:
+ _debug_('%r good' % (item.url))
return 2
if item.network_play:
+ _debug_('%r possible' % (item.url))
return 1
+ _debug_('%r unplayable' % (item.url))
return 0
def play(self, options, item):
- '''
+ """
play a dvd with xine
- '''
+ """
self.item = item
self.options = options
self.item.elapsed = 0
@@ -200,9 +213,9 @@
def stop(self, event=None):
- '''
+ """
Stop xine
- '''
+ """
if not self.app:
return
@@ -230,10 +243,10 @@
def eventhandler(self, event, menuw=None):
- '''
+ """
eventhandler for xine control. If an event is not bound in this
function it will be passed over to the items eventhandler
- '''
+ """
if not self.app:
return self.item.eventhandler(event)
@@ -373,9 +386,9 @@
class XineApp(childapp.ChildApp2):
- '''
+ """
class controlling the in and output from the xine process
- '''
+ """
def __init__(self, command, player):
_debug_('XineApp.__init__(command=%r, player=%r)' % (command, player),
3)
self.item = player.item
@@ -384,17 +397,17 @@
childapp.ChildApp2.__init__(self, command)
def stdout_cb(self, line):
- '''
+ """
parse the stdout of the xine process
- '''
+ """
# show connection status for network play
if self.item.network_play:
pass
def stderr_cb(self, line):
- '''
+ """
parse the stderr of the xine process
- '''
+ """
_debug_('%r' % line, 2)
# Has it started?
if line.find('playing mrl') >= 0:
Modified: branches/rel-1/freevo/src/audio/plugins/fxmms.py
==============================================================================
--- branches/rel-1/freevo/src/audio/plugins/fxmms.py (original)
+++ branches/rel-1/freevo/src/audio/plugins/fxmms.py Wed Oct 24 02:32:57 2007
@@ -116,18 +116,31 @@
1 = possible, but not good
0 = unplayable
"""
+ try:
+ _debug_('url=%r' % (item.url), 2)
+ _debug_('mode=%r' % (item.mode), 2)
+ _debug_('mimetype=%r' % (item.mimetype), 2)
+ except Exception, e:
+ print e
if item.url and item.url.startswith('radio://'):
+ _debug_('%r unplayable' % (item.url))
return 0
if item.url and item.url.startswith('mms://'):
+ _debug_('%r unplayable' % (item.url))
return 0
if item.url and item.url.startswith('rtsp://'):
+ _debug_('%r unplayable' % (item.url))
return 0
if item.url and not config.FXMMS_NETRADIO and
item.url.startswith('https://'):
+ _debug_('%r unplayable' % (item.url))
return 0
if item.url and not config.FXMMS_NETRADIO and
item.url.startswith('http://'):
+ _debug_('%r unplayable' % (item.url))
return 0
if item.filename and not util.match_suffix(item.filename,
config.FXMMS_SUFFIX):
+ _debug_('%r unplayable' % (item.url))
return 0
+ _debug_('%r good' % (item.url))
return 2
def play(self, item, playerGUI):
Modified: branches/rel-1/freevo/src/audio/plugins/mplayer.py
==============================================================================
--- branches/rel-1/freevo/src/audio/plugins/mplayer.py (original)
+++ branches/rel-1/freevo/src/audio/plugins/mplayer.py Wed Oct 24 02:32:57 2007
@@ -73,10 +73,19 @@
1 = possible, but not good
0 = unplayable
"""
+ try:
+ _debug_('url=%r' % (item.url), 2)
+ _debug_('mode=%r' % (item.mode), 2)
+ _debug_('mimetype=%r' % (item.mimetype), 2)
+ except Exception, e:
+ print e
if item.url.startswith('radio://'):
+ _debug_('%r unplayable' % (item.url))
return 0
if item.url.startswith('cdda://'):
+ _debug_('%r possible' % (item.url))
return 1
+ _debug_('%r good' % (item.url))
return 2
Modified: branches/rel-1/freevo/src/audio/plugins/mplayervbr.py
==============================================================================
--- branches/rel-1/freevo/src/audio/plugins/mplayervbr.py (original)
+++ branches/rel-1/freevo/src/audio/plugins/mplayervbr.py Wed Oct 24
02:32:57 2007
@@ -81,10 +81,19 @@
1 = possible, but not good
0 = unplayable
"""
+ try:
+ _debug_('url=%r' % (item.url), 2)
+ _debug_('mode=%r' % (item.mode), 2)
+ _debug_('mimetype=%r' % (item.mimetype), 2)
+ except Exception, e:
+ print e
if item.url.startswith('radio://'):
+ _debug_('%r unplayable' % (item.url))
return 0
if item.url.startswith('cdda://'):
+ _debug_('%r possible' % (item.url))
return 1
+ _debug_('%r good' % (item.url))
return 2
Modified: branches/rel-1/freevo/src/audio/plugins/radioplayer.py
==============================================================================
--- branches/rel-1/freevo/src/audio/plugins/radioplayer.py (original)
+++ branches/rel-1/freevo/src/audio/plugins/radioplayer.py Wed Oct 24
02:32:57 2007
@@ -71,8 +71,16 @@
1 = possible, but not good
0 = unplayable
"""
+ try:
+ _debug_('url=%r' % (item.url), 2)
+ _debug_('mode=%r' % (item.mode), 2)
+ _debug_('mimetype=%r' % (item.mimetype), 2)
+ except Exception, e:
+ print e
if item.url.startswith('radio://'):
+ _debug_('%r good' % (item.url))
return 2
+ _debug_('%r unplayable' % (item.url))
return 0
Modified: branches/rel-1/freevo/src/audio/plugins/xine.py
==============================================================================
--- branches/rel-1/freevo/src/audio/plugins/xine.py (original)
+++ branches/rel-1/freevo/src/audio/plugins/xine.py Wed Oct 24 02:32:57 2007
@@ -83,8 +83,16 @@
1 = possible, but not good
0 = unplayable
"""
+ try:
+ _debug_('url=%r' % (item.url), 2)
+ _debug_('mode=%r' % (item.mode), 2)
+ _debug_('mimetype=%r' % (item.mimetype), 2)
+ except Exception, e:
+ print e
if item.url.startswith('radio://'):
+ _debug_('%r unplayable' % (item.url))
return 0
+ _debug_('%r good' % (item.url))
return 2
Modified: branches/rel-1/freevo/src/video/plugins/mplayer.py
==============================================================================
--- branches/rel-1/freevo/src/video/plugins/mplayer.py (original)
+++ branches/rel-1/freevo/src/video/plugins/mplayer.py Wed Oct 24 02:32:57 2007
@@ -83,20 +83,27 @@
1 = possible, but not good
0 = unplayable
"""
+ try:
+ _debug_('url=%r' % (item.url), 2)
+ _debug_('mode=%r' % (item.mode), 2)
+ _debug_('mimetype=%r' % (item.mimetype), 2)
+ _debug_('network_play=%r' % (item.network_play), 2)
+ except Exception, e:
+ print e
# this seems strange that it is 'possible' for dvd:// and 'good' for
dvd
if item.url[:6] in ('dvd://', 'vcd://') and item.url.endswith('/'):
+ _debug_('%r possible' % (item.url))
return 1
if item.mode in ('dvd', 'vcd'):
+ _debug_('%r good' % (item.url))
return 2
if item.mimetype in config.VIDEO_MPLAYER_SUFFIX:
- if config.DEBUG >= 4:
- for d in dir(item):
- print '%s: %s' % (d, eval('item.%s' % d))
- for d in dir(item.info):
- print '%s: %s' % (d, eval('item.info.%s' % d))
+ _debug_('%r good' % (item.url))
return 2
if item.network_play:
+ _debug_('%r possible' % (item.url))
return 1
+ _debug_('%r unplayable' % (item.url))
return 0
Modified: branches/rel-1/freevo/src/video/plugins/vlc.py
==============================================================================
--- branches/rel-1/freevo/src/video/plugins/vlc.py (original)
+++ branches/rel-1/freevo/src/video/plugins/vlc.py Wed Oct 24 02:32:57 2007
@@ -50,8 +50,17 @@
1 = possible, but not good
0 = unplayable
"""
+ try:
+ _debug_('url=%r' % (item.url), 2)
+ _debug_('mode=%r' % (item.mode), 2)
+ _debug_('mimetype=%r' % (item.mimetype), 2)
+ _debug_('network_play=%r' % (item.network_play), 2)
+ except Exception, e:
+ print e
if item.url[:7] == 'rtsp://':
+ _debug_('%r good' % (item.url))
return 2
+ _debug_('%r unplayable' % (item.url))
return 0
Modified: branches/rel-1/freevo/src/video/plugins/xine.py
==============================================================================
--- branches/rel-1/freevo/src/video/plugins/xine.py (original)
+++ branches/rel-1/freevo/src/video/plugins/xine.py Wed Oct 24 02:32:57 2007
@@ -86,11 +86,12 @@
class Xine:
- '''the main class to control xine
- '''
+ """the main class to control xine
+ """
def __init__(self, type):
- '''Xine contructor
- '''
+ """
+ Xine contructor
+ """
self.name = 'xine'
self.app_mode = 'video'
@@ -105,30 +106,42 @@
def rate(self, item):
- '''
+ """
How good can this player play the file:
2 = good
1 = possible, but not good
0 = unplayable
- '''
+ """
+ try:
+ _debug_('url=%r' % (item.url), 2)
+ _debug_('mode=%r' % (item.mode), 2)
+ _debug_('mimetype=%r' % (item.mimetype), 2)
+ _debug_('network_play=%r' % (item.network_play), 2)
+ except Exception, e:
+ print e
if item.url.startswith('dvd://'):
+ _debug_('%r good' % (item.url))
return 2
if item.url.startswith('vcd://'):
if item.url == 'vcd://':
+ _debug_('%r good' % (item.url))
return 2
+ _debug_('%r unplayable' % (item.url))
return 0
-
if item.mimetype in config.VIDEO_XINE_SUFFIX:
+ _debug_('%r good' % (item.url))
return 2
if item.network_play:
+ _debug_('%r possible' % (item.url))
return 1
+ _debug_('%r unplayable' % (item.url))
return 0
def play(self, options, item):
- '''
+ """
play a dvd with xine
- '''
+ """
self.item = item
self.options = options
self.item.elapsed = 0
@@ -200,9 +213,9 @@
def stop(self, event=None):
- '''
+ """
Stop xine
- '''
+ """
if not self.app:
return
@@ -230,10 +243,10 @@
def eventhandler(self, event, menuw=None):
- '''
+ """
eventhandler for xine control. If an event is not bound in this
function it will be passed over to the items eventhandler
- '''
+ """
if not self.app:
return self.item.eventhandler(event)
@@ -373,9 +386,9 @@
class XineApp(childapp.ChildApp2):
- '''
+ """
class controlling the in and output from the xine process
- '''
+ """
def __init__(self, command, player):
_debug_('XineApp.__init__(command=%r, player=%r)' % (command, player),
3)
self.item = player.item
@@ -384,17 +397,17 @@
childapp.ChildApp2.__init__(self, command)
def stdout_cb(self, line):
- '''
+ """
parse the stdout of the xine process
- '''
+ """
# show connection status for network play
if self.item.network_play:
pass
def stderr_cb(self, line):
- '''
+ """
parse the stderr of the xine process
- '''
+ """
_debug_('%r' % line, 2)
# Has it started?
if line.find('playing mrl') >= 0:
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog