static void OverrideFindBestFormat (GLib.GType gtype, FindBestFormatNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("find_best_format")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } }
private void InternalFindBestFormat (Gst.Caps downstream_caps, Gst.Video.VideoInfo best_info, bool at_least_one_alpha) { FindBestFormatNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("find_best_format")); unmanaged = (FindBestFormatNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FindBestFormatNativeDelegate)); } if (unmanaged == null) return; unmanaged (this.Handle, downstream_caps == null ? IntPtr.Zero : downstream_caps.Handle, best_info == null ? IntPtr.Zero : best_info.Handle, at_least_one_alpha); }