trackobject: Enable adding a TrackObject in a Track before a TimelineObject

We were requiring it only for GESCustomTimelineSource, but it is not actually
necessary so, we can just check if the TrackObject is in a TimelineObject or
not, and react accordingly.
This commit is contained in:
Thibault Saunier 2012-01-26 11:53:54 +01:00
parent 149ceeab2e
commit a762e72c13

View file

@ -728,7 +728,7 @@ ensure_gnl_object (GESTrackObject * object)
GESTrackObjectClass *class;
GstElement *gnlobject;
GHashTable *props_hash;
gboolean res = FALSE;
gboolean res = TRUE;
if (object->priv->gnlobject && object->priv->valid)
return FALSE;
@ -760,9 +760,12 @@ ensure_gnl_object (GESTrackObject * object)
if (gnlobject) {
GST_DEBUG ("Got a valid GnlObject, now filling it in");
res =
ges_timeline_object_fill_track_object (object->priv->timelineobj,
object, object->priv->gnlobject);
if (object->priv->timelineobj)
res = ges_timeline_object_fill_track_object (object->priv->timelineobj,
object, object->priv->gnlobject);
else
res = TRUE;
if (res) {
/* Connect to property notifications */
/* FIXME : remember the signalids so we can remove them later on !!! */