diff options
Diffstat (limited to 'sources/generated/Gst/Global.cs')
-rw-r--r-- | sources/generated/Gst/Global.cs | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/sources/generated/Gst/Global.cs b/sources/generated/Gst/Global.cs index f7b9b11..4fe3c26 100644 --- a/sources/generated/Gst/Global.cs +++ b/sources/generated/Gst/Global.cs @@ -202,15 +202,22 @@ namespace Gst { } [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gst_meta_api_type_register(IntPtr api, IntPtr tags); + static extern IntPtr gst_meta_api_type_register(IntPtr api, IntPtr[] tags); - public static GLib.GType MetaApiTypeRegister(string api, string tags) { + public static GLib.GType MetaApiTypeRegister(string api, string[] tags) { IntPtr native_api = GLib.Marshaller.StringToPtrGStrdup (api); - IntPtr native_tags = GLib.Marshaller.StringToPtrGStrdup (tags); + int cnt_tags = tags == null ? 0 : tags.Length; + IntPtr[] native_tags = new IntPtr [cnt_tags + 1]; + for (int i = 0; i < cnt_tags; i++) + native_tags [i] = GLib.Marshaller.StringToPtrGStrdup (tags[i]); + native_tags [cnt_tags] = IntPtr.Zero; IntPtr raw_ret = gst_meta_api_type_register(native_api, native_tags); GLib.GType ret = new GLib.GType(raw_ret); GLib.Marshaller.Free (native_api); - GLib.Marshaller.Free (native_tags); + for (int i = 0; i < native_tags.Length - 1; i++) { + tags [i] = GLib.Marshaller.Utf8PtrToString (native_tags[i]); + GLib.Marshaller.Free (native_tags[i]); + } return ret; } @@ -290,13 +297,20 @@ namespace Gst { } [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gst_protection_filter_systems_by_available_decryptors(IntPtr system_identifiers); + static extern IntPtr gst_protection_filter_systems_by_available_decryptors(IntPtr[] system_identifiers); - public static string[] ProtectionFilterSystemsByAvailableDecryptors(string system_identifiers) { - IntPtr native_system_identifiers = GLib.Marshaller.StringToPtrGStrdup (system_identifiers); + public static string[] ProtectionFilterSystemsByAvailableDecryptors(string[] system_identifiers) { + int cnt_system_identifiers = system_identifiers == null ? 0 : system_identifiers.Length; + IntPtr[] native_system_identifiers = new IntPtr [cnt_system_identifiers + 1]; + for (int i = 0; i < cnt_system_identifiers; i++) + native_system_identifiers [i] = GLib.Marshaller.StringToPtrGStrdup (system_identifiers[i]); + native_system_identifiers [cnt_system_identifiers] = IntPtr.Zero; IntPtr raw_ret = gst_protection_filter_systems_by_available_decryptors(native_system_identifiers); string[] ret = GLib.Marshaller.NullTermPtrToStringArray (raw_ret, true); - GLib.Marshaller.Free (native_system_identifiers); + for (int i = 0; i < native_system_identifiers.Length - 1; i++) { + system_identifiers [i] = GLib.Marshaller.Utf8PtrToString (native_system_identifiers[i]); + GLib.Marshaller.Free (native_system_identifiers[i]); + } return ret; } |