[vala] gstreamer-1.0: Add Caps.simple, Fix URIHandler interface, Buffer.copy_into



commit 6e8139295c35745fe912343aabd64b296a54b9bd
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Nov 23 09:16:40 2015 +0100

    gstreamer-1.0: Add Caps.simple, Fix URIHandler interface, Buffer.copy_into
    
    Thanks to Pierre Lamot!
    
    Fixes bug 750836, bug 750837, bug 750839.

 vapi/gstreamer-1.0.vapi           |   10 +++++++---
 vapi/metadata/Gst-1.0-custom.vala |    2 ++
 vapi/metadata/Gst-1.0.metadata    |    9 +++++++++
 3 files changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/vapi/gstreamer-1.0.vapi b/vapi/gstreamer-1.0.vapi
index 77f569e..150955f 100644
--- a/vapi/gstreamer-1.0.vapi
+++ b/vapi/gstreamer-1.0.vapi
@@ -618,7 +618,8 @@ namespace Gst {
                public void append_memory (owned Gst.Memory mem);
                public Gst.Buffer append_region (owned Gst.Buffer buf2, ssize_t offset, ssize_t size);
                public Gst.Buffer copy_deep ();
-               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);
@@ -789,6 +790,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);
@@ -2256,9 +2259,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)]
diff --git a/vapi/metadata/Gst-1.0-custom.vala b/vapi/metadata/Gst-1.0-custom.vala
index 9566d9a..6834497 100644
--- a/vapi/metadata/Gst-1.0-custom.vala
+++ b/vapi/metadata/Gst-1.0-custom.vala
@@ -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")]
diff --git a/vapi/metadata/Gst-1.0.metadata b/vapi/metadata/Gst-1.0.metadata
index ecd2c39..3da0b0f 100644
--- a/vapi/metadata/Gst-1.0.metadata
+++ b/vapi/metadata/Gst-1.0.metadata
@@ -66,6 +66,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
@@ -211,6 +212,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
 Pipeline
@@ -220,3 +225,7 @@ Pipeline
 // Upstream
 ///////////
 
+URIHandler
+  .get_protocols abstract
+  .get_uri_type abstract vfunc_name="get_type"
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]