]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gstreamer-1.0: Fix Gst.Base.Adapter.map/take bindings
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 8 Mar 2017 08:50:02 +0000 (09:50 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 8 Mar 2017 08:50:02 +0000 (09:50 +0100)
There is no explicit array-length returned while it is implicitly related
to the in-parameter those methods are taking.

https://bugzilla.gnome.org/show_bug.cgi?id=705987

vapi/gstreamer-base-1.0.vapi
vapi/metadata/GstBase-1.0-custom.vala
vapi/metadata/GstBase-1.0.metadata

index fdd3ec7b1490302c2b5a0d19522cedf340fcf18a..b2b88b9ad6ab37635a8d25bbee6f6729f34fb843 100644 (file)
@@ -26,8 +26,8 @@ namespace Gst {
                        public Gst.BufferList? get_buffer_list (size_t nbytes);
                        [Version (since = "1.6")]
                        public GLib.List<Gst.Buffer>? get_list (size_t nbytes);
-                       [CCode (array_length_pos = 0.1, array_length_type = "gsize")]
-                       public unowned uint8[]? map ();
+                       [CCode (array_length = false)]
+                       public unowned uint8[]? map (size_t size);
                        public ssize_t masked_scan_uint32 (uint32 mask, uint32 pattern, size_t offset, size_t size);
                        public ssize_t masked_scan_uint32_peek (uint32 mask, uint32 pattern, size_t offset, size_t size, out uint32 value);
                        [Version (since = "1.10")]
@@ -43,8 +43,8 @@ namespace Gst {
                        [Version (since = "1.10")]
                        public Gst.ClockTime pts_at_discont ();
                        public void push (owned Gst.Buffer buf);
-                       [CCode (array_length_pos = 0.1, array_length_type = "gsize")]
-                       public uint8[]? take ();
+                       [CCode (array_length = false)]
+                       public uint8[]? take (size_t nbytes);
                        public Gst.Buffer? take_buffer (size_t nbytes);
                        [Version (since = "1.2")]
                        public Gst.Buffer? take_buffer_fast (size_t nbytes);
index 773ab1b678c30299155c5f1da638ee015c95266c..b198a6f26be8ce431be7281ece5d28ae17b3ec17 100644 (file)
@@ -1,5 +1,11 @@
 namespace Gst {
        namespace Base {
+               public class Adapter : GLib.Object {
+                       [CCode (array_length = false)]
+                       public unowned uint8[]? map (size_t size);
+                       [CCode (array_length = false)]
+                       public uint8[]? take (size_t nbytes);
+               }
                [CCode (cheader_filename = "gst/base/gstadapter.h,gst/base/gstbaseparse.h,gst/base/gstbasesink.h,gst/base/gstbasesrc.h,gst/base/gstbasetransform.h,gst/base/gstbitreader.h,gst/base/gstbytereader.h,gst/base/gstbytewriter.h,gst/base/gstcollectpads.h,gst/base/gstpushsrc.h,gst/base/gsttypefindhelper.h", cname = "GstBitReader")]
                [Compact]
                public class BitReader {
@@ -18,4 +24,4 @@ public ByteWriter.with_size (uint size, bool fixed);
 public ByteWriter.with_data ([CCode (array_length_type = "guint")] uint8[] data, uint size, bool initialized);
                }
        }
-}
\ No newline at end of file
+}
index a87606838b6890a0902ad76d817dc52d6fb06d9a..6514339b6417b02184a764df3f1a12bda4be0879 100644 (file)
@@ -14,6 +14,10 @@ ByteWriter struct=false
 BitReader struct=false
 ByteReader struct=false
 
+Adapter
+  .map skip
+  .take skip
+
 // Backwards compatibility
 Adapter
   .copy skip=false