Hello All,
I was playing around with gstreamer today on windows using ossbuild available at http://code.google.com/p/ossbuild/ and I stumbled across with an issue regarding the customized printf style formatting GST_PTR_FORMAT that seems to be used pervasively around the code. Typical GST_PTR_FORMAT usage goes as follows GST_LOG ("caps are %" GST_PTR_FORMAT, caps); GST_PTR_FORMAT seems to resolve to either "p" or "P" depending on preprocessor defs, with the idea that the GST debug system will introduce %p or %P as a new format flag for g_printerr() that will take the GType following the format string and format it accordingly. My problem is that this is not working in my windows builds. After further inspection, seems that in order for this to work, the GST debug system is using 'register_printf_specifier' on gstinfo.c to register the new format types and then after some massaging ends calling g_printerr() of GLib to do the final debug output. Seems like 'register_printf_specifier' is a glibc specific feature therefore is not available in any target that is not using glibc. This seems a little bit odd to me. Is GST_PTR_FORMAT really available only on glibc targets? thanks in advance, Alberto ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Wed, Mar 10, 2010 at 10:32 PM, Alberto Vigata <[hidden email]> wrote:
> Hello All, > > I was playing around with gstreamer today on windows using ossbuild > available at http://code.google.com/p/ossbuild/ and I stumbled across > with an issue regarding the customized printf style formatting > GST_PTR_FORMAT that seems to be used pervasively around the code. > Typical GST_PTR_FORMAT usage goes as follows > > GST_LOG ("caps are %" GST_PTR_FORMAT, caps); > > GST_PTR_FORMAT seems to resolve to either "p" or "P" depending on > preprocessor defs, with the idea that the GST debug system will > introduce %p or %P as a new format flag for g_printerr() that will > take the GType following the format string and format it accordingly. > > My problem is that this is not working in my windows builds. After > further inspection, seems that in order for this to work, the GST > debug system is using 'register_printf_specifier' on gstinfo.c to > register the new format types and then after some massaging ends > calling g_printerr() of GLib to do the final debug output. Seems like > 'register_printf_specifier' is a glibc specific feature therefore is > not available in any target that is not using glibc. This seems a > little bit odd to me. > > Is GST_PTR_FORMAT really available only on glibc targets? Short answer: yes. The result is, as you've presumably noticed, that the debug output isn't as good on non-glibc targets. It's only used for debug output though. Mike ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |