[pitivi] Add ffmpegcolorspace before xvimagesink.



commit 4bcd0da3f62e1991404e514a8e0f38aba4cac1b1
Author: Alessandro Decina <alessandro d gmail com>
Date:   Mon Apr 27 17:22:43 2009 +0200

    Add ffmpegcolorspace before xvimagesink.
    
    xvimagesink doesn't seem to support I420 under vmware.
---
 pitivi/plumber.py |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/pitivi/plumber.py b/pitivi/plumber.py
index 4e57d61..5c4e6c6 100644
--- a/pitivi/plumber.py
+++ b/pitivi/plumber.py
@@ -52,9 +52,18 @@ class DefaultVideoSink(SinkFactory):
             self.debug("Returning cached sink")
             return self._cachedsink
 
+        bin = gst.Bin()
+        ffmpegcolorspace = gst.element_factory_make("ffmpegcolorspace")
+
         autovideosink = gst.element_factory_make("autovideosink")
         autovideosink.set_state(gst.STATE_READY)
 
+        bin.add(ffmpegcolorspace, autovideosink)
+        ffmpegcolorspace.link(autovideosink)
+        pad = ffmpegcolorspace.get_pad("sink")
+        ghost = gst.GhostPad("sink", pad)
+        bin.add_pad(ghost)
+
         if not autovideosink.implements_interface(interfaces.XOverlay):
             autovideosink.info("doesn't implement XOverlay interface")
             self._realsink = autovideosink.get_by_interface(interfaces.XOverlay)
@@ -80,7 +89,7 @@ class DefaultVideoSink(SinkFactory):
             self._realsink.set_xwindow_id(self._xid)
 
         self._cachedsink = autovideosink
-        return autovideosink
+        return bin
 
     def _releaseBin(self, bin, *args):
         if bin == self._cachedsink:



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