[SCM] morituri/master: * morituri/common/gstreamer.py: Stop task when we get an exception. Don't make pipeline go to PLAYING if we got an exception before doing so.

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


The following commit has been merged in the master branch:
commit c314dcb597e4372b283217ab4505a53b1ea01166
Author: Thomas Vander Stichele <thomas (at) apestaart (dot) org>
Date:   Mon May 23 18:08:25 2011 +0000

    	* morituri/common/gstreamer.py:
    	  Stop task when we get an exception.
    	  Don't make pipeline go to PLAYING if we got an exception
    	  before doing so.

diff --git a/ChangeLog b/ChangeLog
index 5de7d68..309d23f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2011-05-23  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+	* morituri/common/gstreamer.py:
+	  Stop task when we get an exception.
+	  Don't make pipeline go to PLAYING if we got an exception
+	  before doing so.
+
+2011-05-23  Thomas Vander Stichele  <thomas at apestaart dot org>
+
 	* morituri/common/encode.py:
 	  Convert TagReadTask to gstreamer.GstPipelineTask and
 	  remove lots of duplicate code.
diff --git a/morituri/common/gstreamer.py b/morituri/common/gstreamer.py
index 1cf7b98..250206d 100644
--- a/morituri/common/gstreamer.py
+++ b/morituri/common/gstreamer.py
@@ -87,6 +87,10 @@ class GstPipelineTask(task.Task):
         #       gst.STATE_PLAYING)
         # would not work.
         def playLater():
+            if self.exception:
+                self.debug('playLater: exception was raised, not playing')
+                return False
+
             self.debug('setting pipeline to PLAYING')
             self.pipeline.set_state(self.gst.STATE_PLAYING)
             self.debug('set pipeline to PLAYING')
@@ -95,7 +99,6 @@ class GstPipelineTask(task.Task):
         self.debug('scheduling setting pipeline to PLAYING')
         self.runner.schedule(0, playLater)
 
-
     def stop(self):
         self.debug('stopping')
         self.debug('setting state to NULL')
@@ -156,6 +159,5 @@ class GstPipelineTask(task.Task):
         """
         exc = GstException(*message.parse_error())
         self.setAndRaiseException(exc)
-        # FIXME: why is this commented ?
-        # self.gst.debug('error, scheduling stop')
-        #self.runner.schedule(0, self.stop)
+        self.debug('error, scheduling stop')
+        self.runner.schedule(0, self.stop)

-- 
morituri packaging



More information about the pkg-multimedia-commits mailing list