[gst-devel] win32 build works fine
Marc_VanDaele at Jabil.com
Wed Jun 16 07:47:16 CEST 2004
Thanks for the clarifications.
I'm not that impressed with this 'cute little macro trick' because IMO, it
adds more confusion than elegancy. Just my opionion of course.
We still need to figure out why we faced a crash from within
gstoptimalscheduler.c (I think; not 100% sure anymore; will double check)
despite that it has code like
#define GST_CAT_DEFAULT debug_scheduler
> -----Original Message-----
> From: Benjamin Otte [mailto:in7y118 at public.uni-hamburg.de]
> Sent: Wednesday, June 16, 2004 2:51 PM
> To: Steve Lhomme
> Cc: Marc VanDaele; 'gstreamer-devel at lists.sourceforge.net'
> Subject: Re: [gst-devel] win32 build works fine
> On Tue, 15 Jun 2004, Steve Lhomme wrote:
> > > I added it in there and modified gstinfo.h to
> > > GSTREAMER_EXPORT GstDebugCategory * GST_CAT_DEFAULT;
> > That's strange for 2 reasons :
> > - this is a macro that defines another symbol
> > - the program wouldn't link or start if the symbol was not
> > I added GST_EXPORT to the GST_CAT_DEFAULT declaration. But
> the defined
> > elements are probably missing from the .def yet... (there
> are actually
> > many of them)
> just FYI:
> GST_CAT_DEFAULT is a cute little macro trick inside the
> debugging system.
> The GST_DEBUG, GST_LOG, ... expand something like this:
> #define GST_LOG(bla, ...) GST_CAT_LOG(GST_CAT_DEFAULT, bla, ...)
> Normally, code with debugging already coded in has this line
> at the top of
> the file:
> #define GST_CAT_DEFAULT my_debug_category
> in that case the above macro expands to GST_CAT_LOG(my_debug_category,
> bla, ...)
> But code that does not have the #define needs to work, too (as in:
> compile and not crash). Therefore libgstreamer exports a
> default fallback
> debugging category named GST_CAT_DEFAULT, which is what you
> where talking
> about above.
> Hope that clears up some remaining questions.
More information about the gstreamer-devel