[pitivi] timeline: Fix the retrieval of the Pipeline state
- From: Mathieu Duponchelle <mathieudu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] timeline: Fix the retrieval of the Pipeline state
- Date: Tue, 4 Feb 2014 21:54:39 +0000 (UTC)
commit 08b45ec3b10d504306fe61bd6cfdc51cdb18af7a
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Sun Jan 12 13:24:05 2014 +0100
timeline: Fix the retrieval of the Pipeline state
pitivi/timeline/timeline.py | 8 ++++----
pitivi/utils/pipeline.py | 2 +-
pitivi/viewer.py | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 94be8c3..7776fd7 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -375,13 +375,13 @@ class TimelineStage(Clutter.ScrollActor, Zoomable):
self.lastPosition = position
def _updatePlayHead(self):
- if self._project and self._project.pipeline.get_state() != Gst.State.PLAYING:
+ if self._project and self._project.pipeline.getState() != Gst.State.PLAYING:
self.playhead.save_easing_state()
self.playhead.set_easing_duration(600)
height = len(self.bTimeline.get_layers()) * (EXPANDED_SIZE + SPACING) * 2
self.playhead.set_size(PLAYHEAD_WIDTH, height)
self.playhead.props.x = self.nsToPixel(self.lastPosition)
- if self._project and self._project.pipeline.get_state() != Gst.State.PLAYING:
+ if self._project and self._project.pipeline.getState() != Gst.State.PLAYING:
self.playhead.restore_easing_state()
def _createPlayhead(self):
@@ -1090,12 +1090,12 @@ class TimelineContainer(Gtk.Grid, Zoomable, Loggable):
elif x < self.hadj.props.lower:
self.warning("Position %s is smaller than the hscrollbar's lower bound (%s)" % (x,
self.hadj.props.lower))
- if self._project and self._project.pipeline.get_state() != Gst.State.PLAYING:
+ if self._project and self._project.pipeline.getState() != Gst.State.PLAYING:
self.timeline.save_easing_state()
self.timeline.set_easing_duration(600)
self._hscrollbar.set_value(x)
- if self._project and self._project.pipeline.get_state() != Gst.State.PLAYING:
+ if self._project and self._project.pipeline.getState() != Gst.State.PLAYING:
self.timeline.restore_easing_state()
return False
diff --git a/pitivi/utils/pipeline.py b/pitivi/utils/pipeline.py
index 6bd544c..2fee741 100644
--- a/pitivi/utils/pipeline.py
+++ b/pitivi/utils/pipeline.py
@@ -223,7 +223,7 @@ class SimplePipeline(Signallable, Loggable):
@return: The current state.
@rtype: C{State}
"""
- change, state, pending = self._pipeline.get_state(0)
+ change, state, pending = self._pipeline.get_state(timeout=0) # No timeout
self.debug("change: %r, state: %r, pending: %r", change, state, pending)
return state
diff --git a/pitivi/viewer.py b/pitivi/viewer.py
index c94096f..faccc7d 100644
--- a/pitivi/viewer.py
+++ b/pitivi/viewer.py
@@ -991,7 +991,7 @@ class ViewerWidget(Gtk.DrawingArea, Loggable):
if self.box.area.width != self.pixbuf.get_width():
cr.restore()
- if self.pipeline and self.pipeline.get_state()[1] == Gst.State.PAUSED:
+ if self.pipeline and self.pipeline.getState() == Gst.State.PAUSED:
self.box.draw(cr)
cr.pop_group_to_source()
cr.paint()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]