[pitivi] pipeline: Call get_mode only on GES.Pipeline
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] pipeline: Call get_mode only on GES.Pipeline
- Date: Thu, 19 Nov 2015 10:03:15 +0000 (UTC)
commit bb8bd19b03189d14af1633286e8e97bbd88b4c88
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Thu Nov 19 09:32:25 2015 +0100
pipeline: Call get_mode only on GES.Pipeline
pitivi/utils/pipeline.py | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/utils/pipeline.py b/pitivi/utils/pipeline.py
index 9dd17b7..5669674 100644
--- a/pitivi/utils/pipeline.py
+++ b/pitivi/utils/pipeline.py
@@ -506,7 +506,7 @@ class SimplePipeline(GObject.Object, Loggable):
Gst.debug_bin_to_dot_file_with_ts(self._pipeline,
Gst.DebugGraphDetails.ALL,
"pitivi.error")
- if not self._pipeline.get_mode() & GES.PipelineFlags.RENDER:
+ if not self._rendering():
self._recover()
elif message.type == Gst.MessageType.DURATION_CHANGED:
self.debug("Duration might have changed, querying it")
@@ -586,6 +586,9 @@ class SimplePipeline(GObject.Object, Loggable):
raise PipelineError("Couldn't get duration: Returned None")
return dur
+ def _rendering(self):
+ return False
+
class AssetPipeline(SimplePipeline):
@@ -703,7 +706,7 @@ class Pipeline(GES.Pipeline, SimplePipeline):
if self._timeline.is_empty():
return
- if self._pipeline.get_mode() & GES.PipelineFlags.RENDER:
+ if self._rendering():
raise PipelineError("Trying to seek while rendering")
st = Gst.Structure.new_empty("seek")
@@ -751,3 +754,7 @@ class Pipeline(GES.Pipeline, SimplePipeline):
self.debug("No ASYNC_DONE will be emited on empty timelines")
self._was_empty = True
self._removeWaitingForAsyncDoneTimeout()
+
+ def _rendering(self):
+ mask = GES.PipelineFlags.RENDER | GES.PipelineFlags.SMART_RENDER
+ return self._pipeline.get_mode() & mask
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]