From: Sebastian Dröge Date: Sat, 27 Mar 2010 12:57:35 +0000 (+0100) Subject: gstreamer: Properly inherit Event/Query/Message from MiniObject X-Git-Tag: 0.9.1~186 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3fda40e37cace7ae9605225fa027971104a78864;p=thirdparty%2Fvala.git gstreamer: Properly inherit Event/Query/Message from MiniObject ...and add ref/unref functions for them to prevent compiler warnings. --- diff --git a/vapi/gstreamer-0.10.vapi b/vapi/gstreamer-0.10.vapi index 58d88d52f..12fc259fc 100644 --- a/vapi/gstreamer-0.10.vapi +++ b/vapi/gstreamer-0.10.vapi @@ -103,13 +103,15 @@ namespace Gst { public bool timestamp_is_valid (); public static Gst.Buffer? try_new_and_alloc (uint size); } - [CCode (cheader_filename = "gst/gst.h")] + [CCode (ref_function = "gst_buffer_list_ref", unref_function = "gst_buffer_list_unref", cheader_filename = "gst/gst.h")] public class BufferList : Gst.MiniObject { [CCode (has_construct_function = false)] public BufferList (); public void @foreach (Gst.BufferListFunc func); public unowned Gst.Buffer? @get (uint group, uint idx); public Gst.BufferListIterator iterate (); + [ReturnsModifiedPointer] + public void make_writable (); public uint n_groups (); } [Compact] @@ -450,7 +452,7 @@ namespace Gst { public static Gst.Element? make (string factoryname, string? name); } [CCode (ref_function = "gst_event_ref", unref_function = "gst_event_unref", cheader_filename = "gst/gst.h")] - public class Event { + public class Event : Gst.MiniObject { public void* abidata; public weak Gst.Object src; public weak Gst.Structure structure; @@ -615,7 +617,7 @@ namespace Gst { public Iterator.single (GLib.Type type, void* object, Gst.CopyFunction copy, GLib.FreeFunc free); } [CCode (ref_function = "gst_message_ref", unref_function = "gst_message_unref", cheader_filename = "gst/gst.h")] - public class Message { + public class Message : Gst.MiniObject { public void* abidata; public weak GLib.Cond cond; public weak GLib.Mutex @lock; @@ -1032,7 +1034,7 @@ namespace Gst { public class ProxyPad : Gst.Pad { } [CCode (ref_function = "gst_query_ref", unref_function = "gst_query_unref", cheader_filename = "gst/gst.h")] - public class Query { + public class Query : Gst.MiniObject { public weak Gst.Structure structure; public Gst.QueryType type; [CCode (has_construct_function = false)] diff --git a/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala b/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala index 46bd7944a..f798df81c 100644 --- a/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala +++ b/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala @@ -33,7 +33,7 @@ namespace Gst { } [CCode (ref_function = "gst_event_ref", unref_function = "gst_event_unref")] - public class Event { + public class Event : MiniObject { } [CCode (ref_function = "gst_object_ref", unref_function = "gst_object_unref")] @@ -69,6 +69,12 @@ namespace Gst { public void join (owned Buffer buf2); } + [CCode (ref_function = "gst_buffer_list_ref", unref_function = "gst_buffer_list_unref")] + public class BufferList : Gst.MiniObject { + [ReturnsModifiedPointer] + public void make_writable (); + } + public class Bus { [CCode (cname = "gst_bus_add_watch_full")] public uint add_watch (owned Gst.BusFunc func, [CCode (pos = 0.1)] int priority = GLib.Priority.DEFAULT); @@ -124,16 +130,18 @@ namespace Gst { [ReturnsModifiedPointer] public void make_writable (); - public virtual MiniObject copy (); - public virtual void finalize (); + public virtual MiniObject copy (); + public virtual void finalize (); } - public class Message { + [CCode (ref_function = "gst_message_ref", unref_function = "gst_message_unref")] + public class Message : MiniObject { [ReturnsModifiedPointer] public void make_writable (); } - public class Query { + [CCode (ref_function = "gst_query_ref", unref_function = "gst_query_unref")] + public class Query : MiniObject { [ReturnsModifiedPointer] public void make_writable (); }