aggregator: Assert if the sink/src pad type that is to be used is not a GstAggregator...
[platform/upstream/gstreamer.git] / libs / gst / base / gstflowcombiner.c
index f3d659b..8b64a46 100644 (file)
@@ -23,6 +23,7 @@
 
 /**
  * SECTION:gstflowcombiner
+ * @title: GstFlowCombiner
  * @short_description: Utility to combine multiple flow returns into one
  *
  * Utility struct to help handling #GstFlowReturn combination. Useful for
  * * %GST_FLOW_OK: otherwise
  *
  * %GST_FLOW_ERROR or below, GST_FLOW_NOT_NEGOTIATED and GST_FLOW_FLUSHING are
- * returned immediatelly from the gst_flow_combiner_update_flow() function.
+ * returned immediately from the gst_flow_combiner_update_flow() function.
  *
  * Since: 1.4
  */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
 
 #include <gst/gst.h>
 #include "gstflowcombiner.h"
@@ -71,12 +75,14 @@ struct _GstFlowCombiner
   volatile gint ref_count;
 };
 
-static GstFlowCombiner *gst_flow_combiner_ref (GstFlowCombiner * combiner);
-static void gst_flow_combiner_unref (GstFlowCombiner * combiner);
+GST_DEBUG_CATEGORY_STATIC (flowcombiner_dbg);
+#define GST_CAT_DEFAULT flowcombiner_dbg
 
-G_DEFINE_BOXED_TYPE (GstFlowCombiner, gst_flow_combiner,
+G_DEFINE_BOXED_TYPE_WITH_CODE (GstFlowCombiner, gst_flow_combiner,
     (GBoxedCopyFunc) gst_flow_combiner_ref,
-    (GBoxedFreeFunc) gst_flow_combiner_unref);
+    (GBoxedFreeFunc) gst_flow_combiner_unref,
+    GST_DEBUG_CATEGORY_INIT (flowcombiner_dbg, "flowcombiner", 0,
+        "Flow Combiner"));
 
 /**
  * gst_flow_combiner_new:
@@ -95,6 +101,9 @@ gst_flow_combiner_new (void)
   combiner->last_ret = GST_FLOW_OK;
   combiner->ref_count = 1;
 
+  /* Make sure debug category is initialised */
+  gst_flow_combiner_get_type ();
+
   return combiner;
 }
 
@@ -112,7 +121,17 @@ gst_flow_combiner_free (GstFlowCombiner * combiner)
   gst_flow_combiner_unref (combiner);
 }
 
-static GstFlowCombiner *
+/**
+ * gst_flow_combiner_ref:
+ * @combiner: the #GstFlowCombiner to add a reference to.
+ *
+ * Increments the reference count on the #GstFlowCombiner.
+ *
+ * Returns: the #GstFlowCombiner.
+ *
+ * Since: 1.12.1
+ */
+GstFlowCombiner *
 gst_flow_combiner_ref (GstFlowCombiner * combiner)
 {
   g_return_val_if_fail (combiner != NULL, NULL);
@@ -122,7 +141,15 @@ gst_flow_combiner_ref (GstFlowCombiner * combiner)
   return combiner;
 }
 
-static void
+/**
+ * gst_flow_combiner_unref:
+ * @combiner: the #GstFlowCombiner to unreference.
+ *
+ * Decrements the reference count on the #GstFlowCombiner.
+ *
+ * Since: 1.12.1
+ */
+void
 gst_flow_combiner_unref (GstFlowCombiner * combiner)
 {
   g_return_if_fail (combiner != NULL);