mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
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:
parent
4ab1e6e3f7
commit
7b24d76260
7 changed files with 25 additions and 27 deletions
|
@ -131,14 +131,13 @@ gst_tracer_get_property (GObject * object, guint prop_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gst_tracer_invoke (GstTracer * self, GstTracerHookId hid,
|
gst_tracer_invoke (GstTracer * self, GstTracerMessageId mid, va_list var_args)
|
||||||
GstTracerMessageId mid, va_list var_args)
|
|
||||||
{
|
{
|
||||||
GstTracerClass *klass = GST_TRACER_GET_CLASS (self);
|
GstTracerClass *klass = GST_TRACER_GET_CLASS (self);
|
||||||
|
|
||||||
g_return_if_fail (klass->invoke);
|
g_return_if_fail (klass->invoke);
|
||||||
|
|
||||||
klass->invoke (self, hid, mid, var_args);
|
klass->invoke (self, mid, var_args);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* tracing modules */
|
/* tracing modules */
|
||||||
|
|
|
@ -53,7 +53,7 @@ struct _GstTracer {
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (*GstTracerInvokeFunction) (GstTracer * self, GstTracerHookId hid,
|
typedef void (*GstTracerInvokeFunction) (GstTracer * self,
|
||||||
GstTracerMessageId mid, va_list var_args);
|
GstTracerMessageId mid, va_list var_args);
|
||||||
|
|
||||||
struct _GstTracerClass {
|
struct _GstTracerClass {
|
||||||
|
@ -66,8 +66,8 @@ struct _GstTracerClass {
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
gpointer _gst_reserved[GST_PADDING];
|
||||||
};
|
};
|
||||||
|
|
||||||
void gst_tracer_invoke (GstTracer * self, GstTracerHookId hid,
|
void gst_tracer_invoke (GstTracer * self, GstTracerMessageId mid,
|
||||||
GstTracerMessageId mid, va_list var_args);
|
va_list var_args);
|
||||||
|
|
||||||
GType gst_tracer_get_type (void);
|
GType gst_tracer_get_type (void);
|
||||||
|
|
||||||
|
|
|
@ -143,7 +143,7 @@ gst_tracer_dispatch (GstTracerHookId hid, GstTracerMessageId mid, ...)
|
||||||
|
|
||||||
for (node = _priv_tracers[hid]; node; node = g_list_next (node)) {
|
for (node = _priv_tracers[hid]; node; node = g_list_next (node)) {
|
||||||
va_start (var_args, mid);
|
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);
|
va_end (var_args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,8 +89,8 @@ get_real_pad_parent (GstPad * pad)
|
||||||
|
|
||||||
/* tracer class */
|
/* tracer class */
|
||||||
|
|
||||||
static void gst_latency_tracer_invoke (GstTracer * obj, GstTracerHookId id,
|
static void gst_latency_tracer_invoke (GstTracer * obj, GstTracerMessageId mid,
|
||||||
GstTracerMessageId mid, va_list var_args);
|
va_list var_args);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_latency_tracer_class_init (GstLatencyTracerClass * klass)
|
gst_latency_tracer_class_init (GstLatencyTracerClass * klass)
|
||||||
|
@ -251,8 +251,8 @@ do_push_event_pre (GstLatencyTracer * self, va_list var_args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_latency_tracer_invoke (GstTracer * obj, GstTracerHookId hid,
|
gst_latency_tracer_invoke (GstTracer * obj, GstTracerMessageId mid,
|
||||||
GstTracerMessageId mid, va_list var_args)
|
va_list var_args)
|
||||||
{
|
{
|
||||||
GstLatencyTracer *self = GST_LATENCY_TRACER_CAST (obj);
|
GstLatencyTracer *self = GST_LATENCY_TRACER_CAST (obj);
|
||||||
|
|
||||||
|
|
|
@ -52,8 +52,8 @@ GST_DEBUG_CATEGORY_STATIC (GST_CAT_QUERY);
|
||||||
G_DEFINE_TYPE_WITH_CODE (GstLogTracer, gst_log_tracer, GST_TYPE_TRACER,
|
G_DEFINE_TYPE_WITH_CODE (GstLogTracer, gst_log_tracer, GST_TYPE_TRACER,
|
||||||
_do_init);
|
_do_init);
|
||||||
|
|
||||||
static void gst_log_tracer_invoke (GstTracer * self, GstTracerHookId id,
|
static void gst_log_tracer_invoke (GstTracer * self, GstTracerMessageId mid,
|
||||||
GstTracerMessageId mid, va_list var_args);
|
va_list var_args);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_log_tracer_class_init (GstLogTracerClass * klass)
|
gst_log_tracer_class_init (GstLogTracerClass * klass)
|
||||||
|
@ -70,8 +70,8 @@ gst_log_tracer_init (GstLogTracer * self)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_log_tracer_invoke (GstTracer * self, GstTracerHookId hid,
|
gst_log_tracer_invoke (GstTracer * self, GstTracerMessageId mid,
|
||||||
GstTracerMessageId mid, va_list var_args)
|
va_list var_args)
|
||||||
{
|
{
|
||||||
const gchar *fmt = NULL;
|
const gchar *fmt = NULL;
|
||||||
GstDebugCategory *cat = GST_CAT_DEFAULT;
|
GstDebugCategory *cat = GST_CAT_DEFAULT;
|
||||||
|
@ -137,11 +137,10 @@ gst_log_tracer_invoke (GstTracer * self, GstTracerHookId hid,
|
||||||
gchar *str;
|
gchar *str;
|
||||||
|
|
||||||
__gst_vasprintf (&str, fmt, var_args);
|
__gst_vasprintf (&str, fmt, var_args);
|
||||||
GST_CAT_TRACE (cat, "[%d,%d] %" GST_TIME_FORMAT ", %s",
|
GST_CAT_TRACE (cat, "[%d] %" GST_TIME_FORMAT ", %s",
|
||||||
hid, mid, GST_TIME_ARGS (ts), str);
|
mid, GST_TIME_ARGS (ts), str);
|
||||||
g_free (str);
|
g_free (str);
|
||||||
} else {
|
} else {
|
||||||
GST_CAT_TRACE (cat, "[%d,%d] %" GST_TIME_FORMAT,
|
GST_CAT_TRACE (cat, "[%d] %" GST_TIME_FORMAT, mid, GST_TIME_ARGS (ts));
|
||||||
hid, mid, GST_TIME_ARGS (ts));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,8 +78,8 @@ typedef struct
|
||||||
|
|
||||||
static GstTraceValues *tvs_proc;
|
static GstTraceValues *tvs_proc;
|
||||||
|
|
||||||
static void gst_rusage_tracer_invoke (GstTracer * self, GstTracerHookId id,
|
static void gst_rusage_tracer_invoke (GstTracer * self, GstTracerMessageId mid,
|
||||||
GstTracerMessageId mid, va_list var_args);
|
va_list var_args);
|
||||||
|
|
||||||
/* data helper */
|
/* data helper */
|
||||||
|
|
||||||
|
@ -249,8 +249,8 @@ gst_rusage_tracer_init (GstRUsageTracer * self)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_rusage_tracer_invoke (GstTracer * obj, GstTracerHookId hid,
|
gst_rusage_tracer_invoke (GstTracer * obj, GstTracerMessageId mid,
|
||||||
GstTracerMessageId mid, va_list var_args)
|
va_list var_args)
|
||||||
{
|
{
|
||||||
GstRUsageTracer *self = GST_RUSAGE_TRACER_CAST (obj);
|
GstRUsageTracer *self = GST_RUSAGE_TRACER_CAST (obj);
|
||||||
guint64 ts = va_arg (var_args, guint64);
|
guint64 ts = va_arg (var_args, guint64);
|
||||||
|
|
|
@ -339,8 +339,8 @@ do_element_stats (GstStatsTracer * self, GstPad * pad, GstClockTime elapsed1,
|
||||||
/* tracer class */
|
/* tracer class */
|
||||||
|
|
||||||
static void gst_stats_tracer_finalize (GObject * obj);
|
static void gst_stats_tracer_finalize (GObject * obj);
|
||||||
static void gst_stats_tracer_invoke (GstTracer * obj, GstTracerHookId id,
|
static void gst_stats_tracer_invoke (GstTracer * obj, GstTracerMessageId mid,
|
||||||
GstTracerMessageId mid, va_list var_args);
|
va_list var_args);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_stats_tracer_class_init (GstStatsTracerClass * klass)
|
gst_stats_tracer_class_init (GstStatsTracerClass * klass)
|
||||||
|
@ -611,8 +611,8 @@ do_query_post (GstStatsTracer * self, va_list var_args)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gst_stats_tracer_invoke (GstTracer * obj, GstTracerHookId hid,
|
gst_stats_tracer_invoke (GstTracer * obj, GstTracerMessageId mid,
|
||||||
GstTracerMessageId mid, va_list var_args)
|
va_list var_args)
|
||||||
{
|
{
|
||||||
GstStatsTracer *self = GST_STATS_TRACER_CAST (obj);
|
GstStatsTracer *self = GST_STATS_TRACER_CAST (obj);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue