From e5ec6f102ef0c8c1040a68d229581776e96119d2 Mon Sep 17 00:00:00 2001 From: Stefan Sauer Date: Sun, 15 May 2016 14:46:40 -0700 Subject: [PATCH] ladspa: use _OBJECT log variants for plugin_init Also trim leading whitespae. --- ext/ladspa/gstladspa.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/ext/ladspa/gstladspa.c b/ext/ladspa/gstladspa.c index df06693..ec91463 100644 --- a/ext/ladspa/gstladspa.c +++ b/ext/ladspa/gstladspa.c @@ -24,21 +24,21 @@ * SECTION:element-ladspa * @short_description: bridge for LADSPA (Linux Audio Developer's Simple Plugin API) * @see_also: #GstAudioConvert #GstAudioResample, #GstAudioTestSrc, #GstAutoAudioSink - * + * * The LADSPA (Linux Audio Developer's Simple Plugin API) element is a bridge * for plugins using the LADSPA API. * It scans all installed LADSPA plugins and registers them as gstreamer * elements. If available it can also parse LRDF files and use the metadata for * element classification. The functionality you get depends on the LADSPA plugins * you have installed. - * + * * * Example LADSPA line without this plugins * |[ * (padsp) listplugins * (padsp) analyseplugin cmt.so amp_mono * gst-launch-1.0 -e filesrc location="$myfile" ! decodebin ! audioconvert ! audioresample ! "audio/x-raw,format=S16LE,rate=48000,channels=1" ! wavenc ! filesink location="testin.wav" - * (padsp) applyplugin testin.wav testout.wav cmt.so amp_mono 2 + * (padsp) applyplugin testin.wav testout.wav cmt.so amp_mono 2 * gst-launch-1.0 playbin uri=file://"$PWD"/testout.wav * ]| Decode any audio file into wav with the format expected for the specific ladspa plugin to be applied, apply the ladspa filter and play it. * @@ -76,7 +76,7 @@ * ]| List details of the plugin, parameters, range and defaults included. * * - * The elements categorize in: + * The elements categorize in: * * Filter/Effect/Audio/LADSPA: * @@ -86,7 +86,7 @@ * ]| Decode any audio file, filter it through Calf Reverb LADSPA then TAP Stereo Echo, and play it. * * - * Source/Audio/LADSPA: + * Source/Audio/LADSPA: * * Example Source/Audio/LADSPA line with this plugins * |[ @@ -360,7 +360,7 @@ ladspa_plugin_path_search (GstPlugin * plugin) } if (skip) break; - /* + /* * transform path: /usr/lib/ladspa -> /usr/share/ladspa/rdf/ * yes, this is ugly, but lrdf has not searchpath */ @@ -402,8 +402,8 @@ plugin_init (GstPlugin * plugin) GST_DEBUG_CATEGORY_INIT (ladspa_debug, "ladspa", 0, "LADSPA plugins"); #ifdef ENABLE_NLS - GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE, - LOCALEDIR); + GST_DEBUG_OBJECT (plugin, "binding text domain %s to locale dir %s", + GETTEXT_PACKAGE, LOCALEDIR); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); #endif @@ -420,13 +420,12 @@ plugin_init (GstPlugin * plugin) if (ladspa_meta_all) { n = gst_structure_n_fields (ladspa_meta_all); } - GST_INFO ("%d entries in cache", n); + GST_INFO_OBJECT (plugin, "%d entries in cache", n); if (!n) { ladspa_meta_all = gst_structure_new_empty ("ladspa"); - res = ladspa_plugin_path_search (plugin); - if (res) { + if ((res = ladspa_plugin_path_search (plugin))) { n = gst_structure_n_fields (ladspa_meta_all); - GST_INFO ("%d entries after scanning", n); + GST_INFO_OBJECT (plugin, "%d entries after scanning", n); gst_plugin_set_cache_data (plugin, ladspa_meta_all); } } else { @@ -438,7 +437,7 @@ plugin_init (GstPlugin * plugin) const gchar *name; const GValue *value; - GST_INFO ("register types"); + GST_INFO_OBJECT (plugin, "register types"); for (i = 0; i < n; i++) { name = gst_structure_nth_field_name (ladspa_meta_all, i); @@ -452,7 +451,7 @@ plugin_init (GstPlugin * plugin) } if (!res) { - GST_WARNING ("no LADSPA plugins found, check LADSPA_PATH"); + GST_WARNING_OBJECT (plugin, "no LADSPA plugins found, check LADSPA_PATH"); } /* we don't want to fail, even if there are no elements registered */ -- 2.7.4