How to build gstreamer-sharp with monodevelop/xamarin?

为君一笑 提交于 2019-11-27 02:33:21

问题


i'm developer of AudioCuesheetEditor, an application for editing audio cuesheets. The new Version should be able to play back sound, so I would like to use gstreamer as backend. I investigated a bit in gstreamer and found out, that I need to use version 1.x with gstreamer-sharp 0.99.x binding. No problem, downloaded gstreamer-sharp 0.99.0, opened the solution with monodevelop (on linux) or xamarin (on windows) and tried to build the dll, but that didn't work. I get the error "namespace Gst.GLib" not found.

I'm developing with xamarin/monodevelop and need to have a portable app (working with mono/.net).

Can anyone help me, get gstreamer-sharp build?

Thanks in advance!


回答1:


gstreamer-sharp is currently not supported on Windows, however you can compile the managed parts on linux and compile the glue on Windows using Visual Studio:

  1. Install gtk-sharp 3.0 from https://github.com/mono/gtk-sharp
  2. Compile gstreamer-sharp using ./autogen.sh && make
  3. Take the compiled glib-sharp and gstreamer-sharp binary and all .c files from sources/glue/
  4. Download and install gstreamer binaries from http://gstreamer.freedesktop.org/data/pkg/windows/1.2.2/ and install the development and binary packages for the architecture you want to compile for. You can use gstreamer 1.0 or 1.2.
  5. Use the Visual Studio template from the gstreamer-devel package and change the project type to library. Add the c files taken from the sources/glue folder and compile the glue library. The library should be called libgstreamersharpglue-1.0.0.dll
  6. Put the managed parts together with the native symbols.

EDIT: Compiling the glue is now easier on Windows! Someone set up a project which can compile the glue using Visual Studio on Windows. I have a fork which has binaries at https://github.com/xDarkice/libgstreamersharpglue




回答2:


gstreamer-sharp uses autotools for its build system, you cannot build it with an IDE. Please do the autotools dance:

./autogen.sh --prefix=/the/prefix/where/you/want/to/install
make
sudo make install


来源:https://stackoverflow.com/questions/21577733/how-to-build-gstreamer-sharp-with-monodevelop-xamarin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!