[Pkg-sugar-commit] [sugar-jukebox-activity] 08/10: Use 'playbin2' instead of 'playbin'

Jonas Smedegaard dr at jones.dk
Sat Jun 27 01:57:03 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag v26.1
in repository sugar-jukebox-activity.

commit a8a8ee9d43f23c7318038f02805b99a48d5e4423
Author: Manuel Kaufmann <humitos at gmail.com>
Date:   Fri Sep 14 10:28:10 2012 -0300

    Use 'playbin2' instead of 'playbin'
    
    'playbin' is obsolete and not should be used. I was told in #gstreamer
    (irc.freenode.net) that 'playbin' is no longer supported, that has
    some bugs and shouldn't be used anymore. It should be changed by
    'playbin2'
    
    I had to set some flags as well to keep showing the 'vis-plugin' with
    'playbin2' player.
    
    Signed-off-by: Manuel Kaufmann <humitos at gmail.com>
---
 jukeboxactivity.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/jukeboxactivity.py b/jukeboxactivity.py
index dc439b3..30a950f 100644
--- a/jukeboxactivity.py
+++ b/jukeboxactivity.py
@@ -716,7 +716,13 @@ class GstPlayer(gobject.GObject):
         self.playing = False
         self.error = False
 
-        self.player = gst.element_factory_make("playbin", "player")
+        self.player = gst.element_factory_make("playbin2", "player")
+
+        # Set the proper flags to render the vis-plugin
+        GST_PLAY_FLAG_VIS = 1 << 3
+        GST_PLAY_FLAG_TEXT = 1 << 2
+        self.player.props.flags |= GST_PLAY_FLAG_VIS
+        self.player.props.flags |= GST_PLAY_FLAG_TEXT
 
         r = gst.registry_get_default()
         l = [x for x in r.get_feature_list(gst.ElementFactory)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sugar/sugar-jukebox-activity.git



More information about the pkg-sugar-commit mailing list