Release 1.22.7
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst.Audio / AudioConverter.cs
1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
3
4 namespace Gst.Audio {
5
6         using System;
7         using System.Collections;
8         using System.Collections.Generic;
9         using System.Runtime.InteropServices;
10
11 #region Autogenerated code
12         [StructLayout(LayoutKind.Sequential)]
13         public partial struct AudioConverter : IEquatable<AudioConverter> {
14
15
16                 public static Gst.Audio.AudioConverter Zero = new Gst.Audio.AudioConverter ();
17
18                 public static Gst.Audio.AudioConverter New(IntPtr raw) {
19                         if (raw == IntPtr.Zero)
20                                 return Gst.Audio.AudioConverter.Zero;
21                         return (Gst.Audio.AudioConverter) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioConverter));
22                 }
23
24                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
25                 static extern IntPtr gst_audio_converter_new(int flags, IntPtr in_info, IntPtr out_info, IntPtr config);
26
27                 public static AudioConverter New(Gst.Audio.AudioConverterFlags flags, Gst.Audio.AudioInfo in_info, Gst.Audio.AudioInfo out_info, Gst.Structure config)
28                 {
29                         config.Owned = false;
30                         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));
31                         return result;
32                 }
33
34                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
35                 static extern IntPtr gst_audio_converter_get_type();
36
37                 public static GLib.GType GType { 
38                         get {
39                                 IntPtr raw_ret = gst_audio_converter_get_type();
40                                 GLib.GType ret = new GLib.GType(raw_ret);
41                                 return ret;
42                         }
43                 }
44
45                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
46                 static extern IntPtr gst_audio_converter_get_config(IntPtr raw, out int in_rate, out int out_rate);
47
48                 public Gst.Structure GetConfig(out int in_rate, out int out_rate) {
49                         IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
50                         System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
51                         IntPtr raw_ret = gst_audio_converter_get_config(this_as_native, out in_rate, out out_rate);
52                         Gst.Structure ret = raw_ret == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Structure), false);
53                         ReadNative (this_as_native, ref this);
54                         System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
55                         return ret;
56                 }
57
58                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
59                 static extern UIntPtr gst_audio_converter_get_in_frames(IntPtr raw, UIntPtr out_frames);
60
61                 public ulong GetInFrames(ulong out_frames) {
62                         IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
63                         System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
64                         UIntPtr raw_ret = gst_audio_converter_get_in_frames(this_as_native, new UIntPtr (out_frames));
65                         ulong ret = (ulong) raw_ret;
66                         ReadNative (this_as_native, ref this);
67                         System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
68                         return ret;
69                 }
70
71                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
72                 static extern UIntPtr gst_audio_converter_get_max_latency(IntPtr raw);
73
74                 public ulong MaxLatency { 
75                         get {
76                                 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
77                                 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
78                                 UIntPtr raw_ret = gst_audio_converter_get_max_latency(this_as_native);
79                                 ulong ret = (ulong) raw_ret;
80                                 ReadNative (this_as_native, ref this);
81                                 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
82                                 return ret;
83                         }
84                 }
85
86                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
87                 static extern UIntPtr gst_audio_converter_get_out_frames(IntPtr raw, UIntPtr in_frames);
88
89                 public ulong GetOutFrames(ulong in_frames) {
90                         IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
91                         System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
92                         UIntPtr raw_ret = gst_audio_converter_get_out_frames(this_as_native, new UIntPtr (in_frames));
93                         ulong ret = (ulong) raw_ret;
94                         ReadNative (this_as_native, ref this);
95                         System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
96                         return ret;
97                 }
98
99                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
100                 static extern bool gst_audio_converter_is_passthrough(IntPtr raw);
101
102                 public bool IsPassthrough { 
103                         get {
104                                 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
105                                 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
106                                 bool raw_ret = gst_audio_converter_is_passthrough(this_as_native);
107                                 bool ret = raw_ret;
108                                 ReadNative (this_as_native, ref this);
109                                 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
110                                 return ret;
111                         }
112                 }
113
114                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
115                 static extern void gst_audio_converter_reset(IntPtr raw);
116
117                 public void Reset() {
118                         IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
119                         System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
120                         gst_audio_converter_reset(this_as_native);
121                         ReadNative (this_as_native, ref this);
122                         System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
123                 }
124
125                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
126                 static extern bool gst_audio_converter_samples(IntPtr raw, int flags, IntPtr in_param, UIntPtr in_frames, IntPtr out_param, UIntPtr out_frames);
127
128                 public bool Samples(Gst.Audio.AudioConverterFlags flags, IntPtr in_param, ulong in_frames, IntPtr out_param, ulong out_frames) {
129                         IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
130                         System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
131                         bool raw_ret = gst_audio_converter_samples(this_as_native, (int) flags, in_param, new UIntPtr (in_frames), out_param, new UIntPtr (out_frames));
132                         bool ret = raw_ret;
133                         ReadNative (this_as_native, ref this);
134                         System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
135                         return ret;
136                 }
137
138                 public bool Samples(Gst.Audio.AudioConverterFlags flags, ulong in_frames, ulong out_frames) {
139                         return Samples (flags, IntPtr.Zero, in_frames, IntPtr.Zero, out_frames);
140                 }
141
142                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
143                 static extern bool gst_audio_converter_supports_inplace(IntPtr raw);
144
145                 public bool SupportsInplace() {
146                         IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
147                         System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
148                         bool raw_ret = gst_audio_converter_supports_inplace(this_as_native);
149                         bool ret = raw_ret;
150                         ReadNative (this_as_native, ref this);
151                         System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
152                         return ret;
153                 }
154
155                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
156                 static extern bool gst_audio_converter_update_config(IntPtr raw, int in_rate, int out_rate, IntPtr config);
157
158                 public bool UpdateConfig(int in_rate, int out_rate, Gst.Structure config) {
159                         IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
160                         System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
161                         config.Owned = false;
162                         bool raw_ret = gst_audio_converter_update_config(this_as_native, in_rate, out_rate, config == null ? IntPtr.Zero : config.Handle);
163                         bool ret = raw_ret;
164                         ReadNative (this_as_native, ref this);
165                         System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
166                         return ret;
167                 }
168
169                 public bool UpdateConfig(int in_rate, int out_rate) {
170                         return UpdateConfig (in_rate, out_rate, null);
171                 }
172
173                 static void ReadNative (IntPtr native, ref Gst.Audio.AudioConverter target)
174                 {
175                         target = New (native);
176                 }
177
178                 public bool Equals (AudioConverter other)
179                 {
180                         return true;
181                 }
182
183                 public override bool Equals (object other)
184                 {
185                         return other is AudioConverter && Equals ((AudioConverter) other);
186                 }
187
188                 public override int GetHashCode ()
189                 {
190                         return this.GetType ().FullName.GetHashCode ();
191                 }
192
193                 public static explicit operator GLib.Value (Gst.Audio.AudioConverter boxed)
194                 {
195                         GLib.Value val = GLib.Value.Empty;
196                         val.Init (Gst.Audio.AudioConverter.GType);
197                         val.Val = boxed;
198                         return val;
199                 }
200
201                 public static explicit operator Gst.Audio.AudioConverter (GLib.Value val)
202                 {
203                         return (Gst.Audio.AudioConverter) val.Val;
204                 }
205 #endregion
206         }
207 }