static void OverrideGetSinkCaps(GLib.GType gtype, GetSinkCapsNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("get_sink_caps")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private Gst.Caps InternalGetSinkCaps(Gst.Caps filter) { GetSinkCapsNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("get_sink_caps")); unmanaged = (GetSinkCapsNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetSinkCapsNativeDelegate)); } if (unmanaged == null) { return(null); } IntPtr __result = unmanaged(this.Handle, filter == null ? IntPtr.Zero : filter.Handle); return(__result == IntPtr.Zero ? null : (Gst.Caps)GLib.Opaque.GetOpaque(__result, typeof(Gst.Caps), true)); }