/**
* ges_timeline_object_find_track_object:
* @object: a #GESTimelineObject
- * @track: a #GESTrack
+ * @track: a #GESTrack or NULL
+ * @type: a #GType indicating the type of track object you are looking
+ * for or %G_TYPE_NONE if you do not care about the track type.
*
- * Finds the #GESTrackObject controlled by @object that is used in @track.
+ * Finds the #GESTrackObject controlled by @object that is used in @track. You
+ * may optionally specify a GType to further narrow search criteria.
*
* Note: The reference count of the returned #GESTrackObject will be increased,
* unref when done with it.
GESTrackObject *
ges_timeline_object_find_track_object (GESTimelineObject * object,
- GESTrack * track)
+ GESTrack * track, GType type)
{
GESTrackObject *ret = NULL;
for (tmp = object->trackobjects; tmp; tmp = g_list_next (tmp))
if (GES_TRACK_OBJECT (tmp->data)->track == track) {
+ if ((type != G_TYPE_NONE) && !G_TYPE_CHECK_INSTANCE_TYPE (tmp->data,
+ type))
+ continue;
+
ret = GES_TRACK_OBJECT (tmp->data);
g_object_ref (ret);
break;
GESTrackObject *
ges_timeline_object_find_track_object (GESTimelineObject * object,
- GESTrack * track);
+ GESTrack * track,
+ GType type);
gboolean
ges_timeline_object_add_track_object (GESTimelineObject *object, GESTrackObject