GST_DEBUG_OBJECT (tmp->data, "Adding %s child %" GST_PTR_FORMAT " %s",
(const gchar *) lchild->data, child,
GES_TIMELINE_ELEMENT_NAME (child));
- ges_container_add (GES_CONTAINER (pgroup->group), child);
+ if (!ges_container_add (GES_CONTAINER (pgroup->group), child)) {
+ GST_ERROR ("%" GES_FORMAT " could not add child %p while"
+ " reloading, this should never happen", GES_ARGS (pgroup->group),
+ child);
+ }
}
pgroup->group = NULL;
}
GST_DEBUG_OBJECT (self, "Adding track_element: %" GST_PTR_FORMAT
" To : %" GST_PTR_FORMAT, trackelement, clip);
- ges_container_add (GES_CONTAINER (clip), GES_TIMELINE_ELEMENT (trackelement));
+ if (!ges_container_add (GES_CONTAINER (clip),
+ GES_TIMELINE_ELEMENT (trackelement)))
+ GST_ERROR ("%" GES_FORMAT " could not add child %p while"
+ " reloading, this should never happen", GES_ARGS (clip), trackelement);
gst_structure_foreach (children_properties,
(GstStructureForeachFunc) _set_child_property, trackelement);
GES_TIMELINE_ELEMENT (child));
to_clip->priv->allow_any_track = TRUE;
- ges_container_add (GES_CONTAINER (to_clip), GES_TIMELINE_ELEMENT (child));
+ if (!ges_container_add (GES_CONTAINER (to_clip),
+ GES_TIMELINE_ELEMENT (child)))
+ GST_ERROR ("%" GES_FORMAT " could not add child %p while"
+ " transfering, this should never happen", GES_ARGS (to_clip), child);
to_clip->priv->allow_any_track = FALSE;
ges_timeline_set_moving_track_elements (timeline, FALSE);
}
/* for GESGroups, this may register the group on the timeline */
- ges_container_add (ncontainer, nchild);
+ if (!ges_container_add (ncontainer, nchild))
+ GST_ERROR ("%" GES_FORMAT " could not add child %p while"
+ " copying, this should never happen", GES_ARGS (ncontainer), nchild);
}
return GES_TIMELINE_ELEMENT (ncontainer);
return NULL;
}
- ges_container_add (ret, tmp->data);
+ if (!ges_container_add (ret, tmp->data)) {
+ GST_INFO ("%" GES_FORMAT " could not add child %p while"
+ " grouping", GES_ARGS (ret), tmp->data);
+ g_object_unref (ret);
+
+ return NULL;
+ }
}
/* No need to add to the timeline here, this will be done in _child_added */
effect_table =
g_hash_table_lookup (props_table, (gchar *) "effect_props");
- ges_container_add (GES_CONTAINER (src), GES_TIMELINE_ELEMENT (effect));
+ if (!ges_container_add (GES_CONTAINER (src),
+ GES_TIMELINE_ELEMENT (effect)))
+ GST_ERROR ("%" GES_FORMAT " could not add %p while"
+ " reloading, this should never happen", GES_ARGS (src), effect);
if (!g_strcmp0 (active, (gchar *) "(bool)False"))
ges_track_element_set_active (GES_TRACK_ELEMENT (effect), FALSE);
text = ges_effect_new (effect_str);
g_free (effect_str_full);
- ges_container_add (GES_CONTAINER (clip),
- GES_TIMELINE_ELEMENT (text));
+ if (!ges_container_add (GES_CONTAINER (clip),
+ GES_TIMELINE_ELEMENT (text))) {
+ GST_ERROR ("Could not add text overlay to ending clip!");
+ }
}
}
ges_track_element_set_has_internal_source (child, TRUE);
_test_children_time_setting_on_clip (clip, child);
/* clip in a group */
- ges_container_add (group, GES_TIMELINE_ELEMENT (clip));
+ fail_unless (ges_container_add (group, GES_TIMELINE_ELEMENT (clip)));
_test_children_time_setting_on_clip (clip, child);
/* group is removed from the timeline and destroyed when empty */
ges_container_remove (group, GES_TIMELINE_ELEMENT (clip));