latency: Dot not override already stored events
[platform/upstream/gstreamer.git] / gst / gsttracerrecord.c
index 022f169..639a4cc 100644 (file)
@@ -21,6 +21,7 @@
 
 /**
  * SECTION:gsttracerrecord
+ * @title: GstTracerRecord
  * @short_description: Trace log entry class
  *
  * Tracing modules will create instances of this class to announce the data they
@@ -175,11 +176,9 @@ gst_tracer_record_init (GstTracerRecord * self)
  * pointer type values must not be NULL - the underlying serialisation can not
  * handle that right now.
  *
- * <note><para>
- *   Please note that this is still under discussion and subject to change.
- * </para></note>
+ * > Please note that this is still under discussion and subject to change.
  *
- * Returns: a new #GstTracerRecord
+ * Returns: (transfer full): a new #GstTracerRecord
  */
 GstTracerRecord *
 gst_tracer_record_new (const gchar * name, const gchar * firstfield, ...)
@@ -209,6 +208,7 @@ gst_tracer_record_new (const gchar * name, const gchar * firstfield, ...)
     G_VALUE_COLLECT_INIT (&val, type, varargs, G_VALUE_NOCOPY_CONTENTS, &err);
     if (G_UNLIKELY (err)) {
       g_critical ("%s", err);
+      g_free (err);
       break;
     }
     /* see boxed_proxy_collect_value */
@@ -219,7 +219,11 @@ gst_tracer_record_new (const gchar * name, const gchar * firstfield, ...)
   }
   va_end (varargs);
 
-  self = g_object_newv (GST_TYPE_TRACER_RECORD, 0, NULL);
+  self = g_object_new (GST_TYPE_TRACER_RECORD, NULL);
+
+  /* Clear floating flag */
+  gst_object_ref_sink (self);
+
   self->spec = structure;
   gst_tracer_record_build_format (self);
 
@@ -236,9 +240,8 @@ gst_tracer_record_new (const gchar * name, const gchar * firstfield, ...)
  *
  * Right now this is using the gstreamer debug log with the level TRACE (7) and
  * the category "GST_TRACER".
- * <note><para>
- *   Please note that this is still under discussion and subject to change.
- * </para></note>
+ *
+ * > Please note that this is still under discussion and subject to change.
  */
 void
 gst_tracer_record_log (GstTracerRecord * self, ...)