summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2017-03-08 09:50:02 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2017-03-08 09:50:02 +0100
commitb3e02e1ecd76cf0443287ac6ef99d18be188e840 (patch)
treeabcac93f6301a8727f7f421112f8312dbdb913a6
parent956ca6b5fb5a2b267edc2986990b83955c500da0 (diff)
downloadvala-b3e02e1ecd76cf0443287ac6ef99d18be188e840.tar.gz
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
-rw-r--r--vapi/gstreamer-base-1.0.vapi8
-rw-r--r--vapi/metadata/GstBase-1.0-custom.vala8
-rw-r--r--vapi/metadata/GstBase-1.0.metadata4
3 files changed, 15 insertions, 5 deletions
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<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);
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