diff options
Diffstat (limited to 'sources/generated/Gst.Audio')
-rw-r--r-- | sources/generated/Gst.Audio/AudioDecoder.cs | 10 | ||||
-rw-r--r-- | sources/generated/Gst.Audio/AudioEncoder.cs | 5 | ||||
-rw-r--r-- | sources/generated/Gst.Audio/AudioSink.cs | 189 | ||||
-rw-r--r-- | sources/generated/Gst.Audio/AudioSinkClassExtension.cs | 45 | ||||
-rw-r--r-- | sources/generated/Gst.Audio/Constants.cs | 2 | ||||
-rw-r--r-- | sources/generated/Gst.Audio/Global.cs | 17 |
6 files changed, 264 insertions, 4 deletions
diff --git a/sources/generated/Gst.Audio/AudioDecoder.cs b/sources/generated/Gst.Audio/AudioDecoder.cs index d6a328d..d05da73 100644 --- a/sources/generated/Gst.Audio/AudioDecoder.cs +++ b/sources/generated/Gst.Audio/AudioDecoder.cs @@ -1350,20 +1350,30 @@ namespace Gst.Audio { static extern int gst_audio_decoder_finish_frame(IntPtr raw, IntPtr buf, int frames); public Gst.FlowReturn FinishFrame(Gst.Buffer buf, int frames) { + buf.Owned = false; int raw_ret = gst_audio_decoder_finish_frame(Handle, buf == null ? IntPtr.Zero : buf.Handle, frames); Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; return ret; } + public Gst.FlowReturn FinishFrame(int frames) { + return FinishFrame (null, frames); + } + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern int gst_audio_decoder_finish_subframe(IntPtr raw, IntPtr buf); public Gst.FlowReturn FinishSubframe(Gst.Buffer buf) { + buf.Owned = false; int raw_ret = gst_audio_decoder_finish_subframe(Handle, buf == null ? IntPtr.Zero : buf.Handle); Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; return ret; } + public Gst.FlowReturn FinishSubframe() { + return FinishSubframe (null); + } + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gst_audio_decoder_get_allocator(IntPtr raw, out IntPtr allocator, IntPtr parms); diff --git a/sources/generated/Gst.Audio/AudioEncoder.cs b/sources/generated/Gst.Audio/AudioEncoder.cs index 44ff052..50bcea0 100644 --- a/sources/generated/Gst.Audio/AudioEncoder.cs +++ b/sources/generated/Gst.Audio/AudioEncoder.cs @@ -1302,11 +1302,16 @@ namespace Gst.Audio { static extern int gst_audio_encoder_finish_frame(IntPtr raw, IntPtr buffer, int samples); public Gst.FlowReturn FinishFrame(Gst.Buffer buffer, int samples) { + buffer.Owned = false; int raw_ret = gst_audio_encoder_finish_frame(Handle, buffer == null ? IntPtr.Zero : buffer.Handle, samples); Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret; return ret; } + public Gst.FlowReturn FinishFrame(int samples) { + return FinishFrame (null, samples); + } + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gst_audio_encoder_get_allocator(IntPtr raw, out IntPtr allocator, IntPtr parms); diff --git a/sources/generated/Gst.Audio/AudioSink.cs b/sources/generated/Gst.Audio/AudioSink.cs index 0e02892..79d918e 100644 --- a/sources/generated/Gst.Audio/AudioSink.cs +++ b/sources/generated/Gst.Audio/AudioSink.cs @@ -419,6 +419,165 @@ namespace Gst.Audio { unmanaged (this.Handle); } + static PauseNativeDelegate Pause_cb_delegate; + static PauseNativeDelegate PauseVMCallback { + get { + if (Pause_cb_delegate == null) + Pause_cb_delegate = new PauseNativeDelegate (Pause_cb); + return Pause_cb_delegate; + } + } + + static void OverridePause (GLib.GType gtype) + { + OverridePause (gtype, PauseVMCallback); + } + + static void OverridePause (GLib.GType gtype, PauseNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pause")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void PauseNativeDelegate (IntPtr inst); + + static void Pause_cb (IntPtr inst) + { + try { + AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink; + __obj.OnPause (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverridePause")] + protected virtual void OnPause () + { + InternalPause (); + } + + private void InternalPause () + { + PauseNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("pause")); + unmanaged = (PauseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PauseNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + static ResumeNativeDelegate Resume_cb_delegate; + static ResumeNativeDelegate ResumeVMCallback { + get { + if (Resume_cb_delegate == null) + Resume_cb_delegate = new ResumeNativeDelegate (Resume_cb); + return Resume_cb_delegate; + } + } + + static void OverrideResume (GLib.GType gtype) + { + OverrideResume (gtype, ResumeVMCallback); + } + + static void OverrideResume (GLib.GType gtype, ResumeNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("resume")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void ResumeNativeDelegate (IntPtr inst); + + static void Resume_cb (IntPtr inst) + { + try { + AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink; + __obj.OnResume (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideResume")] + protected virtual void OnResume () + { + InternalResume (); + } + + private void InternalResume () + { + ResumeNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("resume")); + unmanaged = (ResumeNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ResumeNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + + static StopNativeDelegate Stop_cb_delegate; + static StopNativeDelegate StopVMCallback { + get { + if (Stop_cb_delegate == null) + Stop_cb_delegate = new StopNativeDelegate (Stop_cb); + return Stop_cb_delegate; + } + } + + static void OverrideStop (GLib.GType gtype) + { + OverrideStop (gtype, StopVMCallback); + } + + static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback) + { + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); + } + } + + [UnmanagedFunctionPointer (CallingConvention.Cdecl)] + delegate void StopNativeDelegate (IntPtr inst); + + static void Stop_cb (IntPtr inst) + { + try { + AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink; + __obj.OnStop (); + } catch (Exception e) { + GLib.ExceptionManager.RaiseUnhandledException (e, false); + } + } + + [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideStop")] + protected virtual void OnStop () + { + InternalStop (); + } + + private void InternalStop () + { + StopNativeDelegate unmanaged = null; + unsafe { + IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); + unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate)); + } + if (unmanaged == null) return; + + unmanaged (this.Handle); + } + // Internal representation of the wrapped structure ABI. static GLib.AbiStruct _class_abi = null; @@ -478,14 +637,38 @@ namespace Gst.Audio { , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // reset , "delay" - , "_gst_reserved" + , "pause" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), - new GLib.AbiField("_gst_reserved" + new GLib.AbiField("pause" , -1 - , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved + , (uint) Marshal.SizeOf(typeof(IntPtr)) // pause , "reset" + , "resume" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("resume" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // resume + , "pause" + , "stop" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("stop" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop + , "resume" + , "extension" + , (uint) Marshal.SizeOf(typeof(IntPtr)) + , 0 + ), + new GLib.AbiField("extension" + , -1 + , (uint) Marshal.SizeOf(typeof(IntPtr)) // extension + , "stop" , null , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 diff --git a/sources/generated/Gst.Audio/AudioSinkClassExtension.cs b/sources/generated/Gst.Audio/AudioSinkClassExtension.cs new file mode 100644 index 0000000..3ef75bb --- /dev/null +++ b/sources/generated/Gst.Audio/AudioSinkClassExtension.cs @@ -0,0 +1,45 @@ +// This file was generated by the Gtk# code generator. +// Any changes made will be lost if regenerated. + +namespace Gst.Audio { + + using System; + using System.Collections; + using System.Collections.Generic; + using System.Runtime.InteropServices; + +#region Autogenerated code + [StructLayout(LayoutKind.Sequential)] + public partial struct AudioSinkClassExtension : IEquatable<AudioSinkClassExtension> { + + private IntPtr _clear_all; + + public static Gst.Audio.AudioSinkClassExtension Zero = new Gst.Audio.AudioSinkClassExtension (); + + public static Gst.Audio.AudioSinkClassExtension New(IntPtr raw) { + if (raw == IntPtr.Zero) + return Gst.Audio.AudioSinkClassExtension.Zero; + return (Gst.Audio.AudioSinkClassExtension) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioSinkClassExtension)); + } + + public bool Equals (AudioSinkClassExtension other) + { + return true && _clear_all.Equals (other._clear_all); + } + + public override bool Equals (object other) + { + return other is AudioSinkClassExtension && Equals ((AudioSinkClassExtension) other); + } + + public override int GetHashCode () + { + return this.GetType ().FullName.GetHashCode () ^ _clear_all.GetHashCode (); + } + + private static GLib.GType GType { + get { return GLib.GType.Pointer; } + } +#endregion + } +} diff --git a/sources/generated/Gst.Audio/Constants.cs b/sources/generated/Gst.Audio/Constants.cs index edbe7d7..336ec58 100644 --- a/sources/generated/Gst.Audio/Constants.cs +++ b/sources/generated/Gst.Audio/Constants.cs @@ -25,7 +25,7 @@ namespace Gst.Audio { public const int AUDIO_DEF_RATE = 44100; public const string AUDIO_ENCODER_SINK_NAME = @"sink"; public const string AUDIO_ENCODER_SRC_NAME = @"src"; - public const string AUDIO_FORMATS_ALL = @" { S8, U8, S16LE, S16BE, U16LE, U16BE, S24_32LE, S24_32BE, U24_32LE, U24_32BE, S32LE, S32BE, U32LE, U32BE, S24LE, S24BE, U24LE, U24BE, S20LE, S20BE, U20LE, U20BE, S18LE, S18BE, U18LE, U18BE, F32LE, F32BE, F64LE, F64BE }"; + public const string AUDIO_FORMATS_ALL = @"{ F64BE, F64LE, F32BE, F32LE, S32BE, S32LE, U32BE, U32LE, S24_32BE, S24_32LE, U24_32BE, U24_32LE, S24BE, S24LE, U24BE, U24LE, S20BE, S20LE, U20BE, U20LE, S18BE, S18LE, U18BE, U18LE, S16BE, S16LE, U16BE, U16LE, S8, U8 }"; public const string AUDIO_RATE_RANGE = @"(int) [ 1, max ]"; public const string AUDIO_RESAMPLER_OPT_CUBIC_B = @"GstAudioResampler.cubic-b"; public const string AUDIO_RESAMPLER_OPT_CUBIC_C = @"GstAudioResampler.cubic-c"; diff --git a/sources/generated/Gst.Audio/Global.cs b/sources/generated/Gst.Audio/Global.cs index 71ad7f2..f21e7ae 100644 --- a/sources/generated/Gst.Audio/Global.cs +++ b/sources/generated/Gst.Audio/Global.cs @@ -252,6 +252,23 @@ namespace Gst.Audio { } [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] + static extern IntPtr gst_audio_make_raw_caps(int[] formats, uint len, int layout); + + public static Gst.Caps AudioMakeRawCaps(Gst.Audio.AudioFormat[] formats, uint len, Gst.Audio.AudioLayout layout) { + int cnt_formats = formats == null ? 0 : formats.Length; + int[] native_formats = new int [cnt_formats]; + for (int i = 0; i < cnt_formats; i++) + native_formats [i] = (int) formats[i]; + IntPtr raw_ret = gst_audio_make_raw_caps(native_formats, len, (int) layout); + Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true); + return ret; + } + + public static Gst.Caps AudioMakeRawCaps(uint len, Gst.Audio.AudioLayout layout) { + return AudioMakeRawCaps (null, len, layout); + } + + [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_audio_meta_api_get_type(); public static GLib.GType AudioMetaApiGetType() { |