[vala] gstreamer-0.10: Fix Gst.Structure bindings



commit d1acb3ef5a425d6357b175e091b0cd8ffb932b01
Author: Sebastian Dröge <sebastian droege collabora co uk>
Date:   Thu Jun 24 18:31:47 2010 +0200

    gstreamer-0.10: Fix Gst.Structure bindings

 vapi/gstreamer-0.10.vapi                           |   25 ++++++++-----------
 .../gstreamer-0.10/gstreamer-0.10-custom.vala      |    3 ++
 .../gstreamer-0.10/gstreamer-0.10.metadata         |   11 ++++++++
 3 files changed, 25 insertions(+), 14 deletions(-)
---
diff --git a/vapi/gstreamer-0.10.vapi b/vapi/gstreamer-0.10.vapi
index 3e05286..090e457 100644
--- a/vapi/gstreamer-0.10.vapi
+++ b/vapi/gstreamer-0.10.vapi
@@ -1138,10 +1138,6 @@ namespace Gst {
 	[Immutable]
 	[CCode (copy_function = "gst_structure_copy", type_id = "GST_TYPE_STRUCTURE", cheader_filename = "gst/gst.h")]
 	public class Structure {
-		public weak GLib.Array fields;
-		public GLib.Quark name;
-		public int parent_refcount;
-		public GLib.Type type;
 		[CCode (has_construct_function = false)]
 		public Structure (string name, string firstfield, ...);
 		public Gst.Structure copy ();
@@ -1165,23 +1161,24 @@ namespace Gst {
 		public bool get_int (string fieldname, out int value);
 		public unowned string get_name ();
 		public GLib.Quark get_name_id ();
-		public unowned string get_string (string fieldname);
+		public unowned string? get_string (string fieldname);
 		public bool get_uint (string fieldname, out uint value);
-		public bool get_valist (string first_fieldname, void* args);
+		public bool get_valist (string first_fieldname, va_list args);
 		public unowned Gst.Value? get_value (string fieldname);
 		public bool has_field (string fieldname);
 		public bool has_field_typed (string fieldname, GLib.Type type);
 		public bool has_name (string name);
+		[CCode (cname = "gst_structure_id_new", has_construct_function = false)]
+		public Structure.id (GLib.Quark quark, GLib.Quark field_quark, ...);
 		[CCode (cname = "gst_structure_id_empty_new", has_construct_function = false)]
 		public Structure.id_empty (GLib.Quark quark);
 		public bool id_get (...);
-		public bool id_get_valist (GLib.Quark first_field_id, void* args);
+		public bool id_get_valist (GLib.Quark first_field_id, va_list args);
 		public unowned Gst.Value? id_get_value (GLib.Quark field);
 		public bool id_has_field (GLib.Quark field);
 		public bool id_has_field_typed (GLib.Quark field, GLib.Type type);
-		public static unowned Gst.Structure id_new (GLib.Quark name_quark, GLib.Quark field_quark);
 		public void id_set (GLib.Quark fieldname, ...);
-		public void id_set_valist (GLib.Quark fieldname, void* varargs);
+		public void id_set_valist (GLib.Quark fieldname, va_list varargs);
 		public void id_set_value (GLib.Quark field, Gst.Value value);
 		public bool map_in_place (Gst.StructureMapFunc func);
 		public int n_fields ();
@@ -1189,15 +1186,15 @@ namespace Gst {
 		public void remove_all_fields ();
 		public void remove_field (string fieldname);
 		public void remove_fields (string fieldname, ...);
-		public void remove_fields_valist (string fieldname, void* varargs);
+		public void remove_fields_valist (string fieldname, va_list varargs);
 		public void @set (string fieldname, ...);
 		public void set_name (string name);
-		public void set_parent_refcount (int refcount);
-		public void set_valist (string fieldname, void* varargs);
+		public void set_parent_refcount (ref int refcount);
+		public void set_valist (string fieldname, va_list varargs);
 		public void set_value (string fieldname, Gst.Value value);
 		public string to_string ();
 		[CCode (has_construct_function = false)]
-		public Structure.valist (string name, string firstfield, void* varargs);
+		public Structure.valist (string name, string firstfield, va_list varargs);
 	}
 	[CCode (cheader_filename = "gst/gst.h")]
 	public class SystemClock : Gst.Clock {
@@ -2317,7 +2314,7 @@ namespace Gst {
 	[CCode (cheader_filename = "gst/gst.h")]
 	public delegate bool StructureForeachFunc (GLib.Quark field_id, Gst.Value value);
 	[CCode (cheader_filename = "gst/gst.h")]
-	public delegate bool StructureMapFunc (GLib.Quark field_id, Gst.Value value);
+	public delegate bool StructureMapFunc (GLib.Quark field_id, ref Gst.Value value);
 	[CCode (cheader_filename = "gst/gst.h")]
 	public delegate void TagForeachFunc (Gst.TagList list, string tag);
 	[CCode (cheader_filename = "gst/gst.h", has_target = 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 238c5ba..a3f4c44 100644
--- a/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala
+++ b/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala
@@ -351,6 +351,9 @@ namespace Gst {
 		public Structure.empty (string name);
 		[CCode (cname = "gst_structure_id_empty_new", has_construct_function = false)]
 		public Structure.id_empty (GLib.Quark quark);
+
+		[CCode (cname = "gst_structure_id_new", has_construct_function = false)]
+		public Structure.id (GLib.Quark quark, GLib.Quark field_quark, ...);
 	}
 
 	public enum State {
diff --git a/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata b/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata
index c6ced5a..301b115 100644
--- a/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata
+++ b/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata
@@ -512,11 +512,15 @@ gst_static_caps_get transfer_ownership="1"
 GstStaticPadTemplate is_value_type="1"
 gst_static_pad_template_get transfer_ownership="1"
 gst_static_pad_template_get_caps transfer_ownership="1"
+GstStructureMapFunc.value is_ref="1"
 GstStructure is_immutable="1"
+GstStructure.* hidden="1"
 gst_structure_copy transfer_ownership="1"
 gst_structure_new ellipsis="1"
+gst_structure_new_valist.varargs type_name="va_list"
 gst_structure_empty_new hidden="1"
 gst_structure_id_empty_new hidden="1"
+gst_structure_id_new hidden="1"
 gst_structure_from_string nullable="1" transfer_ownership="1"
 gst_structure_from_string.end is_out="1"
 gst_structure_set ellipsis="1"
@@ -532,8 +536,15 @@ gst_structure_get_fraction.value_numerator is_out="1"
 gst_structure_get_fraction.value_denominator is_out="1"
 gst_structure_get_enum.value is_out="1"
 gst_structure_get_value nullable="1" type_name="Value"
+gst_structure_get_string nullable="1"
 gst_structure_id_get_value nullable="1"
 gst_structure_to_string transfer_ownership="1"
+gst_structure_get_valist.args type_name="va_list"
+gst_structure_set_valist.varargs type_name="va_list"
+gst_structure_id_get_valist.args type_name="va_list"
+gst_structure_id_set_valist.varargs type_name="va_list"
+gst_structure_remove_fields_valist.varargs type_name="va_list"
+gst_structure_set_parent_refcount.refcount is_ref="1"
 gst_tag_list_get_value_index nullable="1"
 gst_tag_list_copy transfer_ownership="1"
 gst_tag_list_copy_value.dest is_out="1"



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]