[pitivi: 4/10] effects: implement a simple but robust TrackEffect.getElement()
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi: 4/10] effects: implement a simple but robust TrackEffect.getElement()
- Date: Sun, 26 Sep 2010 07:44:50 +0000 (UTC)
commit 11d13b08fdacd34ea5380b9fb09acdb3ef2c5bd2
Author: Alessandro Decina <alessandro d gmail com>
Date: Thu Sep 23 13:55:51 2010 +0200
effects: implement a simple but robust TrackEffect.getElement()
pitivi/factories/operation.py | 2 +-
pitivi/timeline/track.py | 6 ++----
2 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/factories/operation.py b/pitivi/factories/operation.py
index c5118bb..5ff8513 100644
--- a/pitivi/factories/operation.py
+++ b/pitivi/factories/operation.py
@@ -80,7 +80,7 @@ class EffectFactory (TransformFactory):
def _makeBin (self, *args):
bin = gst.Bin()
- fx = gst.element_factory_make(self.effectname)
+ fx = gst.element_factory_make(self.effectname, "effect")
if isinstance(self.input_streams[0], VideoStream):
csp = gst.element_factory_make("ffmpegcolorspace")
else:
diff --git a/pitivi/timeline/track.py b/pitivi/timeline/track.py
index 2b87944..d0cc212 100644
--- a/pitivi/timeline/track.py
+++ b/pitivi/timeline/track.py
@@ -763,10 +763,8 @@ class TrackEffect(TrackObject):
Permit to get the gst.Element inside the gnl_object that correspond
to the track factory
"""
- #Should we find a better implementation?
- for element in self.gnl_object.recurse():
- if self.factory.name in element.get_name():
- return element
+ effect_bin = list(self.gnl_object.elements())[0]
+ return effect_bin.get_by_name("effect")
class Transition(Signallable):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]