[pitivi] scenarios: Serialize play / pause
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] scenarios: Serialize play / pause
- Date: Sat, 15 Nov 2014 10:32:03 +0000 (UTC)
commit 592c33f46bbbf982a3d6884b36d72210f15e015d
Author: Mathieu Duponchelle <mathieu duponchelle opencreed com>
Date: Fri May 2 17:51:57 2014 +0200
scenarios: Serialize play / pause
https://bugzilla.gnome.org/show_bug.cgi?id=739251
pitivi/viewer.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/viewer.py b/pitivi/viewer.py
index 3da02a3..250a68c 100644
--- a/pitivi/viewer.py
+++ b/pitivi/viewer.py
@@ -452,9 +452,17 @@ class ViewerContainer(Gtk.VBox, Loggable):
This is meant to be called by mainwindow.
"""
if int(state) == int(Gst.State.PLAYING):
+ st = Gst.Structure.new_empty("play")
+ st.set_value("playback_time", float(self.pipeline.getPosition())
+ / Gst.SECOND)
+ self.app.write_action(st)
self.playpause_button.setPause()
self.system.inhibitScreensaver(self.INHIBIT_REASON)
elif int(state) == int(Gst.State.PAUSED):
+ st = Gst.Structure.new_empty("pause")
+ st.set_value("playback_time", float(self.pipeline.getPosition()) /
+ Gst.SECOND)
+ self.app.write_action(st)
self.playpause_button.setPlay()
self.system.uninhibitScreensaver(self.INHIBIT_REASON)
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]