mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 21:48:55 +00:00
Fix marshalling of the URIHandler GetType method
This commit is contained in:
parent
5bef341b0a
commit
0196d9b622
1 changed files with 4 additions and 4 deletions
|
@ -58,18 +58,18 @@ namespace Gst {
|
||||||
}
|
}
|
||||||
|
|
||||||
[GLib.CDeclCallback]
|
[GLib.CDeclCallback]
|
||||||
delegate IntPtr[] GetProtocolsFullNativeDelegate (IntPtr gtype);
|
delegate IntPtr GetProtocolsFullNativeDelegate (IntPtr gtype);
|
||||||
|
|
||||||
static Hashtable protocols_cache = new Hashtable ();
|
static Hashtable protocols_cache = new Hashtable ();
|
||||||
|
|
||||||
static IntPtr[] GetProtocolsFull_cb (IntPtr gtype)
|
static IntPtr GetProtocolsFull_cb (IntPtr gtype)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
GLib.GType gt = new GLib.GType (gtype);
|
GLib.GType gt = new GLib.GType (gtype);
|
||||||
System.Type t = (System.Type) gt;
|
System.Type t = (System.Type) gt;
|
||||||
|
|
||||||
if (protocols_cache.Contains (gtype)) {
|
if (protocols_cache.Contains (gtype)) {
|
||||||
return (IntPtr[]) protocols_cache[gtype];
|
return (IntPtr) protocols_cache[gtype];
|
||||||
}
|
}
|
||||||
|
|
||||||
System.Reflection.PropertyInfo pi = t.GetProperty ("Protocols", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy);
|
System.Reflection.PropertyInfo pi = t.GetProperty ("Protocols", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.FlattenHierarchy);
|
||||||
|
@ -78,7 +78,7 @@ namespace Gst {
|
||||||
__result = (string[]) pi.GetValue (null, null);
|
__result = (string[]) pi.GetValue (null, null);
|
||||||
else
|
else
|
||||||
__result = new string[] {};
|
__result = new string[] {};
|
||||||
IntPtr[] ret = GLib.Marshaller.StringArrayToNullTermPointer (__result);
|
IntPtr ret = Gst.Marshaller.StringArrayToNullTermPointer (__result);
|
||||||
protocols_cache.Add (gtype, ret);
|
protocols_cache.Add (gtype, ret);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue