1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
7 using System.Collections;
8 using System.Collections.Generic;
9 using System.Runtime.InteropServices;
11 #region Autogenerated code
12 public partial class AudioInfo : GLib.Opaque {
14 public Gst.Audio.AudioFormatInfo Finfo {
17 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("finfo"));
18 return Gst.Audio.AudioFormatInfo.New ((*raw_ptr));
23 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("finfo"));
24 *raw_ptr = GLib.Marshaller.StructureToPtrAlloc (value);
29 public Gst.Audio.AudioFlags Flags {
32 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("flags"));
33 return (Gst.Audio.AudioFlags) (*raw_ptr);
38 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("flags"));
39 *raw_ptr = (int) value;
44 public Gst.Audio.AudioLayout Layout {
47 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("layout"));
48 return (Gst.Audio.AudioLayout) (*raw_ptr);
53 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("layout"));
54 *raw_ptr = (int) value;
62 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("rate"));
68 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("rate"));
77 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("channels"));
83 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("channels"));
92 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("bpf"));
98 int* raw_ptr = (int*)(((byte*)Handle) + abi_info.GetFieldOffset("bpf"));
104 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
105 static extern IntPtr gst_audio_info_get_type();
107 public static GLib.GType GType {
109 IntPtr raw_ret = gst_audio_info_get_type();
110 GLib.GType ret = new GLib.GType(raw_ret);
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);
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);
124 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
125 static extern IntPtr gst_audio_info_copy(IntPtr raw);
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);
133 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
134 static extern bool gst_audio_info_from_caps(IntPtr raw, IntPtr caps);
136 public bool FromCaps(Gst.Caps caps) {
137 bool raw_ret = gst_audio_info_from_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle);
142 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
143 static extern void gst_audio_info_init(IntPtr raw);
146 gst_audio_info_init(Handle);
149 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
150 static extern bool gst_audio_info_is_equal(IntPtr raw, IntPtr other);
152 public bool IsEqual(Gst.Audio.AudioInfo other) {
153 bool raw_ret = gst_audio_info_is_equal(Handle, other == null ? IntPtr.Zero : other.Handle);
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);
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);
169 public void SetFormat(Gst.Audio.AudioFormat format, int rate, int channels) {
170 SetFormat (format, rate, channels, null);
173 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
174 static extern IntPtr gst_audio_info_to_caps(IntPtr raw);
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);
182 public AudioInfo(IntPtr raw) : base(raw) {}
184 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
185 static extern IntPtr gst_audio_info_new();
189 Raw = gst_audio_info_new();
192 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
193 static extern void gst_audio_info_free(IntPtr raw);
195 protected override void Free (IntPtr raw)
197 gst_audio_info_free (raw);
200 protected override Action<IntPtr> DisposeUnmanagedFunc {
202 return gst_audio_info_free;
207 // Internal representation of the wrapped structure ABI.
208 static GLib.AbiStruct _abi_info = null;
209 static public GLib.AbiStruct abi_info {
211 if (_abi_info == null)
212 _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
213 new GLib.AbiField("finfo"
215 , (uint) Marshal.SizeOf(typeof(IntPtr)) // finfo
218 , (uint) Marshal.SizeOf(typeof(IntPtr))
221 new GLib.AbiField("flags"
223 , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Audio.AudioFlags))) // flags
226 , (long) Marshal.OffsetOf(typeof(GstAudioInfo_flagsAlign), "flags")
229 new GLib.AbiField("layout"
231 , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Audio.AudioLayout))) // layout
234 , (long) Marshal.OffsetOf(typeof(GstAudioInfo_layoutAlign), "layout")
237 new GLib.AbiField("rate"
239 , (uint) Marshal.SizeOf(typeof(int)) // rate
242 , (long) Marshal.OffsetOf(typeof(GstAudioInfo_rateAlign), "rate")
245 new GLib.AbiField("channels"
247 , (uint) Marshal.SizeOf(typeof(int)) // channels
250 , (long) Marshal.OffsetOf(typeof(GstAudioInfo_channelsAlign), "channels")
253 new GLib.AbiField("bpf"
255 , (uint) Marshal.SizeOf(typeof(int)) // bpf
258 , (long) Marshal.OffsetOf(typeof(GstAudioInfo_bpfAlign), "bpf")
261 new GLib.AbiField("position"
263 , (uint) Marshal.SizeOf(System.Enum.GetUnderlyingType(typeof(Gst.Audio.AudioChannelPosition))) * 64 // position
266 , (long) Marshal.OffsetOf(typeof(GstAudioInfo_positionAlign), "position")
269 new GLib.AbiField("_gst_reserved"
271 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
274 , (uint) Marshal.SizeOf(typeof(IntPtr))
283 [StructLayout(LayoutKind.Sequential)]
284 public struct GstAudioInfo_flagsAlign
287 private Gst.Audio.AudioFlags flags;
290 [StructLayout(LayoutKind.Sequential)]
291 public struct GstAudioInfo_layoutAlign
294 private Gst.Audio.AudioLayout layout;
297 [StructLayout(LayoutKind.Sequential)]
298 public struct GstAudioInfo_rateAlign
304 [StructLayout(LayoutKind.Sequential)]
305 public struct GstAudioInfo_channelsAlign
308 private int channels;
311 [StructLayout(LayoutKind.Sequential)]
312 public struct GstAudioInfo_bpfAlign
318 [StructLayout(LayoutKind.Sequential)]
319 public struct GstAudioInfo_positionAlign
322 [MarshalAs (UnmanagedType.ByValArray, SizeConst=64)]
323 private Gst.Audio.AudioChannelPosition[] position;
327 // End of the ABI representation.