[vala] gstreamer: Fix and cleanup Gst.Buffer bindings



commit 4b7c0d497e2709ae7b3dcd36dd9f3697cb31826d
Author: Sebastian Dröge <sebastian droege collabora co uk>
Date:   Sat Mar 27 09:16:21 2010 +0100

    gstreamer: Fix and cleanup Gst.Buffer bindings

 vapi/gstreamer-0.10.vapi                           |   19 +++++++++++--------
 .../gstreamer-0.10/gstreamer-0.10-custom.vala      |    8 ++++++--
 .../gstreamer-0.10/gstreamer-0.10.metadata         |    7 ++++++-
 3 files changed, 23 insertions(+), 11 deletions(-)
---
diff --git a/vapi/gstreamer-0.10.vapi b/vapi/gstreamer-0.10.vapi
index 140b07e..a1773f4 100644
--- a/vapi/gstreamer-0.10.vapi
+++ b/vapi/gstreamer-0.10.vapi
@@ -68,7 +68,7 @@ namespace Gst {
 		public weak uint8[] data;
 		public Gst.ClockTime duration;
 		public weak GLib.FreeFunc free_func;
-		public uchar malloc_data;
+		public void* malloc_data;
 		public uint64 offset;
 		public uint64 offset_end;
 		public weak Gst.Buffer parent;
@@ -80,25 +80,28 @@ namespace Gst {
 		public Buffer.and_alloc (uint size);
 		public void copy_metadata (Gst.Buffer src, Gst.BufferCopyFlags flags);
 		public Gst.Buffer create_sub (uint offset, uint size);
+		[CCode (cname = "GST_BUFFER_DURATION_IS_VALID")]
+		public bool duration_is_valid ();
 		[CCode (cname = "GST_BUFFER_FLAG_SET")]
 		public void flag_set (Gst.BufferFlag flag);
 		[CCode (cname = "GST_BUFFER_FLAG_UNSET")]
 		public void flag_unset (Gst.BufferFlag flag);
-		public unowned Gst.Caps get_caps ();
+		public Gst.Caps get_caps ();
 		public bool is_metadata_writable ();
 		public bool is_span_fast (Gst.Buffer buf2);
-		public unowned Gst.Buffer join (Gst.Buffer buf2);
+		[ReturnsModifiedPointer]
+		public void join (owned Gst.Buffer buf2);
 		[ReturnsModifiedPointer]
 		public void make_metadata_writable ();
 		[ReturnsModifiedPointer]
 		public void make_writable ();
-		public unowned Gst.Buffer merge (Gst.Buffer buf2);
-		public unowned Gst.Buffer @ref ();
+		public Gst.Buffer merge (Gst.Buffer buf2);
 		public void set_caps (Gst.Caps caps);
-		public unowned Gst.Buffer span (uint32 offset, Gst.Buffer buf2, uint32 len);
+		public Gst.Buffer span (uint32 offset, Gst.Buffer buf2, uint32 len);
 		public void stamp (Gst.Buffer src);
-		public static Gst.Buffer try_new_and_alloc (uint size);
-		public void unref ();
+		[CCode (cname = "GST_BUFFER_TIMESTAMP_IS_VALID")]
+		public bool timestamp_is_valid ();
+		public static Gst.Buffer? try_new_and_alloc (uint size);
 	}
 	[Compact]
 	[CCode (cheader_filename = "gst/gst.h")]
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 c9259e7..38a32c4 100644
--- a/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala
+++ b/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala
@@ -52,8 +52,6 @@ namespace Gst {
 	public class Buffer : Gst.MiniObject {
 		[CCode (has_construct_function = false)]
 		public Buffer ();
-		public unowned Buffer @ref ();
-		public void unref ();
 		[CCode (cname = "GST_BUFFER_FLAG_SET")]
 		public void flag_set (BufferFlag flag);
 		[CCode (cname = "GST_BUFFER_FLAG_UNSET")]
@@ -62,6 +60,12 @@ namespace Gst {
 		public void make_metadata_writable ();
 		[ReturnsModifiedPointer]
 		public void make_writable ();
+		[CCode (cname = "GST_BUFFER_TIMESTAMP_IS_VALID")]
+		public bool timestamp_is_valid ();
+		[CCode (cname = "GST_BUFFER_DURATION_IS_VALID")]
+		public bool duration_is_valid ();
+		[ReturnsModifiedPointer]
+		public void join (owned Buffer buf2);
 	}
 
 	public class Bus {
diff --git a/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata b/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata
index 406f119..2110e54 100644
--- a/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata
+++ b/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata
@@ -25,12 +25,17 @@ gst_bin_find_unconnected_pad transfer_ownership="1"
 GstBuffer base_class="GstMiniObject"
 GstBuffer.data is_array="1" array_length_cname="size" array_length_type="guint" type_name="uint8"
 GstBuffer.mini_object hidden="1"
+GstBuffer.malloc_data type_name="pointer"
 GstBufferClass hidden="1"
 gst_buffer_new hidden="1"
 gst_buffer_create_sub transfer_ownership="1"
+gst_buffer_get_caps transfer_ownership="1"
 gst_buffer_make_writable hidden="1"
 gst_buffer_make_metadata_writable hidden="1"
-gst_buffer_try_new_and_alloc transfer_ownership="1"
+gst_buffer_try_new_and_alloc transfer_ownership="1" nullable="1"
+gst_buffer_join hidden="1"
+gst_buffer_merge transfer_ownership="1"
+gst_buffer_span transfer_ownership="1"
 gst_bus_add_watch hidden="1"
 gst_bus_add_watch_full.func value_owned="1"
 gst_bus_add_watch_full.notify hidden="1"



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