--gst-debug-disable

Max Paklin mpaklin at hotmail.com
Sun Nov 6 21:19:55 PST 2011


As I mentioned in my original e-mail I simply dropped an .so that I built
for PPC into a folder on FC15 desktop Linux. After adding that folder to
GST_PLUGIN_PATH I ran
gst-launch fakesrc ! fakesink

That sure made plugin scanner unhappy and it generated this warning
(gst-plugin-scanner:3022): GStreamer-WARNING **: Failed to load plugin
'./libcommons.so': ./libcommons.so: ELF file data encoding not little-endian

The same warning is generated when my app is run, so it's not an output from
gst-launch. I was looking for a way to suppress it.
As it turned out (thanks to helpful folks at IRC) this particular spew is
generated by "hard error" logging facility and simply cannot be suppressed
using normal GStreamer debugging tools.

Thanks for the links on Glib logging hooks! I will check them out.

-- Max.



-----Original Message-----
From: gstreamer-devel-bounces+mpaklin=hotmail.com at lists.freedesktop.org
[mailto:gstreamer-devel-bounces+mpaklin=hotmail.com at lists.freedesktop.org]
On Behalf Of Tim-Philipp Müller
Sent: Friday, November 04, 2011 5:47 PM
To: gstreamer-devel at lists.freedesktop.org
Subject: Re: --gst-debug-disable

On Fri, 2011-11-04 at 00:57 -0700, Max Paklin wrote:

> Is --gst-debug-disable flag supposed to work?
>
> I have a need to completely disable all output from GStreamer 
> libraries under certain conditions. I thought I'd try 
> --gst-debug-disable, but it seems to have no effect.

Why do you think it has no effect? What output do you get?

--gst-debug-disable just disables something that you would explicitly need
to enable in the first place (if you're using released versions of
GStreamer), so is probably not what you're looking for.

GStreamer does not / should not output anything to stderr or stdout (other
than g_warnings() for programming errors or when a plugin can't be loaded or
so).

gst-launch might however. gst-launch has a --quiet option, but that only
affects stuff it would spew to stdout, not errors/stderr.


> To test I simply copied an invalid .so file to one of directories 
> included in GST_PLUGIN_PATH. Invalid in this case was simply a .so 
> compiled for a different platform (PPC), while the test was on FC15 x86
(0.10.35).
> Running the following
> gst-launch --gst-debug-disable fakesrc ! fakesink
> 
> Resulted in this
> (gst-plugin-scanner:3022): GStreamer-WARNING **: Failed to load plugin
> './libcommons.so': ./libcommons.so: ELF file data encoding not 
> little-endian
> 
> The same happened when I tried all I could think of from my own app.
> gst_debug_set_active(FALSE),
> gst_debug_remove_log_function(gst_debug_log_default), GST_DEBUG=0, 
> GST_DEBUG_FILE=/dev/null did not help.
> 
> Can anyone recommend the right approach to ensure that no output is 
> generated to either stdout or stderr no matter what the error is?

GLib provides some hooks that you can use to suppress even g_warnings() like
this in your application:

http://developer.gnome.org/glib/stable/glib-Message-Logging.html#g-log-set-h
andler
http://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html#g-s
et-printerr-handler
http://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html#g-s
et-print-handler

Other than that, there's not much you can do really.

 Cheers
  -Tim


_______________________________________________
gstreamer-devel mailing list
gstreamer-devel at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list