2018-01-29 18:56:49 +00:00
|
|
|
// 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
|
2018-03-11 15:28:57 +00:00
|
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
|
|
public partial struct AudioConverter : IEquatable<AudioConverter> {
|
|
|
|
|
|
|
|
|
|
|
|
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));
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-03-11 15:28:57 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-03-11 15:28:57 +00:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
2018-01-29 18:56:49 +00:00
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-05-17 19:38:32 +00:00
|
|
|
static extern IntPtr gst_audio_converter_get_config(IntPtr raw, out int in_rate, out int out_rate);
|
2018-01-29 18:56:49 +00:00
|
|
|
|
2018-05-17 19:38:32 +00:00
|
|
|
public Gst.Structure GetConfig(out int in_rate, out int out_rate) {
|
2018-03-11 15:28:57 +00:00
|
|
|
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);
|
2018-05-17 19:38:32 +00:00
|
|
|
IntPtr raw_ret = gst_audio_converter_get_config(this_as_native, out in_rate, out out_rate);
|
2018-01-29 18:56:49 +00:00
|
|
|
Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false);
|
2018-03-11 15:28:57 +00:00
|
|
|
ReadNative (this_as_native, ref this);
|
|
|
|
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
|
2018-01-29 18:56:49 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-01-29 18:56:49 +00:00
|
|
|
static extern UIntPtr gst_audio_converter_get_in_frames(IntPtr raw, UIntPtr out_frames);
|
|
|
|
|
|
|
|
public ulong GetInFrames(ulong out_frames) {
|
2018-03-11 15:28:57 +00:00
|
|
|
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));
|
2018-01-29 18:56:49 +00:00
|
|
|
ulong ret = (ulong) raw_ret;
|
2018-03-11 15:28:57 +00:00
|
|
|
ReadNative (this_as_native, ref this);
|
|
|
|
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
|
2018-01-29 18:56:49 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-01-29 18:56:49 +00:00
|
|
|
static extern UIntPtr gst_audio_converter_get_max_latency(IntPtr raw);
|
|
|
|
|
|
|
|
public ulong MaxLatency {
|
|
|
|
get {
|
2018-03-11 15:28:57 +00:00
|
|
|
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);
|
2018-01-29 18:56:49 +00:00
|
|
|
ulong ret = (ulong) raw_ret;
|
2018-03-11 15:28:57 +00:00
|
|
|
ReadNative (this_as_native, ref this);
|
|
|
|
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
|
2018-01-29 18:56:49 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-01-29 18:56:49 +00:00
|
|
|
static extern UIntPtr gst_audio_converter_get_out_frames(IntPtr raw, UIntPtr in_frames);
|
|
|
|
|
|
|
|
public ulong GetOutFrames(ulong in_frames) {
|
2018-03-11 15:28:57 +00:00
|
|
|
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));
|
2018-01-29 18:56:49 +00:00
|
|
|
ulong ret = (ulong) raw_ret;
|
2018-03-11 15:28:57 +00:00
|
|
|
ReadNative (this_as_native, ref this);
|
|
|
|
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
|
2018-01-29 18:56:49 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2019-02-25 14:33:39 +00:00
|
|
|
static extern bool gst_audio_converter_is_passthrough(IntPtr raw);
|
|
|
|
|
|
|
|
public bool IsPassthrough {
|
|
|
|
get {
|
|
|
|
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_is_passthrough(this_as_native);
|
|
|
|
bool ret = raw_ret;
|
|
|
|
ReadNative (this_as_native, ref this);
|
|
|
|
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-01-29 18:56:49 +00:00
|
|
|
static extern void gst_audio_converter_reset(IntPtr raw);
|
|
|
|
|
|
|
|
public void Reset() {
|
2018-03-11 15:28:57 +00:00
|
|
|
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);
|
2018-01-29 18:56:49 +00:00
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-01-29 18:56:49 +00:00
|
|
|
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) {
|
2018-03-11 15:28:57 +00:00
|
|
|
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));
|
2018-01-29 18:56:49 +00:00
|
|
|
bool ret = raw_ret;
|
2018-03-11 15:28:57 +00:00
|
|
|
ReadNative (this_as_native, ref this);
|
|
|
|
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
|
2018-01-29 18:56:49 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool Samples(Gst.Audio.AudioConverterFlags flags, ulong in_frames, ulong out_frames) {
|
|
|
|
return Samples (flags, IntPtr.Zero, in_frames, IntPtr.Zero, out_frames);
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-01-29 18:56:49 +00:00
|
|
|
static extern bool gst_audio_converter_supports_inplace(IntPtr raw);
|
|
|
|
|
|
|
|
public bool SupportsInplace() {
|
2018-03-11 15:28:57 +00:00
|
|
|
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);
|
2018-01-29 18:56:49 +00:00
|
|
|
bool ret = raw_ret;
|
2018-03-11 15:28:57 +00:00
|
|
|
ReadNative (this_as_native, ref this);
|
|
|
|
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
|
2018-01-29 18:56:49 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2019-10-24 14:00:17 +00:00
|
|
|
[DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
|
2018-01-29 18:56:49 +00:00
|
|
|
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) {
|
2018-03-11 15:28:57 +00:00
|
|
|
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);
|
2018-01-29 18:56:49 +00:00
|
|
|
config.Owned = false;
|
2018-03-11 15:28:57 +00:00
|
|
|
bool raw_ret = gst_audio_converter_update_config(this_as_native, in_rate, out_rate, config == null ? IntPtr.Zero : config.Handle);
|
2018-01-29 18:56:49 +00:00
|
|
|
bool ret = raw_ret;
|
2018-03-11 15:28:57 +00:00
|
|
|
ReadNative (this_as_native, ref this);
|
|
|
|
System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
|
2018-01-29 18:56:49 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
public bool UpdateConfig(int in_rate, int out_rate) {
|
|
|
|
return UpdateConfig (in_rate, out_rate, null);
|
|
|
|
}
|
|
|
|
|
2018-03-11 15:28:57 +00:00
|
|
|
static void ReadNative (IntPtr native, ref Gst.Audio.AudioConverter target)
|
2018-01-29 18:56:49 +00:00
|
|
|
{
|
2018-03-11 15:28:57 +00:00
|
|
|
target = New (native);
|
2018-01-29 18:56:49 +00:00
|
|
|
}
|
|
|
|
|
2018-03-11 15:28:57 +00:00
|
|
|
public bool Equals (AudioConverter other)
|
|
|
|
{
|
|
|
|
return true;
|
2018-01-29 18:56:49 +00:00
|
|
|
}
|
|
|
|
|
2018-03-11 15:28:57 +00:00
|
|
|
public override bool Equals (object other)
|
2018-01-29 18:56:49 +00:00
|
|
|
{
|
2018-03-11 15:28:57 +00:00
|
|
|
return other is AudioConverter && Equals ((AudioConverter) other);
|
2018-01-29 18:56:49 +00:00
|
|
|
}
|
|
|
|
|
2018-03-11 15:28:57 +00:00
|
|
|
public override int GetHashCode ()
|
|
|
|
{
|
|
|
|
return this.GetType ().FullName.GetHashCode ();
|
2018-01-29 18:56:49 +00:00
|
|
|
}
|
|
|
|
|
2018-03-11 15:28:57 +00:00
|
|
|
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;
|
|
|
|
}
|
2018-01-29 18:56:49 +00:00
|
|
|
|
2018-03-11 15:28:57 +00:00
|
|
|
public static explicit operator Gst.Audio.AudioConverter (GLib.Value val)
|
|
|
|
{
|
|
|
|
return (Gst.Audio.AudioConverter) val.Val;
|
|
|
|
}
|
2018-01-29 18:56:49 +00:00
|
|
|
#endregion
|
|
|
|
}
|
|
|
|
}
|