From: Thibault Saunier Date: Sun, 9 Jun 2019 16:16:28 +0000 (-0400) Subject: Fix gst_promise_new_with_change_func X-Git-Tag: 1.19.3~483^2~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a7ac9ee4fbbc59666b56361a2f5039339a639d5d;p=platform%2Fupstream%2Fgstreamer.git Fix gst_promise_new_with_change_func For some reason bindinator doesn't properly detect that the `func` passed in gst_promise_new_with_change_func is a closure and what the destroy function is (because it is a constructor?) Mark it manually. From suggestion from Alex Dircksen: https://gitlab.freedesktop.org/gstreamer/gstreamer-sharp/issues/9#note_166633 Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer-sharp/issues/9 --- diff --git a/sources/generated/Gst/Promise.cs b/sources/generated/Gst/Promise.cs index c41e7f8..857402a 100644 --- a/sources/generated/Gst/Promise.cs +++ b/sources/generated/Gst/Promise.cs @@ -75,9 +75,18 @@ namespace Gst { [DllImport("gstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_promise_new_with_change_func(GstSharp.PromiseChangeFuncNative func, IntPtr user_data, GLib.DestroyNotify notify); - public Promise (Gst.PromiseChangeFunc func, IntPtr user_data, GLib.DestroyNotify notify) + 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); } diff --git a/sources/generated/gstreamer-sharp-api.xml b/sources/generated/gstreamer-sharp-api.xml index 259e4ac..6195792 100644 --- a/sources/generated/gstreamer-sharp-api.xml +++ b/sources/generated/gstreamer-sharp-api.xml @@ -9060,7 +9060,7 @@ - + diff --git a/sources/gstreamer-sharp.metadata b/sources/gstreamer-sharp.metadata index e25957a..fa74b36 100644 --- a/sources/gstreamer-sharp.metadata +++ b/sources/gstreamer-sharp.metadata @@ -39,6 +39,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA RetrieveReply + notified + 1 + 2 + true