trackobject: Add the copy method to the API
authorThibault Saunier <thibault.saunier@collabora.com>
Mon, 23 Apr 2012 23:17:51 +0000 (19:17 -0400)
committerThibault Saunier <thibault.saunier@collabora.com>
Tue, 24 Apr 2012 02:03:11 +0000 (22:03 -0400)
Add documentation and plug a leak at the same time.

API: ges_track_object_copy

docs/libs/ges-sections.txt
ges/ges-internal.h
ges/ges-track-object.c
ges/ges-track-object.h

index d3223a698f7b56d8b2c13ed41a17e4f4e12f1cdc..cd93ceacf31968c2b40978e303bced96e770cba5 100644 (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
index 0c910d1a7ee2d6bd331a26f788fbec5abe41fe53..f863c679de8228585dfda9043ddfcea0f31be8e3 100644 (file)
 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,
index 8e6690e9de2bb667a92c454577240843f7a212b0..57b3c2f66ea8ddcb4746a3ad0714af6740ea6f87 100644 (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;
 }
 
index e1b339d9917da76baa4cc5a851b323dca6edd470..307a9a9ce83f815e67f14986c13ae9d26e544e63 100644 (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,