public Promise(Gst.PromiseChangeFunc func) { GstSharp.PromiseChangeFuncWrapper func_wrapper = new GstSharp.PromiseChangeFuncWrapper(func); IntPtr user_data; GLib.DestroyNotify notify; if (func == null) { user_data = IntPtr.Zero; notify = null; } else { user_data = (IntPtr)GCHandle.Alloc(func_wrapper); notify = GLib.DestroyHelper.NotifyHandler; } Raw = gst_promise_new_with_change_func(func_wrapper.NativeDelegate, user_data, notify); }
public Promise(Gst.PromiseChangeFunc func, IntPtr user_data, GLib.DestroyNotify notify) { GstSharp.PromiseChangeFuncWrapper func_wrapper = new GstSharp.PromiseChangeFuncWrapper(func); Raw = gst_promise_new_with_change_func(func_wrapper.NativeDelegate, user_data, notify); }