From b0c1554ca36a9b6b0e3b221f39ccac8edf96e41f Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Tue, 1 May 2018 12:44:09 +0200 Subject: [PATCH] gstreamer: Update from 1.15+ git master --- vapi/gstreamer-allocators-1.0.vapi | 2 ++ vapi/gstreamer-audio-1.0.vapi | 16 ++++++++-------- vapi/gstreamer-base-1.0.vapi | 2 ++ vapi/gstreamer-pbutils-1.0.vapi | 4 ++-- vapi/gstreamer-rtp-1.0.vapi | 16 ++++++++-------- vapi/gstreamer-rtsp-1.0.vapi | 16 ++++++++-------- vapi/gstreamer-video-1.0.vapi | 20 ++++++++++---------- 7 files changed, 40 insertions(+), 36 deletions(-) diff --git a/vapi/gstreamer-allocators-1.0.vapi b/vapi/gstreamer-allocators-1.0.vapi index 1823d26f7..400092471 100644 --- a/vapi/gstreamer-allocators-1.0.vapi +++ b/vapi/gstreamer-allocators-1.0.vapi @@ -12,6 +12,8 @@ namespace Gst { public DmaBufAllocator (); [Version (since = "1.2")] public static Gst.Memory alloc (Gst.Allocator allocator, int fd, size_t size); + [Version (since = "1.16")] + public static Gst.Memory alloc_with_flags (Gst.Allocator allocator, int fd, size_t size, Gst.Allocators.FdMemoryFlags flags); } [CCode (cheader_filename = "gst/allocators/allocators.h", cname = "GstFdAllocator", lower_case_cprefix = "gst_fd_allocator_", type_id = "gst_fd_allocator_get_type ()")] [GIR (name = "FdAllocator")] diff --git a/vapi/gstreamer-audio-1.0.vapi b/vapi/gstreamer-audio-1.0.vapi index 53be907d0..cfa3c1071 100644 --- a/vapi/gstreamer-audio-1.0.vapi +++ b/vapi/gstreamer-audio-1.0.vapi @@ -149,7 +149,7 @@ namespace Gst { [Version (since = "1.14")] public bool convert (Gst.Audio.ConverterFlags flags, [CCode (array_length_cname = "in_size", array_length_pos = 2.5, array_length_type = "gsize")] uint8[] @in, [CCode (array_length_cname = "out_size", array_length_pos = 3.1, array_length_type = "gsize")] out uint8[] @out); public void free (); - public unowned Gst.Structure get_config (int in_rate, int out_rate); + public unowned Gst.Structure get_config (out int in_rate, out int out_rate); public size_t get_in_frames (size_t out_frames); public size_t get_max_latency (); public size_t get_out_frames (size_t in_frames); @@ -185,7 +185,7 @@ namespace Gst { public int get_max_errors (); public Gst.ClockTime get_min_latency (); public bool get_needs_format (); - public void get_parse_state (bool sync, bool eos); + public void get_parse_state (out bool sync, out bool eos); public bool get_plc (); public int get_plc_aware (); public Gst.ClockTime get_tolerance (); @@ -342,7 +342,7 @@ namespace Gst { public int rate; [CCode (has_construct_function = false)] public Info (); - public bool convert (Gst.Format src_fmt, int64 src_val, Gst.Format dest_fmt, int64 dest_val); + public bool convert (Gst.Format src_fmt, int64 src_val, Gst.Format dest_fmt, out int64 dest_val); public Gst.Audio.Info copy (); public void free (); public bool from_caps (Gst.Caps caps); @@ -398,8 +398,8 @@ namespace Gst { public void clear (int segment); public virtual void clear_all (); public virtual bool close_device (); - public virtual uint commit (uint64 sample, uint8 data, int in_samples, int out_samples, int accum); - public bool convert (Gst.Format src_fmt, int64 src_val, Gst.Format dest_fmt, int64 dest_val); + public virtual uint commit (uint64 sample, [CCode (array_length_cname = "in_samples", array_length_pos = 2.5)] uint8[] data, int out_samples, ref int accum); + public bool convert (Gst.Format src_fmt, int64 src_val, Gst.Format dest_fmt, out int64 dest_val); public static void debug_spec_buff (Gst.Audio.RingBufferSpec spec); public static void debug_spec_caps (Gst.Audio.RingBufferSpec spec); public virtual uint delay (); @@ -411,15 +411,15 @@ namespace Gst { public virtual bool open_device (); public static bool parse_caps (Gst.Audio.RingBufferSpec spec, Gst.Caps caps); public virtual bool pause (); - public bool prepare_read (int segment, uint8 readptr, int len); - public uint read (uint64 sample, uint8 data, uint len, Gst.ClockTime timestamp); + public bool prepare_read (out int segment, [CCode (array_length_cname = "len", array_length_pos = 2.1)] out uint8[] readptr); + public uint read (uint64 sample, [CCode (array_length_cname = "len", array_length_pos = 2.5, array_length_type = "guint")] uint8[] data, out Gst.ClockTime timestamp); public virtual bool release (); [NoWrapper] public virtual bool resume (); public uint64 samples_done (); [Version (since = "1.12")] public void set_callback_full (owned Gst.Audio.RingBufferCallback? cb); - public void set_channel_positions (Gst.Audio.ChannelPosition position); + public void set_channel_positions ([CCode (array_length = false)] Gst.Audio.ChannelPosition[] position); public void set_flushing (bool flushing); public void set_sample (uint64 sample); public void set_timestamp (int readseg, Gst.ClockTime timestamp); diff --git a/vapi/gstreamer-base-1.0.vapi b/vapi/gstreamer-base-1.0.vapi index 7e8ec215c..94b10f58a 100644 --- a/vapi/gstreamer-base-1.0.vapi +++ b/vapi/gstreamer-base-1.0.vapi @@ -111,6 +111,8 @@ namespace Gst { public bool drop_buffer (); [NoWrapper] public virtual Gst.FlowReturn flush (Gst.Base.Aggregator aggregator); + [Version (since = "1.16")] + public bool has_buffer (); public bool is_eos (); public Gst.Buffer peek_buffer (); public Gst.Buffer pop_buffer (); diff --git a/vapi/gstreamer-pbutils-1.0.vapi b/vapi/gstreamer-pbutils-1.0.vapi index fc76c8075..d12972ff7 100644 --- a/vapi/gstreamer-pbutils-1.0.vapi +++ b/vapi/gstreamer-pbutils-1.0.vapi @@ -351,10 +351,10 @@ namespace Gst { public static Gst.Buffer codec_utils_opus_create_header (uint32 rate, uint8 channels, uint8 channel_mapping_family, uint8 stream_count, uint8 coupled_count, [CCode (array_length = false)] uint8[]? channel_mapping, uint16 pre_skip, int16 output_gain); [CCode (cheader_filename = "gst/pbutils/pbutils.h", cname = "gst_codec_utils_opus_parse_caps")] [Version (since = "1.8")] - public static bool codec_utils_opus_parse_caps (Gst.Caps caps, out uint32 rate, out uint8 channels, out uint8 channel_mapping_family, out uint8 stream_count, out uint8 coupled_count, [CCode (array_length = false)] out uint8[] channel_mapping); + public static bool codec_utils_opus_parse_caps (Gst.Caps caps, out uint32 rate, out uint8 channels, out uint8 channel_mapping_family, out uint8 stream_count, out uint8 coupled_count, [CCode (array_length = false)] out uint8 channel_mapping[256]); [CCode (cheader_filename = "gst/pbutils/pbutils.h", cname = "gst_codec_utils_opus_parse_header")] [Version (since = "1.8")] - public static bool codec_utils_opus_parse_header (Gst.Buffer header, out uint32 rate, out uint8 channels, out uint8 channel_mapping_family, out uint8 stream_count, out uint8 coupled_count, [CCode (array_length = false)] out uint8[] channel_mapping, out uint16 pre_skip, out int16 output_gain); + public static bool codec_utils_opus_parse_header (Gst.Buffer header, out uint32 rate, out uint8 channels, out uint8 channel_mapping_family, out uint8 stream_count, out uint8 coupled_count, [CCode (array_length = false)] out uint8 channel_mapping[256], out uint16 pre_skip, out int16 output_gain); [CCode (cheader_filename = "gst/pbutils/pbutils.h", cname = "gst_encoding_list_all_targets")] public static GLib.List encoding_list_all_targets (string? categoryname); [CCode (cheader_filename = "gst/pbutils/pbutils.h", cname = "gst_encoding_list_available_categories")] diff --git a/vapi/gstreamer-rtp-1.0.vapi b/vapi/gstreamer-rtp-1.0.vapi index fb7742db2..138b8ccde 100644 --- a/vapi/gstreamer-rtp-1.0.vapi +++ b/vapi/gstreamer-rtp-1.0.vapi @@ -14,7 +14,7 @@ namespace Gst { protected BaseAudioPayload (); public Gst.FlowReturn flush (uint payload_len, Gst.ClockTime timestamp); public Gst.Base.Adapter get_adapter (); - public Gst.FlowReturn push (uint8 data, uint payload_len, Gst.ClockTime timestamp); + public Gst.FlowReturn push ([CCode (array_length_cname = "payload_len", array_length_pos = 1.5, array_length_type = "guint")] uint8[] data, Gst.ClockTime timestamp); public void set_frame_based (); public void set_frame_options (int frame_duration, int frame_size); public void set_sample_based (); @@ -272,7 +272,7 @@ namespace Gst { [CCode (cheader_filename = "gst/rtp/rtp.h")] public static uint32 buffer_default_clock_rate (uint8 payload_type); [CCode (cheader_filename = "gst/rtp/rtp.h")] - public static uint64 buffer_ext_timestamp (uint64 exttimestamp, uint32 timestamp); + public static uint64 buffer_ext_timestamp (ref uint64 exttimestamp, uint32 timestamp); [CCode (cheader_filename = "gst/rtp/rtp.h")] public static bool buffer_map (Gst.Buffer buffer, Gst.MapFlags flags, out unowned Gst.RTP.Buffer rtp); [CCode (cheader_filename = "gst/rtp/rtp.h")] @@ -284,9 +284,9 @@ namespace Gst { [CCode (cheader_filename = "gst/rtp/rtp.h")] public static Gst.Buffer buffer_new_take_data ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "gsize")] owned uint8[] data); [CCode (cheader_filename = "gst/rtp/rtp.h")] - public static bool hdrext_get_ntp_56 (void* data, uint size, uint64 ntptime); + public static bool hdrext_get_ntp_56 ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "guint")] uint8[] data, out uint64 ntptime); [CCode (cheader_filename = "gst/rtp/rtp.h")] - public static bool hdrext_get_ntp_64 (void* data, uint size, uint64 ntptime); + public static bool hdrext_get_ntp_64 ([CCode (array_length_cname = "size", array_length_pos = 1.5, array_length_type = "guint")] uint8[] data, out uint64 ntptime); [CCode (cheader_filename = "gst/rtp/rtp.h")] public static bool hdrext_set_ntp_56 (void* data, uint size, uint64 ntptime); [CCode (cheader_filename = "gst/rtp/rtp.h")] @@ -317,7 +317,7 @@ namespace Gst { public weak Gst.RTPC.Buffer rtcp; public uint offset; [CCode (cname = "gst_rtcp_packet_add_profile_specific_ext")] - public bool add_profile_specific_ext (uint8 data, uint len); + public bool add_profile_specific_ext ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "guint")] uint8[] data); [CCode (cname = "gst_rtcp_packet_add_rb")] public bool add_rb (uint32 ssrc, uint8 fractionlost, int32 packetslost, uint32 exthighestseq, uint32 jitter, uint32 lsr, uint32 dlsr); [CCode (cname = "gst_rtcp_packet_app_get_data")] @@ -350,7 +350,7 @@ namespace Gst { [CCode (cname = "gst_rtcp_packet_bye_add_ssrc")] public bool bye_add_ssrc (uint32 ssrc); [CCode (cname = "gst_rtcp_packet_bye_add_ssrcs")] - public bool bye_add_ssrcs (uint32 ssrc, uint len); + public bool bye_add_ssrcs ([CCode (array_length_cname = "len", array_length_pos = 1.1, array_length_type = "guint")] uint32[] ssrc); [CCode (cname = "gst_rtcp_packet_bye_get_nth_ssrc")] public uint32 bye_get_nth_ssrc (uint nth); [CCode (cname = "gst_rtcp_packet_bye_get_reason")] @@ -392,7 +392,7 @@ namespace Gst { [CCode (cname = "gst_rtcp_packet_get_profile_specific_ext_length")] public uint16 get_profile_specific_ext_length (); [CCode (cname = "gst_rtcp_packet_get_rb")] - public void get_rb (uint nth, uint32 ssrc, uint8 fractionlost, int32 packetslost, uint32 exthighestseq, uint32 jitter, uint32 lsr, uint32 dlsr); + public void get_rb (uint nth, out uint32 ssrc, out uint8 fractionlost, out int32 packetslost, out uint32 exthighestseq, out uint32 jitter, out uint32 lsr, out uint32 dlsr); [CCode (cname = "gst_rtcp_packet_get_rb_count")] public uint get_rb_count (); [CCode (cname = "gst_rtcp_packet_get_type")] @@ -428,7 +428,7 @@ namespace Gst { [CCode (cname = "gst_rtcp_packet_set_rb")] public void set_rb (uint nth, uint32 ssrc, uint8 fractionlost, int32 packetslost, uint32 exthighestseq, uint32 jitter, uint32 lsr, uint32 dlsr); [CCode (cname = "gst_rtcp_packet_sr_get_sender_info")] - public void sr_get_sender_info (uint32 ssrc, uint64 ntptime, uint32 rtptime, uint32 packet_count, uint32 octet_count); + public void sr_get_sender_info (out uint32 ssrc, out uint64 ntptime, out uint32 rtptime, out uint32 packet_count, out uint32 octet_count); [CCode (cname = "gst_rtcp_packet_sr_set_sender_info")] public void sr_set_sender_info (uint32 ssrc, uint64 ntptime, uint32 rtptime, uint32 packet_count, uint32 octet_count); } diff --git a/vapi/gstreamer-rtsp-1.0.vapi b/vapi/gstreamer-rtsp-1.0.vapi index 49b82af5b..0d8494080 100644 --- a/vapi/gstreamer-rtsp-1.0.vapi +++ b/vapi/gstreamer-rtsp-1.0.vapi @@ -120,15 +120,15 @@ namespace Gst { public Gst.RTSP.Result init_request (Gst.RTSP.Method method, string uri); [CCode (cname = "gst_rtsp_message_init_response")] public Gst.RTSP.Result init_response (Gst.RTSP.StatusCode code, string? reason, Gst.RTSP.Message? request); - [CCode (cname = "gst_rtsp_message_parse_auth_credentials")] + [CCode (array_length = false, array_null_terminated = true, cname = "gst_rtsp_message_parse_auth_credentials")] [Version (since = "1.12")] - public Gst.RTSP.AuthCredential parse_auth_credentials (Gst.RTSP.HeaderField field); + public Gst.RTSP.AuthCredential[] parse_auth_credentials (Gst.RTSP.HeaderField field); [CCode (cname = "gst_rtsp_message_parse_data")] public Gst.RTSP.Result parse_data (out uint8 channel); [CCode (cname = "gst_rtsp_message_parse_request")] - public Gst.RTSP.Result parse_request (out Gst.RTSP.Method method, out string uri, out Gst.RTSP.Version version); + public Gst.RTSP.Result parse_request (out Gst.RTSP.Method method, out unowned string uri, out Gst.RTSP.Version version); [CCode (cname = "gst_rtsp_message_parse_response")] - public Gst.RTSP.Result parse_response (out Gst.RTSP.StatusCode code, out string reason, out Gst.RTSP.Version version); + public Gst.RTSP.Result parse_response (out Gst.RTSP.StatusCode code, out unowned string reason, out Gst.RTSP.Version version); [CCode (cname = "gst_rtsp_message_remove_header")] public Gst.RTSP.Result remove_header (Gst.RTSP.HeaderField field, int indx); [CCode (cname = "gst_rtsp_message_remove_header_by_name")] @@ -164,7 +164,7 @@ namespace Gst { [CCode (array_length = false, array_null_terminated = true)] public string[] decode_path_components (); public void free (); - public Gst.RTSP.Result get_port (uint16 port); + public Gst.RTSP.Result get_port (out uint16 port); public string get_request_uri (); public Gst.RTSP.Result set_port (uint16 port); } @@ -579,9 +579,9 @@ namespace Gst { public static void range_free (Gst.RTSP.TimeRange range); [CCode (cheader_filename = "gst/rtsp/rtsp.h")] [Version (since = "1.2")] - public static bool range_get_times (Gst.RTSP.TimeRange range, Gst.ClockTime min, Gst.ClockTime max); + public static bool range_get_times (Gst.RTSP.TimeRange range, out Gst.ClockTime min, out Gst.ClockTime max); [CCode (cheader_filename = "gst/rtsp/rtsp.h")] - public static Gst.RTSP.Result range_parse (string rangestr, Gst.RTSP.TimeRange range); + public static Gst.RTSP.Result range_parse (string rangestr, out Gst.RTSP.TimeRange range); [CCode (cheader_filename = "gst/rtsp/rtsp.h")] public static string range_to_string (Gst.RTSP.TimeRange range); [CCode (cheader_filename = "gst/rtsp/rtsp.h")] @@ -589,7 +589,7 @@ namespace Gst { [CCode (cheader_filename = "gst/rtsp/rtsp.h")] public static string strresult (Gst.RTSP.Result result); [CCode (cheader_filename = "gst/rtsp/rtsp.h")] - public static Gst.RTSP.Result transport_get_manager (Gst.RTSP.TransMode trans, string manager, uint option); + public static Gst.RTSP.Result transport_get_manager (Gst.RTSP.TransMode trans, out unowned string? manager, uint option); [CCode (cheader_filename = "gst/rtsp/rtsp.h")] [Version (deprecated = true)] public static Gst.RTSP.Result transport_get_mime (Gst.RTSP.TransMode trans, string mime); diff --git a/vapi/gstreamer-video-1.0.vapi b/vapi/gstreamer-video-1.0.vapi index 3b453d159..9c00b41b4 100644 --- a/vapi/gstreamer-video-1.0.vapi +++ b/vapi/gstreamer-video-1.0.vapi @@ -274,7 +274,7 @@ namespace Gst { [Version (since = "1.6")] public Info (); public bool align (Gst.Video.Alignment align); - public bool convert (Gst.Format src_format, int64 src_value, Gst.Format dest_format, int64 dest_value); + public bool convert (Gst.Format src_format, int64 src_value, Gst.Format dest_format, out int64 dest_value); [Version (since = "1.6")] public Gst.Video.Info copy (); [Version (since = "1.6")] @@ -413,7 +413,7 @@ namespace Gst { public class VBIParser { [CCode (has_construct_function = false)] public VBIParser (Gst.Video.Format format, uint32 pixel_width); - public void add_line (uint8 data); + public void add_line ([CCode (array_length = false)] uint8[] data); public Gst.Video.VBIParser copy (); public void free (); public Gst.Video.VBIParserResult get_ancillary (out Gst.Video.Ancillary anc); @@ -469,10 +469,10 @@ namespace Gst { [CCode (cheader_filename = "gst/video/video.h", type_id = "gst_video_orientation_get_type ()")] [GIR (name = "VideoOrientation")] public interface Orientation : GLib.Object { - public abstract bool get_hcenter (int center); - public abstract bool get_hflip (bool flip); - public abstract bool get_vcenter (int center); - public abstract bool get_vflip (bool flip); + public abstract bool get_hcenter (out int center); + public abstract bool get_hflip (out bool flip); + public abstract bool get_vcenter (out int center); + public abstract bool get_vflip (out bool flip); public abstract bool set_hcenter (int center); public abstract bool set_hflip (bool flip); public abstract bool set_vcenter (int center); @@ -642,7 +642,7 @@ namespace Gst { public weak size_t offset[4]; [CCode (array_length = false)] public weak int stride[4]; - public bool map (uint plane, Gst.MapInfo info, void* data, int stride, Gst.MapFlags flags); + public bool map (uint plane, Gst.MapInfo info, out void* data, out int stride, Gst.MapFlags flags); public bool unmap (uint plane, Gst.MapInfo info); } [CCode (cheader_filename = "gst/video/video.h", has_type_id = false)] @@ -1459,12 +1459,12 @@ namespace Gst { public static unowned string chroma_to_string (Gst.Video.ChromaSite site); [CCode (cheader_filename = "gst/video/video.h")] [Version (since = "1.6")] - public static bool color_matrix_get_Kr_Kb (Gst.Video.ColorMatrix matrix, double Kr, double Kb); + public static bool color_matrix_get_Kr_Kb (Gst.Video.ColorMatrix matrix, out double Kr, out double Kb); [CCode (cheader_filename = "gst/video/video.h")] [Version (since = "1.6")] public static unowned Gst.Video.ColorPrimariesInfo? color_primaries_get_info (Gst.Video.ColorPrimaries primaries); [CCode (cheader_filename = "gst/video/video.h")] - public static void color_range_offsets (Gst.Video.ColorRange range, Gst.Video.FormatInfo info, out int offset, out int scale); + public static void color_range_offsets (Gst.Video.ColorRange range, Gst.Video.FormatInfo info, [CCode (array_length = false)] out int offset[4], [CCode (array_length = false)] out int scale[4]); [CCode (cheader_filename = "gst/video/video.h")] [Version (since = "1.6")] public static double color_transfer_decode (Gst.Video.TransferFunction func, double val); @@ -1490,7 +1490,7 @@ namespace Gst { [CCode (cheader_filename = "gst/video/video.h")] public static bool event_parse_downstream_force_key_unit (Gst.Event event, out Gst.ClockTime timestamp, out Gst.ClockTime stream_time, out Gst.ClockTime running_time, out bool all_headers, out uint count); [CCode (cheader_filename = "gst/video/video.h")] - public static bool event_parse_still_frame (Gst.Event event, bool in_still); + public static bool event_parse_still_frame (Gst.Event event, out bool in_still); [CCode (cheader_filename = "gst/video/video.h")] public static bool event_parse_upstream_force_key_unit (Gst.Event event, out Gst.ClockTime running_time, out bool all_headers, out uint count); [CCode (cheader_filename = "gst/video/video.h")] -- 2.47.2