From c2d5b35332aa3e16117e33f341487726713ad7a5 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Sun, 27 Oct 2013 20:43:25 +0100 Subject: [PATCH] tracer: pass the instance to the vmethod --- gst/gsttracer.c | 2 +- gst/gsttracer.h | 2 +- plugins/tracers/gstlog.c | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gst/gsttracer.c b/gst/gsttracer.c index 29ee374..4349804 100644 --- a/gst/gsttracer.c +++ b/gst/gsttracer.c @@ -130,7 +130,7 @@ gst_tracer_invoke (GstTracer * self, GstTracerHookId id, GstStructure * s) g_return_if_fail (klass->invoke); - klass->invoke (id, s); + klass->invoke (self, id, s); } /* tracing modules */ diff --git a/gst/gsttracer.h b/gst/gsttracer.h index 7bc1c22..97e4d4e 100644 --- a/gst/gsttracer.h +++ b/gst/gsttracer.h @@ -81,7 +81,7 @@ struct _GstTracer { gpointer _gst_reserved[GST_PADDING]; }; -typedef void (*GstTracerInvokeFunction) (GstTracerHookId id, GstStructure *s); +typedef void (*GstTracerInvokeFunction) (GstTracer * self, GstTracerHookId id, GstStructure *s); struct _GstTracerClass { GstObjectClass parent_class; diff --git a/plugins/tracers/gstlog.c b/plugins/tracers/gstlog.c index 3b77656..a92bcaf 100644 --- a/plugins/tracers/gstlog.c +++ b/plugins/tracers/gstlog.c @@ -34,7 +34,8 @@ GST_DEBUG_CATEGORY_STATIC (gst_log_debug); G_DEFINE_TYPE_WITH_CODE (GstLogTracer, gst_log_tracer, GST_TYPE_TRACER, _do_init); -static void gst_log_tracer_invoke (GstTracerHookId id, GstStructure * s); +static void gst_log_tracer_invoke (GstTracer * self, GstTracerHookId id, + GstStructure * s); static void gst_log_tracer_class_init (GstLogTracerClass * klass) @@ -51,7 +52,7 @@ gst_log_tracer_init (GstLogTracer * self) } static void -gst_log_tracer_invoke (GstTracerHookId id, GstStructure * s) +gst_log_tracer_invoke (GstTracer * self, GstTracerHookId id, GstStructure * s) { gchar *str = gst_structure_to_string (s); /* TODO(ensonic): log to different categories depending on 'id' -- 2.7.4