Release 1.22.7
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst.Audio / AudioStreamAlign.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 AudioStreamAlign : IEquatable<AudioStreamAlign> {
14
15
16                 public static Gst.Audio.AudioStreamAlign Zero = new Gst.Audio.AudioStreamAlign ();
17
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));
22                 }
23
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);
26
27                 public static AudioStreamAlign New(int rate, ulong alignment_threshold, ulong discont_wait)
28                 {
29                         AudioStreamAlign result = AudioStreamAlign.New (gst_audio_stream_align_new(rate, alignment_threshold, discont_wait));
30                         return result;
31                 }
32
33                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
34                 static extern IntPtr gst_audio_stream_align_get_type();
35
36                 public static GLib.GType GType { 
37                         get {
38                                 IntPtr raw_ret = gst_audio_stream_align_get_type();
39                                 GLib.GType ret = new GLib.GType(raw_ret);
40                                 return ret;
41                         }
42                 }
43
44                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
45                 static extern ulong gst_audio_stream_align_get_alignment_threshold(IntPtr raw);
46
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);
49
50                 public ulong AlignmentThreshold { 
51                         get {
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);
55                                 ulong ret = raw_ret;
56                                 ReadNative (this_as_native, ref this);
57                                 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
58                                 return ret;
59                         }
60                         set {
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);
66                         }
67                 }
68
69                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
70                 static extern ulong gst_audio_stream_align_get_discont_wait(IntPtr raw);
71
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);
74
75                 public ulong DiscontWait { 
76                         get {
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);
80                                 ulong ret = raw_ret;
81                                 ReadNative (this_as_native, ref this);
82                                 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
83                                 return ret;
84                         }
85                         set {
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);
91                         }
92                 }
93
94                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
95                 static extern int gst_audio_stream_align_get_rate(IntPtr raw);
96
97                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
98                 static extern void gst_audio_stream_align_set_rate(IntPtr raw, int rate);
99
100                 public int Rate { 
101                         get {
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);
105                                 int ret = raw_ret;
106                                 ReadNative (this_as_native, ref this);
107                                 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
108                                 return ret;
109                         }
110                         set {
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);
116                         }
117                 }
118
119                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
120                 static extern ulong gst_audio_stream_align_get_samples_since_discont(IntPtr raw);
121
122                 public ulong SamplesSinceDiscont { 
123                         get {
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);
127                                 ulong ret = raw_ret;
128                                 ReadNative (this_as_native, ref this);
129                                 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
130                                 return ret;
131                         }
132                 }
133
134                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
135                 static extern ulong gst_audio_stream_align_get_timestamp_at_discont(IntPtr raw);
136
137                 public ulong TimestampAtDiscont { 
138                         get {
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);
142                                 ulong ret = raw_ret;
143                                 ReadNative (this_as_native, ref this);
144                                 System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
145                                 return ret;
146                         }
147                 }
148
149                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
150                 static extern void gst_audio_stream_align_mark_discont(IntPtr raw);
151
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);
158                 }
159
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);
162
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);
167                         bool ret = raw_ret;
168                         ReadNative (this_as_native, ref this);
169                         System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native);
170                         return ret;
171                 }
172
173                 static void ReadNative (IntPtr native, ref Gst.Audio.AudioStreamAlign target)
174                 {
175                         target = New (native);
176                 }
177
178                 public bool Equals (AudioStreamAlign other)
179                 {
180                         return true;
181                 }
182
183                 public override bool Equals (object other)
184                 {
185                         return other is AudioStreamAlign && Equals ((AudioStreamAlign) 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.AudioStreamAlign boxed)
194                 {
195                         GLib.Value val = GLib.Value.Empty;
196                         val.Init (Gst.Audio.AudioStreamAlign.GType);
197                         val.Val = boxed;
198                         return val;
199                 }
200
201                 public static explicit operator Gst.Audio.AudioStreamAlign (GLib.Value val)
202                 {
203                         return (Gst.Audio.AudioStreamAlign) val.Val;
204                 }
205 #endregion
206         }
207 }