From: Rico Tzschichholz Date: Wed, 8 Mar 2017 08:50:02 +0000 (+0100) Subject: gstreamer-1.0: Fix Gst.Base.Adapter.map/take bindings X-Git-Tag: 0.35.90~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b3e02e1ecd76cf0443287ac6ef99d18be188e840;p=thirdparty%2Fvala.git gstreamer-1.0: Fix Gst.Base.Adapter.map/take bindings 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 --- diff --git a/vapi/gstreamer-base-1.0.vapi b/vapi/gstreamer-base-1.0.vapi index fdd3ec7b1..b2b88b9ad 100644 --- a/vapi/gstreamer-base-1.0.vapi +++ b/vapi/gstreamer-base-1.0.vapi @@ -26,8 +26,8 @@ namespace Gst { public Gst.BufferList? get_buffer_list (size_t nbytes); [Version (since = "1.6")] public GLib.List? 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); diff --git a/vapi/metadata/GstBase-1.0-custom.vala b/vapi/metadata/GstBase-1.0-custom.vala index 773ab1b67..b198a6f26 100644 --- a/vapi/metadata/GstBase-1.0-custom.vala +++ b/vapi/metadata/GstBase-1.0-custom.vala @@ -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 +} diff --git a/vapi/metadata/GstBase-1.0.metadata b/vapi/metadata/GstBase-1.0.metadata index a87606838..6514339b6 100644 --- a/vapi/metadata/GstBase-1.0.metadata +++ b/vapi/metadata/GstBase-1.0.metadata @@ -14,6 +14,10 @@ ByteWriter struct=false BitReader struct=false ByteReader struct=false +Adapter + .map skip + .take skip + // Backwards compatibility Adapter .copy skip=false