mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
aa7bb8fa1c
glib-sharp will only get a new release with the new API that we need for 3.0 in a year or something. Instead of waiting a year before we can release something we now have our own internal copy of glib-sharp trunk that will be dropped once glib-sharp 3.0 is released. Everything is now compilable and working without any additional patches.
13 lines
538 B
Text
13 lines
538 B
Text
[DllImport("libgstreamer-0.10.dll") ]
|
|
static extern IntPtr gst_plugin_load_file (IntPtr filename, out IntPtr gerror);
|
|
|
|
public static Gst.Plugin LoadFile (string filename) {
|
|
IntPtr native_name = Gst.GLib.Marshaller.StringToPtrGStrdup (filename);
|
|
IntPtr gerror;
|
|
IntPtr raw_ret = gst_plugin_load_file (native_name, out gerror);
|
|
Gst.Plugin ret = Gst.GLib.Object.GetObject (raw_ret, true) as Gst.Plugin;
|
|
Gst.GLib.Marshaller.Free (native_name);
|
|
if (gerror != IntPtr.Zero)
|
|
throw new Gst.GLib.GException (gerror);
|
|
return ret;
|
|
}
|