/**
* 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"
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:
combiner->last_ret = GST_FLOW_OK;
combiner->ref_count = 1;
+ /* Make sure debug category is initialised */
+ gst_flow_combiner_get_type ();
+
return 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);
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);