From 903fade5677e6d43a18245ae767e3b8950c21b59 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Sun, 18 Nov 2012 13:04:37 +0000 Subject: [PATCH] simplify logic; log bus error cb --- morituri/extern/task/gstreamer.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/morituri/extern/task/gstreamer.py b/morituri/extern/task/gstreamer.py index 4771348..7fac387 100644 --- a/morituri/extern/task/gstreamer.py +++ b/morituri/extern/task/gstreamer.py @@ -6,17 +6,17 @@ # Copyright (C) 2009 Thomas Vander Stichele # This file is part of morituri. -# +# # morituri is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. -# +# # morituri is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with morituri. If not, see . @@ -98,11 +98,11 @@ class GstPipelineTask(task.Task): # GStreamer tasks could already be done in paused, and not # need playing. - if not self.exception: - done = self.paused() - else: + if self.exception: raise self.exception + done = self.paused() + if done: self.debug('paused() is done') else: @@ -208,6 +208,7 @@ class GstPipelineTask(task.Task): """ Called synchronously (ie from messaging thread) on error message. """ + self.debug('bus_error_cb: bus %r, message %r' % (bus, message)) exc = GstException(*message.parse_error()) self.setAndRaiseException(exc) self.debug('error, scheduling stop')