trackobject: Add the copy method to the API

Add documentation and plug a leak at the same time.

API: ges_track_object_copy
This commit is contained in:
Thibault Saunier 2012-04-23 19:17:51 -04:00
parent c238b356fe
commit 6735e877b3
4 changed files with 20 additions and 4 deletions

View file

@ -107,6 +107,7 @@ ges_track_object_get_child_property
ges_track_object_get_child_property_valist
ges_track_object_get_child_property_by_pspec
ges_track_object_edit
ges_track_object_copy
<SUBSECTION Standard>
GES_TRACK_OBJECT_DURATION
GES_TRACK_OBJECT_INPOINT

View file

@ -28,10 +28,6 @@
GST_DEBUG_CATEGORY_EXTERN (_ges_debug);
#define GST_CAT_DEFAULT _ges_debug
GESTrackObject *
ges_track_object_copy (GESTrackObject * object, gboolean deep);
gboolean
timeline_ripple_object (GESTimeline *timeline, GESTrackObject *obj,
GList * layers, GESEdge edge,

View file

@ -1499,6 +1499,17 @@ ges_track_object_set_max_duration (GESTrackObject * object, guint64 maxduration)
object->priv->maxduration = maxduration;
}
/**
* ges_track_object_copy:
* @object: The #GESTrackObject to copy
* @deep: whether we want to create the gnlobject and copy it properties
*
* Copies @object
*
* Returns: The newly create #GESTrackObject, copied from @object
*
* Since: 0.10.XX
*/
GESTrackObject *
ges_track_object_copy (GESTrackObject * object, gboolean deep)
{
@ -1529,6 +1540,8 @@ ges_track_object_copy (GESTrackObject * object, gboolean deep)
ret = g_object_newv (G_TYPE_FROM_INSTANCE (object), n_params, params);
g_free (specs);
g_free (params);
specs = NULL;
params = NULL;
if (deep == FALSE)
return ret;
@ -1542,6 +1555,9 @@ ges_track_object_copy (GESTrackObject * object, gboolean deep)
g_value_unset (&val);
}
g_free (specs);
g_free (params);
return ret;
}

View file

@ -226,6 +226,9 @@ void ges_track_object_set_child_property (GESTrackObject * object,
const gchar * first_property_name,
...) G_GNUC_NULL_TERMINATED;
GESTrackObject * ges_track_object_copy (GESTrackObject * object,
gboolean deep);
gboolean
ges_track_object_edit (GESTrackObject * object,
GList *layers, GESEditMode mode,