[pitivi: 1/3] factories: make videoscale::add-borders optional in base.py.
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi: 1/3] factories: make videoscale::add-borders optional in base.py.
- Date: Tue, 7 Sep 2010 06:58:20 +0000 (UTC)
commit 32466521ffbbf087c07e9d568d879e953bf513b7
Author: Alessandro Decina <alessandro d gmail com>
Date: Mon Sep 6 11:20:58 2010 +0200
factories: make videoscale::add-borders optional in base.py.
pitivi/factories/base.py | 5 +++--
pitivi/factories/operation.py | 7 ++++++-
2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/factories/base.py b/pitivi/factories/base.py
index e2baee4..87a45f3 100644
--- a/pitivi/factories/base.py
+++ b/pitivi/factories/base.py
@@ -425,8 +425,9 @@ class SourceFactory(ObjectFactory):
b.scale = gst.element_factory_make("videoscale")
try:
b.scale.props.add_borders = True
- except:
- self.warning("User has old version of videoscale. add-border not enabled")
+ except AttributeError:
+ self.warning("User has old version of videoscale. "
+ "add-border not enabled")
b.capsfilter = gst.element_factory_make("capsfilter")
self.setFilterCaps(self._filtercaps, b)
diff --git a/pitivi/factories/operation.py b/pitivi/factories/operation.py
index ee47117..c6a0d2d 100644
--- a/pitivi/factories/operation.py
+++ b/pitivi/factories/operation.py
@@ -111,7 +111,12 @@ class VideoModifierFactory(StreamModifierFactory):
# if we have an output stream specified, we add a capsfilter
vscale = gst.element_factory_make("videoscale")
- vscale.props.add_borders = True
+ try:
+ vscale.props.add_borders = True
+ except AttributeError:
+ self.warning("User has old version of videoscale. "
+ "add-border not enabled.")
+
b.add(vscale)
vrate.link(vscale)
self.debug("output_streams:%d", len(self.output_streams))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]