Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to build gstreamer-sharp with monodevelop/xamarin?

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!

like image 252
Sven Avatar asked Dec 06 '22 03:12

Sven


1 Answers

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

like image 198
Stephan Avatar answered Dec 27 '22 01:12

Stephan