From fbed9b9448b95e0e48c47de93bb113f9dc709cc8 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 05 Sep 2012 21:14:29 +0000 Subject: Switch between video streams in the playlist Some tests to make this action to work. --- 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): -- cgit v0.9.1