[pitivi: 3/4] Also put videoscale in DefaultVideoSink.



commit 416d6feb18f3533dc0bb08f77faec90ed27de50a
Author: Alessandro Decina <alessandro d gmail com>
Date:   Mon May 4 15:32:17 2009 +0200

    Also put videoscale in DefaultVideoSink.
---
 pitivi/plumber.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/pitivi/plumber.py b/pitivi/plumber.py
index 23fe827..d1d5431 100644
--- a/pitivi/plumber.py
+++ b/pitivi/plumber.py
@@ -55,12 +55,17 @@ class DefaultVideoSink(SinkFactory):
 
         bin = gst.Bin()
         ffmpegcolorspace = gst.element_factory_make("ffmpegcolorspace")
+        try:
+            videoscale = gst.element_factory_make("ffvideoscale")
+        except gst.ElementNotFoundError:
+            videoscale = gst.element_factory_make("videoscale")
 
         autovideosink = gst.element_factory_make("autovideosink")
         autovideosink.set_state(gst.STATE_READY)
 
-        bin.add(ffmpegcolorspace, autovideosink)
-        ffmpegcolorspace.link(autovideosink)
+        bin.add(ffmpegcolorspace, videoscale, autovideosink)
+        ffmpegcolorspace.link(videoscale)
+        videoscale.link(autovideosink)
         pad = ffmpegcolorspace.get_pad("sink")
         ghost = gst.GhostPad("sink", pad)
         bin.add_pad(ghost)



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