tracer: drop the HookId hid from the invoke method

The MessageId is more detailed and anyway needed to interpret the varargs.
This commit is contained in:
Stefan Sauer 2014-09-12 18:43:52 +02:00
parent 4ab1e6e3f7
commit 7b24d76260
7 changed files with 25 additions and 27 deletions

View file

@ -131,14 +131,13 @@ gst_tracer_get_property (GObject * object, guint prop_id,
}
void
gst_tracer_invoke (GstTracer * self, GstTracerHookId hid,
GstTracerMessageId mid, va_list var_args)
gst_tracer_invoke (GstTracer * self, GstTracerMessageId mid, va_list var_args)
{
GstTracerClass *klass = GST_TRACER_GET_CLASS (self);
g_return_if_fail (klass->invoke);
klass->invoke (self, hid, mid, var_args);
klass->invoke (self, mid, var_args);
}
/* tracing modules */

View file

@ -53,7 +53,7 @@ struct _GstTracer {
gpointer _gst_reserved[GST_PADDING];
};
typedef void (*GstTracerInvokeFunction) (GstTracer * self, GstTracerHookId hid,
typedef void (*GstTracerInvokeFunction) (GstTracer * self,
GstTracerMessageId mid, va_list var_args);
struct _GstTracerClass {
@ -66,8 +66,8 @@ struct _GstTracerClass {
gpointer _gst_reserved[GST_PADDING];
};
void gst_tracer_invoke (GstTracer * self, GstTracerHookId hid,
GstTracerMessageId mid, va_list var_args);
void gst_tracer_invoke (GstTracer * self, GstTracerMessageId mid,
va_list var_args);
GType gst_tracer_get_type (void);

View file

@ -143,7 +143,7 @@ gst_tracer_dispatch (GstTracerHookId hid, GstTracerMessageId mid, ...)
for (node = _priv_tracers[hid]; node; node = g_list_next (node)) {
va_start (var_args, mid);
gst_tracer_invoke (node->data, hid, mid, var_args);
gst_tracer_invoke (node->data, mid, var_args);
va_end (var_args);
}
}

View file

@ -89,8 +89,8 @@ get_real_pad_parent (GstPad * pad)
/* tracer class */
static void gst_latency_tracer_invoke (GstTracer * obj, GstTracerHookId id,
GstTracerMessageId mid, va_list var_args);
static void gst_latency_tracer_invoke (GstTracer * obj, GstTracerMessageId mid,
va_list var_args);
static void
gst_latency_tracer_class_init (GstLatencyTracerClass * klass)
@ -251,8 +251,8 @@ do_push_event_pre (GstLatencyTracer * self, va_list var_args)
}
static void
gst_latency_tracer_invoke (GstTracer * obj, GstTracerHookId hid,
GstTracerMessageId mid, va_list var_args)
gst_latency_tracer_invoke (GstTracer * obj, GstTracerMessageId mid,
va_list var_args)
{
GstLatencyTracer *self = GST_LATENCY_TRACER_CAST (obj);

View file

@ -52,8 +52,8 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_QUERY);
G_DEFINE_TYPE_WITH_CODE (GstLogTracer, gst_log_tracer, GST_TYPE_TRACER,
_do_init);
static void gst_log_tracer_invoke (GstTracer * self, GstTracerHookId id,
GstTracerMessageId mid, va_list var_args);
static void gst_log_tracer_invoke (GstTracer * self, GstTracerMessageId mid,
va_list var_args);
static void
gst_log_tracer_class_init (GstLogTracerClass * klass)
@ -70,8 +70,8 @@ gst_log_tracer_init (GstLogTracer * self)
}
static void
gst_log_tracer_invoke (GstTracer * self, GstTracerHookId hid,
GstTracerMessageId mid, va_list var_args)
gst_log_tracer_invoke (GstTracer * self, GstTracerMessageId mid,
va_list var_args)
{
const gchar *fmt = NULL;
GstDebugCategory *cat = GST_CAT_DEFAULT;
@ -137,11 +137,10 @@ gst_log_tracer_invoke (GstTracer * self, GstTracerHookId hid,
gchar *str;
__gst_vasprintf (&str, fmt, var_args);
GST_CAT_TRACE (cat, "[%d,%d] %" GST_TIME_FORMAT ", %s",
hid, mid, GST_TIME_ARGS (ts), str);
GST_CAT_TRACE (cat, "[%d] %" GST_TIME_FORMAT ", %s",
mid, GST_TIME_ARGS (ts), str);
g_free (str);
} else {
GST_CAT_TRACE (cat, "[%d,%d] %" GST_TIME_FORMAT,
hid, mid, GST_TIME_ARGS (ts));
GST_CAT_TRACE (cat, "[%d] %" GST_TIME_FORMAT, mid, GST_TIME_ARGS (ts));
}
}

View file

@ -78,8 +78,8 @@ typedef struct
static GstTraceValues *tvs_proc;
static void gst_rusage_tracer_invoke (GstTracer * self, GstTracerHookId id,
GstTracerMessageId mid, va_list var_args);
static void gst_rusage_tracer_invoke (GstTracer * self, GstTracerMessageId mid,
va_list var_args);
/* data helper */
@ -249,8 +249,8 @@ gst_rusage_tracer_init (GstRUsageTracer * self)
}
static void
gst_rusage_tracer_invoke (GstTracer * obj, GstTracerHookId hid,
GstTracerMessageId mid, va_list var_args)
gst_rusage_tracer_invoke (GstTracer * obj, GstTracerMessageId mid,
va_list var_args)
{
GstRUsageTracer *self = GST_RUSAGE_TRACER_CAST (obj);
guint64 ts = va_arg (var_args, guint64);

View file

@ -339,8 +339,8 @@ do_element_stats (GstStatsTracer * self, GstPad * pad, GstClockTime elapsed1,
/* tracer class */
static void gst_stats_tracer_finalize (GObject * obj);
static void gst_stats_tracer_invoke (GstTracer * obj, GstTracerHookId id,
GstTracerMessageId mid, va_list var_args);
static void gst_stats_tracer_invoke (GstTracer * obj, GstTracerMessageId mid,
va_list var_args);
static void
gst_stats_tracer_class_init (GstStatsTracerClass * klass)
@ -611,8 +611,8 @@ do_query_post (GstStatsTracer * self, va_list var_args)
}
static void
gst_stats_tracer_invoke (GstTracer * obj, GstTracerHookId hid,
GstTracerMessageId mid, va_list var_args)
gst_stats_tracer_invoke (GstTracer * obj, GstTracerMessageId mid,
va_list var_args)
{
GstStatsTracer *self = GST_STATS_TRACER_CAST (obj);