summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2016-06-20 14:00:07 -0400
committerThibault Saunier <tsaunier@gnome.org>2016-06-20 14:22:10 -0400
commitdb6cd2e3ca806cc0958b2e06cd60e23a99dada8a (patch)
tree3ed68ad65f9e311a499c762b9c37b64679a4633b
parent2b957394955ef3de8cd28bfa97ec07ea8ea47cd9 (diff)
title_: Do not forget to link up child_added/removed vmethod
Otherwise effect handling is broken Differential Revision: https://phabricator.freedesktop.org/D1099
-rw-r--r--ges/ges-title-clip.c6
-rw-r--r--tests/check/python/test_clip.py26
2 files changed, 32 insertions, 0 deletions
diff --git a/ges/ges-title-clip.c b/ges/ges-title-clip.c
index 5d28fdc6..e6b6d685 100644
--- a/ges/ges-title-clip.c
+++ b/ges/ges-title-clip.c
@@ -655,6 +655,9 @@ _child_removed (GESContainer * container, GESTimelineElement * element)
priv->track_titles = g_slist_remove (priv->track_titles, element);
gst_object_unref (element);
}
+
+ GES_CONTAINER_CLASS (ges_title_clip_parent_class)->child_removed (container,
+ element);
}
static void
@@ -667,6 +670,9 @@ _child_added (GESContainer * container, GESTimelineElement * element)
priv->track_titles = g_slist_prepend (priv->track_titles,
gst_object_ref (element));
}
+
+ GES_CONTAINER_CLASS (ges_title_clip_parent_class)->child_added (container,
+ element);
}
static GESTrackElement *
diff --git a/tests/check/python/test_clip.py b/tests/check/python/test_clip.py
index 000ce993..9bbce02d 100644
--- a/tests/check/python/test_clip.py
+++ b/tests/check/python/test_clip.py
@@ -72,3 +72,29 @@ class TestTitleClip(unittest.TestCase):
title_clip = GES.TitleClip.new()
self.assertEqual(title_clip.props.text, "")
self.assertEqual(title_clip.props.font_desc, "Serif 36")
+
+ def test_split_effect(self):
+ timeline = GES.Timeline.new()
+ timeline.add_track(GES.VideoTrack.new())
+ layer = timeline.append_layer()
+
+ clip1 = GES.TitleClip.new()
+ clip1.props.duration = Gst.SECOND
+ self.assertTrue(layer.add_clip(clip1))
+
+ effect = GES.Effect.new("agingtv")
+ self.assertTrue(clip1.add(effect))
+
+ children1 = clip1.get_children(True)
+ self.assertNotEqual(children1[0].props.priority,
+ children1[1].props.priority)
+
+ clip2 = clip1.split(Gst.SECOND / 2)
+
+ children1 = clip1.get_children(True)
+ self.assertNotEqual(children1[0].props.priority,
+ children1[1].props.priority)
+
+ children2 = clip2.get_children(True)
+ self.assertNotEqual(children2[0].props.priority,
+ children2[1].props.priority)