static void OverrideTransformFrameIp(GLib.GType gtype, TransformFrameIpNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("transform_frame_ip")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private Gst.FlowReturn InternalTransformFrameIp(Gst.Video.VideoFrame frame) { TransformFrameIpNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("transform_frame_ip")); unmanaged = (TransformFrameIpNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformFrameIpNativeDelegate)); } if (unmanaged == null) { return((Gst.FlowReturn) 0); } IntPtr native_frame = GLib.Marshaller.StructureToPtrAlloc(frame); int __result = unmanaged(this.Handle, native_frame); Marshal.FreeHGlobal(native_frame); return((Gst.FlowReturn)__result); }