(self, bus, message)
| 41 | gtk.gdk.threads_leave() |
| 42 | |
| 43 | def on_message(self, bus, message): |
| 44 | t = message.type |
| 45 | if t == gst.MESSAGE_ERROR: |
| 46 | err, debug = message.parse_error() |
| 47 | print "Error: %s" % err, debug |
| 48 | if self.on_eos: |
| 49 | self.on_eos() |
| 50 | self.playing = False |
| 51 | elif t == gst.MESSAGE_EOS: |
| 52 | if self.on_eos: |
| 53 | self.on_eos() |
| 54 | self.playing = False |
| 55 | |
| 56 | def set_location(self, location): |
| 57 | self.player.set_state(gst.STATE_NULL) |