Release 1.22.7
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst.Audio / AudioBaseSrc.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 AudioBaseSrc : Gst.Base.PushSrc {
13
14                 public AudioBaseSrc (IntPtr raw) : base(raw) {}
15
16                 protected AudioBaseSrc() : base(IntPtr.Zero)
17                 {
18                         CreateNativeObject (new string [0], new GLib.Value [0]);
19                 }
20
21                 [GLib.Property ("actual-buffer-time")]
22                 public long ActualBufferTime {
23                         get {
24                                 GLib.Value val = GetProperty ("actual-buffer-time");
25                                 long ret = (long) val;
26                                 val.Dispose ();
27                                 return ret;
28                         }
29                 }
30
31                 [GLib.Property ("actual-latency-time")]
32                 public long ActualLatencyTime {
33                         get {
34                                 GLib.Value val = GetProperty ("actual-latency-time");
35                                 long ret = (long) val;
36                                 val.Dispose ();
37                                 return ret;
38                         }
39                 }
40
41                 [GLib.Property ("buffer-time")]
42                 public long BufferTime {
43                         get {
44                                 GLib.Value val = GetProperty ("buffer-time");
45                                 long ret = (long) val;
46                                 val.Dispose ();
47                                 return ret;
48                         }
49                         set {
50                                 GLib.Value val = new GLib.Value(value);
51                                 SetProperty("buffer-time", val);
52                                 val.Dispose ();
53                         }
54                 }
55
56                 [GLib.Property ("latency-time")]
57                 public long LatencyTime {
58                         get {
59                                 GLib.Value val = GetProperty ("latency-time");
60                                 long ret = (long) val;
61                                 val.Dispose ();
62                                 return ret;
63                         }
64                         set {
65                                 GLib.Value val = new GLib.Value(value);
66                                 SetProperty("latency-time", val);
67                                 val.Dispose ();
68                         }
69                 }
70
71                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
72                 static extern bool gst_audio_base_src_get_provide_clock(IntPtr raw);
73
74                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
75                 static extern void gst_audio_base_src_set_provide_clock(IntPtr raw, bool provide);
76
77                 [GLib.Property ("provide-clock")]
78                 public bool ProvideClock {
79                         get  {
80                                 bool raw_ret = gst_audio_base_src_get_provide_clock(Handle);
81                                 bool ret = raw_ret;
82                                 return ret;
83                         }
84                         set  {
85                                 gst_audio_base_src_set_provide_clock(Handle, value);
86                         }
87                 }
88
89                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
90                 static extern int gst_audio_base_src_get_slave_method(IntPtr raw);
91
92                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
93                 static extern void gst_audio_base_src_set_slave_method(IntPtr raw, int method);
94
95                 [GLib.Property ("slave-method")]
96                 public Gst.Audio.AudioBaseSrcSlaveMethod SlaveMethod {
97                         get  {
98                                 int raw_ret = gst_audio_base_src_get_slave_method(Handle);
99                                 Gst.Audio.AudioBaseSrcSlaveMethod ret = (Gst.Audio.AudioBaseSrcSlaveMethod) raw_ret;
100                                 return ret;
101                         }
102                         set  {
103                                 gst_audio_base_src_set_slave_method(Handle, (int) value);
104                         }
105                 }
106
107                 public Gst.Audio.AudioRingBuffer Ringbuffer {
108                         get {
109                                 unsafe {
110                                         IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("ringbuffer"));
111                                         return GLib.Object.GetObject((*raw_ptr)) as Gst.Audio.AudioRingBuffer;
112                                 }
113                         }
114                 }
115
116                 public ulong BufferTimeField {
117                         get {
118                                 unsafe {
119                                         ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("buffer_time"));
120                                         return (*raw_ptr);
121                                 }
122                         }
123                 }
124
125                 public ulong LatencyTimeField {
126                         get {
127                                 unsafe {
128                                         ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("latency_time"));
129                                         return (*raw_ptr);
130                                 }
131                         }
132                 }
133
134                 public ulong NextSample {
135                         get {
136                                 unsafe {
137                                         ulong* raw_ptr = (ulong*)(((byte*)Handle) + abi_info.GetFieldOffset("next_sample"));
138                                         return (*raw_ptr);
139                                 }
140                         }
141                 }
142
143                 public Gst.Clock Clock {
144                         get {
145                                 unsafe {
146                                         IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("clock"));
147                                         return GLib.Object.GetObject((*raw_ptr)) as Gst.Clock;
148                                 }
149                         }
150                 }
151
152                 static CreateRingbufferNativeDelegate CreateRingbuffer_cb_delegate;
153                 static CreateRingbufferNativeDelegate CreateRingbufferVMCallback {
154                         get {
155                                 if (CreateRingbuffer_cb_delegate == null)
156                                         CreateRingbuffer_cb_delegate = new CreateRingbufferNativeDelegate (CreateRingbuffer_cb);
157                                 return CreateRingbuffer_cb_delegate;
158                         }
159                 }
160
161                 static void OverrideCreateRingbuffer (GLib.GType gtype)
162                 {
163                         OverrideCreateRingbuffer (gtype, CreateRingbufferVMCallback);
164                 }
165
166                 static void OverrideCreateRingbuffer (GLib.GType gtype, CreateRingbufferNativeDelegate callback)
167                 {
168                         unsafe {
169                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("create_ringbuffer"));
170                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
171                         }
172                 }
173
174                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
175                 delegate IntPtr CreateRingbufferNativeDelegate (IntPtr inst);
176
177                 static IntPtr CreateRingbuffer_cb (IntPtr inst)
178                 {
179                         try {
180                                 AudioBaseSrc __obj = GLib.Object.GetObject (inst, false) as AudioBaseSrc;
181                                 Gst.Audio.AudioRingBuffer __result;
182                                 __result = __obj.OnCreateRingbuffer ();
183                                 return __result == null ? IntPtr.Zero : __result.Handle;
184                         } catch (Exception e) {
185                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
186                                 // NOTREACHED: above call does not return.
187                                 throw e;
188                         }
189                 }
190
191                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioBaseSrc), ConnectionMethod="OverrideCreateRingbuffer")]
192                 protected virtual Gst.Audio.AudioRingBuffer OnCreateRingbuffer ()
193                 {
194                         return InternalCreateRingbuffer ();
195                 }
196
197                 private Gst.Audio.AudioRingBuffer InternalCreateRingbuffer ()
198                 {
199                         CreateRingbufferNativeDelegate unmanaged = null;
200                         unsafe {
201                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("create_ringbuffer"));
202                                 unmanaged = (CreateRingbufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CreateRingbufferNativeDelegate));
203                         }
204                         if (unmanaged == null) return null;
205
206                         IntPtr __result = unmanaged (this.Handle);
207                         return GLib.Object.GetObject(__result) as Gst.Audio.AudioRingBuffer;
208                 }
209
210
211                 // Internal representation of the wrapped structure ABI.
212                 static GLib.AbiStruct _class_abi = null;
213                 static public new GLib.AbiStruct class_abi {
214                         get {
215                                 if (_class_abi == null)
216                                         _class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{ 
217                                                 new GLib.AbiField("create_ringbuffer"
218                                                         , Gst.Base.PushSrc.class_abi.Fields
219                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // create_ringbuffer
220                                                         , null
221                                                         , "_gst_reserved"
222                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
223                                                         , 0
224                                                         ),
225                                                 new GLib.AbiField("_gst_reserved"
226                                                         , -1
227                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
228                                                         , "create_ringbuffer"
229                                                         , null
230                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
231                                                         , 0
232                                                         ),
233                                         });
234
235                                 return _class_abi;
236                         }
237                 }
238
239
240                 // End of the ABI representation.
241
242                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
243                 static extern IntPtr gst_audio_base_src_get_type();
244
245                 public static new GLib.GType GType { 
246                         get {
247                                 IntPtr raw_ret = gst_audio_base_src_get_type();
248                                 GLib.GType ret = new GLib.GType(raw_ret);
249                                 return ret;
250                         }
251                 }
252
253                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
254                 static extern IntPtr gst_audio_base_src_create_ringbuffer(IntPtr raw);
255
256                 public Gst.Audio.AudioRingBuffer CreateRingbuffer() {
257                         IntPtr raw_ret = gst_audio_base_src_create_ringbuffer(Handle);
258                         Gst.Audio.AudioRingBuffer ret = GLib.Object.GetObject(raw_ret) as Gst.Audio.AudioRingBuffer;
259                         return ret;
260                 }
261
262
263                 static AudioBaseSrc ()
264                 {
265                         GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
266                 }
267
268                 // Internal representation of the wrapped structure ABI.
269                 static GLib.AbiStruct _abi_info = null;
270                 static public new GLib.AbiStruct abi_info {
271                         get {
272                                 if (_abi_info == null)
273                                         _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
274                                                 new GLib.AbiField("ringbuffer"
275                                                         , Gst.Base.PushSrc.abi_info.Fields
276                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // ringbuffer
277                                                         , null
278                                                         , "buffer_time"
279                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
280                                                         , 0
281                                                         ),
282                                                 new GLib.AbiField("buffer_time"
283                                                         , -1
284                                                         , (uint) Marshal.SizeOf(typeof(ulong)) // buffer_time
285                                                         , "ringbuffer"
286                                                         , "latency_time"
287                                                         , (long) Marshal.OffsetOf(typeof(GstAudioBaseSrc_buffer_timeAlign), "buffer_time")
288                                                         , 0
289                                                         ),
290                                                 new GLib.AbiField("latency_time"
291                                                         , -1
292                                                         , (uint) Marshal.SizeOf(typeof(ulong)) // latency_time
293                                                         , "buffer_time"
294                                                         , "next_sample"
295                                                         , (long) Marshal.OffsetOf(typeof(GstAudioBaseSrc_latency_timeAlign), "latency_time")
296                                                         , 0
297                                                         ),
298                                                 new GLib.AbiField("next_sample"
299                                                         , -1
300                                                         , (uint) Marshal.SizeOf(typeof(ulong)) // next_sample
301                                                         , "latency_time"
302                                                         , "clock"
303                                                         , (long) Marshal.OffsetOf(typeof(GstAudioBaseSrc_next_sampleAlign), "next_sample")
304                                                         , 0
305                                                         ),
306                                                 new GLib.AbiField("clock"
307                                                         , -1
308                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // clock
309                                                         , "next_sample"
310                                                         , "priv"
311                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
312                                                         , 0
313                                                         ),
314                                                 new GLib.AbiField("priv"
315                                                         , -1
316                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
317                                                         , "clock"
318                                                         , "_gst_reserved"
319                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
320                                                         , 0
321                                                         ),
322                                                 new GLib.AbiField("_gst_reserved"
323                                                         , -1
324                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
325                                                         , "priv"
326                                                         , null
327                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
328                                                         , 0
329                                                         ),
330                                         });
331
332                                 return _abi_info;
333                         }
334                 }
335
336                 [StructLayout(LayoutKind.Sequential)]
337                 public struct GstAudioBaseSrc_buffer_timeAlign
338                 {
339                         sbyte f1;
340                         private ulong buffer_time;
341                 }
342
343                 [StructLayout(LayoutKind.Sequential)]
344                 public struct GstAudioBaseSrc_latency_timeAlign
345                 {
346                         sbyte f1;
347                         private ulong latency_time;
348                 }
349
350                 [StructLayout(LayoutKind.Sequential)]
351                 public struct GstAudioBaseSrc_next_sampleAlign
352                 {
353                         sbyte f1;
354                         private ulong next_sample;
355                 }
356
357
358                 // End of the ABI representation.
359
360 #endregion
361         }
362 }