rusage: properly free the queue memory
[platform/upstream/gstreamer.git] / plugins / tracers / gstrusage.h
index e73515d..b5abbca 100644 (file)
@@ -23,6 +23,7 @@
 #define __GST_RUSAGE_TRACER_H__
 
 #include <gst/gst.h>
+#include <gst/gsttracer.h>
 
 G_BEGIN_DECLS
 
@@ -41,6 +42,18 @@ G_BEGIN_DECLS
 typedef struct _GstRUsageTracer GstRUsageTracer;
 typedef struct _GstRUsageTracerClass GstRUsageTracerClass;
 
+typedef struct
+{
+  GstClockTime ts;
+  GstClockTime val;
+} GstTraceValue;
+
+typedef struct
+{
+  GstClockTime window;
+  GQueue values;                /* GstTraceValue* */
+} GstTraceValues;
+
 /**
  * GstRUsageTracer:
  *
@@ -51,6 +64,11 @@ struct _GstRUsageTracer {
 
   /*< private >*/        
   GHashTable *threads;
+  GstTraceValues *tvs_proc;
+
+  /* for ts calibration */
+  gpointer main_thread_id;
+  guint64 tproc_base;
 };
 
 struct _GstRUsageTracerClass {