mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 03:45:39 +00:00
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
This commit is contained in:
parent
38a0731461
commit
a7ac9ee4fb
3 changed files with 15 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -9060,7 +9060,7 @@
|
|||
<constructor cname="gst_promise_new" disable_void_ctor="" version="1.14" />
|
||||
<constructor cname="gst_promise_new_with_change_func" version="1.14">
|
||||
<parameters>
|
||||
<parameter name="func" type="GstPromiseChangeFunc" />
|
||||
<parameter name="func" type="GstPromiseChangeFunc" scope="notified" closure="1" destroy="2" />
|
||||
<parameter name="user_data" type="gpointer" />
|
||||
<parameter name="notify" type="GDestroyNotify" />
|
||||
</parameters>
|
||||
|
|
|
@ -39,6 +39,10 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|||
|
||||
<!-- GstPromise fixes -->
|
||||
<attr path="/api/namespace/boxed[@cname='GstPromise']/method[@cname='gst_promise_get_reply']" name="name">RetrieveReply</attr>
|
||||
<attr path="/api/namespace/boxed[@cname='GstPromise']/constructor[@cname='gst_promise_new_with_change_func']/*/*[@name='func']" name="scope">notified</attr>
|
||||
<attr path="/api/namespace/boxed[@cname='GstPromise']/constructor[@cname='gst_promise_new_with_change_func']/*/*[@name='func']" name="closure">1</attr>
|
||||
<attr path="/api/namespace/boxed[@cname='GstPromise']/constructor[@cname='gst_promise_new_with_change_func']/*/*[@name='func']" name="destroy">2</attr>
|
||||
|
||||
|
||||
<!-- GstRTSPMessage fixes -->
|
||||
<attr path="/api/namespace/boxed[@cname='GstRTSPMessage']/method[@cname='gst_rtsp_message_get_body']" name="hidden">true</attr>
|
||||
|
|
Loading…
Reference in a new issue