From f9044e93e160b0f9a0cf86d8bc93a58665ec60cd Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sun, 11 Mar 2018 12:28:57 -0300 Subject: [PATCH] Update to 1.13.90 * Hide new GstAudioAggregator for now (needs some work) * Fix the GstAudioInfo.SetFormat API and its use in the samples (it was plain broken and fixes in the annotation fixed it) --- ges/generated/GES_Timeline.cs | 9 + ges/generated/gst-editing-services-api.xml | 8 + ges/gst-editing-services-api.raw | 8 + samples/BasicTutorial8.cs | 3 +- samples/PlaybackTutorial3.cs | 3 +- sources/generated/Gst.Audio_AudioConverter.cs | 142 +++++--- sources/generated/Gst.Audio_AudioInfo.cs | 14 +- sources/generated/Gst.Base_Aggregator.cs | 28 +- sources/generated/Gst.Base_BaseTransform.cs | 80 +++-- sources/generated/Gst.PbUtils_Constants.cs | 4 +- .../generated/Gst.PbUtils_EncodingTarget.cs | 4 +- sources/generated/Gst.Rtp_RTPBufferFlags.cs | 1 + sources/generated/Gst.Video_Constants.cs | 2 +- sources/generated/Gst.Video_Global.cs | 11 + sources/generated/Gst.Video_VideoFormat.cs | 3 + .../Gst.Video_VideoOverlayAdapter.cs | 11 + .../Gst.Video_VideoRegionOfInterestMeta.cs | 37 +- sources/generated/Gst_Buffer.cs | 6 +- sources/generated/Gst_BufferFlags.cs | 1 + sources/generated/Gst_Constants.cs | 4 +- sources/generated/Gst_Debug.cs | 4 +- sources/generated/Gst_Event.cs | 14 +- sources/generated/Gst_Global.cs | 4 +- sources/generated/Gst_Memory.cs | 18 +- sources/generated/Gst_Message.cs | 10 +- sources/generated/Gst_PresetAdapter.cs | 4 +- sources/generated/Gst_Query.cs | 16 +- sources/generated/Gst_Segment.cs | 1 + sources/generated/Gst_TagList.cs | 6 +- sources/generated/Gst_Uri.cs | 1 + sources/generated/Gst_Util.cs | 3 +- sources/generated/gstreamer-sharp-abi.c | 1 - sources/generated/gstreamer-sharp-abi.cs | 1 - sources/generated/gstreamer-sharp-api.xml | 312 ++++++++++++++--- sources/generated/meson.build | 1 + sources/gstreamer-sharp-api.raw | 322 ++++++++++++++---- sources/gstreamer-sharp.metadata | 6 + 37 files changed, 825 insertions(+), 278 deletions(-) diff --git a/ges/generated/GES_Timeline.cs b/ges/generated/GES_Timeline.cs index 2e0e489c84..a346efcf68 100644 --- a/ges/generated/GES_Timeline.cs +++ b/ges/generated/GES_Timeline.cs @@ -825,6 +825,15 @@ namespace GES { return ret; } + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr ges_timeline_paste_element(IntPtr raw, IntPtr element, ulong position, int layer_priority); + + public GES.TimelineElement PasteElement(GES.TimelineElement element, ulong position, int layer_priority) { + IntPtr raw_ret = ges_timeline_paste_element(Handle, element == null ? IntPtr.Zero : element.Handle, position, layer_priority); + GES.TimelineElement ret = GLib.Object.GetObject(raw_ret) as GES.TimelineElement; + return ret; + } + [DllImport("ges-1.0", CallingConvention = CallingConvention.Cdecl)] static extern bool ges_timeline_remove_layer(IntPtr raw, IntPtr layer); diff --git a/ges/generated/gst-editing-services-api.xml b/ges/generated/gst-editing-services-api.xml index 2fe6b5a594..8a2a4c3bbd 100644 --- a/ges/generated/gst-editing-services-api.xml +++ b/ges/generated/gst-editing-services-api.xml @@ -2379,6 +2379,14 @@ + + + + + + + + diff --git a/ges/gst-editing-services-api.raw b/ges/gst-editing-services-api.raw index 3e59f07e40..f8962ed5e2 100644 --- a/ges/gst-editing-services-api.raw +++ b/ges/gst-editing-services-api.raw @@ -2409,6 +2409,14 @@ + + + + + + + + diff --git a/samples/BasicTutorial8.cs b/samples/BasicTutorial8.cs index 2b4bde5de9..34c4e6c868 100644 --- a/samples/BasicTutorial8.cs +++ b/samples/BasicTutorial8.cs @@ -160,7 +160,8 @@ namespace GstreamerSharp Visual ["style"] = 0; // Configure appsrc - info.SetFormat (Gst.Audio.AudioFormat.S16, SampleRate, 1, (Gst.Audio.AudioChannelPosition) 0); + Gst.Audio.AudioChannelPosition[] position = {}; + info.SetFormat (Gst.Audio.AudioFormat.S16, SampleRate, 1, position); var audioCaps = info.ToCaps (); AppSource ["caps"] = audioCaps; AppSource ["format"] = Format.Time; diff --git a/samples/PlaybackTutorial3.cs b/samples/PlaybackTutorial3.cs index dc725b0638..c597ca68b5 100644 --- a/samples/PlaybackTutorial3.cs +++ b/samples/PlaybackTutorial3.cs @@ -99,7 +99,8 @@ namespace GstreamerSharp AppSource = source; // Configure appsrc - info.SetFormat (Gst.Audio.AudioFormat.S16, SampleRate, 1, (Gst.Audio.AudioChannelPosition)0); + Gst.Audio.AudioChannelPosition[] position = {}; + info.SetFormat (Gst.Audio.AudioFormat.S16, SampleRate, 1, position); var audioCaps = info.ToCaps (); source ["caps"] = audioCaps; source ["format"] = Format.Time; diff --git a/sources/generated/Gst.Audio_AudioConverter.cs b/sources/generated/Gst.Audio_AudioConverter.cs index a9bce484fa..f0c732cc7f 100644 --- a/sources/generated/Gst.Audio_AudioConverter.cs +++ b/sources/generated/Gst.Audio_AudioConverter.cs @@ -9,14 +9,49 @@ namespace Gst.Audio { using System.Runtime.InteropServices; #region Autogenerated code - public partial class AudioConverter : GLib.Opaque { + [StructLayout(LayoutKind.Sequential)] + public partial struct AudioConverter : IEquatable { + + + public static Gst.Audio.AudioConverter Zero = new Gst.Audio.AudioConverter (); + + public static Gst.Audio.AudioConverter New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Audio.AudioConverter.Zero; + return (Gst.Audio.AudioConverter) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioConverter)); + } + + [DllImport("libgstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_converter_new(int flags, IntPtr in_info, IntPtr out_info, IntPtr config); + + public static AudioConverter New(Gst.Audio.AudioConverterFlags flags, Gst.Audio.AudioInfo in_info, Gst.Audio.AudioInfo out_info, Gst.Structure config) + { + config.Owned = false; + AudioConverter result = AudioConverter.New (gst_audio_converter_new((int) flags, in_info == null ? IntPtr.Zero : in_info.Handle, out_info == null ? IntPtr.Zero : out_info.Handle, config == null ? IntPtr.Zero : config.Handle)); + return result; + } + + [DllImport("libgstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_converter_get_type(); + + public static GLib.GType GType { + get { + IntPtr raw_ret = gst_audio_converter_get_type(); + GLib.GType ret = new GLib.GType(raw_ret); + return ret; + } + } [DllImport("libgstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_audio_converter_get_config(IntPtr raw, int in_rate, int out_rate); public Gst.Structure GetConfig(int in_rate, int out_rate) { - IntPtr raw_ret = gst_audio_converter_get_config(Handle, in_rate, out_rate); + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr raw_ret = gst_audio_converter_get_config(this_as_native, in_rate, out_rate); Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); return ret; } @@ -24,8 +59,12 @@ namespace Gst.Audio { static extern UIntPtr gst_audio_converter_get_in_frames(IntPtr raw, UIntPtr out_frames); public ulong GetInFrames(ulong out_frames) { - UIntPtr raw_ret = gst_audio_converter_get_in_frames(Handle, new UIntPtr (out_frames)); + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + UIntPtr raw_ret = gst_audio_converter_get_in_frames(this_as_native, new UIntPtr (out_frames)); ulong ret = (ulong) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); return ret; } @@ -34,8 +73,12 @@ namespace Gst.Audio { public ulong MaxLatency { get { - UIntPtr raw_ret = gst_audio_converter_get_max_latency(Handle); + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + UIntPtr raw_ret = gst_audio_converter_get_max_latency(this_as_native); ulong ret = (ulong) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); return ret; } } @@ -44,8 +87,12 @@ namespace Gst.Audio { static extern UIntPtr gst_audio_converter_get_out_frames(IntPtr raw, UIntPtr in_frames); public ulong GetOutFrames(ulong in_frames) { - UIntPtr raw_ret = gst_audio_converter_get_out_frames(Handle, new UIntPtr (in_frames)); + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + UIntPtr raw_ret = gst_audio_converter_get_out_frames(this_as_native, new UIntPtr (in_frames)); ulong ret = (ulong) raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); return ret; } @@ -53,15 +100,23 @@ namespace Gst.Audio { static extern void gst_audio_converter_reset(IntPtr raw); public void Reset() { - gst_audio_converter_reset(Handle); + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + gst_audio_converter_reset(this_as_native); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); } [DllImport("libgstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gst_audio_converter_samples(IntPtr raw, int flags, IntPtr in_param, UIntPtr in_frames, IntPtr out_param, UIntPtr out_frames); public bool Samples(Gst.Audio.AudioConverterFlags flags, IntPtr in_param, ulong in_frames, IntPtr out_param, ulong out_frames) { - bool raw_ret = gst_audio_converter_samples(Handle, (int) flags, in_param, new UIntPtr (in_frames), out_param, new UIntPtr (out_frames)); + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_audio_converter_samples(this_as_native, (int) flags, in_param, new UIntPtr (in_frames), out_param, new UIntPtr (out_frames)); bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); return ret; } @@ -73,8 +128,12 @@ namespace Gst.Audio { static extern bool gst_audio_converter_supports_inplace(IntPtr raw); public bool SupportsInplace() { - bool raw_ret = gst_audio_converter_supports_inplace(Handle); + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + bool raw_ret = gst_audio_converter_supports_inplace(this_as_native); bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); return ret; } @@ -82,9 +141,13 @@ namespace Gst.Audio { static extern bool gst_audio_converter_update_config(IntPtr raw, int in_rate, int out_rate, IntPtr config); public bool UpdateConfig(int in_rate, int out_rate, Gst.Structure config) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); config.Owned = false; - bool raw_ret = gst_audio_converter_update_config(Handle, in_rate, out_rate, config == null ? IntPtr.Zero : config.Handle); + bool raw_ret = gst_audio_converter_update_config(this_as_native, in_rate, out_rate, config == null ? IntPtr.Zero : config.Handle); bool ret = raw_ret; + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); return ret; } @@ -92,55 +155,38 @@ namespace Gst.Audio { return UpdateConfig (in_rate, out_rate, null); } - public AudioConverter(IntPtr raw) : base(raw) {} - - [DllImport("libgstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern void gst_audio_converter_free(IntPtr raw); - - protected override void Free (IntPtr raw) + static void ReadNative (IntPtr native, ref Gst.Audio.AudioConverter target) { - gst_audio_converter_free (raw); + target = New (native); } - class FinalizerInfo { - IntPtr handle; - - public FinalizerInfo (IntPtr handle) - { - this.handle = handle; - } - - public bool Handler () - { - gst_audio_converter_free (handle); - return false; - } - } - - ~AudioConverter () + public bool Equals (AudioConverter other) { - if (!Owned) - return; - FinalizerInfo info = new FinalizerInfo (Handle); - GLib.Timeout.Add (50, new GLib.TimeoutHandler (info.Handler)); + return true; } - - // Internal representation of the wrapped structure ABI. - static GLib.AbiStruct _abi_info = null; - static public GLib.AbiStruct abi_info { - get { - if (_abi_info == null) - _abi_info = new GLib.AbiStruct (new List{ - }); - - return _abi_info; - } + public override bool Equals (object other) + { + return other is AudioConverter && Equals ((AudioConverter) other); } + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode (); + } - // End of the ABI representation. + public static explicit operator GLib.Value (Gst.Audio.AudioConverter boxed) + { + GLib.Value val = GLib.Value.Empty; + val.Init (Gst.Audio.AudioConverter.GType); + val.Val = boxed; + return val; + } + public static explicit operator Gst.Audio.AudioConverter (GLib.Value val) + { + return (Gst.Audio.AudioConverter) val.Val; + } #endregion } } diff --git a/sources/generated/Gst.Audio_AudioInfo.cs b/sources/generated/Gst.Audio_AudioInfo.cs index 62977c4a58..0a234eff08 100644 --- a/sources/generated/Gst.Audio_AudioInfo.cs +++ b/sources/generated/Gst.Audio_AudioInfo.cs @@ -156,10 +156,18 @@ namespace Gst.Audio { } [DllImport("libgstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern void gst_audio_info_set_format(IntPtr raw, int format, int rate, int channels, int position); + static extern void gst_audio_info_set_format(IntPtr raw, int format, int rate, int channels, int[] position); - public void SetFormat(Gst.Audio.AudioFormat format, int rate, int channels, Gst.Audio.AudioChannelPosition position) { - gst_audio_info_set_format(Handle, (int) format, rate, channels, (int) position); + public void SetFormat(Gst.Audio.AudioFormat format, int rate, int channels, Gst.Audio.AudioChannelPosition[] position) { + int cnt_position = position == null ? 0 : position.Length; + int[] native_position = new int [cnt_position]; + for (int i = 0; i < cnt_position; i++) + native_position [i] = (int) position[i]; + gst_audio_info_set_format(Handle, (int) format, rate, channels, native_position); + } + + public void SetFormat(Gst.Audio.AudioFormat format, int rate, int channels) { + SetFormat (format, rate, channels, null); } [DllImport("libgstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] diff --git a/sources/generated/Gst.Base_Aggregator.cs b/sources/generated/Gst.Base_Aggregator.cs index bffa325d56..df92bde9e9 100644 --- a/sources/generated/Gst.Base_Aggregator.cs +++ b/sources/generated/Gst.Base_Aggregator.cs @@ -59,15 +59,6 @@ namespace Gst.Base { } } - public Gst.Segment Segment { - get { - unsafe { - IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("segment")); - return Gst.Segment.New ((*raw_ptr)); - } - } - } - static FlushNativeDelegate Flush_cb_delegate; static FlushNativeDelegate FlushVMCallback { get { @@ -1299,22 +1290,14 @@ namespace Gst.Base { , Gst.Element.abi_info.Fields , (uint) Marshal.SizeOf(typeof(IntPtr)) // srcpad , null - , "segment" - , (uint) Marshal.SizeOf(typeof(IntPtr)) - , 0 - ), - new GLib.AbiField("segment" - , -1 - , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // segment - , "srcpad" , "priv" - , (long) Marshal.OffsetOf(typeof(GstAggregator_segmentAlign), "segment") + , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("priv" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv - , "segment" + , "srcpad" , "_gst_reserved" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 @@ -1333,13 +1316,6 @@ namespace Gst.Base { } } - [StructLayout(LayoutKind.Sequential)] - public struct GstAggregator_segmentAlign - { - sbyte f1; - private Gst.Segment segment; - } - // End of the ABI representation. diff --git a/sources/generated/Gst.Base_BaseTransform.cs b/sources/generated/Gst.Base_BaseTransform.cs index 8c8a5b7c76..04f741064e 100644 --- a/sources/generated/Gst.Base_BaseTransform.cs +++ b/sources/generated/Gst.Base_BaseTransform.cs @@ -565,14 +565,16 @@ namespace Gst.Base { } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] - delegate bool TransformSizeNativeDelegate (IntPtr inst, int direction, IntPtr caps, UIntPtr size, IntPtr othercaps, UIntPtr othersize); + delegate bool TransformSizeNativeDelegate (IntPtr inst, int direction, IntPtr caps, UIntPtr size, IntPtr othercaps, out UIntPtr othersize); - static bool TransformSize_cb (IntPtr inst, int direction, IntPtr caps, UIntPtr size, IntPtr othercaps, UIntPtr othersize) + static bool TransformSize_cb (IntPtr inst, int direction, IntPtr caps, UIntPtr size, IntPtr othercaps, out UIntPtr othersize) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; bool __result; - __result = __obj.OnTransformSize ((Gst.PadDirection) direction, caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false), (ulong) size, othercaps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (othercaps, typeof (Gst.Caps), false), (ulong) othersize); + ulong myothersize; + __result = __obj.OnTransformSize ((Gst.PadDirection) direction, caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false), (ulong) size, othercaps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (othercaps, typeof (Gst.Caps), false), out myothersize); + othersize = new UIntPtr (myothersize); return __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); @@ -582,21 +584,23 @@ namespace Gst.Base { } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideTransformSize")] - protected virtual bool OnTransformSize (Gst.PadDirection direction, Gst.Caps caps, ulong size, Gst.Caps othercaps, ulong othersize) + protected virtual bool OnTransformSize (Gst.PadDirection direction, Gst.Caps caps, ulong size, Gst.Caps othercaps, out ulong othersize) { - return InternalTransformSize (direction, caps, size, othercaps, othersize); + return InternalTransformSize (direction, caps, size, othercaps, out othersize); } - private bool InternalTransformSize (Gst.PadDirection direction, Gst.Caps caps, ulong size, Gst.Caps othercaps, ulong othersize) + private bool InternalTransformSize (Gst.PadDirection direction, Gst.Caps caps, ulong size, Gst.Caps othercaps, out ulong othersize) { TransformSizeNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_size")); unmanaged = (TransformSizeNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformSizeNativeDelegate)); } - if (unmanaged == null) return false; + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); - bool __result = unmanaged (this.Handle, (int) direction, caps == null ? IntPtr.Zero : caps.Handle, new UIntPtr (size), othercaps == null ? IntPtr.Zero : othercaps.Handle, new UIntPtr (othersize)); + UIntPtr native_othersize; + bool __result = unmanaged (this.Handle, (int) direction, caps == null ? IntPtr.Zero : caps.Handle, new UIntPtr (size), othercaps == null ? IntPtr.Zero : othercaps.Handle, out native_othersize); + othersize = (ulong) native_othersize; return __result; } @@ -623,14 +627,16 @@ namespace Gst.Base { } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] - delegate bool GetUnitSizeNativeDelegate (IntPtr inst, IntPtr caps, UIntPtr size); + delegate bool GetUnitSizeNativeDelegate (IntPtr inst, IntPtr caps, out UIntPtr size); - static bool GetUnitSize_cb (IntPtr inst, IntPtr caps, UIntPtr size) + static bool GetUnitSize_cb (IntPtr inst, IntPtr caps, out UIntPtr size) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; bool __result; - __result = __obj.OnGetUnitSize (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false), (ulong) size); + ulong mysize; + __result = __obj.OnGetUnitSize (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false), out mysize); + size = new UIntPtr (mysize); return __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); @@ -640,21 +646,23 @@ namespace Gst.Base { } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideGetUnitSize")] - protected virtual bool OnGetUnitSize (Gst.Caps caps, ulong size) + protected virtual bool OnGetUnitSize (Gst.Caps caps, out ulong size) { - return InternalGetUnitSize (caps, size); + return InternalGetUnitSize (caps, out size); } - private bool InternalGetUnitSize (Gst.Caps caps, ulong size) + private bool InternalGetUnitSize (Gst.Caps caps, out ulong size) { GetUnitSizeNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_unit_size")); unmanaged = (GetUnitSizeNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetUnitSizeNativeDelegate)); } - if (unmanaged == null) return false; + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); - bool __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle, new UIntPtr (size)); + UIntPtr native_size; + bool __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle, out native_size); + size = (ulong) native_size; return __result; } @@ -913,14 +921,16 @@ namespace Gst.Base { } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] - delegate int PrepareOutputBufferNativeDelegate (IntPtr inst, IntPtr input, IntPtr outbuf); + delegate int PrepareOutputBufferNativeDelegate (IntPtr inst, IntPtr input, out IntPtr outbuf); - static int PrepareOutputBuffer_cb (IntPtr inst, IntPtr input, IntPtr outbuf) + static int PrepareOutputBuffer_cb (IntPtr inst, IntPtr input, out IntPtr outbuf) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; Gst.FlowReturn __result; - __result = __obj.OnPrepareOutputBuffer (input == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (input, typeof (Gst.Buffer), false), outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (outbuf, typeof (Gst.Buffer), false)); + Gst.Buffer myoutbuf; + __result = __obj.OnPrepareOutputBuffer (input == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (input, typeof (Gst.Buffer), false), out myoutbuf); + outbuf = myoutbuf == null ? IntPtr.Zero : myoutbuf.Handle; return (int) __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); @@ -930,21 +940,23 @@ namespace Gst.Base { } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverridePrepareOutputBuffer")] - protected virtual Gst.FlowReturn OnPrepareOutputBuffer (Gst.Buffer input, Gst.Buffer outbuf) + protected virtual Gst.FlowReturn OnPrepareOutputBuffer (Gst.Buffer input, out Gst.Buffer outbuf) { - return InternalPrepareOutputBuffer (input, outbuf); + return InternalPrepareOutputBuffer (input, out outbuf); } - private Gst.FlowReturn InternalPrepareOutputBuffer (Gst.Buffer input, Gst.Buffer outbuf) + private Gst.FlowReturn InternalPrepareOutputBuffer (Gst.Buffer input, out Gst.Buffer outbuf) { PrepareOutputBufferNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare_output_buffer")); unmanaged = (PrepareOutputBufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrepareOutputBufferNativeDelegate)); } - if (unmanaged == null) return (Gst.FlowReturn) 0; + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); - int __result = unmanaged (this.Handle, input == null ? IntPtr.Zero : input.Handle, outbuf == null ? IntPtr.Zero : outbuf.Handle); + IntPtr native_outbuf; + int __result = unmanaged (this.Handle, input == null ? IntPtr.Zero : input.Handle, out native_outbuf); + outbuf = native_outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_outbuf, typeof (Gst.Buffer), true); return (Gst.FlowReturn) __result; } @@ -1316,14 +1328,16 @@ namespace Gst.Base { } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] - delegate int GenerateOutputNativeDelegate (IntPtr inst, IntPtr outbuf); + delegate int GenerateOutputNativeDelegate (IntPtr inst, out IntPtr outbuf); - static int GenerateOutput_cb (IntPtr inst, IntPtr outbuf) + static int GenerateOutput_cb (IntPtr inst, out IntPtr outbuf) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; Gst.FlowReturn __result; - __result = __obj.OnGenerateOutput (outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (outbuf, typeof (Gst.Buffer), false)); + Gst.Buffer myoutbuf; + __result = __obj.OnGenerateOutput (out myoutbuf); + outbuf = myoutbuf == null ? IntPtr.Zero : myoutbuf.Handle; return (int) __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); @@ -1333,21 +1347,23 @@ namespace Gst.Base { } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideGenerateOutput")] - protected virtual Gst.FlowReturn OnGenerateOutput (Gst.Buffer outbuf) + protected virtual Gst.FlowReturn OnGenerateOutput (out Gst.Buffer outbuf) { - return InternalGenerateOutput (outbuf); + return InternalGenerateOutput (out outbuf); } - private Gst.FlowReturn InternalGenerateOutput (Gst.Buffer outbuf) + private Gst.FlowReturn InternalGenerateOutput (out Gst.Buffer outbuf) { GenerateOutputNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("generate_output")); unmanaged = (GenerateOutputNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GenerateOutputNativeDelegate)); } - if (unmanaged == null) return (Gst.FlowReturn) 0; + if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); - int __result = unmanaged (this.Handle, outbuf == null ? IntPtr.Zero : outbuf.Handle); + IntPtr native_outbuf; + int __result = unmanaged (this.Handle, out native_outbuf); + outbuf = native_outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_outbuf, typeof (Gst.Buffer), true); return (Gst.FlowReturn) __result; } diff --git a/sources/generated/Gst.PbUtils_Constants.cs b/sources/generated/Gst.PbUtils_Constants.cs index 4f091f77c9..53db26925c 100644 --- a/sources/generated/Gst.PbUtils_Constants.cs +++ b/sources/generated/Gst.PbUtils_Constants.cs @@ -17,9 +17,9 @@ namespace Gst.PbUtils { public const string ENCODING_CATEGORY_ONLINE_SERVICE = @"online-service"; public const string ENCODING_CATEGORY_STORAGE_EDITING = @"storage-editing"; public const int PLUGINS_BASE_VERSION_MAJOR = 1; - public const int PLUGINS_BASE_VERSION_MICRO = 0; + public const int PLUGINS_BASE_VERSION_MICRO = 90; public const int PLUGINS_BASE_VERSION_MINOR = 13; - public const int PLUGINS_BASE_VERSION_NANO = 1; + public const int PLUGINS_BASE_VERSION_NANO = 0; #endregion } } diff --git a/sources/generated/Gst.PbUtils_EncodingTarget.cs b/sources/generated/Gst.PbUtils_EncodingTarget.cs index 88dcf1b3e4..84cf2d6ff5 100644 --- a/sources/generated/Gst.PbUtils_EncodingTarget.cs +++ b/sources/generated/Gst.PbUtils_EncodingTarget.cs @@ -67,7 +67,7 @@ namespace Gst.PbUtils { static extern unsafe IntPtr gst_encoding_target_load_from_file(IntPtr filepath, out IntPtr error); public static unsafe Gst.PbUtils.EncodingTarget LoadFromFile(string filepath) { - IntPtr native_filepath = GLib.Marshaller.StringToPtrGStrdup (filepath); + IntPtr native_filepath = GLib.Marshaller.StringToFilenamePtr (filepath); IntPtr error = IntPtr.Zero; IntPtr raw_ret = gst_encoding_target_load_from_file(native_filepath, out error); Gst.PbUtils.EncodingTarget ret = GLib.Object.GetObject(raw_ret, true) as Gst.PbUtils.EncodingTarget; @@ -155,7 +155,7 @@ namespace Gst.PbUtils { static extern unsafe bool gst_encoding_target_save_to_file(IntPtr raw, IntPtr filepath, out IntPtr error); public unsafe bool SaveToFile(string filepath) { - IntPtr native_filepath = GLib.Marshaller.StringToPtrGStrdup (filepath); + IntPtr native_filepath = GLib.Marshaller.StringToFilenamePtr (filepath); IntPtr error = IntPtr.Zero; bool raw_ret = gst_encoding_target_save_to_file(Handle, native_filepath, out error); bool ret = raw_ret; diff --git a/sources/generated/Gst.Rtp_RTPBufferFlags.cs b/sources/generated/Gst.Rtp_RTPBufferFlags.cs index 57c426d41d..2ee916ca06 100644 --- a/sources/generated/Gst.Rtp_RTPBufferFlags.cs +++ b/sources/generated/Gst.Rtp_RTPBufferFlags.cs @@ -12,6 +12,7 @@ namespace Gst.Rtp { public enum RTPBufferFlags { Retransmission = 1048576, + Redundant = 2097152, Last = 268435456, } diff --git a/sources/generated/Gst.Video_Constants.cs b/sources/generated/Gst.Video_Constants.cs index ed404f96ee..6a8f52af55 100644 --- a/sources/generated/Gst.Video_Constants.cs +++ b/sources/generated/Gst.Video_Constants.cs @@ -64,7 +64,7 @@ namespace Gst.Video { public const string VIDEO_DECODER_SRC_NAME = @"src"; public const string VIDEO_ENCODER_SINK_NAME = @"sink"; public const string VIDEO_ENCODER_SRC_NAME = @"src"; - public const string VIDEO_FORMATS_ALL = @"{ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE }"; + public const string VIDEO_FORMATS_ALL = @"{ I420, YV12, YUY2, UYVY, AYUV, RGBx, BGRx, xRGB, xBGR, RGBA, BGRA, ARGB, ABGR, RGB, BGR, Y41B, Y42B, YVYU, Y444, v210, v216, NV12, NV21, GRAY8, GRAY16_BE, GRAY16_LE, v308, RGB16, BGR16, RGB15, BGR15, UYVP, A420, RGB8P, YUV9, YVU9, IYU1, ARGB64, AYUV64, r210, I420_10BE, I420_10LE, I422_10BE, I422_10LE, Y444_10BE, Y444_10LE, GBR, GBR_10BE, GBR_10LE, NV16, NV24, NV12_64Z32, A420_10BE, A420_10LE, A422_10BE, A422_10LE, A444_10BE, A444_10LE, NV61, P010_10BE, P010_10LE, IYU2, VYUY, GBRA, GBRA_10BE, GBRA_10LE, GBR_12BE, GBR_12LE, GBRA_12BE, GBRA_12LE, I420_12BE, I420_12LE, I422_12BE, I422_12LE, Y444_12BE, Y444_12LE, GRAY10_LE32, NV12_10LE32, NV16_10LE32 }"; public const string VIDEO_FPS_RANGE = @"(fraction) [ 0, max ]"; public const int VIDEO_MAX_COMPONENTS = 4; public const int VIDEO_MAX_PLANES = 4; diff --git a/sources/generated/Gst.Video_Global.cs b/sources/generated/Gst.Video_Global.cs index 79d23e0b27..e363117a59 100644 --- a/sources/generated/Gst.Video_Global.cs +++ b/sources/generated/Gst.Video_Global.cs @@ -852,6 +852,17 @@ namespace Gst.Video { return ret; } + [DllImport("libgstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_overlay_set_property(IntPtr _object, int last_prop_id, uint property_id, IntPtr value); + + public static bool VideoOverlaySetProperty(GLib.Object _object, int last_prop_id, uint property_id, GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = gst_video_overlay_set_property(_object == null ? IntPtr.Zero : _object.Handle, last_prop_id, property_id, native_value); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + [DllImport("libgstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_video_region_of_interest_meta_api_get_type(); diff --git a/sources/generated/Gst.Video_VideoFormat.cs b/sources/generated/Gst.Video_VideoFormat.cs index 5dd96a1bab..65f6b65990 100644 --- a/sources/generated/Gst.Video_VideoFormat.cs +++ b/sources/generated/Gst.Video_VideoFormat.cs @@ -88,6 +88,9 @@ namespace Gst.Video { I42212le = 75, Y44412be = 76, Y44412le = 77, + Gray10Le32 = 78, + Nv1210le32 = 79, + Nv1610le32 = 80, } internal class VideoFormatGType { diff --git a/sources/generated/Gst.Video_VideoOverlayAdapter.cs b/sources/generated/Gst.Video_VideoOverlayAdapter.cs index d72113d076..62cdb9d21b 100644 --- a/sources/generated/Gst.Video_VideoOverlayAdapter.cs +++ b/sources/generated/Gst.Video_VideoOverlayAdapter.cs @@ -169,6 +169,17 @@ namespace Gst.Video { } } + [DllImport("libgstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern bool gst_video_overlay_set_property(IntPtr _object, int last_prop_id, uint property_id, IntPtr value); + + public static bool SetProperty(GLib.Object _object, int last_prop_id, uint property_id, GLib.Value value) { + IntPtr native_value = GLib.Marshaller.StructureToPtrAlloc (value); + bool raw_ret = gst_video_overlay_set_property(_object == null ? IntPtr.Zero : _object.Handle, last_prop_id, property_id, native_value); + bool ret = raw_ret; + Marshal.FreeHGlobal (native_value); + return ret; + } + [DllImport("libgstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gst_video_overlay_expose(IntPtr raw); diff --git a/sources/generated/Gst.Video_VideoRegionOfInterestMeta.cs b/sources/generated/Gst.Video_VideoRegionOfInterestMeta.cs index 22fcaea71f..712b319e24 100644 --- a/sources/generated/Gst.Video_VideoRegionOfInterestMeta.cs +++ b/sources/generated/Gst.Video_VideoRegionOfInterestMeta.cs @@ -20,6 +20,7 @@ namespace Gst.Video { public uint Y; public uint W; public uint H; + private IntPtr _parms; public static Gst.Video.VideoRegionOfInterestMeta Zero = new Gst.Video.VideoRegionOfInterestMeta (); @@ -29,6 +30,33 @@ namespace Gst.Video { return (Gst.Video.VideoRegionOfInterestMeta) Marshal.PtrToStructure (raw, typeof (Gst.Video.VideoRegionOfInterestMeta)); } + [DllImport("libgstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern void gst_video_region_of_interest_meta_add_param(IntPtr raw, IntPtr s); + + public void AddParam(Gst.Structure s) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + s.Owned = false; + gst_video_region_of_interest_meta_add_param(this_as_native, s == null ? IntPtr.Zero : s.Handle); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + } + + [DllImport("libgstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_video_region_of_interest_meta_get_param(IntPtr raw, IntPtr name); + + public Gst.Structure GetParam(string name) { + IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); + System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); + IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); + IntPtr raw_ret = gst_video_region_of_interest_meta_get_param(this_as_native, native_name); + Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false); + ReadNative (this_as_native, ref this); + System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); + GLib.Marshaller.Free (native_name); + return ret; + } + [DllImport("libgstvideo-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_video_region_of_interest_meta_get_info(); @@ -40,9 +68,14 @@ namespace Gst.Video { } } + static void ReadNative (IntPtr native, ref Gst.Video.VideoRegionOfInterestMeta target) + { + target = New (native); + } + public bool Equals (VideoRegionOfInterestMeta other) { - return true && Meta.Equals (other.Meta) && RoiType.Equals (other.RoiType) && Id.Equals (other.Id) && ParentId.Equals (other.ParentId) && X.Equals (other.X) && Y.Equals (other.Y) && W.Equals (other.W) && H.Equals (other.H); + return true && Meta.Equals (other.Meta) && RoiType.Equals (other.RoiType) && Id.Equals (other.Id) && ParentId.Equals (other.ParentId) && X.Equals (other.X) && Y.Equals (other.Y) && W.Equals (other.W) && H.Equals (other.H) && _parms.Equals (other._parms); } public override bool Equals (object other) @@ -52,7 +85,7 @@ namespace Gst.Video { public override int GetHashCode () { - return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ RoiType.GetHashCode () ^ Id.GetHashCode () ^ ParentId.GetHashCode () ^ X.GetHashCode () ^ Y.GetHashCode () ^ W.GetHashCode () ^ H.GetHashCode (); + return this.GetType ().FullName.GetHashCode () ^ Meta.GetHashCode () ^ RoiType.GetHashCode () ^ Id.GetHashCode () ^ ParentId.GetHashCode () ^ X.GetHashCode () ^ Y.GetHashCode () ^ W.GetHashCode () ^ H.GetHashCode () ^ _parms.GetHashCode (); } private static GLib.GType GType { diff --git a/sources/generated/Gst_Buffer.cs b/sources/generated/Gst_Buffer.cs index 0b396750f2..28732cb8e4 100644 --- a/sources/generated/Gst_Buffer.cs +++ b/sources/generated/Gst_Buffer.cs @@ -280,10 +280,10 @@ namespace Gst { } [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern uint gst_buffer_get_n_meta(IntPtr raw, IntPtr api); + static extern uint gst_buffer_get_n_meta(IntPtr raw, IntPtr api_type); - public uint GetNMeta(GLib.GType api) { - uint raw_ret = gst_buffer_get_n_meta(Handle, api.Val); + public uint GetNMeta(GLib.GType api_type) { + uint raw_ret = gst_buffer_get_n_meta(Handle, api_type.Val); uint ret = raw_ret; return ret; } diff --git a/sources/generated/Gst_BufferFlags.cs b/sources/generated/Gst_BufferFlags.cs index a688f57629..632533493e 100644 --- a/sources/generated/Gst_BufferFlags.cs +++ b/sources/generated/Gst_BufferFlags.cs @@ -23,6 +23,7 @@ namespace Gst { DeltaUnit = 8192, TagMemory = 16384, SyncAfter = 32768, + NonDroppable = 65536, Last = 1048576, } diff --git a/sources/generated/Gst_Constants.cs b/sources/generated/Gst_Constants.cs index 4d27bfb710..3d23760a62 100644 --- a/sources/generated/Gst_Constants.cs +++ b/sources/generated/Gst_Constants.cs @@ -163,9 +163,9 @@ namespace Gst { public const int VALUE_LESS_THAN = -1; public const int VALUE_UNORDERED = 2; public const int VERSION_MAJOR = 1; - public const int VERSION_MICRO = 0; + public const int VERSION_MICRO = 90; public const int VERSION_MINOR = 13; - public const int VERSION_NANO = 1; + public const int VERSION_NANO = 0; #endregion } } diff --git a/sources/generated/Gst_Debug.cs b/sources/generated/Gst_Debug.cs index 32218c07bb..282d8c8c26 100644 --- a/sources/generated/Gst_Debug.cs +++ b/sources/generated/Gst_Debug.cs @@ -46,7 +46,7 @@ namespace Gst { static extern void gst_debug_bin_to_dot_file(IntPtr bin, int details, IntPtr file_name); public static void BinToDotFile(Gst.Bin bin, Gst.DebugGraphDetails details, string file_name) { - IntPtr native_file_name = GLib.Marshaller.StringToPtrGStrdup (file_name); + IntPtr native_file_name = GLib.Marshaller.StringToFilenamePtr (file_name); gst_debug_bin_to_dot_file(bin == null ? IntPtr.Zero : bin.Handle, (int) details, native_file_name); GLib.Marshaller.Free (native_file_name); } @@ -55,7 +55,7 @@ namespace Gst { static extern void gst_debug_bin_to_dot_file_with_ts(IntPtr bin, int details, IntPtr file_name); public static void BinToDotFileWithTs(Gst.Bin bin, Gst.DebugGraphDetails details, string file_name) { - IntPtr native_file_name = GLib.Marshaller.StringToPtrGStrdup (file_name); + IntPtr native_file_name = GLib.Marshaller.StringToFilenamePtr (file_name); gst_debug_bin_to_dot_file_with_ts(bin == null ? IntPtr.Zero : bin.Handle, (int) details, native_file_name); GLib.Marshaller.Free (native_file_name); } diff --git a/sources/generated/Gst_Event.cs b/sources/generated/Gst_Event.cs index 771d4e854f..4749ff1606 100644 --- a/sources/generated/Gst_Event.cs +++ b/sources/generated/Gst_Event.cs @@ -172,20 +172,16 @@ namespace Gst { } [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern void gst_event_parse_protection(IntPtr raw, out IntPtr system_id, out IntPtr data, IntPtr origin); + static extern void gst_event_parse_protection(IntPtr raw, out IntPtr system_id, out IntPtr data, out IntPtr origin); - public void ParseProtection(out string system_id, out Gst.Buffer data, string origin) { + public void ParseProtection(out string system_id, out Gst.Buffer data, out string origin) { IntPtr native_system_id; IntPtr native_data; - IntPtr native_origin = GLib.Marshaller.StringToPtrGStrdup (origin); - gst_event_parse_protection(Handle, out native_system_id, out native_data, native_origin); + IntPtr native_origin; + gst_event_parse_protection(Handle, out native_system_id, out native_data, out native_origin); system_id = GLib.Marshaller.Utf8PtrToString (native_system_id); data = native_data == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_data, typeof (Gst.Buffer), false); - GLib.Marshaller.Free (native_origin); - } - - public void ParseProtection(out string system_id, out Gst.Buffer data) { - ParseProtection (out system_id, out data, null); + origin = GLib.Marshaller.Utf8PtrToString (native_origin); } [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] diff --git a/sources/generated/Gst_Global.cs b/sources/generated/Gst_Global.cs index 06cbb29409..f7b9b11d63 100644 --- a/sources/generated/Gst_Global.cs +++ b/sources/generated/Gst_Global.cs @@ -274,7 +274,7 @@ namespace Gst { public static string PresetGetAppDir() { IntPtr raw_ret = gst_preset_get_app_dir(); - string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + string ret = GLib.Marshaller.FilenamePtrToString (raw_ret); return ret; } @@ -282,7 +282,7 @@ namespace Gst { static extern bool gst_preset_set_app_dir(IntPtr app_dir); public static bool PresetSetAppDir(string app_dir) { - IntPtr native_app_dir = GLib.Marshaller.StringToPtrGStrdup (app_dir); + IntPtr native_app_dir = GLib.Marshaller.StringToFilenamePtr (app_dir); bool raw_ret = gst_preset_set_app_dir(native_app_dir); bool ret = raw_ret; GLib.Marshaller.Free (native_app_dir); diff --git a/sources/generated/Gst_Memory.cs b/sources/generated/Gst_Memory.cs index 5cf55be5f2..1d969ec5c5 100644 --- a/sources/generated/Gst_Memory.cs +++ b/sources/generated/Gst_Memory.cs @@ -122,20 +122,26 @@ namespace Gst { } [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern UIntPtr gst_memory_get_sizes(IntPtr raw, UIntPtr offset, UIntPtr maxsize); + static extern UIntPtr gst_memory_get_sizes(IntPtr raw, out UIntPtr offset, out UIntPtr maxsize); - public ulong GetSizes(ulong offset, ulong maxsize) { - UIntPtr raw_ret = gst_memory_get_sizes(Handle, new UIntPtr (offset), new UIntPtr (maxsize)); + public ulong GetSizes(out ulong offset, out ulong maxsize) { + UIntPtr native_offset; + UIntPtr native_maxsize; + UIntPtr raw_ret = gst_memory_get_sizes(Handle, out native_offset, out native_maxsize); ulong ret = (ulong) raw_ret; + offset = (ulong) native_offset; + maxsize = (ulong) native_maxsize; return ret; } [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern bool gst_memory_is_span(IntPtr raw, IntPtr mem2, UIntPtr offset); + static extern bool gst_memory_is_span(IntPtr raw, IntPtr mem2, out UIntPtr offset); - public bool IsSpan(Gst.Memory mem2, ulong offset) { - bool raw_ret = gst_memory_is_span(Handle, mem2 == null ? IntPtr.Zero : mem2.Handle, new UIntPtr (offset)); + public bool IsSpan(Gst.Memory mem2, out ulong offset) { + UIntPtr native_offset; + bool raw_ret = gst_memory_is_span(Handle, mem2 == null ? IntPtr.Zero : mem2.Handle, out native_offset); bool ret = raw_ret; + offset = (ulong) native_offset; return ret; } diff --git a/sources/generated/Gst_Message.cs b/sources/generated/Gst_Message.cs index a20931050a..cbcc2f9f00 100644 --- a/sources/generated/Gst_Message.cs +++ b/sources/generated/Gst_Message.cs @@ -186,7 +186,7 @@ namespace Gst { IntPtr native_context_type; bool raw_ret = gst_message_parse_context_type(Handle, out native_context_type); bool ret = raw_ret; - context_type = GLib.Marshaller.PtrToStringGFree(native_context_type); + context_type = GLib.Marshaller.Utf8PtrToString (native_context_type); return ret; } @@ -219,7 +219,7 @@ namespace Gst { Gst.Structure structure; IntPtr native_structure; gst_message_parse_error_details(Handle, out native_structure); - structure = native_structure == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (native_structure, typeof (Gst.Structure), true); + structure = native_structure == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (native_structure, typeof (Gst.Structure), false); return structure; } @@ -260,7 +260,7 @@ namespace Gst { Gst.Structure structure; IntPtr native_structure; gst_message_parse_info_details(Handle, out native_structure); - structure = native_structure == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (native_structure, typeof (Gst.Structure), true); + structure = native_structure == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (native_structure, typeof (Gst.Structure), false); return structure; } @@ -297,7 +297,7 @@ namespace Gst { IntPtr native_property_value = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (GLib.Value))); gst_message_parse_property_notify(Handle, out native__object, out native_property_name, native_property_value); _object = GLib.Object.GetObject(native__object) as Gst.Object; - property_name = GLib.Marshaller.PtrToStringGFree(native_property_name); + property_name = GLib.Marshaller.Utf8PtrToString (native_property_name); property_value = (GLib.Value) Marshal.PtrToStructure (native_property_value, typeof (GLib.Value)); Marshal.FreeHGlobal (native_property_value); } @@ -488,7 +488,7 @@ namespace Gst { Gst.Structure structure; IntPtr native_structure; gst_message_parse_warning_details(Handle, out native_structure); - structure = native_structure == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (native_structure, typeof (Gst.Structure), true); + structure = native_structure == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (native_structure, typeof (Gst.Structure), false); return structure; } diff --git a/sources/generated/Gst_PresetAdapter.cs b/sources/generated/Gst_PresetAdapter.cs index 9eb130cb30..9142b012aa 100644 --- a/sources/generated/Gst_PresetAdapter.cs +++ b/sources/generated/Gst_PresetAdapter.cs @@ -275,7 +275,7 @@ namespace Gst { public static string AppDir { get { IntPtr raw_ret = gst_preset_get_app_dir(); - string ret = GLib.Marshaller.Utf8PtrToString (raw_ret); + string ret = GLib.Marshaller.FilenamePtrToString (raw_ret); return ret; } } @@ -284,7 +284,7 @@ namespace Gst { static extern bool gst_preset_set_app_dir(IntPtr app_dir); public static bool SetAppDir(string app_dir) { - IntPtr native_app_dir = GLib.Marshaller.StringToPtrGStrdup (app_dir); + IntPtr native_app_dir = GLib.Marshaller.StringToFilenamePtr (app_dir); bool raw_ret = gst_preset_set_app_dir(native_app_dir); bool ret = raw_ret; GLib.Marshaller.Free (native_app_dir); diff --git a/sources/generated/Gst_Query.cs b/sources/generated/Gst_Query.cs index 06fe512180..0a4bb42f0b 100644 --- a/sources/generated/Gst_Query.cs +++ b/sources/generated/Gst_Query.cs @@ -193,10 +193,12 @@ namespace Gst { } [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern void gst_query_parse_accept_caps_result(IntPtr raw, bool _result); + static extern void gst_query_parse_accept_caps_result(IntPtr raw, out bool _result); - public void ParseAcceptCapsResult(bool _result) { - gst_query_parse_accept_caps_result(Handle, _result); + public bool ParseAcceptCapsResult() { + bool _result; + gst_query_parse_accept_caps_result(Handle, out _result); + return _result; } [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] @@ -356,12 +358,14 @@ namespace Gst { } [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern void gst_query_parse_nth_format(IntPtr raw, out uint nth, out int format); + static extern void gst_query_parse_nth_format(IntPtr raw, uint nth, out int format); - public void ParseNthFormat(out uint nth, out Gst.Format format) { + public Gst.Format ParseNthFormat(uint nth) { + Gst.Format format; int native_format; - gst_query_parse_nth_format(Handle, out nth, out native_format); + gst_query_parse_nth_format(Handle, nth, out native_format); format = (Gst.Format) native_format; + return format; } [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] diff --git a/sources/generated/Gst_Segment.cs b/sources/generated/Gst_Segment.cs index 51611fa3e7..82605500c5 100644 --- a/sources/generated/Gst_Segment.cs +++ b/sources/generated/Gst_Segment.cs @@ -200,6 +200,7 @@ namespace Gst { [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern ulong gst_segment_to_position(IntPtr raw, int format, ulong running_time); + [Obsolete] public ulong ToPosition(Gst.Format format, ulong running_time) { IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false); diff --git a/sources/generated/Gst_TagList.cs b/sources/generated/Gst_TagList.cs index 035eebc421..a7cc2100f8 100644 --- a/sources/generated/Gst_TagList.cs +++ b/sources/generated/Gst_TagList.cs @@ -171,11 +171,11 @@ namespace Gst { } [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern bool gst_tag_list_get_int64(IntPtr raw, IntPtr tag, long value); + static extern bool gst_tag_list_get_int64(IntPtr raw, IntPtr tag, out long value); - public bool GetInt64(string tag, long value) { + public bool GetInt64(string tag, out long value) { IntPtr native_tag = GLib.Marshaller.StringToPtrGStrdup (tag); - bool raw_ret = gst_tag_list_get_int64(Handle, native_tag, value); + bool raw_ret = gst_tag_list_get_int64(Handle, native_tag, out value); bool ret = raw_ret; GLib.Marshaller.Free (native_tag); return ret; diff --git a/sources/generated/Gst_Uri.cs b/sources/generated/Gst_Uri.cs index f2000f1a3a..5f304004ee 100644 --- a/sources/generated/Gst_Uri.cs +++ b/sources/generated/Gst_Uri.cs @@ -635,6 +635,7 @@ namespace Gst { [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_uri_construct(IntPtr protocol, IntPtr location); + [Obsolete] public static string Construct(string protocol, string location) { IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup (protocol); IntPtr native_location = GLib.Marshaller.StringToPtrGStrdup (location); diff --git a/sources/generated/Gst_Util.cs b/sources/generated/Gst_Util.cs index 4cb2739489..ab526f58bc 100644 --- a/sources/generated/Gst_Util.cs +++ b/sources/generated/Gst_Util.cs @@ -13,7 +13,7 @@ namespace Gst { static extern unsafe IntPtr gst_filename_to_uri(IntPtr filename, out IntPtr error); public static unsafe string FilenameToUri(string filename) { - IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup (filename); + IntPtr native_filename = GLib.Marshaller.StringToFilenamePtr (filename); IntPtr error = IntPtr.Zero; IntPtr raw_ret = gst_filename_to_uri(native_filename, out error); string ret = GLib.Marshaller.PtrToStringGFree(raw_ret); @@ -85,6 +85,7 @@ namespace Gst { [DllImport("libgstreamer-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_uri_construct(IntPtr protocol, IntPtr location); + [Obsolete] public static string UriConstruct(string protocol, string location) { IntPtr native_protocol = GLib.Marshaller.StringToPtrGStrdup (protocol); IntPtr native_location = GLib.Marshaller.StringToPtrGStrdup (location); diff --git a/sources/generated/gstreamer-sharp-abi.c b/sources/generated/gstreamer-sharp-abi.c index c9bb47af2b..ce9695753a 100644 --- a/sources/generated/gstreamer-sharp-abi.c +++ b/sources/generated/gstreamer-sharp-abi.c @@ -545,7 +545,6 @@ int main (int argc, char *argv[]) { g_print("\"GstAggregatorClass.propose_allocation\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorClass, propose_allocation)); g_print("\"sizeof(GstAggregator)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAggregator)); g_print("\"GstAggregator.srcpad\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregator, srcpad)); - g_print("\"GstAggregator.segment\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregator, segment)); g_print("\"GstAggregator.priv\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregator, priv)); g_print("\"sizeof(GstAggregatorPadClass)\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) sizeof(GstAggregatorPadClass)); g_print("\"GstAggregatorPadClass.flush\": \"%" G_GUINT64_FORMAT "\"\n", (guint64) G_STRUCT_OFFSET(GstAggregatorPadClass, flush)); diff --git a/sources/generated/gstreamer-sharp-abi.cs b/sources/generated/gstreamer-sharp-abi.cs index cadd4884d5..8b7177c40f 100644 --- a/sources/generated/gstreamer-sharp-abi.cs +++ b/sources/generated/gstreamer-sharp-abi.cs @@ -540,7 +540,6 @@ namespace AbiTester { Console.WriteLine("\"GstAggregatorClass.propose_allocation\": \"" + Gst.Base.Aggregator.class_abi.GetFieldOffset("propose_allocation") + "\""); Console.WriteLine("\"sizeof(GstAggregator)\": \"" + Gst.Base.Aggregator.abi_info.Size + "\""); Console.WriteLine("\"GstAggregator.srcpad\": \"" + Gst.Base.Aggregator.abi_info.GetFieldOffset("srcpad") + "\""); - Console.WriteLine("\"GstAggregator.segment\": \"" + Gst.Base.Aggregator.abi_info.GetFieldOffset("segment") + "\""); Console.WriteLine("\"GstAggregator.priv\": \"" + Gst.Base.Aggregator.abi_info.GetFieldOffset("priv") + "\""); Console.WriteLine("\"sizeof(GstAggregatorPadClass)\": \"" + Gst.Base.AggregatorPad.class_abi.Size + "\""); Console.WriteLine("\"GstAggregatorPadClass.flush\": \"" + Gst.Base.AggregatorPad.class_abi.GetFieldOffset("flush") + "\""); diff --git a/sources/generated/gstreamer-sharp-api.xml b/sources/generated/gstreamer-sharp-api.xml index 88fa6fe511..4516332092 100644 --- a/sources/generated/gstreamer-sharp-api.xml +++ b/sources/generated/gstreamer-sharp-api.xml @@ -197,7 +197,7 @@ - + @@ -418,6 +418,7 @@ + @@ -1222,7 +1223,7 @@ - + @@ -1464,12 +1465,12 @@ - + - + @@ -6324,7 +6325,7 @@ - + @@ -7483,7 +7484,7 @@ missing glib:type-name - + @@ -7790,8 +7791,8 @@ - - + + @@ -7800,7 +7801,7 @@ missing glib:type-name - + @@ -8259,7 +8260,7 @@ - + @@ -8286,7 +8287,7 @@ - + missing glib:type-name @@ -8317,7 +8318,7 @@ - + missing glib:type-name @@ -8340,8 +8341,8 @@ - - + + missing glib:type-name @@ -8498,7 +8499,7 @@ - + missing glib:type-name @@ -8925,36 +8926,36 @@ - - + - +