summaryrefslogtreecommitdiff
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2009-04-30 13:32:30 (GMT)
committer Sebastian Dröge <sebastian.droege@collabora.co.uk>2009-04-30 13:32:30 (GMT)
commitc42ef5f916225f11bd15c8cde4f68ed06e615c34 (patch) (side-by-side diff)
tree0c2b94c0ce40dbfdb307d84213a3cb4b973aa3ee
parent7eb6f09f761564c32dcffa43ba631db4fb4350f6 (diff)
downloadgstreamer-sharp-c42ef5f916225f11bd15c8cde4f68ed06e615c34.zip
gstreamer-sharp-c42ef5f916225f11bd15c8cde4f68ed06e615c34.tar.gz
Fix registration of new Typefinders
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--gstreamer-sharp/TypeFind.custom8
1 files changed, 5 insertions, 3 deletions
diff --git a/gstreamer-sharp/TypeFind.custom b/gstreamer-sharp/TypeFind.custom
index 70d99fe..3d48041 100644
--- a/gstreamer-sharp/TypeFind.custom
+++ b/gstreamer-sharp/TypeFind.custom
@@ -1,12 +1,14 @@
[DllImport ("gstreamer-0.10.dll") ]
-static extern bool gst_type_find_register (IntPtr plugin, IntPtr name, uint rank, GstSharp.TypeFindFunctionNative func, IntPtr extensions, IntPtr possible_caps, IntPtr data, IntPtr data_notify);
+static extern bool gst_type_find_register (IntPtr plugin, IntPtr name, uint rank, GstSharp.TypeFindFunctionNative func, IntPtr[] extensions, IntPtr possible_caps, IntPtr data, IntPtr data_notify);
-public static bool Register (Gst.Plugin plugin, string name, uint rank, Gst.TypeFindFunction func, string extensions, Gst.Caps possible_caps) {
+public static bool Register (Gst.Plugin plugin, string name, uint rank, Gst.TypeFindFunction func, string[] extensions, Gst.Caps possible_caps) {
IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name);
+ IntPtr[] native_extensions = GLib.Marshaller.StringArrayToNullTermPointer (extensions);
GstSharp.TypeFindFunctionWrapper func_wrapper = new GstSharp.TypeFindFunctionWrapper (func);
- bool raw_ret = gst_type_find_register (plugin == null ? IntPtr.Zero : plugin.Handle, native_name, rank, func_wrapper.NativeDelegate, GLib.Marshaller.StringToPtrGStrdup (extensions), possible_caps == null ? IntPtr.Zero : possible_caps.Handle, IntPtr.Zero, IntPtr.Zero);
+ bool raw_ret = gst_type_find_register (plugin == null ? IntPtr.Zero : plugin.Handle, native_name, rank, func_wrapper.NativeDelegate, native_extensions, possible_caps == null ? IntPtr.Zero : possible_caps.Handle, IntPtr.Zero, IntPtr.Zero);
bool ret = raw_ret;
GLib.Marshaller.Free (native_name);
+ GLib.Marshaller.Free (native_extensions);
return ret;
}