From 128760f246d891bc2a3c5f208e09fb03a2e80fd1 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Tue, 19 Jan 2016 11:10:30 +0100 Subject: [PATCH] tracerrecord: Disable logging if GST_DISABLE_GST_DEBUG Make the gst_tracer_record_log() a no-op if the gst-debug subsystem is disabled. --- gst/gsttracerrecord.c | 2 ++ gst/gsttracerrecord.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/gst/gsttracerrecord.c b/gst/gsttracerrecord.c index 73ecc7d..d1e9939 100644 --- a/gst/gsttracerrecord.c +++ b/gst/gsttracerrecord.c @@ -227,6 +227,7 @@ gst_tracer_record_new (GstStructure * spec) return g_object_new (GST_TYPE_TRACER_RECORD, "spec", spec, NULL); } +#ifndef GST_DISABLE_GST_DEBUG /** * gst_tracer_record_log: * @self: the tracer-record @@ -264,3 +265,4 @@ gst_tracer_record_log (GstTracerRecord * self, ...) } va_end (var_args); } +#endif diff --git a/gst/gsttracerrecord.h b/gst/gsttracerrecord.h index 4ccf2c4..3cc791b 100644 --- a/gst/gsttracerrecord.h +++ b/gst/gsttracerrecord.h @@ -89,7 +89,11 @@ typedef enum GstTracerRecord * gst_tracer_record_new (GstStructure *spec); +#ifndef GST_DISABLE_GST_DEBUG void gst_tracer_record_log (GstTracerRecord *self, ...); +#else +#define gst_tracer_record_log(...) G_STMT_START {} G_STMT_END +#endif #endif -- 2.7.4