]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
gstreamer-1.0: Add Caps.simple, Fix URIHandler interface, Buffer.copy_into
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 23 Nov 2015 08:16:40 +0000 (09:16 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 23 Nov 2015 10:40:06 +0000 (11:40 +0100)
Thanks to Pierre Lamot!

Fixes bug 750836, bug 750837, bug 750839.

(cherry picked from commit 6e8139295c35745fe912343aabd64b296a54b9bd)

vapi/gstreamer-1.0.vapi
vapi/metadata/Gst-1.0-custom.vala
vapi/metadata/Gst-1.0.metadata

index 1e246d6440e85bf280f66a67ba6a16616c6917ef..3ae7686107094aaf6924b001da51a7250e66b699 100644 (file)
@@ -591,7 +591,8 @@ namespace Gst {
                public Gst.Buffer append (owned Gst.Buffer buf2);
                public void append_memory (owned Gst.Memory mem);
                public Gst.Buffer append_region (owned Gst.Buffer buf2, ssize_t offset, ssize_t size);
-               public bool copy_into (Gst.Buffer src, Gst.BufferCopyFlags flags, size_t offset, size_t size);
+               [CCode (instance_pos = 1.9)]
+               public bool copy_into (Gst.Buffer dst, Gst.BufferCopyFlags flags, size_t offset, size_t size);
                public Gst.Buffer copy_region (Gst.BufferCopyFlags flags, size_t offset, size_t size);
                public size_t extract (size_t offset, void* dest, size_t size);
                public void extract_dup (size_t offset, size_t size, [CCode (array_length_cname = "dest_size", array_length_pos = 3.1, array_length_type = "gsize")] out uint8[] dest);
@@ -757,6 +758,8 @@ namespace Gst {
                public void set_simple (string field, ...);
                public void set_simple_valist (string field, va_list varargs);
                public void set_value (string field, GLib.Value value);
+               [CCode (has_construct_function = false)]
+               public Caps.simple (string media_type, string fieldname, ...);
                public Gst.Caps simplify ();
                public Gst.Structure steal_structure (uint index);
                public Gst.Caps subtract (Gst.Caps subtrahend);
@@ -2139,9 +2142,10 @@ namespace Gst {
        [CCode (cheader_filename = "gst/gst.h", type_cname = "GstURIHandlerInterface", type_id = "gst_uri_handler_get_type ()")]
        public interface URIHandler : GLib.Object {
                [CCode (array_length = false, array_null_terminated = true)]
-               public unowned string[]? get_protocols ();
+               public abstract unowned string[]? get_protocols ();
                public abstract string? get_uri ();
-               public Gst.URIType get_uri_type ();
+               [CCode (vfunc_name = "get_type")]
+               public abstract Gst.URIType get_uri_type ();
                public abstract bool set_uri (string uri) throws GLib.Error;
        }
        [CCode (cheader_filename = "gst/gst.h", has_type_id = false)]
index 9566d9a50bd533d4fd9fd140c0fbb1000aa2c974..6834497d1156f757c7e6537ff0d88b96e7e8637d 100644 (file)
@@ -13,6 +13,8 @@ namespace Gst {
        public class Buffer {
                [CCode (has_construct_function = false, simple_generics = true)]
                public static Buffer new_wrapped_full<T> (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);
+               [CCode (instance_pos= 1.9)]
+               public bool copy_into (Gst.Buffer dst, Gst.BufferCopyFlags flags, size_t offset, size_t size);
        }
 
        [Compact, CCode (ref_function = "gst_buffer_list_ref", type_id = "gst_buffer_list_get_type ()", unref_function = "gst_buffer_list_unref")]
index 2b59f052eb44b5725b186beda788a3bb7353cbc8..916a57e96341f197784fd9c25d3bdca2c0dd4da9 100644 (file)
@@ -69,6 +69,7 @@ parse_bin_from_description_full floating
 *.*_valist_* skip=false
 debug_log skip=false printf_format
 Caps
+  .new_simple skip=false
   .set_simple skip=false
 CapsFeatures
   .new skip=false
@@ -214,6 +215,10 @@ formats_contains parent="Gst.Format" name="contains"
 // Structs as generic type arguments
 ElementFactory.get_static_pad_templates type="GLib.List<weak Gst.StaticPadTemplate?>"
 
+// Custom
+Buffer
+  .copy_into skip
+
 // Backwards compatibility
 Structure.new_from_string skip
 
@@ -227,3 +232,7 @@ PadEventFunction.event owned
 
 // Bug #730957:
 ElementFactory.get_metadata_keys nullable
+
+URIHandler
+  .get_protocols abstract
+  .get_uri_type abstract vfunc_name="get_type"