public PtpStatisticsCallbackWrapper(Gst.Net.PtpStatisticsCallback managed) { this.managed = managed; if (managed != null) { NativeDelegate = new PtpStatisticsCallbackNative(NativeCallback); } }
public static ulong PtpStatisticsCallbackAdd(Gst.Net.PtpStatisticsCallback cb) { Gst.NetSharp.PtpStatisticsCallbackWrapper cb_wrapper = new Gst.NetSharp.PtpStatisticsCallbackWrapper(cb); IntPtr user_data; GLib.DestroyNotify destroy_data; if (cb == null) { user_data = IntPtr.Zero; destroy_data = null; } else { user_data = (IntPtr)GCHandle.Alloc(cb_wrapper); destroy_data = GLib.DestroyHelper.NotifyHandler; } UIntPtr raw_ret = gst_ptp_statistics_callback_add(cb_wrapper.NativeDelegate, user_data, destroy_data); ulong ret = (ulong)raw_ret; return(ret); }