[SCM] morituri/master: * gstreamer.py: Document bus and pipeline. Make bus public.

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Oct 19 20:09:32 UTC 2014


The following commit has been merged in the master branch:
commit 8af605c2c04e51c9e431d16e7c05026f2d794b9b
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Fri Aug 5 20:19:58 2011 +0000

    	* gstreamer.py:
    	  Document bus and pipeline.  Make bus public.

diff --git a/morituri/extern/task/ChangeLog b/morituri/extern/task/ChangeLog
index 907a2bf..6999323 100644
--- a/morituri/extern/task/ChangeLog
+++ b/morituri/extern/task/ChangeLog
@@ -1,6 +1,11 @@
 2011-08-05  Thomas Vander Stichele  <thomas at apestaart dot org>
 
 	* gstreamer.py:
+	  Document bus and pipeline.  Make bus public.
+
+2011-08-05  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+	* gstreamer.py:
 	  Add quoteParse() method.
 
 2011-08-05  Thomas Vander Stichele  <thomas at apestaart dot org>
diff --git a/morituri/extern/task/gstreamer.py b/morituri/extern/task/gstreamer.py
index 8a38d8d..986d6b1 100644
--- a/morituri/extern/task/gstreamer.py
+++ b/morituri/extern/task/gstreamer.py
@@ -48,15 +48,20 @@ class GstPipelineTask(task.Task):
 
     I handle errors and raise them appropriately.
 
-    @cvar gst: the GStreamer module, so code does not have to import gst
-               as a module in code everywhere to avoid option stealing.
-    @var playing: whether the pipeline should be set to playing after
-                  paused.  Some pipelines don't need to play for a task
-                  to be done (for example, querying length)
+    @cvar gst:      the GStreamer module, so code does not have to import gst
+                    as a module in code everywhere to avoid option stealing.
+    @var  playing:  whether the pipeline should be set to playing after
+                    paused.  Some pipelines don't need to play for a task
+                    to be done (for example, querying length)
+    @type playing:  bool
+    @type pipeline: L{gst.Pipeline}
+    @type bus:      L{gst.Bus}
     """
 
     gst = None
     playing = True
+    pipeline = None
+    bus = None
 
     ### task.Task implementations
     def start(self, runner):
@@ -67,18 +72,20 @@ class GstPipelineTask(task.Task):
 
         self.getPipeline()
 
-        self._bus = self.pipeline.get_bus()
-        self.gst.debug('got bus %r' % self._bus)
+        self.bus = self.pipeline.get_bus()
+        # FIXME: remove this
+        self._bus = self.bus
+        self.gst.debug('got bus %r' % self.bus)
 
         # a signal watch calls callbacks from an idle loop
-        # self._bus.add_signal_watch()
+        # self.bus.add_signal_watch()
 
         # sync emission triggers sync-message signals which calls callbacks
         # from the thread that signals, but happens immediately
-        self._bus.enable_sync_message_emission()
-        self._bus.connect('sync-message::eos', self.bus_eos_cb)
-        self._bus.connect('sync-message::tag', self.bus_tag_cb)
-        self._bus.connect('sync-message::error', self.bus_error_cb)
+        self.bus.enable_sync_message_emission()
+        self.bus.connect('sync-message::eos', self.bus_eos_cb)
+        self.bus.connect('sync-message::tag', self.bus_tag_cb)
+        self.bus.connect('sync-message::error', self.bus_error_cb)
 
         self.parsed()
 

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list