mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 04:22:27 +00:00
title_: Do not forget to link up child_added/removed vmethod
Otherwise effect handling is broken Differential Revision: https://phabricator.freedesktop.org/D1099
This commit is contained in:
parent
716c0dbe8d
commit
c9c4a60de2
2 changed files with 32 additions and 0 deletions
|
@ -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 *
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue