mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 00:06:36 +00:00
Make sure Gst.Bus.SyncHandler handlers are not garbage collected too early
This commit is contained in:
parent
4cdbee8249
commit
aff62828ea
2 changed files with 13 additions and 0 deletions
|
@ -19,3 +19,15 @@ public bool AsyncSignalFunc (Gst.Message message) {
|
||||||
bool ret = raw_ret;
|
bool ret = raw_ret;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DllImport ("libgstreamer-0.10.dll", CallingConvention = CallingConvention.Cdecl) ]
|
||||||
|
static extern void gst_bus_set_sync_handler (IntPtr raw, GstSharp.BusSyncHandlerNative func, IntPtr data);
|
||||||
|
private GstSharp.BusSyncHandlerWrapper sync_handler = null;
|
||||||
|
|
||||||
|
public Gst.BusSyncHandler SyncHandler {
|
||||||
|
set {
|
||||||
|
GstSharp.BusSyncHandlerWrapper value_wrapper = new GstSharp.BusSyncHandlerWrapper (value);
|
||||||
|
sync_handler = value_wrapper;
|
||||||
|
gst_bus_set_sync_handler (Handle, value_wrapper.NativeDelegate, IntPtr.Zero);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -99,6 +99,7 @@
|
||||||
<attr path="/api/namespace/object[@name='Bus']/method[@cname='gst_bus_async_signal_func']" name="hidden">1</attr>
|
<attr path="/api/namespace/object[@name='Bus']/method[@cname='gst_bus_async_signal_func']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/object[@name='Bus']/method[@cname='gst_bus_add_signal_watch_full']" name="name">AddSignalWatch</attr>
|
<attr path="/api/namespace/object[@name='Bus']/method[@cname='gst_bus_add_signal_watch_full']" name="name">AddSignalWatch</attr>
|
||||||
<attr path="/api/namespace/object[@name='Bus']/method[@cname='gst_bus_poll']/return-type" name="owned">true</attr>
|
<attr path="/api/namespace/object[@name='Bus']/method[@cname='gst_bus_poll']/return-type" name="owned">true</attr>
|
||||||
|
<attr path="/api/namespace/object[@name='Bus']/method[@cname='gst_bus_set_sync_handler']" name="hidden">1</attr>
|
||||||
|
|
||||||
<attr path="/api/namespace/enum[@name='BusFlags']/member[@cname='GST_BUS_FLAG_LAST']" name="name">Last</attr>
|
<attr path="/api/namespace/enum[@name='BusFlags']/member[@cname='GST_BUS_FLAG_LAST']" name="name">Last</attr>
|
||||||
<attr path="/api/namespace/enum[@name='BusFlags']/member[@cname='GST_BUS_FLUSHING']" name="value">MiniObjectFlags.Last << 0</attr>
|
<attr path="/api/namespace/enum[@name='BusFlags']/member[@cname='GST_BUS_FLUSHING']" name="value">MiniObjectFlags.Last << 0</attr>
|
||||||
|
|
Loading…
Reference in a new issue