Release 1.22.7
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst.Audio / AudioSrc.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 AudioSrc : Gst.Audio.AudioBaseSrc {
13
14                 public AudioSrc (IntPtr raw) : base(raw) {}
15
16                 protected AudioSrc() : base(IntPtr.Zero)
17                 {
18                         CreateNativeObject (new string [0], new GLib.Value [0]);
19                 }
20
21                 static OpenNativeDelegate Open_cb_delegate;
22                 static OpenNativeDelegate OpenVMCallback {
23                         get {
24                                 if (Open_cb_delegate == null)
25                                         Open_cb_delegate = new OpenNativeDelegate (Open_cb);
26                                 return Open_cb_delegate;
27                         }
28                 }
29
30                 static void OverrideOpen (GLib.GType gtype)
31                 {
32                         OverrideOpen (gtype, OpenVMCallback);
33                 }
34
35                 static void OverrideOpen (GLib.GType gtype, OpenNativeDelegate callback)
36                 {
37                         unsafe {
38                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("open"));
39                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
40                         }
41                 }
42
43                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
44                 delegate bool OpenNativeDelegate (IntPtr inst);
45
46                 static bool Open_cb (IntPtr inst)
47                 {
48                         try {
49                                 AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
50                                 bool __result;
51                                 __result = __obj.OnOpen ();
52                                 return __result;
53                         } catch (Exception e) {
54                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
55                                 // NOTREACHED: above call does not return.
56                                 throw e;
57                         }
58                 }
59
60                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideOpen")]
61                 protected virtual bool OnOpen ()
62                 {
63                         return InternalOpen ();
64                 }
65
66                 private bool InternalOpen ()
67                 {
68                         OpenNativeDelegate unmanaged = null;
69                         unsafe {
70                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("open"));
71                                 unmanaged = (OpenNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(OpenNativeDelegate));
72                         }
73                         if (unmanaged == null) return false;
74
75                         bool __result = unmanaged (this.Handle);
76                         return __result;
77                 }
78
79                 static PrepareNativeDelegate Prepare_cb_delegate;
80                 static PrepareNativeDelegate PrepareVMCallback {
81                         get {
82                                 if (Prepare_cb_delegate == null)
83                                         Prepare_cb_delegate = new PrepareNativeDelegate (Prepare_cb);
84                                 return Prepare_cb_delegate;
85                         }
86                 }
87
88                 static void OverridePrepare (GLib.GType gtype)
89                 {
90                         OverridePrepare (gtype, PrepareVMCallback);
91                 }
92
93                 static void OverridePrepare (GLib.GType gtype, PrepareNativeDelegate callback)
94                 {
95                         unsafe {
96                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare"));
97                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
98                         }
99                 }
100
101                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
102                 delegate bool PrepareNativeDelegate (IntPtr inst, IntPtr spec);
103
104                 static bool Prepare_cb (IntPtr inst, IntPtr spec)
105                 {
106                         try {
107                                 AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
108                                 bool __result;
109                                 __result = __obj.OnPrepare (spec == IntPtr.Zero ? null : (Gst.Audio.AudioRingBufferSpec) GLib.Opaque.GetOpaque (spec, typeof (Gst.Audio.AudioRingBufferSpec), false));
110                                 return __result;
111                         } catch (Exception e) {
112                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
113                                 // NOTREACHED: above call does not return.
114                                 throw e;
115                         }
116                 }
117
118                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverridePrepare")]
119                 protected virtual bool OnPrepare (Gst.Audio.AudioRingBufferSpec spec)
120                 {
121                         return InternalPrepare (spec);
122                 }
123
124                 private bool InternalPrepare (Gst.Audio.AudioRingBufferSpec spec)
125                 {
126                         PrepareNativeDelegate unmanaged = null;
127                         unsafe {
128                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare"));
129                                 unmanaged = (PrepareNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrepareNativeDelegate));
130                         }
131                         if (unmanaged == null) return false;
132
133                         bool __result = unmanaged (this.Handle, spec == null ? IntPtr.Zero : spec.Handle);
134                         return __result;
135                 }
136
137                 static UnprepareNativeDelegate Unprepare_cb_delegate;
138                 static UnprepareNativeDelegate UnprepareVMCallback {
139                         get {
140                                 if (Unprepare_cb_delegate == null)
141                                         Unprepare_cb_delegate = new UnprepareNativeDelegate (Unprepare_cb);
142                                 return Unprepare_cb_delegate;
143                         }
144                 }
145
146                 static void OverrideUnprepare (GLib.GType gtype)
147                 {
148                         OverrideUnprepare (gtype, UnprepareVMCallback);
149                 }
150
151                 static void OverrideUnprepare (GLib.GType gtype, UnprepareNativeDelegate callback)
152                 {
153                         unsafe {
154                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("unprepare"));
155                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
156                         }
157                 }
158
159                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
160                 delegate bool UnprepareNativeDelegate (IntPtr inst);
161
162                 static bool Unprepare_cb (IntPtr inst)
163                 {
164                         try {
165                                 AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
166                                 bool __result;
167                                 __result = __obj.OnUnprepare ();
168                                 return __result;
169                         } catch (Exception e) {
170                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
171                                 // NOTREACHED: above call does not return.
172                                 throw e;
173                         }
174                 }
175
176                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideUnprepare")]
177                 protected virtual bool OnUnprepare ()
178                 {
179                         return InternalUnprepare ();
180                 }
181
182                 private bool InternalUnprepare ()
183                 {
184                         UnprepareNativeDelegate unmanaged = null;
185                         unsafe {
186                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("unprepare"));
187                                 unmanaged = (UnprepareNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UnprepareNativeDelegate));
188                         }
189                         if (unmanaged == null) return false;
190
191                         bool __result = unmanaged (this.Handle);
192                         return __result;
193                 }
194
195                 static CloseNativeDelegate Close_cb_delegate;
196                 static CloseNativeDelegate CloseVMCallback {
197                         get {
198                                 if (Close_cb_delegate == null)
199                                         Close_cb_delegate = new CloseNativeDelegate (Close_cb);
200                                 return Close_cb_delegate;
201                         }
202                 }
203
204                 static void OverrideClose (GLib.GType gtype)
205                 {
206                         OverrideClose (gtype, CloseVMCallback);
207                 }
208
209                 static void OverrideClose (GLib.GType gtype, CloseNativeDelegate callback)
210                 {
211                         unsafe {
212                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close"));
213                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
214                         }
215                 }
216
217                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
218                 delegate bool CloseNativeDelegate (IntPtr inst);
219
220                 static bool Close_cb (IntPtr inst)
221                 {
222                         try {
223                                 AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
224                                 bool __result;
225                                 __result = __obj.OnClose ();
226                                 return __result;
227                         } catch (Exception e) {
228                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
229                                 // NOTREACHED: above call does not return.
230                                 throw e;
231                         }
232                 }
233
234                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideClose")]
235                 protected virtual bool OnClose ()
236                 {
237                         return InternalClose ();
238                 }
239
240                 private bool InternalClose ()
241                 {
242                         CloseNativeDelegate unmanaged = null;
243                         unsafe {
244                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("close"));
245                                 unmanaged = (CloseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CloseNativeDelegate));
246                         }
247                         if (unmanaged == null) return false;
248
249                         bool __result = unmanaged (this.Handle);
250                         return __result;
251                 }
252
253                 static ReadNativeDelegate Read_cb_delegate;
254                 static ReadNativeDelegate ReadVMCallback {
255                         get {
256                                 if (Read_cb_delegate == null)
257                                         Read_cb_delegate = new ReadNativeDelegate (Read_cb);
258                                 return Read_cb_delegate;
259                         }
260                 }
261
262                 static void OverrideRead (GLib.GType gtype)
263                 {
264                         OverrideRead (gtype, ReadVMCallback);
265                 }
266
267                 static void OverrideRead (GLib.GType gtype, ReadNativeDelegate callback)
268                 {
269                         unsafe {
270                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("read"));
271                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
272                         }
273                 }
274
275                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
276                 delegate uint ReadNativeDelegate (IntPtr inst, IntPtr data, uint length, ulong timestamp);
277
278                 static uint Read_cb (IntPtr inst, IntPtr data, uint length, ulong timestamp)
279                 {
280                         try {
281                                 AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
282                                 uint __result;
283                                 __result = __obj.OnRead (data, length, timestamp);
284                                 return __result;
285                         } catch (Exception e) {
286                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
287                                 // NOTREACHED: above call does not return.
288                                 throw e;
289                         }
290                 }
291
292                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideRead")]
293                 protected virtual uint OnRead (IntPtr data, uint length, ulong timestamp)
294                 {
295                         return InternalRead (data, length, timestamp);
296                 }
297
298                 private uint InternalRead (IntPtr data, uint length, ulong timestamp)
299                 {
300                         ReadNativeDelegate unmanaged = null;
301                         unsafe {
302                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("read"));
303                                 unmanaged = (ReadNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ReadNativeDelegate));
304                         }
305                         if (unmanaged == null) return 0;
306
307                         uint __result = unmanaged (this.Handle, data, length, timestamp);
308                         return __result;
309                 }
310
311                 static DelayNativeDelegate Delay_cb_delegate;
312                 static DelayNativeDelegate DelayVMCallback {
313                         get {
314                                 if (Delay_cb_delegate == null)
315                                         Delay_cb_delegate = new DelayNativeDelegate (Delay_cb);
316                                 return Delay_cb_delegate;
317                         }
318                 }
319
320                 static void OverrideDelay (GLib.GType gtype)
321                 {
322                         OverrideDelay (gtype, DelayVMCallback);
323                 }
324
325                 static void OverrideDelay (GLib.GType gtype, DelayNativeDelegate callback)
326                 {
327                         unsafe {
328                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("delay"));
329                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
330                         }
331                 }
332
333                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
334                 delegate uint DelayNativeDelegate (IntPtr inst);
335
336                 static uint Delay_cb (IntPtr inst)
337                 {
338                         try {
339                                 AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
340                                 uint __result;
341                                 __result = __obj.OnDelay ();
342                                 return __result;
343                         } catch (Exception e) {
344                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
345                                 // NOTREACHED: above call does not return.
346                                 throw e;
347                         }
348                 }
349
350                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideDelay")]
351                 protected virtual uint OnDelay ()
352                 {
353                         return InternalDelay ();
354                 }
355
356                 private uint InternalDelay ()
357                 {
358                         DelayNativeDelegate unmanaged = null;
359                         unsafe {
360                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("delay"));
361                                 unmanaged = (DelayNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DelayNativeDelegate));
362                         }
363                         if (unmanaged == null) return 0;
364
365                         uint __result = unmanaged (this.Handle);
366                         return __result;
367                 }
368
369                 static ResetNativeDelegate Reset_cb_delegate;
370                 static ResetNativeDelegate ResetVMCallback {
371                         get {
372                                 if (Reset_cb_delegate == null)
373                                         Reset_cb_delegate = new ResetNativeDelegate (Reset_cb);
374                                 return Reset_cb_delegate;
375                         }
376                 }
377
378                 static void OverrideReset (GLib.GType gtype)
379                 {
380                         OverrideReset (gtype, ResetVMCallback);
381                 }
382
383                 static void OverrideReset (GLib.GType gtype, ResetNativeDelegate callback)
384                 {
385                         unsafe {
386                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("reset"));
387                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
388                         }
389                 }
390
391                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
392                 delegate void ResetNativeDelegate (IntPtr inst);
393
394                 static void Reset_cb (IntPtr inst)
395                 {
396                         try {
397                                 AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
398                                 __obj.OnReset ();
399                         } catch (Exception e) {
400                                 GLib.ExceptionManager.RaiseUnhandledException (e, false);
401                         }
402                 }
403
404                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideReset")]
405                 protected virtual void OnReset ()
406                 {
407                         InternalReset ();
408                 }
409
410                 private void InternalReset ()
411                 {
412                         ResetNativeDelegate unmanaged = null;
413                         unsafe {
414                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("reset"));
415                                 unmanaged = (ResetNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ResetNativeDelegate));
416                         }
417                         if (unmanaged == null) return;
418
419                         unmanaged (this.Handle);
420                 }
421
422
423                 // Internal representation of the wrapped structure ABI.
424                 static GLib.AbiStruct _class_abi = null;
425                 static public new GLib.AbiStruct class_abi {
426                         get {
427                                 if (_class_abi == null)
428                                         _class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{ 
429                                                 new GLib.AbiField("open"
430                                                         , Gst.Audio.AudioBaseSrc.class_abi.Fields
431                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // open
432                                                         , null
433                                                         , "prepare"
434                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
435                                                         , 0
436                                                         ),
437                                                 new GLib.AbiField("prepare"
438                                                         , -1
439                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // prepare
440                                                         , "open"
441                                                         , "unprepare"
442                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
443                                                         , 0
444                                                         ),
445                                                 new GLib.AbiField("unprepare"
446                                                         , -1
447                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // unprepare
448                                                         , "prepare"
449                                                         , "close"
450                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
451                                                         , 0
452                                                         ),
453                                                 new GLib.AbiField("close"
454                                                         , -1
455                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // close
456                                                         , "unprepare"
457                                                         , "read"
458                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
459                                                         , 0
460                                                         ),
461                                                 new GLib.AbiField("read"
462                                                         , -1
463                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // read
464                                                         , "close"
465                                                         , "delay"
466                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
467                                                         , 0
468                                                         ),
469                                                 new GLib.AbiField("delay"
470                                                         , -1
471                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // delay
472                                                         , "read"
473                                                         , "reset"
474                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
475                                                         , 0
476                                                         ),
477                                                 new GLib.AbiField("reset"
478                                                         , -1
479                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // reset
480                                                         , "delay"
481                                                         , "_gst_reserved"
482                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
483                                                         , 0
484                                                         ),
485                                                 new GLib.AbiField("_gst_reserved"
486                                                         , -1
487                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
488                                                         , "reset"
489                                                         , null
490                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
491                                                         , 0
492                                                         ),
493                                         });
494
495                                 return _class_abi;
496                         }
497                 }
498
499
500                 // End of the ABI representation.
501
502                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
503                 static extern IntPtr gst_audio_src_get_type();
504
505                 public static new GLib.GType GType { 
506                         get {
507                                 IntPtr raw_ret = gst_audio_src_get_type();
508                                 GLib.GType ret = new GLib.GType(raw_ret);
509                                 return ret;
510                         }
511                 }
512
513
514                 static AudioSrc ()
515                 {
516                         GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
517                 }
518
519                 // Internal representation of the wrapped structure ABI.
520                 static GLib.AbiStruct _abi_info = null;
521                 static public new GLib.AbiStruct abi_info {
522                         get {
523                                 if (_abi_info == null)
524                                         _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
525                                                 new GLib.AbiField("thread"
526                                                         , Gst.Audio.AudioBaseSrc.abi_info.Fields
527                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // thread
528                                                         , null
529                                                         , "_gst_reserved"
530                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
531                                                         , 0
532                                                         ),
533                                                 new GLib.AbiField("_gst_reserved"
534                                                         , -1
535                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
536                                                         , "thread"
537                                                         , null
538                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
539                                                         , 0
540                                                         ),
541                                         });
542
543                                 return _abi_info;
544                         }
545                 }
546
547
548                 // End of the ABI representation.
549
550 #endregion
551         }
552 }