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 [StructLayout(LayoutKind.Sequential)]
13 public partial struct AudioStreamAlign : IEquatable<AudioStreamAlign> {
16 public static Gst.Audio.AudioStreamAlign Zero = new Gst.Audio.AudioStreamAlign ();
18 public static Gst.Audio.AudioStreamAlign New(IntPtr raw) {
19 if (raw == IntPtr.Zero)
20 return Gst.Audio.AudioStreamAlign.Zero;
21 return (Gst.Audio.AudioStreamAlign) Marshal.PtrToStructure (raw, typeof (Gst.Audio.AudioStreamAlign));
24 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
25 static extern IntPtr gst_audio_stream_align_new(int rate, ulong alignment_threshold, ulong discont_wait);
27 public static AudioStreamAlign New(int rate, ulong alignment_threshold, ulong discont_wait)
29 AudioStreamAlign result = AudioStreamAlign.New (gst_audio_stream_align_new(rate, alignment_threshold, discont_wait));
33 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
34 static extern IntPtr gst_audio_stream_align_get_type();
36 public static GLib.GType GType {
38 IntPtr raw_ret = gst_audio_stream_align_get_type();
39 GLib.GType ret = new GLib.GType(raw_ret);
44 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
45 static extern ulong gst_audio_stream_align_get_alignment_threshold(IntPtr raw);
47 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
48 static extern void gst_audio_stream_align_set_alignment_threshold(IntPtr raw, ulong alignment_threshold);
50 public ulong AlignmentThreshold {
52 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
53 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
54 ulong raw_ret = gst_audio_stream_align_get_alignment_threshold(this_as_native);
56 ReadNative (this_as_native, ref this);
57 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
61 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
62 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
63 gst_audio_stream_align_set_alignment_threshold(this_as_native, value);
64 ReadNative (this_as_native, ref this);
65 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
69 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
70 static extern ulong gst_audio_stream_align_get_discont_wait(IntPtr raw);
72 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
73 static extern void gst_audio_stream_align_set_discont_wait(IntPtr raw, ulong discont_wait);
75 public ulong DiscontWait {
77 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
78 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
79 ulong raw_ret = gst_audio_stream_align_get_discont_wait(this_as_native);
81 ReadNative (this_as_native, ref this);
82 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
86 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
87 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
88 gst_audio_stream_align_set_discont_wait(this_as_native, value);
89 ReadNative (this_as_native, ref this);
90 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
94 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
95 static extern int gst_audio_stream_align_get_rate(IntPtr raw);
97 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
98 static extern void gst_audio_stream_align_set_rate(IntPtr raw, int rate);
102 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
103 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
104 int raw_ret = gst_audio_stream_align_get_rate(this_as_native);
106 ReadNative (this_as_native, ref this);
107 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
111 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
112 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
113 gst_audio_stream_align_set_rate(this_as_native, value);
114 ReadNative (this_as_native, ref this);
115 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
119 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
120 static extern ulong gst_audio_stream_align_get_samples_since_discont(IntPtr raw);
122 public ulong SamplesSinceDiscont {
124 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
125 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
126 ulong raw_ret = gst_audio_stream_align_get_samples_since_discont(this_as_native);
128 ReadNative (this_as_native, ref this);
129 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
134 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
135 static extern ulong gst_audio_stream_align_get_timestamp_at_discont(IntPtr raw);
137 public ulong TimestampAtDiscont {
139 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
140 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
141 ulong raw_ret = gst_audio_stream_align_get_timestamp_at_discont(this_as_native);
143 ReadNative (this_as_native, ref this);
144 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
149 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
150 static extern void gst_audio_stream_align_mark_discont(IntPtr raw);
152 public void MarkDiscont() {
153 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
154 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
155 gst_audio_stream_align_mark_discont(this_as_native);
156 ReadNative (this_as_native, ref this);
157 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
160 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
161 static extern bool gst_audio_stream_align_process(IntPtr raw, bool discont, ulong timestamp, uint n_samples, out ulong out_timestamp, out ulong out_duration, out ulong out_sample_position);
163 public bool Process(bool discont, ulong timestamp, uint n_samples, out ulong out_timestamp, out ulong out_duration, out ulong out_sample_position) {
164 IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this));
165 System.Runtime.InteropServices.Marshal.StructureToPtr (this, this_as_native, false);
166 bool raw_ret = gst_audio_stream_align_process(this_as_native, discont, timestamp, n_samples, out out_timestamp, out out_duration, out out_sample_position);
168 ReadNative (this_as_native, ref this);
169 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
173 static void ReadNative (IntPtr native, ref Gst.Audio.AudioStreamAlign target)
175 target = New (native);
178 public bool Equals (AudioStreamAlign other)
183 public override bool Equals (object other)
185 return other is AudioStreamAlign && Equals ((AudioStreamAlign) other);
188 public override int GetHashCode ()
190 return this.GetType ().FullName.GetHashCode ();
193 public static explicit operator GLib.Value (Gst.Audio.AudioStreamAlign boxed)
195 GLib.Value val = GLib.Value.Empty;
196 val.Init (Gst.Audio.AudioStreamAlign.GType);
201 public static explicit operator Gst.Audio.AudioStreamAlign (GLib.Value val)
203 return (Gst.Audio.AudioStreamAlign) val.Val;