From c2e40b2077d6c4ea8391da7e178426c83a341deb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 7 Apr 2010 08:07:20 +0200 Subject: [PATCH] gstreamer: First go at fixing Gst.Iterator bindings This has to be converted to simple generics later once generic delegates are supported. See bug #615040. --- vapi/gstreamer-0.10.vapi | 13 ++++++------- .../packages/gstreamer-0.10/gstreamer-0.10.metadata | 8 ++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/vapi/gstreamer-0.10.vapi b/vapi/gstreamer-0.10.vapi index 45748cc0e..ba8287b24 100644 --- a/vapi/gstreamer-0.10.vapi +++ b/vapi/gstreamer-0.10.vapi @@ -607,17 +607,16 @@ namespace Gst { public class Iterator { public uint32 cookie; public weak GLib.Mutex @lock; - public uint32 master_cookie; + public void* master_cookie; public weak Gst.Iterator pushed; public GLib.Type type; [CCode (has_construct_function = false)] - public Iterator (uint size, GLib.Type type, GLib.Mutex @lock, uint32 master_cookie, Gst.IteratorNextFunction next, Gst.IteratorItemFunction item, Gst.IteratorResyncFunction resync, Gst.IteratorFreeFunction free); - public unowned Gst.Iterator filter (GLib.CompareFunc func); - public void* find_custom (GLib.CompareFunc func, void* user_data); + public Iterator (uint size, GLib.Type type, GLib.Mutex @lock, ref uint32 master_cookie, Gst.IteratorNextFunction next, Gst.IteratorItemFunction item, Gst.IteratorResyncFunction resync, Gst.IteratorFreeFunction free); + public void* find_custom (GLib.CompareFunc func); public Gst.IteratorResult fold ([CCode (delegate_target_pos = 2.1)] Gst.IteratorFoldFunction func, Gst.Value? ret); public Gst.IteratorResult @foreach (GLib.Func func); [CCode (has_construct_function = false)] - public Iterator.list (GLib.Type type, GLib.Mutex @lock, uint32 master_cookie, GLib.List list, void* owner, Gst.IteratorItemFunction item, Gst.IteratorDisposeFunction free); + public Iterator.list (GLib.Type type, GLib.Mutex @lock, ref uint32 master_cookie, GLib.List list, void* owner, Gst.IteratorItemFunction item, Gst.IteratorDisposeFunction free); public Gst.IteratorResult next (out void* elem); public void push (Gst.Iterator other); public void resync (); @@ -2238,13 +2237,13 @@ namespace Gst { [CCode (cheader_filename = "gst/gst.h", has_target = false)] public delegate void IteratorDisposeFunction (void* owner); [CCode (cheader_filename = "gst/gst.h")] - public delegate bool IteratorFoldFunction (void* item, Gst.Value ret); + public delegate bool IteratorFoldFunction (void* item, ref Gst.Value ret); [CCode (cheader_filename = "gst/gst.h", has_target = false)] public delegate void IteratorFreeFunction (Gst.Iterator it); [CCode (cheader_filename = "gst/gst.h", has_target = false)] public delegate Gst.IteratorItem IteratorItemFunction (Gst.Iterator it, void* item); [CCode (cheader_filename = "gst/gst.h", has_target = false)] - public delegate Gst.IteratorResult IteratorNextFunction (Gst.Iterator it, void* result); + public delegate Gst.IteratorResult IteratorNextFunction (Gst.Iterator it, out void* result); [CCode (cheader_filename = "gst/gst.h", has_target = false)] public delegate void IteratorResyncFunction (Gst.Iterator it); [CCode (cheader_filename = "gst/gst.h")] diff --git a/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata b/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata index 69f3f4410..b23960208 100644 --- a/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata +++ b/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata @@ -228,10 +228,18 @@ GstIterator.free hidden="1" GstIterator.next hidden="1" GstIterator.resync hidden="1" GstIterator.item hidden="1" +GstIterator.pushed nullable="1" +GstIterator.master_cookie type_name="pointer" gst_iterator_next.elem is_out="1" gst_iterator_fold.func delegate_target_pos="2.1" gst_iterator_fold.ret nullable="1" gst_iterator_find_custom.user_data hidden="0" +gst_iterator_new.master_cookie is_ref="1" +gst_iterator_new_list.master_cookie is_ref="1" +gst_iterator_find_custom.user_data hidden="1" +gst_iterator_filter hidden="1" +GstIteratorNextFunction.result is_out="1" +GstIteratorFoldFunction.ret is_ref="1" GstMessage base_class="GstMiniObject" GstMessage.mini_object hidden="1" GstMessageClass hidden="1" -- 2.47.3