mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-21 15:56:42 +00:00
Fix MiniObject bindings
This commit is contained in:
parent
652b922790
commit
4a716f3ba2
2 changed files with 25 additions and 2 deletions
|
@ -167,7 +167,16 @@
|
|||
<attr path="/api/namespace/boxed[@name='MiniObject']" name="opaque">true</attr>
|
||||
<attr path="/api/namespace/boxed[@name='MiniObject']" name="abstract">1</attr>
|
||||
<remove-attr path="/api/namespace/boxed[@name='MiniObject']" name="parent" />
|
||||
<remove-node path="/api/namespace/boxed[@name='MiniObject']/constructor[@cname='gst_mini_object_new']" />
|
||||
<attr path="/api/namespace/boxed[@name='MiniObject']/field[@name='Refcount']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/boxed[@name='MiniObject']/field[@name='Flags']" name="writeable">true</attr>
|
||||
<attr path="/api/namespace/boxed[@name='MiniObject']/field[@name='Flags']" name="type">GstMiniObjectFlags</attr>
|
||||
<attr path="/api/namespace/boxed[@name='MiniObject']/method[@cname='gst_mini_object_copy']" name="owned">true</attr>
|
||||
<attr path="/api/namespace/boxed[@name='MiniObject']/method[@cname='gst_mini_object_make_writable']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/boxed[@name='MiniObject']/method[@cname='gst_mini_object_replace']" name="hidden">1</attr>
|
||||
|
||||
<attr path="/api/namespace/callback[@name='MiniObjectCopyFunction']" name="hidden">1</attr>
|
||||
|
||||
<attr path="/api/namespace/callback[@name='MiniObjectFinalizeFunction']" name="hidden">1</attr>
|
||||
|
||||
<attr path="/api/namespace/object[@name='Object']/field[@name='Refcount']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@name='Object']/method[@name='DefaultError']" name="hidden">1</attr>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
protected MiniObject () : base (IntPtr.Zero)
|
||||
protected MiniObject () : base ()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -25,3 +25,17 @@ private static extern IntPtr gstsharp_g_value_type (ref GLib.Value val);
|
|||
private static extern IntPtr gst_value_get_mini_object (ref GLib.Value v);
|
||||
[DllImport ("gstreamer-0.10.dll") ]
|
||||
private static extern void gst_value_set_mini_object (ref GLib.Value v, IntPtr o);
|
||||
|
||||
/* FIXME: This is not optimal! */
|
||||
public void MakeWritable() {
|
||||
if (IsWritable)
|
||||
return;
|
||||
|
||||
IntPtr copy = gst_mini_object_copy (Raw);
|
||||
Raw = copy;
|
||||
/* ^--- Takes a second ref, not good */
|
||||
Unref (Raw);
|
||||
/* ^--- Sets Owned = false, wrong! */
|
||||
Owned = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue