2009-09-20 08:19:49 +00:00
|
|
|
[DllImport ("libgstreamer-0.10.dll") ]
|
2009-04-27 10:08:40 +00:00
|
|
|
static extern IntPtr gst_plugin_load_file (IntPtr filename, out IntPtr gerror);
|
|
|
|
|
|
|
|
public static Gst.Plugin LoadFile (string filename) {
|
2009-08-05 14:57:20 +00:00
|
|
|
IntPtr native_name = Gst.GLib.Marshaller.StringToPtrGStrdup (filename);
|
2009-04-27 10:08:40 +00:00
|
|
|
IntPtr gerror;
|
|
|
|
IntPtr raw_ret = gst_plugin_load_file (native_name, out gerror);
|
2009-08-05 14:57:20 +00:00
|
|
|
Gst.Plugin ret = Gst.GLib.Object.GetObject (raw_ret, true) as Gst.Plugin;
|
|
|
|
Gst.GLib.Marshaller.Free (native_name);
|
2009-04-27 10:08:40 +00:00
|
|
|
if (gerror != IntPtr.Zero)
|
2009-08-05 14:57:20 +00:00
|
|
|
throw new Gst.GLib.GException (gerror);
|
2009-04-27 10:08:40 +00:00
|
|
|
return ret;
|
|
|
|
}
|