[pitivi] base: Set prefer-passthrough on alpha only if available



commit 7966ba1bfd1f0dd7a930e6c79fde1cd1ae40725f
Author: Arun Raghavan <arun raghavan collabora co uk>
Date:   Sun Jan 30 16:35:09 2011 +0530

    base: Set prefer-passthrough on alpha only if available
    
    This allows us to work with gst-plugins-good prior to 0.10.24
    
    https://bugzilla.gnome.org/show_bug.cgi?id=640936

 pitivi/factories/base.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/factories/base.py b/pitivi/factories/base.py
index 96d588a..2e564c2 100644
--- a/pitivi/factories/base.py
+++ b/pitivi/factories/base.py
@@ -483,7 +483,13 @@ class SourceFactory(ObjectFactory):
             video_bin.csp = gst.element_factory_make("identity")
 
         video_bin.alpha = gst.element_factory_make("alpha", "internal-alpha")
-        video_bin.alpha.props.prefer_passthrough = True
+
+        try:
+            video_bin.alpha.props.prefer_passthrough = True
+        except AttributeError:
+            self.warning("User has old version of alpha. "
+                         "prefer-passthrough not enabled")
+
         video_bin.scale = gst.element_factory_make("videoscale")
         try:
             video_bin.scale.props.add_borders = True



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