--gst-debug-disable

Tim-Philipp Müller t.i.m at zen.co.uk
Fri Nov 4 17:47:13 PDT 2011


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-handler
http://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html#g-set-printerr-handler
http://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html#g-set-print-handler

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

 Cheers
  -Tim




More information about the gstreamer-devel mailing list