[pitivi/ges: 42/287] Cleanup the effects after the GES port
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/ges: 42/287] Cleanup the effects after the GES port
- Date: Thu, 15 Mar 2012 16:29:21 +0000 (UTC)
commit 348b81cc16b3075f34affaf2fb5b740dc5fe1e0d
Author: Thibault Saunier <thibault saunier collabora com>
Date: Mon Oct 3 20:46:28 2011 -0300
Cleanup the effects after the GES port
pitivi/effects.py | 35 +++++------------------------------
1 files changed, 5 insertions(+), 30 deletions(-)
---
diff --git a/pitivi/effects.py b/pitivi/effects.py
index 266c26c..e09960d 100644
--- a/pitivi/effects.py
+++ b/pitivi/effects.py
@@ -138,14 +138,11 @@ class EffectsHandler(object):
self._getEffectCategories(name),
self._getEffectName(element_factory),
self._getEffectDescripton(element_factory))
- added = self.addStreams(element_factory, effect)
-
- if added is True:
- if 'Audio' in klass:
- self.audio_effects.append(element_factory)
- elif 'Video' in klass:
- self.video_effects.append(element_factory)
- self._addEffectToDic(name, effect)
+ if 'Audio' in klass:
+ self.audio_effects.append(element_factory)
+ elif 'Video' in klass:
+ self.video_effects.append(element_factory)
+ self._addEffectToDic(name, effect)
def getAllAudioEffects(self):
"""
@@ -171,28 +168,6 @@ class EffectsHandler(object):
"""
return self._effect_factories_dict.get(name)
- def addStreams(self, element, factory):
- """
- Adds the good streams to the corresponding factory
- """
- pads = element.get_static_pad_templates()
-
- if not factory:
- return False
-
- for padTmp in pads:
- pad = gst.Pad(padTmp.get())
- if pad.get_caps() == "ANY":
- return False
-
- if padTmp.direction == gst.PAD_SRC:
- stream = get_stream_for_pad(pad)
- factory.addInputStream(stream)
- elif padTmp.direction == gst.PAD_SINK:
- stream = get_stream_for_pad(pad)
- factory.addOutputStream(stream)
- return True
-
def _getEffectDescripton(self, element_factory):
"""
@ivar element_factory: The element factory
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]