From: Rico Tzschichholz Date: Thu, 25 Jul 2013 06:40:11 +0000 (+0200) Subject: gstreamer-1.0: Define ref/unref methods of MiniObject subclasses X-Git-Tag: 0.21.1~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b31584b56a4dc3fb754bc3df096727b33f38306d;p=thirdparty%2Fvala.git gstreamer-1.0: Define ref/unref methods of MiniObject subclasses Also define some copy/free methods and include more fixes on the way. --- diff --git a/vapi/Makefile.am b/vapi/Makefile.am index 5aec61664..3bf27d17d 100644 --- a/vapi/Makefile.am +++ b/vapi/Makefile.am @@ -596,7 +596,7 @@ gstreamer-tag-1.0: $(GENVAPI) --library $(srcdir)/gstreamer-tag-1.0 --pkg gstreamer-base-1.0 --metadatadir $(METADATADIR) $(GIRDIR)/GstTag-1.0.gir gstreamer-video-1.0: - $(GENVAPI) --library $(srcdir)/gstreamer-video-1.0 --pkg gstreamer-base-1.0 --metadatadir $(METADATADIR) $(GIRDIR)/GstVideo-1.0.gir + $(GENVAPI) --library $(srcdir)/gstreamer-video-1.0 --pkg gstreamer-base-1.0 --metadatadir $(METADATADIR) $(METADATADIR)/GstVideo-1.0-custom.vala $(GIRDIR)/GstVideo-1.0.gir gtk+-2.0: $(GENVAPI) --library $(srcdir)/gtk+-2.0 $(PACKAGESDIR)/gtk+-2.0/gtk+-2.0-custom.vala $(PACKAGESDIR)/gtk+-2.0/gtk+-2.0.gi diff --git a/vapi/gstreamer-1.0.vapi b/vapi/gstreamer-1.0.vapi index 74d41c3bf..7fb0c1d7c 100644 --- a/vapi/gstreamer-1.0.vapi +++ b/vapi/gstreamer-1.0.vapi @@ -459,7 +459,7 @@ namespace Gst { [CCode (cheader_filename = "gst/gst.h")] public static bool union (out GLib.Value dest, GLib.Value value1, GLib.Value value2); } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_allocation_params_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", copy_function = "gst_allocation_params_copy", free_function = "gst_allocation_params_free", type_id = "gst_allocation_params_get_type ()")] [Compact] public class AllocationParams { public size_t align; @@ -485,7 +485,7 @@ namespace Gst { public static void register (string name, owned Gst.Allocator allocator); public void set_default (); } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_atomic_queue_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_atomic_queue_ref", type_id = "gst_atomic_queue_get_type ()", unref_function = "gst_atomic_queue_unref")] [Compact] public class AtomicQueue { [CCode (has_construct_function = false)] @@ -544,7 +544,7 @@ namespace Gst { [CCode (has_construct_function = false)] protected Bitmask (); } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_buffer_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_buffer_ref", type_id = "gst_buffer_get_type ()", unref_function = "gst_buffer_unref")] [Compact] public class Buffer : Gst.MiniObject { public Gst.ClockTime dts; @@ -599,9 +599,9 @@ namespace Gst { [CCode (has_construct_function = false)] public Buffer.wrapped ([CCode (array_length_cname = "size", array_length_pos = 1.1, array_length_type = "gsize")] owned uint8[] data); } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_buffer_list_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_buffer_list_ref", type_id = "gst_buffer_list_get_type ()", unref_function = "gst_buffer_list_unref")] [Compact] - public class BufferList { + public class BufferList : Gst.MiniObject { [CCode (has_construct_function = false)] public BufferList (); public bool @foreach (Gst.BufferListFunc func); @@ -673,7 +673,7 @@ namespace Gst { public virtual signal void message (Gst.Message message); public virtual signal void sync_message (Gst.Message message); } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_caps_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_caps_ref", type_id = "gst_caps_get_type ()", unref_function = "gst_caps_unref")] [Compact] public class Caps : Gst.MiniObject { [CCode (has_construct_function = false)] @@ -777,7 +777,7 @@ namespace Gst { public bool get_value (Gst.ClockTime timestamp, double value); public bool get_value_array (Gst.ClockTime timestamp, Gst.ClockTime interval, [CCode (array_length_cname = "n_values", array_length_pos = 2.5, array_length_type = "guint", type = "gdouble*")] double[] values); } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_date_time_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_date_time_ref", type_id = "gst_date_time_get_type ()", unref_function = "gst_date_time_unref")] [Compact] public class DateTime { [CCode (has_construct_function = false)] @@ -955,7 +955,7 @@ namespace Gst { public bool list_is_type (Gst.ElementFactoryListType type); public static unowned Gst.Element make (string factoryname, string? name); } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_event_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_event_ref", type_id = "gst_event_get_type ()", unref_function = "gst_event_unref")] [Compact] public class Event : Gst.MiniObject { public uint32 seqnum; @@ -1059,7 +1059,7 @@ namespace Gst { [CCode (has_construct_function = false)] protected IntRange (); } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_iterator_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", copy_function = "gst_iterator_copy", free_function = "gst_iterator_free", type_id = "gst_iterator_get_type ()")] [Compact] public class Iterator { public uint32 cookie; @@ -1080,7 +1080,7 @@ namespace Gst { [CCode (has_construct_function = false)] public Iterator.single (GLib.Type type, GLib.Value object); } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_memory_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_memory_ref", type_id = "gst_memory_get_type ()", unref_function = "gst_memory_unref")] [Compact] public class Memory : Gst.MiniObject { public size_t align; @@ -1100,7 +1100,7 @@ namespace Gst { [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", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_message_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_message_ref", type_id = "gst_message_get_type ()", unref_function = "gst_message_unref")] [Compact] public class Message : Gst.MiniObject { public uint32 seqnum; @@ -1380,7 +1380,7 @@ namespace Gst { [CCode (has_construct_function = false)] protected ParamFraction (); } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_parse_context_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", free_function = "gst_parse_context_free", type_id = "gst_parse_context_get_type ()")] [Compact] public class ParseContext { [CCode (has_construct_function = false)] @@ -1477,7 +1477,7 @@ namespace Gst { public static Gst.FlowReturn getrange_default (Gst.Pad pad, Gst.Object parent, uint64 offset, uint size, out Gst.Buffer buffer); public static Gst.Iterator iterate_internal_links_default (Gst.Pad pad, Gst.Object? parent); } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_query_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_query_ref", type_id = "gst_query_get_type ()", unref_function = "gst_query_unref")] [Compact] public class Query : Gst.MiniObject { public Gst.QueryType type; @@ -1528,7 +1528,7 @@ namespace Gst { public void parse_latency (out bool live, out Gst.ClockTime min_latency, out Gst.ClockTime max_latency); public void parse_n_formats (out uint n_formats); public GLib.Type parse_nth_allocation_meta (uint index, out Gst.Structure @params); - public void parse_nth_allocation_param (uint index, out unowned Gst.Allocator allocator, out unowned Gst.AllocationParams @params); + public void parse_nth_allocation_param (uint index, out Gst.Allocator allocator, out unowned Gst.AllocationParams @params); public void parse_nth_allocation_pool (uint index, out Gst.BufferPool pool, out uint size, out uint min_buffers, out uint max_buffers); public bool parse_nth_buffering_range (uint index, out int64 start, out int64 stop); public void parse_nth_format (out uint nth, out Gst.Format format); @@ -1593,9 +1593,9 @@ namespace Gst { public signal void feature_added (Gst.PluginFeature feature); public signal void plugin_added (Gst.Plugin plugin); } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_sample_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_sample_ref", type_id = "gst_sample_get_type ()", unref_function = "gst_sample_unref")] [Compact] - public class Sample { + public class Sample : Gst.MiniObject { [CCode (has_construct_function = false)] public Sample (Gst.Buffer? buffer, Gst.Caps? caps, Gst.Segment? segment, owned Gst.Structure? info); public unowned Gst.Buffer get_buffer (); @@ -1603,7 +1603,7 @@ namespace Gst { public unowned Gst.Structure get_info (); public unowned Gst.Segment get_segment (); } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_segment_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", copy_function = "gst_segment_copy", free_function = "gst_segment_free", type_id = "gst_segment_get_type ()")] [Compact] public class Segment { public double applied_rate; @@ -1630,12 +1630,12 @@ namespace Gst { public uint64 to_running_time (Gst.Format format, uint64 position); public uint64 to_stream_time (Gst.Format format, uint64 position); } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_structure_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", copy_function = "gst_structure_copy", free_function = "gst_structure_free", type_id = "gst_structure_get_type ()")] [Compact] public class Structure { public GLib.Type type; public bool can_intersect (Gst.Structure struct2); - public unowned Gst.Structure copy (); + public Gst.Structure copy (); [CCode (has_construct_function = false)] public Structure.empty (string name); public void fixate (); @@ -1694,7 +1694,7 @@ namespace Gst { [NoAccessorMethod] public Gst.ClockType clock_type { get; set; } } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_tag_list_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_tag_list_ref", type_id = "gst_tag_list_get_type ()", unref_function = "gst_tag_list_unref")] [Compact] public class TagList : Gst.MiniObject { public void add_value (Gst.TagMergeMode mode, string tag, GLib.Value value); @@ -1774,7 +1774,7 @@ namespace Gst { public virtual void prepare () throws GLib.Error; public virtual void* push (Gst.TaskPoolFunction func) throws GLib.Error; } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_toc_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_toc_ref", type_id = "gst_toc_get_type ()", unref_function = "gst_toc_unref")] [Compact] public class Toc : Gst.MiniObject { [CCode (has_construct_function = false)] @@ -1788,7 +1788,7 @@ namespace Gst { public void merge_tags (Gst.TagList? tags, Gst.TagMergeMode mode); public void set_tags (owned Gst.TagList? tags); } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_toc_entry_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_toc_entry_ref", type_id = "gst_toc_entry_get_type ()", unref_function = "gst_toc_entry_unref")] [Compact] public class TocEntry : Gst.MiniObject { [CCode (has_construct_function = false)] diff --git a/vapi/gstreamer-video-1.0.vapi b/vapi/gstreamer-video-1.0.vapi index bcb6d7757..daa716866 100644 --- a/vapi/gstreamer-video-1.0.vapi +++ b/vapi/gstreamer-video-1.0.vapi @@ -9,7 +9,7 @@ namespace Gst { [CCode (has_construct_function = false, type = "GstBufferPool*")] public BufferPool (); } - [CCode (cheader_filename = "gst/video/colorbalance.h,gst/video/colorbalancechannel.h,gst/video/gstvideodecoder.h,gst/video/gstvideoencoder.h,gst/video/gstvideofilter.h,gst/video/gstvideometa.h,gst/video/gstvideopool.h,gst/video/gstvideosink.h,gst/video/gstvideoutils.h,gst/video/navigation.h,gst/video/video-blend.h,gst/video/video-color.h,gst/video/video-enumtypes.h,gst/video/video-event.h,gst/video/video-format.h,gst/video/video-frame.h,gst/video/video-info.h,gst/video/video-overlay-composition.h,gst/video/video.h,gst/video/videoorientation.h,gst/video/videooverlay.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_video_codec_frame_get_type ()")] + [CCode (cheader_filename = "gst/video/gstvideoutils.h", ref_function = "gst_video_codec_frame_ref", type_id = "gst_video_codec_frame_get_type ()", unref_function = "gst_video_codec_frame_unref")] [Compact] [GIR (name = "VideoCodecFrame")] public class CodecFrame { @@ -23,7 +23,11 @@ namespace Gst { public uint32 presentation_frame_number; public Gst.ClockTime pts; public uint32 system_frame_number; + [CCode (simple_generics = true)] + public T get_user_data (); public Gst.Video.CodecFrame @ref (); + [CCode (simple_generics = true)] + public void set_user_data (owned T user_data); public void unref (); } [CCode (cheader_filename = "gst/video/colorbalance.h,gst/video/colorbalancechannel.h,gst/video/gstvideodecoder.h,gst/video/gstvideoencoder.h,gst/video/gstvideofilter.h,gst/video/gstvideometa.h,gst/video/gstvideopool.h,gst/video/gstvideosink.h,gst/video/gstvideoutils.h,gst/video/navigation.h,gst/video/video-blend.h,gst/video/video-color.h,gst/video/video-enumtypes.h,gst/video/video-event.h,gst/video/video-format.h,gst/video/video-frame.h,gst/video/video-info.h,gst/video/video-overlay-composition.h,gst/video/video.h,gst/video/videoorientation.h,gst/video/videooverlay.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_video_codec_state_get_type ()")] @@ -169,10 +173,10 @@ namespace Gst { [NoWrapper] public virtual Gst.FlowReturn transform_frame_ip (Gst.Video.Frame frame); } - [CCode (cheader_filename = "gst/video/colorbalance.h,gst/video/colorbalancechannel.h,gst/video/gstvideodecoder.h,gst/video/gstvideoencoder.h,gst/video/gstvideofilter.h,gst/video/gstvideometa.h,gst/video/gstvideopool.h,gst/video/gstvideosink.h,gst/video/gstvideoutils.h,gst/video/navigation.h,gst/video/video-blend.h,gst/video/video-color.h,gst/video/video-enumtypes.h,gst/video/video-event.h,gst/video/video-format.h,gst/video/video-frame.h,gst/video/video-info.h,gst/video/video-overlay-composition.h,gst/video/video.h,gst/video/videoorientation.h,gst/video/videooverlay.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_video_overlay_composition_get_type ()")] + [CCode (cheader_filename = "gst/video/video-overlay-composition.h", ref_function = "gst_video_overlay_composition_ref", type_id = "gst_video_overlay_composition_get_type ()", unref_function = "gst_video_overlay_composition_unref")] [Compact] [GIR (name = "VideoOverlayComposition")] - public class OverlayComposition { + public class OverlayComposition : Gst.MiniObject { [CCode (has_construct_function = false)] public OverlayComposition (Gst.Video.OverlayRectangle rectangle); public void add_rectangle (Gst.Video.OverlayRectangle rectangle); @@ -183,10 +187,10 @@ namespace Gst { public Gst.Video.OverlayComposition make_writable (); public uint n_rectangles (); } - [CCode (cheader_filename = "gst/video/colorbalance.h,gst/video/colorbalancechannel.h,gst/video/gstvideodecoder.h,gst/video/gstvideoencoder.h,gst/video/gstvideofilter.h,gst/video/gstvideometa.h,gst/video/gstvideopool.h,gst/video/gstvideosink.h,gst/video/gstvideoutils.h,gst/video/navigation.h,gst/video/video-blend.h,gst/video/video-color.h,gst/video/video-enumtypes.h,gst/video/video-event.h,gst/video/video-format.h,gst/video/video-frame.h,gst/video/video-info.h,gst/video/video-overlay-composition.h,gst/video/video.h,gst/video/videoorientation.h,gst/video/videooverlay.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_video_overlay_rectangle_get_type ()")] + [CCode (cheader_filename = "gst/video/video-overlay-composition.h", ref_function = "gst_video_overlay_rectangle_ref", type_id = "gst_video_overlay_rectangle_get_type ()", unref_function = "gst_video_overlay_rectangle_unref")] [Compact] [GIR (name = "VideoOverlayRectangle")] - public class OverlayRectangle { + public class OverlayRectangle : Gst.MiniObject { public Gst.Video.OverlayRectangle copy (); public Gst.Video.OverlayFormatFlags get_flags (); public float get_global_alpha (); diff --git a/vapi/metadata/Gst-1.0-custom.vala b/vapi/metadata/Gst-1.0-custom.vala index 108aea3c7..dc26b9b39 100644 --- a/vapi/metadata/Gst-1.0-custom.vala +++ b/vapi/metadata/Gst-1.0-custom.vala @@ -1,11 +1,40 @@ namespace Gst { - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_buffer_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", copy_function = "gst_allocation_params_copy", free_function = "gst_allocation_params_free", type_id = "gst_allocation_params_get_type ()")] + [Compact] + public class AllocationParams { + } + + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_buffer_ref", type_id = "gst_buffer_get_type ()", unref_function = "gst_buffer_unref")] [Compact] 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); } + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_buffer_list_ref", type_id = "gst_buffer_list_get_type ()", unref_function = "gst_buffer_list_unref")] + [Compact] + public class BufferList { + } + + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_caps_ref", type_id = "gst_caps_get_type ()", unref_function = "gst_caps_unref")] + [Compact] + public class Caps { + } + + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_date_time_ref", type_id = "gst_date_time_get_type ()", unref_function = "gst_date_time_unref")] + [Compact] + public class DateTime { + } + + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_event_ref", type_id = "gst_event_get_type ()", unref_function = "gst_event_unref")] + [Compact] + public class Event { + } + + [CCode (cheader_filename = "gst/gst.h", copy_function = "gst_iterator_copy", free_function = "gst_iterator_free", type_id = "gst_iterator_get_type ()")] + [Compact] + public class Iterator { + } [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_mini_object_ref", unref_function = "gst_mini_object_unref")] [Compact] @@ -16,7 +45,57 @@ namespace Gst { public void set_qdata (GLib.Quark quark, owned T data); } - [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_atomic_queue_get_type ()")] + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_memory_ref", type_id = "gst_memory_get_type ()", unref_function = "gst_memory_unref")] + [Compact] + public class Memory { + } + + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_message_ref", type_id = "gst_message_get_type ()", unref_function = "gst_message_unref")] + [Compact] + public class Message { + } + + [CCode (cheader_filename = "gst/gst.h", free_function = "gst_parse_context_free", type_id = "gst_parse_context_get_type ()")] + [Compact] + public class ParseContext { + } + + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_query_ref", type_id = "gst_query_get_type ()", unref_function = "gst_query_unref")] + [Compact] + public class Query { + } + + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_sample_ref", type_id = "gst_sample_get_type ()", unref_function = "gst_sample_unref")] + [Compact] + public class Sample { + } + + [CCode (cheader_filename = "gst/gst.h", copy_function = "gst_segment_copy", free_function = "gst_segment_free", type_id = "gst_segment_get_type ()")] + [Compact] + public class Segment { + } + + [CCode (cheader_filename = "gst/gst.h", copy_function = "gst_structure_copy", free_function = "gst_structure_free", type_id = "gst_structure_get_type ()")] + [Compact] + public class Structure { + } + + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_tag_list_ref", type_id = "gst_tag_list_get_type ()", unref_function = "gst_tag_list_unref")] + [Compact] + public class TagList { + } + + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_toc_ref", type_id = "gst_toc_get_type ()", unref_function = "gst_toc_unref")] + [Compact] + public class Toc { + } + + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_toc_entry_ref", type_id = "gst_toc_entry_get_type ()", unref_function = "gst_toc_entry_unref")] + [Compact] + public class TocEntry { + } + + [CCode (cheader_filename = "gst/gst.h", ref_function = "gst_atomic_queue_ref", type_id = "gst_atomic_queue_get_type ()", unref_function = "gst_atomic_queue_unref")] [Compact] public class AtomicQueue { public unowned T? peek (); @@ -30,4 +109,4 @@ namespace Gst { [CCode (cname = "gst_flow_get_name")] public unowned string get_name (); } -} \ No newline at end of file +} diff --git a/vapi/metadata/Gst-1.0.metadata b/vapi/metadata/Gst-1.0.metadata index 80751f6b8..5341da040 100644 --- a/vapi/metadata/Gst-1.0.metadata +++ b/vapi/metadata/Gst-1.0.metadata @@ -100,6 +100,7 @@ MiniObject struct=false .make_writable skip=false Buffer base_type="Gst.MiniObject" .mini_object skip +BufferList base_type="Gst.MiniObject" Caps base_type="Gst.MiniObject" .mini_object skip Event base_type="Gst.MiniObject" @@ -110,6 +111,7 @@ Message base_type="Gst.MiniObject" .mini_object skip Query base_type="Gst.MiniObject" .mini_object skip +Sample base_type="Gst.MiniObject" TagList base_type="Gst.MiniObject" .mini_object skip Toc base_type="Gst.MiniObject" @@ -131,3 +133,9 @@ formats_contains parent="Gst.Format" name="contains" // No way to make reparented functions instance methods FlowReturn.custom_error_2 skip flow_get_name skip // parent="Gst.FlowReturn" name="get_name" + +// Upstream +Query + .parse_nth_allocation_param.allocator unowned=false +Structure + .copy unowned=false diff --git a/vapi/metadata/GstVideo-1.0-custom.vala b/vapi/metadata/GstVideo-1.0-custom.vala index 8d6d568d4..d1467b583 100644 --- a/vapi/metadata/GstVideo-1.0-custom.vala +++ b/vapi/metadata/GstVideo-1.0-custom.vala @@ -1,6 +1,6 @@ namespace Gst { namespace Video { - [CCode (cheader_filename = "gst/video/gstvideoutils.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_video_codec_frame_get_type ()")] + [CCode (cheader_filename = "gst/video/gstvideoutils.h", ref_function = "gst_video_codec_frame_ref", type_id = "gst_video_codec_frame_get_type ()", unref_function = "gst_video_codec_frame_unref")] [Compact] [GIR (name = "VideoCodecFrame")] public class CodecFrame { @@ -9,5 +9,17 @@ namespace Gst { [CCode (simple_generics = true)] public void set_user_data (owned T user_data); } + + [CCode (cheader_filename = "gst/video/video-overlay-composition.h", ref_function = "gst_video_overlay_composition_ref", type_id = "gst_video_overlay_composition_get_type ()", unref_function = "gst_video_overlay_composition_unref")] + [Compact] + [GIR (name = "VideoOverlayComposition")] + public class OverlayComposition { + } + + [CCode (cheader_filename = "gst/video/video-overlay-composition.h", ref_function = "gst_video_overlay_rectangle_ref", type_id = "gst_video_overlay_rectangle_get_type ()", unref_function = "gst_video_overlay_rectangle_unref")] + [Compact] + [GIR (name = "VideoOverlayRectangle")] + public class OverlayRectangle { + } } } diff --git a/vapi/metadata/GstVideo-1.0.metadata b/vapi/metadata/GstVideo-1.0.metadata index 5ad04a936..6c0ede5d0 100644 --- a/vapi/metadata/GstVideo-1.0.metadata +++ b/vapi/metadata/GstVideo-1.0.metadata @@ -14,6 +14,10 @@ VideoCodecFrame .get_user_data skip .set_user_data skip +// Gst.MiniObject inheritance +VideoOverlayComposition base_type="Gst.MiniObject" +VideoOverlayRectangle base_type="Gst.MiniObject" + // Bug #685833 VideoCodecFrame - .abidata skip \ No newline at end of file + .abidata skip