tracerrecord: Disable logging if GST_DISABLE_GST_DEBUG
authorEdward Hervey <edward@centricular.com>
Tue, 19 Jan 2016 10:10:30 +0000 (11:10 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Tue, 19 Jan 2016 10:12:21 +0000 (11:12 +0100)
Make the gst_tracer_record_log() a no-op if the gst-debug subsystem
is disabled.

gst/gsttracerrecord.c
gst/gsttracerrecord.h

index 73ecc7d..d1e9939 100644 (file)
@@ -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
index 4ccf2c4..3cc791b 100644 (file)
@@ -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