[pitivi] effects: Don't error out when the effect doesn't have a recognized media type.
- From: Mathieu Duponchelle <mathieudu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] effects: Don't error out when the effect doesn't have a recognized media type.
- Date: Wed, 17 Jul 2013 23:53:31 +0000 (UTC)
commit 59fc0b1121a7f708da0aea44abf8050838d64755
Author: Mathieu Duponchelle <mathieu duponchelle epitech eu>
Date: Thu Jul 18 00:47:09 2013 +0200
effects: Don't error out when the effect doesn't have a recognized media type.
pitivi/effects.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/effects.py b/pitivi/effects.py
index 9590220..adc7638 100644
--- a/pitivi/effects.py
+++ b/pitivi/effects.py
@@ -60,7 +60,7 @@ from pitivi.utils.widgets import GstElementSettingsWidget, FractionWidget
#------------- Helper to handle effect in the backend ---------------------------#
-(VIDEO_EFFECT, AUDIO_EFFECT) = range(2)
+(VIDEO_EFFECT, AUDIO_EFFECT) = range(1, 3)
BLACKLISTED_EFFECTS = ["colorconvert", "coglogoinsert", "festival",
"alphacolor", "cogcolorspace", "videodetect",
@@ -191,6 +191,7 @@ class EffectsHandler(object):
if ("Effect" in klass and name not in BLACKLISTED_EFFECTS
and not [bplug for bplug in BLACKLISTED_PLUGINS if bplug in name]):
+ media_type = None
if "Audio" in klass:
self.audio_effects.append(element_factory)
@@ -199,6 +200,10 @@ class EffectsHandler(object):
self.video_effects.append(element_factory)
media_type = VIDEO_EFFECT
+ if not media_type:
+ HIDDEN_EFFECTS.append(name)
+ continue
+
effect = Effect(name, media_type,
self._getEffectCategories(name),
self._getEffectName(element_factory),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]