Changeset - 331e67fa1492
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 12 years ago 2013-06-12 23:48:32
drewp@bigasterisk.com
asco try to print gst error messages. untested
Ignore-this: 137d6b933ed8a2502f7281e3a0ab5754
1 file changed with 11 insertions and 3 deletions:
0 comments (0 inline, 0 general)
light9/ascoltami/player.py
Show inline comments
 
@@ -71,12 +71,20 @@ class Player(object):
 
        """bus.add_signal_watch seems to be having no effect, but this works"""
 
        bus = self.pipeline.get_bus()
 
        mt = Gst.MessageType
 
        msg = bus.poll(mt.EOS | mt.STREAM_STATUS, 0)
 
        msg = bus.poll(mt.EOS | mt.STREAM_STATUS | mt.ERROR,# | mt.ANY,
 
                       0)
 
        if msg is not None:
 
            if msg.type == Gst.MessageType.EOS:
 
            log.debug("bus message: %r %r", msg.src, msg.type)
 
            # i'm trying to catch here a case where the pulseaudio
 
            # output has an error, since that's otherwise kind of
 
            # mysterious to diagnose. I don't think this is exactly
 
            # working.
 
            if msg.type == mt.ERROR:
 
                log.error(repr(msg.parse_error()))
 
            if msg.type == mt.EOS:
 
                if self.onEOS is not None:
 
                    self.onEOS(self.getSong())
 
            if msg.type == Gst.MessageType.STREAM_STATUS:
 
            if msg.type == mt.STREAM_STATUS:
 
                (statusType, _elem) = msg.parse_stream_status()
 
                if statusType == Gst.StreamStatusType.ENTER:
 
                    self.setupAutostop()
0 comments (0 inline, 0 general)