[gst-devel] python gstreamer and windows

Michal Benes michal.benes at xeris.cz
Mon Nov 7 00:50:59 CET 2005


Hello John,

	if You are getting undefined references to gobject, try to 
export LDFLAGS=`pkg-config --libs gobject-2.0 gthread-2.0 gmodule-2.0`
before running configure. If it does not work try to send us some error
messages from the compiler but I am not sure if I can help since I have
not been compiling python bindings.

	By the way, were you able to compile and run gstreamer on Windows? I
had not time to work on the Windows port lately, is there anything that
should be added or changed in http://gstreamer.xeris.cz/winport.html ?

	Regards
		Michal


John Janecek píše v Ne 06. 11. 2005 v 21:31 +0800:
> Managed to get the _gst extension to compile under windows, with mingw
> Need help to get the interfaces extension to compile, I get all sorts
> of nasty references to gobject (even though linked against it).
> 
> If anyone got any ideas how to make interfaces module compile i would
> be happy :)
> 
> Anyway here is what i did
> 
> 1) follow this http://gstreamer.xeris.cz/winport.html
> 
> The in the gst-python module generate the gst.c and interface.c files
> 
> In the gst.c file remove all references to libxml_xmlDocPtrWrap
> (for some reason linker can not find that function)
> 
> My compiler complained about a static structure (just set it to 0) I
> think it is a compiler error.
> 
> I use pymingw python which uses mscvt libs, if u use regular python
> nasty will happen probably
> 
> Made a setup.py file
> ####setup.py
> from distutils.core import setup
> from distutils.extension import Extension
> import sys
> prefix = "C:/msys/1.0/local"
> 
> files = ["gst.c","gst-argtypes.c","gstmodule.c","pygstiterator.c","pygstminiobject.c","pygstobject.c","pygstvalue.c","pygstexception.c"]
> define_macros=[("PYGST_MAJOR_VERSION","0"),("PYGST_MINOR_VERSION","9"),("PYGST_MICRO_VERSION","4")]
> include_dirs=[	
> 				"C:/Python24/include/pygtk-2.0",
> 				prefix+"/include",
> 				prefix+"/include/glib-2.0",
> 				prefix+"/lib/glib-2.0/include", #glibconfig.h shoves there why ?
> 				prefix+"/include/gstreamer-0.9",
> 				prefix+"/include/libxml2"
> 				]
> 				
> library_dirs = [prefix+"/lib"]
> libraries = ["python24",
> 			"gobject-2.0",
> 			"glib-2.0",
> 			"gmodule-2.0",
> 			"libgstbase-0.9",
> 			"gstcontroller-0.9",
> 			"gstdataprotocol-0.9",
> 			"gstinterfaces-0.9",
> 			"gstreamer-0.9",
> 			"gthread-2.0"]
> 
> setup(name="gst",
>       ext_modules=[
>                     Extension("_gst",files,
>                     define_macros=define_macros,
>                     library_dirs=library_dirs,
>                     libraries=libraries,
>                     include_dirs=include_dirs,
>                     depends=[]),
>                     ]
>      )
> #### end file
> 
> When I try same for interfaces extension
> 
> from distutils.core import setup
> from distutils.extension import Extension
> import sys
> 
> prefix = "C:/msys/1.0/local"
> 
> files = ["interfacesmodule.c","interfaces.c"]
> define_macros=[("PYGST_MAJOR_VERSION","0"),("PYGST_MINOR_VERSION","9"),("PYGST_MICRO_VERSION","4")]
> include_dirs=[	
> 				"C:/Python24/include/pygtk-2.0",
> 				prefix+"/include",
> 				prefix+"/include/glib-2.0",
> 				prefix+"/lib/glib-2.0/include", #glibconfig.h shoves there why ?
> 				prefix+"/include/gstreamer-0.9",
> 				prefix+"/include/libxml2"
> 				]
> 				
> library_dirs = [prefix+"/lib",prefix+"/lib/gstreamer-0.9"]
> libraries = ["python24",
> 			"gobject-2.0",
> 			"glib-2.0",
> 			"gmodule-2.0",
> 			"gstbase-0.9",
> 			"gstcontroller-0.9",
> 			"gstdataprotocol-0.9",
> 			"gstinterfaces-0.9",
> 			"gstnet-0.9",
> 			"gstriff-0.9",
> 			"gstreamer-0.9",
> 			"gthread-2.0",
> 			]
> 
> setup(name="interfaces",
>       ext_modules=[
>                     Extension("interfaces",files,
>                     define_macros=define_macros,
>                     library_dirs=library_dirs,
>                     libraries=libraries,
>                     include_dirs=include_dirs,
>                     depends=[]),
>                     ]
>      )
> 
> I can not get it to link (get lots of undefined references to things in glib)
> 
> If u remove from the __init__.py importing interfaces
> 
> and if u set ur plugin paths etc
> 
> the f2f.py example will work. Have not tried other examples (obviously
> ones which require interfaces will not work)
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App Server. Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel





More information about the gstreamer-devel mailing list