diff --git a/gst/playback/gstfactorylists.c b/gst/playback/gstfactorylists.c index f1d1e8675f..eb5fb4c0f9 100644 --- a/gst/playback/gstfactorylists.c +++ b/gst/playback/gstfactorylists.c @@ -186,6 +186,7 @@ gst_factory_list_get_elements (GstFactoryListType type) void gst_factory_list_debug (GValueArray * array) { +#ifndef GST_DISABLE_GST_DEBUG gint i; for (i = 0; i < array->n_values; i++) { @@ -197,6 +198,7 @@ gst_factory_list_debug (GValueArray * array) GST_DEBUG ("%s", gst_plugin_feature_get_name (feature)); } +#endif } /** diff --git a/gst/playback/gstfactorylists.h b/gst/playback/gstfactorylists.h index c8e50757df..5d4c64cca2 100644 --- a/gst/playback/gstfactorylists.h +++ b/gst/playback/gstfactorylists.h @@ -39,6 +39,12 @@ void gst_factory_list_debug (GValueArray *array); GValueArray * gst_factory_list_filter (GValueArray *array, const GstCaps *caps); +#ifndef GST_DISABLE_GST_DEBUG +#define GST_FACTORY_LIST_DEBUG(array) gst_factory_list_debug(array) +#else +#define GST_FACTORY_LIST_DEBUG(array) +#endif + G_END_DECLS #endif /* __GST_FACTORY_LISTS_H__ */ diff --git a/gst/playback/gstplaybin2.c b/gst/playback/gstplaybin2.c index 67ac788c47..b1a832444f 100644 --- a/gst/playback/gstplaybin2.c +++ b/gst/playback/gstplaybin2.c @@ -1171,7 +1171,7 @@ gst_play_bin_init (GstPlayBin * playbin) /* first filter out the interesting element factories */ playbin->elements_lock = g_mutex_new (); gst_play_bin_update_elements_list (playbin); - gst_factory_list_debug (playbin->elements); + GST_FACTORY_LIST_DEBUG (playbin->elements); /* add sink */ playbin->playsink = g_object_new (GST_TYPE_PLAY_SINK, NULL); @@ -2956,7 +2956,7 @@ autoplug_factories_cb (GstElement * decodebin, GstPad * pad, g_mutex_unlock (playbin->elements_lock); GST_DEBUG_OBJECT (playbin, "found factories %p", result); - gst_factory_list_debug (result); + GST_FACTORY_LIST_DEBUG (result); return result; }