element: Enforce that elements created by gst_element_factory_create/make() are floating
[platform/upstream/gstreamer.git] / gst / gsttracer.h
index 97e4d4e..1d2726d 100644 (file)
@@ -1,7 +1,7 @@
 /* GStreamer
  * Copyright (C) 2013 Stefan Sauer <ensonic@users.sf.net>
  *
- * gsttracer.h: tracing subsystem
+ * gsttracer.h: tracer base class
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
 
 #include <glib.h>
 #include <glib-object.h>
+#include <gst/gstobject.h>
 #include <gst/gstconfig.h>
-#include <gst/gstbin.h>
 
 G_BEGIN_DECLS
 
-#ifndef GST_DISABLE_GST_DEBUG
-
-/* hook flags and ids */
-
-typedef enum
-{
-  GST_TRACER_HOOK_NONE      = 0,
-  GST_TRACER_HOOK_BUFFERS   = (1 << 0),
-  GST_TRACER_HOOK_EVENTS    = (1 << 1),
-  GST_TRACER_HOOK_MESSAGES  = (1 << 2),
-  GST_TRACER_HOOK_QUERIES   = (1 << 3),
-  GST_TRACER_HOOK_TOPOLOGY  = (1 << 4),
-  /*
-  GST_TRACER_HOOK_TIMER
-  */
-  GST_TRACER_HOOK_ALL       = (1 << 5) - 1
-} GstTracerHook;
-
-typedef enum
-{
-  GST_TRACER_HOOK_ID_BUFFERS = 0,
-  GST_TRACER_HOOK_ID_EVENTS,
-  GST_TRACER_HOOK_ID_MESSAGES,
-  GST_TRACER_HOOK_ID_QUERIES,
-  GST_TRACER_HOOK_ID_TOPLOGY,
-  /*
-  GST_TRACER_HOOK_ID_TIMER
-  */
-  GST_TRACER_HOOK_ID_LAST
-} GstTracerHookId;
-
-/* tracing plugins */
-
 typedef struct _GstTracer GstTracer;
 typedef struct _GstTracerPrivate GstTracerPrivate;
 typedef struct _GstTracerClass GstTracerClass;
@@ -81,35 +48,32 @@ struct _GstTracer {
   gpointer _gst_reserved[GST_PADDING];
 };
 
-typedef void                 (*GstTracerInvokeFunction) (GstTracer * self, GstTracerHookId id, GstStructure *s);
-
 struct _GstTracerClass {
   GstObjectClass parent_class;
-  
-  /* plugin vmethods */
-  GstTracerInvokeFunction invoke;
-  
+
   /*< private >*/
   gpointer _gst_reserved[GST_PADDING];
 };
 
+GST_API
 GType gst_tracer_get_type          (void);
 
-/* tracing hooks */
+#ifdef GST_USE_UNSTABLE_API
 
-void _priv_gst_tracer_init (void);
-void _priv_gst_tracer_deinit (void);
+GST_API
+void gst_tracing_register_hook (GstTracer *tracer, const gchar *detail,
+  GCallback func);
 
-gboolean gst_tracer_register (GstPlugin * plugin, const gchar * name, GType type);
+/* tracing modules */
 
-gboolean gst_tracer_is_enabled (GstTracerHookId id);
-void gst_tracer_push_buffer_pre (GstPad *pad, GstBuffer *buffer);
-void gst_tracer_push_buffer_post (GstPad *pad, GstFlowReturn res);
+GST_API
+gboolean gst_tracer_register (GstPlugin * plugin, const gchar * name, GType type);
 
-void gst_tracer_push_buffer_list_pre (GstPad * pad, GstBufferList * list);
-void gst_tracer_push_buffer_list_post (GstPad * pad, GstFlowReturn res);
+#endif
 
-#endif /* GST_DISABLE_GST_DEBUG */
+#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstTracer, gst_object_unref)
+#endif
 
 G_END_DECLS