[pitivi] Always add SmartScale to the rendering pipeline.



commit 2d1bc4b0052b4808596e7318c57031501cb9f9ac
Author: Alessandro Decina <alessandro d gmail com>
Date:   Fri Jun 26 16:25:31 2009 +0200

    Always add SmartScale to the rendering pipeline.
    
    This is needed to make DV rendering work, since the ffmpeg dv muxer accepts only some specific resolutions.

 pitivi/factories/operation.py |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/pitivi/factories/operation.py b/pitivi/factories/operation.py
index 92fcb6c..3a76ac5 100644
--- a/pitivi/factories/operation.py
+++ b/pitivi/factories/operation.py
@@ -109,13 +109,12 @@ class VideoModifierFactory(StreamModifierFactory):
         b.add_pad(gsink)
 
         # if we have an output stream specified, we add a capsfilter
+        vscale = SmartVideoScale()
+        vscale.set_caps(self.output_streams[0].caps)
+        b.add(vscale)
+        vrate.link(vscale)
         self.debug("output_streams:%d", len(self.output_streams))
         if len(self.output_streams) and self.output_streams[0].caps.is_fixed():
-            vscale = SmartVideoScale()
-            vscale.set_caps(self.output_streams[0].caps)
-            b.add(vscale)
-            vrate.link(vscale)
-
             idt = gst.element_factory_make("capsfilter")
             idt.props.caps = self.output_streams[0].caps
             b.add(idt)
@@ -123,7 +122,7 @@ class VideoModifierFactory(StreamModifierFactory):
 
             gsrc = gst.GhostPad("src", idt.get_pad("src"))
         else:
-            gsrc = gst.GhostPad("src", vrate.get_pad("src"))
+            gsrc = gst.GhostPad("src", vscale.get_pad("src"))
 
         gsrc.set_active(True)
         b.add_pad(gsrc)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]