Release 1.22.7
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst.Audio / AudioInfo.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         public partial class AudioInfo : GLib.Opaque {
13
14                 public Gst.Audio.AudioFormatInfo Finfo {
15                         get {
16                                 unsafe {
17                                         IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("finfo"));
18                                         return Gst.Audio.AudioFormatInfo.New ((*raw_ptr));
19                                 }
20                         }
21                         set {
22                                 unsafe {
23                                         IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("finfo"));
24                                         *raw_ptr = GLib.Marshaller.StructureToPtrAlloc (value);
25                                 }
26                         }
27                 }
28
29                 public Gst.Audio.AudioFlags Flags {
30                         get {
31                                 unsafe {
32                                         int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("flags"));
33                                         return (Gst.Audio.AudioFlags) (*raw_ptr);
34                                 }
35                         }
36                         set {
37                                 unsafe {
38                                         int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("flags"));
39                                         *raw_ptr = (int) value;
40                                 }
41                         }
42                 }
43
44                 public Gst.Audio.AudioLayout Layout {
45                         get {
46                                 unsafe {
47                                         int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("layout"));
48                                         return (Gst.Audio.AudioLayout) (*raw_ptr);
49                                 }
50                         }
51                         set {
52                                 unsafe {
53                                         int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("layout"));
54                                         *raw_ptr = (int) value;
55                                 }
56                         }
57                 }
58
59                 public int Rate {
60                         get {
61                                 unsafe {
62                                         int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("rate"));
63                                         return (*raw_ptr);
64                                 }
65                         }
66                         set {
67                                 unsafe {
68                                         int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("rate"));
69                                         *raw_ptr = value;
70                                 }
71                         }
72                 }
73
74                 public int Channels {
75                         get {
76                                 unsafe {
77                                         int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("channels"));
78                                         return (*raw_ptr);
79                                 }
80                         }
81                         set {
82                                 unsafe {
83                                         int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("channels"));
84                                         *raw_ptr = value;
85                                 }
86                         }
87                 }
88
89                 public int Bpf {
90                         get {
91                                 unsafe {
92                                         int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("bpf"));
93                                         return (*raw_ptr);
94                                 }
95                         }
96                         set {
97                                 unsafe {
98                                         int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("bpf"));
99                                         *raw_ptr = value;
100                                 }
101                         }
102                 }
103
104                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
105                 static extern IntPtr gst_audio_info_get_type();
106
107                 public static GLib.GType GType { 
108                         get {
109                                 IntPtr raw_ret = gst_audio_info_get_type();
110                                 GLib.GType ret = new GLib.GType(raw_ret);
111                                 return ret;
112                         }
113                 }
114
115                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
116                 static extern bool gst_audio_info_convert(IntPtr raw, int src_fmt, long src_val, int dest_fmt, out long dest_val);
117
118                 public bool Convert(Gst.Format src_fmt, long src_val, Gst.Format dest_fmt, out long dest_val) {
119                         bool raw_ret = gst_audio_info_convert(Handle, (int) src_fmt, src_val, (int) dest_fmt, out dest_val);
120                         bool ret = raw_ret;
121                         return ret;
122                 }
123
124                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
125                 static extern IntPtr gst_audio_info_copy(IntPtr raw);
126
127                 public Gst.Audio.AudioInfo Copy() {
128                         IntPtr raw_ret = gst_audio_info_copy(Handle);
129                         Gst.Audio.AudioInfo ret = raw_ret == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Audio.AudioInfo), true);
130                         return ret;
131                 }
132
133                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
134                 static extern bool gst_audio_info_from_caps(IntPtr raw, IntPtr caps);
135
136                 public bool FromCaps(Gst.Caps caps) {
137                         bool raw_ret = gst_audio_info_from_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle);
138                         bool ret = raw_ret;
139                         return ret;
140                 }
141
142                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
143                 static extern void gst_audio_info_init(IntPtr raw);
144
145                 public void Init() {
146                         gst_audio_info_init(Handle);
147                 }
148
149                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
150                 static extern bool gst_audio_info_is_equal(IntPtr raw, IntPtr other);
151
152                 public bool IsEqual(Gst.Audio.AudioInfo other) {
153                         bool raw_ret = gst_audio_info_is_equal(Handle, other == null ? IntPtr.Zero : other.Handle);
154                         bool ret = raw_ret;
155                         return ret;
156                 }
157
158                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
159                 static extern void gst_audio_info_set_format(IntPtr raw, int format, int rate, int channels, int[] position);
160
161                 public void SetFormat(Gst.Audio.AudioFormat format, int rate, int channels, Gst.Audio.AudioChannelPosition[] position) {
162                         int cnt_position = position == null ? 0 : position.Length;
163                         int[] native_position = new int [cnt_position];
164                         for (int i = 0; i < cnt_position; i++)
165                                 native_position [i] = (int) position[i];
166                         gst_audio_info_set_format(Handle, (int) format, rate, channels, native_position);
167                 }
168
169                 public void SetFormat(Gst.Audio.AudioFormat format, int rate, int channels) {
170                         SetFormat (format, rate, channels, null);
171                 }
172
173                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
174                 static extern IntPtr gst_audio_info_to_caps(IntPtr raw);
175
176                 public Gst.Caps ToCaps() {
177                         IntPtr raw_ret = gst_audio_info_to_caps(Handle);
178                         Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
179                         return ret;
180                 }
181
182                 public AudioInfo(IntPtr raw) : base(raw) {}
183
184                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
185                 static extern IntPtr gst_audio_info_new();
186
187                 public AudioInfo () 
188                 {
189                         Raw = gst_audio_info_new();
190                 }
191
192                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
193                 static extern void gst_audio_info_free(IntPtr raw);
194
195                 protected override void Free (IntPtr raw)
196                 {
197                         gst_audio_info_free (raw);
198                 }
199
200                 protected override Action<IntPtr> DisposeUnmanagedFunc {
201                         get {
202                                 return gst_audio_info_free;
203                         }
204                 }
205
206
207                 // Internal representation of the wrapped structure ABI.
208                 static GLib.AbiStruct _abi_info = null;
209                 static public GLib.AbiStruct abi_info {
210                         get {
211                                 if (_abi_info == null)
212                                         _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
213                                                 new GLib.AbiField("finfo"
214                                                         , 0
215                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // finfo
216                                                         , null
217                                                         , "flags"
218                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
219                                                         , 0
220                                                         ),
221                                                 new GLib.AbiField("flags"
222                                                         , -1
223                                                         , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Audio.AudioFlags))) // flags
224                                                         , "finfo"
225                                                         , "layout"
226                                                         , (long) Marshal.OffsetOf(typeof(GstAudioInfo_flagsAlign), "flags")
227                                                         , 0
228                                                         ),
229                                                 new GLib.AbiField("layout"
230                                                         , -1
231                                                         , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Audio.AudioLayout))) // layout
232                                                         , "flags"
233                                                         , "rate"
234                                                         , (long) Marshal.OffsetOf(typeof(GstAudioInfo_layoutAlign), "layout")
235                                                         , 0
236                                                         ),
237                                                 new GLib.AbiField("rate"
238                                                         , -1
239                                                         , (uint) Marshal.SizeOf(typeof(int)) // rate
240                                                         , "layout"
241                                                         , "channels"
242                                                         , (long) Marshal.OffsetOf(typeof(GstAudioInfo_rateAlign), "rate")
243                                                         , 0
244                                                         ),
245                                                 new GLib.AbiField("channels"
246                                                         , -1
247                                                         , (uint) Marshal.SizeOf(typeof(int)) // channels
248                                                         , "rate"
249                                                         , "bpf"
250                                                         , (long) Marshal.OffsetOf(typeof(GstAudioInfo_channelsAlign), "channels")
251                                                         , 0
252                                                         ),
253                                                 new GLib.AbiField("bpf"
254                                                         , -1
255                                                         , (uint) Marshal.SizeOf(typeof(int)) // bpf
256                                                         , "channels"
257                                                         , "position"
258                                                         , (long) Marshal.OffsetOf(typeof(GstAudioInfo_bpfAlign), "bpf")
259                                                         , 0
260                                                         ),
261                                                 new GLib.AbiField("position"
262                                                         , -1
263                                                         , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Audio.AudioChannelPosition))) * 64 // position
264                                                         , "bpf"
265                                                         , "_gst_reserved"
266                                                         , (long) Marshal.OffsetOf(typeof(GstAudioInfo_positionAlign), "position")
267                                                         , 0
268                                                         ),
269                                                 new GLib.AbiField("_gst_reserved"
270                                                         , -1
271                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
272                                                         , "position"
273                                                         , null
274                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
275                                                         , 0
276                                                         ),
277                                         });
278
279                                 return _abi_info;
280                         }
281                 }
282
283                 [StructLayout(LayoutKind.Sequential)]
284                 public struct GstAudioInfo_flagsAlign
285                 {
286                         sbyte f1;
287                         private Gst.Audio.AudioFlags flags;
288                 }
289
290                 [StructLayout(LayoutKind.Sequential)]
291                 public struct GstAudioInfo_layoutAlign
292                 {
293                         sbyte f1;
294                         private Gst.Audio.AudioLayout layout;
295                 }
296
297                 [StructLayout(LayoutKind.Sequential)]
298                 public struct GstAudioInfo_rateAlign
299                 {
300                         sbyte f1;
301                         private int rate;
302                 }
303
304                 [StructLayout(LayoutKind.Sequential)]
305                 public struct GstAudioInfo_channelsAlign
306                 {
307                         sbyte f1;
308                         private int channels;
309                 }
310
311                 [StructLayout(LayoutKind.Sequential)]
312                 public struct GstAudioInfo_bpfAlign
313                 {
314                         sbyte f1;
315                         private int bpf;
316                 }
317
318                 [StructLayout(LayoutKind.Sequential)]
319                 public struct GstAudioInfo_positionAlign
320                 {
321                         sbyte f1;
322                         [MarshalAs (UnmanagedType.ByValArray, SizeConst=64)]
323                         private Gst.Audio.AudioChannelPosition[] position;
324                 }
325
326
327                 // End of the ABI representation.
328
329 #endregion
330         }
331 }