g_return_val_if_fail (GES_IS_TRACK_ELEMENT (element), FALSE);
+ if (element->timeline
+ && element->timeline != GES_TIMELINE_ELEMENT_TIMELINE (container)) {
+ GST_WARNING_OBJECT (container, "Can not add the child %" GES_FORMAT
+ " because its timeline is %" GST_PTR_FORMAT " rather than the "
+ "clip's timeline %" GST_PTR_FORMAT, GES_ARGS (element),
+ element->timeline, GES_TIMELINE_ELEMENT_TIMELINE (container));
+ return FALSE;
+ }
+
/* NOTE: notifies are currently frozen by ges_container_add */
_get_priority_range (container, &min_prio, &max_prio);
if (ELEMENT_FLAG_IS_SET (element, GES_TRACK_ELEMENT_IS_CORE)) {
fail_unless (ges_timeline_add_track (timeline, track1));
fail_unless (ges_timeline_add_track (timeline, track2));
+ /* need to register the clip with the timeline */
+ /* FIXME: we should make the clip part of a layer, but the current
+ * default select-tracks-for-object signal is broken for multiple
+ * tracks. In fact, we should be using this signal in this test */
+ ges_timeline_element_set_timeline (GES_TIMELINE_ELEMENT (clip), timeline);
+
effect = GES_TRACK_ELEMENT (ges_effect_new ("identity"));
fail_unless (ges_track_add_element (track, effect));
fail_unless (ges_container_add (GES_CONTAINER (clip),