tracer: pass the instance to the vmethod

This commit is contained in:
Stefan Sauer 2013-10-27 20:43:25 +01:00
parent 8a8f16863b
commit c2d5b35332
3 changed files with 5 additions and 4 deletions

View file

@ -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 */

View file

@ -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;

View file

@ -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'