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

Michael Smith msmith at xiph.org
Thu Mar 11 08:18:25 CET 2010


On Wed, Mar 10, 2010 at 10:32 PM, Alberto Vigata <alberto at nelalabs.com> 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




More information about the gstreamer-devel mailing list