mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
Implement Gst.MiniObject.Copy() manually to get the correct type from the instance
This commit is contained in:
parent
431b934fb5
commit
c1eeb9c6bd
2 changed files with 12 additions and 2 deletions
|
@ -234,10 +234,9 @@
|
|||
<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" />
|
||||
<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_copy']" name="hidden">1</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>
|
||||
|
||||
|
|
|
@ -38,3 +38,14 @@ public void MakeWritable() {
|
|||
Owned = true;
|
||||
}
|
||||
|
||||
[DllImport ("gstreamer-0.10.dll") ]
|
||||
static extern IntPtr gst_mini_object_copy (IntPtr raw);
|
||||
|
||||
public Gst.MiniObject Copy() {
|
||||
IntPtr raw_ret = gst_mini_object_copy (Handle);
|
||||
GLib.GType type = new GLib.GType (gstsharp_g_type_from_instance (raw_ret));
|
||||
|
||||
Gst.MiniObject ret = raw_ret == IntPtr.Zero ? null : (Gst.MiniObject) GLib.Opaque.GetOpaque (raw_ret, (Type) type, true);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue