simplify logic; log bus error cb
This commit is contained in:
13
morituri/extern/task/gstreamer.py
vendored
13
morituri/extern/task/gstreamer.py
vendored
@@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user