[gst-devel] RE: Newbe Gstreamer for Win32
Larry Berlinski
LBerlinski at inspireworksinc.com
Fri Nov 19 08:16:04 CET 2004
Hello Steve,
Yes, I did have to make a few changes ... although like I said in my original cry for help, I haven't addressed the gst_version issue yet.
The primary problem I had was recognizing that the gstenumtypes.h and .c needed to be rebuilt using glib-mkenums perl script. Those that were in the win32 directory were out-of-date (I guess since v0.8.5). I tried a number of ways to get glib-mkenums to run the Pre-Build Event entry, but finally took the chicken way out and created two batch files to do what needed to be done. I split the original glib-mkenums command that I found the makefiles found in the gst directoroy into a number of separate commands, because the list of header files got truncated when I first tested it out (DOS line limit???)
The next problem to tackle, which I haven't attempted yet is to re-build gstconfig.h and gstversion.h ... this is a little over my head.
Anyway, here's the changes (I can send you these as a text file if you wish)
(P.S., one of my collegues is working on a Linux gstreamer build environment. He used the same programs I sent in my original note, and was able to compile and run without errors ... so there must be some other difference beside documentation that's causing the failures noted in win32 ...)
---------- ORIGINAL libstreamer Pre-Build Event commands ----------------------
[snip Original libstramer Pre-Build Event commands]
copy $(ProjectDir)\gstconfig.h $(ProjectDir)\..\gst\gstconfig.h
copy $(ProjectDir)\gstversion.h $(ProjectDir)\..\gst\gstversion.h
copy $(ProjectDir)\gstenumtypes.h $(ProjectDir)\..\gst\gstenumtypes.h
copy $(ProjectDir)\gstenumtypes.c $(ProjectDir)\..\gst\gstenumtypes.c
echo #include "gst/gstconfig.h" > gstmarshal.h.tmp
glib-genmarshal --header --prefix=gst_marshal $(ProjectDir)..\gst\gstmarshal.list >> gstmarshal.h.tmp
move gstmarshal.h.tmp $(ProjectDir)..\gst\gstmarshal.h
echo #include "glib-object.h" > gstmarshal.c.tmp
echo #include "gstmarshal.h" >> gstmarshal.c.tmp
glib-genmarshal --body --prefix=gst_marshal $(ProjectDir)..\gst\gstmarshal.list >> gstmarshal.c.tmp
move gstmarshal.c.tmp $(ProjectDir)..\gst\gstmarshal.c
bison -d -v -p_gst_parse__yy $(ProjectDir)..\gst\parse\grammar.y -o $(ProjectDir)..\gst\parse\grammar.tab.c
flex -P_gst_parse_yy $(ProjectDir)..\gst\parse\parse.l
move lex._gst_parse_yy.c $(ProjectDir)..\gst\parse\lex._gst_parse_yy.c
type gstreamer.def > gst.def
type gstreamer-dbg.def >> gst.def
[/snip Original libstramer Pre-Build Event commands]
---------- New libstreamer Pre-Build Event commands ----------------------
[snip libstramer Pre-Build Event commands]
copy $(ProjectDir)\gstconfig.h $(ProjectDir)\..\gst\gstconfig.h
copy $(ProjectDir)\gstversion.h $(ProjectDir)\..\gst\gstversion.h
call $(ProjectDir)\mkenumsh.bat $(ProjectDir)
copy $(ProjectDir)\gstenumtypes.h $(ProjectDir)\..\gst\gstenumtypes.h
call $(ProjectDir)\mkenumsc.bat $(ProjectDir)
copy $(ProjectDir)\gstenumtypes.c $(ProjectDir)\..\gst\gstenumtypes.c
echo #include "gst/gstconfig.h" > gstmarshal.h.tmp
glib-genmarshal --header --prefix=gst_marshal $(ProjectDir)\..\gst\gstmarshal.list >> gstmarshal.h.tmp
move gstmarshal.h.tmp $(ProjectDir)\..\gst\gstmarshal.h
echo #include "glib-object.h" > gstmarshal.c.tmp
echo #include "gstmarshal.h" >> gstmarshal.c.tmp
glib-genmarshal --body --prefix=gst_marshal $(ProjectDir)\..\gst\gstmarshal.list >> gstmarshal.c.tmp
move gstmarshal.c.tmp $(ProjectDir)\..\gst\gstmarshal.c
bison -d -v -p_gst_parse__yy $(ProjectDir)\..\gst\parse\grammar.y -o $(ProjectDir)\..\gst\parse\grammar.tab.c
flex -P_gst_parse_yy $(ProjectDir)\..\gst\parse\parse.l
move lex._gst_parse_yy.c $(ProjectDir)\..\gst\parse\lex._gst_parse_yy.c
type gstreamer.def > gst.def
type gstreamer-dbg.def >> gst.def
[/snip libstramer Pre-Build Event commands]
--------------------- Copy of mkenumsh.bat installed into \win32 directory ------ needed to create "gstenumtypes.h" ----------------------
[snip win32\mkenumsh.h]
copy %1\..\gst\*.h %1
perl -S glib-mkenums --fhead "#ifndef __GST_ENUM_TYPES_H__\n#define __GST_ENUM_TYPES_H__\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n" --fprod "/* enumerations from \"@filename@\" */\n" --vhead "GType @enum_name at _get_type (void);\n#define GST_TYPE_ at ENUMSHORT@ (@enum_name at _get_type())\n" gst.h gstatomic.h gstobject.h gstbin.h gstbuffer.h gstcaps.h > %1\gstenumtypes.h
perl -S glib-mkenums --fprod "/* enumerations from \"@filename@\" */\n" --vhead "GType @enum_name at _get_type (void);\n#define GST_TYPE_ at ENUMSHORT@ (@enum_name at _get_type())\n" gstclock.h gstcompat.h gstcpu.h gstdata.h gstelement.h gsterror.h >> %1\gstenumtypes.h
perl -S glib-mkenums --fprod "/* enumerations from \"@filename@\" */\n" --vhead "GType @enum_name at _get_type (void);\n#define GST_TYPE_ at ENUMSHORT@ (@enum_name at _get_type())\n" gstevent.h gstfilter.h gstformat.h gstindex.h gstinfo.h gstinterface.h >> %1\gstenumtypes.h
perl -S glib-mkenums --fprod "/* enumerations from \"@filename@\" */\n" --vhead "GType @enum_name at _get_type (void);\n#define GST_TYPE_ at ENUMSHORT@ (@enum_name at _get_type())\n" gstmacros.h gstmemchunk.h gstpad.h gstpipeline.h gstplugin.h gstpluginfeature.h >> %1\gstenumtypes.h
perl -S glib-mkenums --fprod "/* enumenations from \"@filename@\" */\n" --vhead "GType @enum_name at _get_type (void);\n#define GST_TYPE_ at ENUMSHORT@ (@enum_name at _get_type())\n" gstprobe.h gstqueue.h gstquery.h gstscheduler.h gststructure.h gstsystemclock.h >> %1\gstenumtypes.h
perl -S glib-mkenums --fprod "/* enumerations from \"@filename@\" */\n" --vhead "GType @enum_name at _get_type (void);\n#define GST_TYPE_ at ENUMSHORT@ (@enum_name at _get_type())\n" gsttag.h gsttaginterface.h gstthread.h gsttrace.h gsttrashstack.h gsttypefind.h >> %1\gstenumtypes.h
perl -S glib-mkenums --fprod "/* enumerations from \"@filename@\" */\n" --vhead "GType @enum_name at _get_type (void);\n#define GST_TYPE_ at ENUMSHORT@ (@enum_name at _get_type())\n" gsttypes.h gsturi.h gsturitype.h gstutils.h gstvalue.h gstregistry.h >> %1\gstenumtypes.h
perl -S glib-mkenums --fprod "/* enumerations from \"@filename@\" */\n" --vhead "GType @enum_name at _get_type (void);\n#define GST_TYPE_ at ENUMSHORT@ (@enum_name at _get_type())\n" --ftail "G_END_DECLS\n\n#endif /* __GST_ENUM_TYPES_H__ */" gstregistrypool.h gstparse.h gstxml.h >> %1\gstenumtypes.h
[/snip win32\mkenumsh.h]
--------------------- Copy of mkenumsc.bat installed into \win32 directory ------ needed to create "gstenumtypes.c" ----------------------
[snip win32\mkenumsc.h]
copy %1\..\gst\*.h %1
perl -S glib-mkenums --fhead "#include \"gst_private.h\"\n#include <gst/gst.h>" --fprod "\n/* enumerations from \"@filename@\" */" --vhead "GType\n at enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G at Type@Value values[] = {" --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," --vtail " { 0, NULL, NULL }\n };\n etype = g_ at type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" gst.h gstatomic.h gstobject.h gstbin.h gstbuffer.h gstcaps.h > %1\gstenumtypes.c
perl -S glib-mkenums --fprod "\n/* enumerations from \"@filename@\" */" --vhead "GType\n at enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G at Type@Value values[] = {" --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," --vtail " { 0, NULL, NULL }\n };\n etype = g_ at type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" gstclock.h gstcompat.h gstcpu.h gstdata.h gstelement.h gsterror.h >> %1\gstenumtypes.c
perl -S glib-mkenums --fprod "\n/* enumerations from \"@filename@\" */" --vhead "GType\n at enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G at Type@Value values[] = {" --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," --vtail " { 0, NULL, NULL }\n };\n etype = g_ at type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" gstevent.h gstfilter.h gstformat.h gstindex.h gstinfo.h gstinterface.h >> %1\gstenumtypes.c
perl -S glib-mkenums --fprod "\n/* enumerations from \"@filename@\" */" --vhead "GType\n at enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G at Type@Value values[] = {" --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," --vtail " { 0, NULL, NULL }\n };\n etype = g_ at type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" gstmacros.h gstmemchunk.h gstpad.h gstpipeline.h gstplugin.h gstpluginfeature.h >> %1\gstenumtypes.c
perl -S glib-mkenums --fprod "\n/* enumerations from \"@filename@\" */" --vhead "GType\n at enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G at Type@Value values[] = {" --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," --vtail " { 0, NULL, NULL }\n };\n etype = g_ at type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" gstprobe.h gstqueue.h gstquery.h gstscheduler.h gststructure.h gstsystemclock.h >> %1\gstenumtypes.c
perl -S glib-mkenums --fprod "\n/* enumerations from \"@filename@\" */" --vhead "GType\n at enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G at Type@Value values[] = {" --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," --vtail " { 0, NULL, NULL }\n };\n etype = g_ at type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" gsttag.h gsttaginterface.h gstthread.h gsttrace.h gsttrashstack.h gsttypefind.h >> %1\gstenumtypes.c
perl -S glib-mkenums --fprod "\n/* enumerations from \"@filename@\" */" --vhead "GType\n at enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G at Type@Value values[] = {" --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," --vtail " { 0, NULL, NULL }\n };\n etype = g_ at type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" gsttypes.h gsturi.h gsturitype.h gstutils.h gstvalue.h gstregistry.h >> %1\gstenumtypes.c
perl -S glib-mkenums --fprod "\n/* enumerations from \"@filename@\" */" --vhead "GType\n at enum_name@_get_type (void)\n{\n static GType etype = 0;\n if (etype == 0) {\n static const G at Type@Value values[] = {" --vprod " { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," --vtail " { 0, NULL, NULL }\n };\n etype = g_ at type@_register_static (\"@EnumName@\", values);\n }\n return etype;\n}\n" gstregistrypool.h gstparse.h gstxml.h >> %1\gstenumtypes.c
[/snip win32\mkenumsc.h]
More information about the gstreamer-devel
mailing list