static void OverridePushBufferEvent(GLib.GType gtype, PushBufferEventNativeDelegate callback) { unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("push_buffer")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback); } }
private Gst.FlowReturn InternalPushBufferEvent(Gst.Buffer buffer) { PushBufferEventNativeDelegate unmanaged = null; unsafe { IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("push_buffer")); unmanaged = (PushBufferEventNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PushBufferEventNativeDelegate)); } if (unmanaged == null) { return((Gst.FlowReturn) 0); } int __result = unmanaged(this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); return((Gst.FlowReturn)__result); }