Hello,
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. 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? Thanks, -- Max. _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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 _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
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=[hidden email] [mailto:gstreamer-devel-bounces+mpaklin=[hidden email]] On Behalf Of Tim-Philipp Müller Sent: Friday, November 04, 2011 5:47 PM To: [hidden email] 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 [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
On 11/07/2011 06:19 AM, Max Paklin wrote:
> 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 Aparrently the binary that you copied to your FC15 desktop is invalid. Are you running the FC15 desktop on a PPC as well? Some or at least compatible arch? The error comes a from levels below gstreamer. Fix those first please. Stefan > 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=[hidden email] > [mailto:gstreamer-devel-bounces+mpaklin=[hidden email]] > On Behalf Of Tim-Philipp Müller > Sent: Friday, November 04, 2011 5:47 PM > To: [hidden email] > 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 > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Stefan, thanks for responding.
The binary was "invalid" intentionally. It's a valid PPC binary copied over to x86 machine for testing. That invalid binary generated hard warnings that I was looking for a way to get rid of. Of course, shipping code must not have those, but during development having a way to redirect those to our internal log instead of having an embedded box hosed is a good strategy. On our box the code runs as daemon with all stdXXX shut off. Having something generating a spew to stderr causes problems. Tim gave me some ideas, so I have something to consider. Thanks, -- Max. -----Original Message----- From: gstreamer-devel-bounces+mpaklin=[hidden email] [mailto:gstreamer-devel-bounces+mpaklin=[hidden email]] On Behalf Of Stefan Sauer Sent: Monday, November 07, 2011 7:36 AM To: [hidden email] Subject: Re: --gst-debug-disable On 11/07/2011 06:19 AM, Max Paklin wrote: > 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 Aparrently the binary that you copied to your FC15 desktop is invalid. Are you running the FC15 desktop on a PPC as well? Some or at least compatible arch? The error comes a from levels below gstreamer. Fix those first please. Stefan > 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=[hidden email] > [mailto:gstreamer-devel-bounces+mpaklin=[hidden email]. > org] > On Behalf Of Tim-Philipp Müller > Sent: Friday, November 04, 2011 5:47 PM > To: [hidden email] > 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.ht > ml#g-s > et-printerr-handler > http://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.ht > ml#g-s > et-print-handler > > Other than that, there's not much you can do really. > > Cheers > -Tim > > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel > > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel _______________________________________________ gstreamer-devel mailing list [hidden email] http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |