diff options
author | Manuel Kaufmann <humitos@gmail.com> | 2012-09-05 21:14:29 (GMT) |
---|---|---|
committer | Manuel Kaufmann <humitos@gmail.com> | 2012-09-05 21:14:29 (GMT) |
commit | fbed9b9448b95e0e48c47de93bb113f9dc709cc8 (patch) | |
tree | b5caf45a9fac816176591bc829801687e82649c1 | |
parent | 1500effa6c27b4e88b41e86bf2830bf4406e90a7 (diff) |
Switch between video streams in the playlistsugar-0.94
Some tests to make this action to work.
-rw-r--r-- | jukeboxactivity.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/jukeboxactivity.py b/jukeboxactivity.py index 8bb320e..998d635 100644 --- a/jukeboxactivity.py +++ b/jukeboxactivity.py @@ -47,6 +47,7 @@ import pygtk pygtk.require('2.0') import gobject +gobject.threads_init() import pygst pygst.require('0.10') @@ -271,6 +272,7 @@ class JukeboxActivity(activity.Activity): # self.playflag = False # return self.player.seek(0L) + self.player.stop() if direction == "prev" and self.currentplaying > 0: self.play(self.currentplaying - 1) logging.info("prev: " + self.playlist[self.currentplaying]['url']) @@ -850,7 +852,8 @@ class GstPlayer(gobject.GObject): self.error = False def stop(self): - self.player.set_state(gst.STATE_NULL) + self.player.set_state(gst.STATE_READY) + # self.player.set_state(gst.STATE_NULL) logging.debug("stopped player") def get_state(self, timeout=1): |