Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManuel Kaufmann <humitos@gmail.com>2012-09-05 21:14:29 (GMT)
committer Manuel Kaufmann <humitos@gmail.com>2012-09-05 21:14:29 (GMT)
commitfbed9b9448b95e0e48c47de93bb113f9dc709cc8 (patch)
treeb5caf45a9fac816176591bc829801687e82649c1
parent1500effa6c27b4e88b41e86bf2830bf4406e90a7 (diff)
Switch between video streams in the playlistsugar-0.94
Some tests to make this action to work.
-rw-r--r--jukeboxactivity.py5
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):