[gst-devel] Use of GST_PTR_FORMAT on non glibc targets unavailable?

Alberto Vigata alberto at nelalabs.com
Thu Mar 11 07:32:04 CET 2010


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




More information about the gstreamer-devel mailing list