gstreamer/gstreamer-sharp/Plugin.custom
Maarten Bosmans f665c749b6 Use libgst*.dll in DllImport attribute, instead of gst*.dll
Nescessary for .NET, which doesn't prefix the library filename
with lib automatically.
2009-05-25 12:09:52 +02:00

13 lines
522 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 = GLib.Marshaller.StringToPtrGStrdup (filename);
IntPtr gerror;
IntPtr raw_ret = gst_plugin_load_file (native_name, out gerror);
Gst.Plugin ret = GLib.Object.GetObject (raw_ret, true) as Gst.Plugin;
GLib.Marshaller.Free (native_name);
if (gerror != IntPtr.Zero)
throw new GLib.GException (gerror);
return ret;
}