[gst-devel] win32 build works fine

Marc VanDaele Marc_VanDaele at Jabil.com
Wed Jun 16 02:03:06 CEST 2004


> -----Original Message-----
> From: Steve Lhomme [mailto:steve.lhomme at free.fr]
> Sent: Tuesday, June 15, 2004 9:53 PM
> To: Marc VanDaele; 'gstreamer-devel at lists.sourceforge.net'
> Subject: Re: [gst-devel] win32 build works fine

> OK. Apparently I can't make it to save this in the project 
> file... Very 
> strange.

Can't help you with this one.

> > Next I ran into a crash in gst_bin_add_many
> > This was caused because GST_CAT_DEFAULT was declared 
> external in gstinfo.h
> > but not part of the .def file.
> > 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

As far as I can see, 
- there is no #define of GST_CAT_DEFAULT in a header file
- there is a define of GST_CAT_DEFAULT in gstinfo.c but only *after* the
variable has been declared
So I do think there is a variable in gstinfo.obj with the name
GST_CAT_DEFAULT.
[I didn't find a nm.exe tool or so listing all the names in an object to
check this but
I did find the symbol GST_CAT_DEFAULT a few times in the object using a
hex-editor though.]

IIRC, in my case, the crash was triggered by the GST_DEBUG_OBJECT statement
in gst_opt_scheduler_add_element function.
The only thing I can come up with is something along the following lines
In gstoptimalschedule.c I see
	#include <gst/gst.h>

	GST_DEBUG_CATEGORY_STATIC (debug_scheduler);
	#define GST_CAT_DEFAULT debug_scheduler
Maybe, the define of GST_CAT_DEFAULT does not get used when expanding the
GST_DEBUG_OBJECT (defined indirectly by gst.h)?

By adding this variable to the .def file and recompiling everything, it
worked here
but possibly, moving up the two statements to before the gst.h also works?

> - the program wouldn't link or start if the symbol was not accessible

That's a good point!
I'm curious what is going wrong here.
I'm in favor of having functions in gstinfo.h iso macros (and possible
having one extra function to set the default debug category and adding these
functions to the dll).  


> 
> 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)

I indeed added GST_CAT_DEFAULT to the .def file which worked for me.

> > Now the helloworld (with filesink replacing mad/osssink) works fine.
> > Now I can use this to get acquainted with gstreamer.
> 
> What command exactly works for you ?

Sorry for not being clear.
I modified examples/helloworld/helloworld.c,
removed mad and osssink and added
  sink = gst_element_factory_make ("filesink", "disk_sink");
  g_assert (sink);
  g_object_set (G_OBJECT (sink), "location", "bbb.txt", NULL);

  /* add objects to the main pipeline */
  gst_bin_add_many (GST_BIN (bin), filesrc, sink, NULL);

  /* link the elements */
  gst_element_link_many (filesrc, sink, NULL);

Kind Regards,

Marc





More information about the gstreamer-devel mailing list