gstreamer/gstreamer-sharp/Plugin.custom
2009-09-20 10:22:16 +02:00

13 lines
539 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;
}