[pitivi] render: set a restriction for the pixel format.
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] render: set a restriction for the pixel format.
- Date: Fri, 27 Sep 2013 20:07:28 +0000 (UTC)
commit cfaa2b10fbe9d2d964a57393a998c3262e69b40f
Author: Mathieu Duponchelle <mathieu duponchelle epitech eu>
Date: Thu Sep 26 02:54:13 2013 +0200
render: set a restriction for the pixel format.
pitivi/render.py | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/render.py b/pitivi/render.py
index ecee0d6..3ac588d 100644
--- a/pitivi/render.py
+++ b/pitivi/render.py
@@ -886,6 +886,17 @@ class RenderDialog(Loggable):
self.progress = RenderingProgressDialog(self.app, self)
self.window.hide() # Hide the rendering settings dialog while rendering
+ # Now find a format to set on the restriction caps.
+ # The reason is we can't send different formats on the encoders.
+ factory = Gst.ElementFactory.find(self.project.vencoder)
+ for struct in factory.get_static_pad_templates():
+ if struct.direction == Gst.PadDirection.SINK:
+ caps = struct.get_caps()
+ fixed = caps.fixate()
+ fmt = fixed.get_structure(0).get_value("format")
+ self.project.video_profile.get_restriction()[0]["format"] = fmt
+ break
+
self._pipeline.set_render_settings(self.outfile, self.project.container_profile)
self.startAction()
self.progress.window.show()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]