From 5e40639be7a3b8b809d216d49a79012dbf1dc37d Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Wed, 6 Jan 2016 20:41:26 +0100 Subject: [PATCH] tracer: make gst_tracing_register_hook_id static We don't need to expose this as public API. Change the only plugin that was using it. --- docs/gst/gstreamer-sections.txt | 1 - gst/gsttracer.h | 6 ++---- gst/gsttracerutils.c | 11 ++--------- plugins/tracers/gstrusage.c | 2 +- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/docs/gst/gstreamer-sections.txt b/docs/gst/gstreamer-sections.txt index 81b1033a47..0ecc51de8a 100644 --- a/docs/gst/gstreamer-sections.txt +++ b/docs/gst/gstreamer-sections.txt @@ -3044,7 +3044,6 @@ gst_toc_scope_get_type GstTracer gst_tracer_register gst_tracing_register_hook -gst_tracing_register_hook_id gst_tracer_log_trace GST_TRACER diff --git a/gst/gsttracer.h b/gst/gsttracer.h index a5953f2694..059433b919 100644 --- a/gst/gsttracer.h +++ b/gst/gsttracer.h @@ -55,16 +55,14 @@ struct _GstTracer { struct _GstTracerClass { GstObjectClass parent_class; - + /*< private >*/ gpointer _gst_reserved[GST_PADDING]; }; GType gst_tracer_get_type (void); -void gst_tracing_register_hook (GstTracer *tracer, const gchar *detail, - GCallback func); -void gst_tracing_register_hook_id (GstTracer *tracer, GQuark detail, +void gst_tracing_register_hook (GstTracer *tracer, const gchar *detail, GCallback func); /* tracing modules */ diff --git a/gst/gsttracerutils.c b/gst/gsttracerutils.c index 64c24afed5..974930aebb 100644 --- a/gst/gsttracerutils.c +++ b/gst/gsttracerutils.c @@ -151,15 +151,7 @@ _priv_gst_tracing_deinit (void) _priv_tracers = NULL; } -/** - * gst_tracing_register_hook_id: - * @tracer: the tracer - * @detail: the detailed hook - * @func: (scope async): the callback - * - * Register @func to be called when the trace hook @detail is getting invoked. - */ -void +static void gst_tracing_register_hook_id (GstTracer * tracer, GQuark detail, GCallback func) { gpointer key = GINT_TO_POINTER (detail); @@ -182,6 +174,7 @@ gst_tracing_register_hook_id (GstTracer * tracer, GQuark detail, GCallback func) * @func: (scope async): the callback * * Register @func to be called when the trace hook @detail is getting invoked. + * Use %NULL for @detail to register to all hooks. */ void gst_tracing_register_hook (GstTracer * tracer, const gchar * detail, diff --git a/plugins/tracers/gstrusage.c b/plugins/tracers/gstrusage.c index 6ea2685e59..3db10119cf 100644 --- a/plugins/tracers/gstrusage.c +++ b/plugins/tracers/gstrusage.c @@ -351,7 +351,7 @@ gst_rusage_tracer_init (GstRUsageTracer * self) { GstTracer *tracer = GST_TRACER (self); - gst_tracing_register_hook_id (tracer, 0, G_CALLBACK (do_stats)); + gst_tracing_register_hook (tracer, NULL, G_CALLBACK (do_stats)); self->threads = g_hash_table_new_full (NULL, NULL, NULL, free_thread_stats); self->tvs_proc = make_trace_values (GST_SECOND);