From: Rico Tzschichholz Date: Mon, 23 Nov 2015 23:08:56 +0000 (+0100) Subject: gstreamer-1.0: Fix bindings of Buffer.new_wrapped_full / Memory.new_wrapped X-Git-Tag: 0.30.1~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c32987b741e39cdb35291dae933ccaee50eeb7e;p=thirdparty%2Fvala.git gstreamer-1.0: Fix bindings of Buffer.new_wrapped_full / Memory.new_wrapped (cherry picked from commit b067cc4708af5bef542ce25c7745858ce37cf0ea) --- diff --git a/vapi/gstreamer-1.0.vapi b/vapi/gstreamer-1.0.vapi index 3ae768610..8f33d0a77 100644 --- a/vapi/gstreamer-1.0.vapi +++ b/vapi/gstreamer-1.0.vapi @@ -617,7 +617,7 @@ namespace Gst { public size_t memset (size_t offset, uint8 val, size_t size); public uint n_memory (); [CCode (has_construct_function = false, simple_generics = true)] - public static Gst.Buffer new_wrapped_full (Gst.MemoryFlags flags, [CCode (array_length_cname = "size", array_length_pos = 4.5, array_length_type = "gsize")] uint8[] data, size_t maxsize, size_t offset, owned T user_data); + public static Gst.Buffer new_wrapped_full (Gst.MemoryFlags flags, [CCode (array_length_cname = "maxsize", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] data, size_t offset, size_t size, owned T user_data); public unowned Gst.Memory peek_memory (uint idx); public void prepend_memory (owned Gst.Memory mem); public void remove_all_memory (); @@ -1274,11 +1274,11 @@ namespace Gst { public bool is_type (string mem_type); public Gst.Memory? make_mapped (out Gst.MapInfo info, Gst.MapFlags flags); public bool map (out Gst.MapInfo info, Gst.MapFlags flags); + [CCode (has_construct_function = false, simple_generics = true)] + public static Gst.Memory new_wrapped (Gst.MemoryFlags flags, [CCode (array_length_cname = "maxsize", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] data, size_t offset, size_t size, owned T user_data); public void resize (ssize_t offset, size_t size); public Gst.Memory share (ssize_t offset, ssize_t size); public void unmap (Gst.MapInfo info); - [CCode (has_construct_function = false)] - public Memory.wrapped (Gst.MemoryFlags flags, [CCode (array_length_cname = "size", array_length_pos = 4.33333, array_length_type = "gsize")] uint8[] data, size_t maxsize, size_t offset, [CCode (delegate_target_pos = 4.66667)] GLib.DestroyNotify? notify); } [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_message_ref", type_id = "gst_message_get_type ()", unref_function = "gst_message_unref")] [Compact] diff --git a/vapi/metadata/Gst-1.0-custom.vala b/vapi/metadata/Gst-1.0-custom.vala index 6834497d1..87467efad 100644 --- a/vapi/metadata/Gst-1.0-custom.vala +++ b/vapi/metadata/Gst-1.0-custom.vala @@ -12,7 +12,7 @@ namespace Gst { [Compact, CCode (ref_function = "gst_buffer_ref", type_id = "gst_buffer_get_type ()", unref_function = "gst_buffer_unref")] public class Buffer { [CCode (has_construct_function = false, simple_generics = true)] - public static Buffer new_wrapped_full (Gst.MemoryFlags flags, [CCode (array_length_cname = "size", array_length_pos = 4.5, array_length_type = "gsize")] uint8[] data, size_t maxsize, size_t offset, owned T user_data); + public static Buffer new_wrapped_full (Gst.MemoryFlags flags, [CCode (array_length_cname = "maxsize", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] data, size_t offset, size_t size, owned T user_data); [CCode (instance_pos= 1.9)] public bool copy_into (Gst.Buffer dst, Gst.BufferCopyFlags flags, size_t offset, size_t size); } @@ -70,6 +70,8 @@ namespace Gst { [Compact, CCode (ref_function = "gst_memory_ref", type_id = "gst_memory_get_type ()", unref_function = "gst_memory_unref")] public class Memory { + [CCode (has_construct_function = false, simple_generics = true)] + public static Memory new_wrapped (Gst.MemoryFlags flags, [CCode (array_length_cname = "maxsize", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] data, size_t offset, size_t size, owned T user_data); } [Compact, CCode (ref_function = "gst_message_ref", type_id = "gst_message_get_type ()", unref_function = "gst_message_unref")] diff --git a/vapi/metadata/Gst-1.0.metadata b/vapi/metadata/Gst-1.0.metadata index 916a57e96..af464a7f9 100644 --- a/vapi/metadata/Gst-1.0.metadata +++ b/vapi/metadata/Gst-1.0.metadata @@ -116,6 +116,8 @@ Buffer Iterator .filter skip .find_custom skip +Memory + .new_wrapped skip // Rename *_full functions Bus