[pitivi] project: update tracks restriction caps when framerate is changed.
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] project: update tracks restriction caps when framerate is changed.
- Date: Fri, 27 Sep 2013 20:06:58 +0000 (UTC)
commit b66fe23f31884e751fd4f50cfa0d24103db8d56f
Author: Mathieu Duponchelle <mathieu duponchelle epitech eu>
Date: Thu Sep 5 01:05:08 2013 +0200
project: update tracks restriction caps when framerate is changed.
pitivi/project.py | 2 ++
pitivi/timeline/timeline.py | 2 +-
2 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/project.py b/pitivi/project.py
index 40c622d..0c200ff 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -677,6 +677,7 @@ class Project(Loggable, GES.Project):
def videorate(self, value):
if self.video_profile.get_restriction()[0]["framerate"] != value and value:
self.video_profile.get_restriction()[0]["framerate"] = value
+ self._emitChange("rendering-settings-changed", "videorate", value)
@property
def videopar(self):
@@ -861,6 +862,7 @@ class Project(Loggable, GES.Project):
caps = Gst.Caps.new_empty_simple("video/x-raw")
caps.set_value("width", self.videowidth)
caps.set_value("height", self.videoheight)
+ caps.set_value("framerate", self.videorate)
for track in self.timeline.get_tracks():
if isinstance(track, GES.VideoTrack):
track.set_restriction_caps(caps)
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index ddc5b36..ec3d627 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1374,7 +1374,7 @@ class Timeline(Gtk.VBox, Zoomable, Loggable):
self.ruler.setProjectFrameRate(self._framerate)
- if item == "width" or item == "height":
+ if item == "width" or item == "height" or item == "videorate":
project.update_restriction_caps()
def _snapDistanceChangedCb(self, settings):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]