From: Thibault Saunier Date: Mon, 23 Apr 2012 23:17:51 +0000 (-0400) Subject: trackobject: Add the copy method to the API X-Git-Tag: 1.19.3~493^2~2199^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6735e877b309998abe7281a3dbebdeeeacbfede6;p=platform%2Fupstream%2Fgstreamer.git trackobject: Add the copy method to the API Add documentation and plug a leak at the same time. API: ges_track_object_copy --- diff --git a/docs/libs/ges-sections.txt b/docs/libs/ges-sections.txt index d3223a698f..cd93ceacf3 100644 --- a/docs/libs/ges-sections.txt +++ b/docs/libs/ges-sections.txt @@ -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 GES_TRACK_OBJECT_DURATION GES_TRACK_OBJECT_INPOINT diff --git a/ges/ges-internal.h b/ges/ges-internal.h index 0c910d1a7e..f863c679de 100644 --- a/ges/ges-internal.h +++ b/ges/ges-internal.h @@ -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, diff --git a/ges/ges-track-object.c b/ges/ges-track-object.c index 8e6690e9de..57b3c2f66e 100644 --- a/ges/ges-track-object.c +++ b/ges/ges-track-object.c @@ -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; } diff --git a/ges/ges-track-object.h b/ges/ges-track-object.h index e1b339d991..307a9a9ce8 100644 --- a/ges/ges-track-object.h +++ b/ges/ges-track-object.h @@ -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,