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 AudioSink : Gst.Audio.AudioBaseSink {
14 public AudioSink (IntPtr raw) : base(raw) {}
16 protected AudioSink() : base(IntPtr.Zero)
18 CreateNativeObject (new string [0], new GLib.Value [0]);
21 static OpenNativeDelegate Open_cb_delegate;
22 static OpenNativeDelegate OpenVMCallback {
24 if (Open_cb_delegate == null)
25 Open_cb_delegate = new OpenNativeDelegate (Open_cb);
26 return Open_cb_delegate;
30 static void OverrideOpen (GLib.GType gtype)
32 OverrideOpen (gtype, OpenVMCallback);
35 static void OverrideOpen (GLib.GType gtype, OpenNativeDelegate callback)
38 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("open"));
39 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
43 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
44 delegate bool OpenNativeDelegate (IntPtr inst);
46 static bool Open_cb (IntPtr inst)
49 AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
51 __result = __obj.OnOpen ();
53 } catch (Exception e) {
54 GLib.ExceptionManager.RaiseUnhandledException (e, true);
55 // NOTREACHED: above call does not return.
60 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideOpen")]
61 protected virtual bool OnOpen ()
63 return InternalOpen ();
66 private bool InternalOpen ()
68 OpenNativeDelegate unmanaged = null;
70 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("open"));
71 unmanaged = (OpenNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(OpenNativeDelegate));
73 if (unmanaged == null) return false;
75 bool __result = unmanaged (this.Handle);
79 static PrepareNativeDelegate Prepare_cb_delegate;
80 static PrepareNativeDelegate PrepareVMCallback {
82 if (Prepare_cb_delegate == null)
83 Prepare_cb_delegate = new PrepareNativeDelegate (Prepare_cb);
84 return Prepare_cb_delegate;
88 static void OverridePrepare (GLib.GType gtype)
90 OverridePrepare (gtype, PrepareVMCallback);
93 static void OverridePrepare (GLib.GType gtype, PrepareNativeDelegate callback)
96 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare"));
97 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
101 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
102 delegate bool PrepareNativeDelegate (IntPtr inst, IntPtr spec);
104 static bool Prepare_cb (IntPtr inst, IntPtr spec)
107 AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
109 __result = __obj.OnPrepare (spec == IntPtr.Zero ? null : (Gst.Audio.AudioRingBufferSpec) GLib.Opaque.GetOpaque (spec, typeof (Gst.Audio.AudioRingBufferSpec), false));
111 } catch (Exception e) {
112 GLib.ExceptionManager.RaiseUnhandledException (e, true);
113 // NOTREACHED: above call does not return.
118 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverridePrepare")]
119 protected virtual bool OnPrepare (Gst.Audio.AudioRingBufferSpec spec)
121 return InternalPrepare (spec);
124 private bool InternalPrepare (Gst.Audio.AudioRingBufferSpec spec)
126 PrepareNativeDelegate unmanaged = null;
128 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare"));
129 unmanaged = (PrepareNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrepareNativeDelegate));
131 if (unmanaged == null) return false;
133 bool __result = unmanaged (this.Handle, spec == null ? IntPtr.Zero : spec.Handle);
137 static UnprepareNativeDelegate Unprepare_cb_delegate;
138 static UnprepareNativeDelegate UnprepareVMCallback {
140 if (Unprepare_cb_delegate == null)
141 Unprepare_cb_delegate = new UnprepareNativeDelegate (Unprepare_cb);
142 return Unprepare_cb_delegate;
146 static void OverrideUnprepare (GLib.GType gtype)
148 OverrideUnprepare (gtype, UnprepareVMCallback);
151 static void OverrideUnprepare (GLib.GType gtype, UnprepareNativeDelegate callback)
154 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("unprepare"));
155 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
159 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
160 delegate bool UnprepareNativeDelegate (IntPtr inst);
162 static bool Unprepare_cb (IntPtr inst)
165 AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
167 __result = __obj.OnUnprepare ();
169 } catch (Exception e) {
170 GLib.ExceptionManager.RaiseUnhandledException (e, true);
171 // NOTREACHED: above call does not return.
176 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideUnprepare")]
177 protected virtual bool OnUnprepare ()
179 return InternalUnprepare ();
182 private bool InternalUnprepare ()
184 UnprepareNativeDelegate unmanaged = null;
186 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("unprepare"));
187 unmanaged = (UnprepareNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(UnprepareNativeDelegate));
189 if (unmanaged == null) return false;
191 bool __result = unmanaged (this.Handle);
195 static CloseNativeDelegate Close_cb_delegate;
196 static CloseNativeDelegate CloseVMCallback {
198 if (Close_cb_delegate == null)
199 Close_cb_delegate = new CloseNativeDelegate (Close_cb);
200 return Close_cb_delegate;
204 static void OverrideClose (GLib.GType gtype)
206 OverrideClose (gtype, CloseVMCallback);
209 static void OverrideClose (GLib.GType gtype, CloseNativeDelegate callback)
212 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close"));
213 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
217 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
218 delegate bool CloseNativeDelegate (IntPtr inst);
220 static bool Close_cb (IntPtr inst)
223 AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
225 __result = __obj.OnClose ();
227 } catch (Exception e) {
228 GLib.ExceptionManager.RaiseUnhandledException (e, true);
229 // NOTREACHED: above call does not return.
234 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideClose")]
235 protected virtual bool OnClose ()
237 return InternalClose ();
240 private bool InternalClose ()
242 CloseNativeDelegate unmanaged = null;
244 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("close"));
245 unmanaged = (CloseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CloseNativeDelegate));
247 if (unmanaged == null) return false;
249 bool __result = unmanaged (this.Handle);
253 static WriteNativeDelegate Write_cb_delegate;
254 static WriteNativeDelegate WriteVMCallback {
256 if (Write_cb_delegate == null)
257 Write_cb_delegate = new WriteNativeDelegate (Write_cb);
258 return Write_cb_delegate;
262 static void OverrideWrite (GLib.GType gtype)
264 OverrideWrite (gtype, WriteVMCallback);
267 static void OverrideWrite (GLib.GType gtype, WriteNativeDelegate callback)
270 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("write"));
271 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
275 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
276 delegate int WriteNativeDelegate (IntPtr inst, IntPtr data, uint length);
278 static int Write_cb (IntPtr inst, IntPtr data, uint length)
281 AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
283 __result = __obj.OnWrite (data, length);
285 } catch (Exception e) {
286 GLib.ExceptionManager.RaiseUnhandledException (e, true);
287 // NOTREACHED: above call does not return.
292 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideWrite")]
293 protected virtual int OnWrite (IntPtr data, uint length)
295 return InternalWrite (data, length);
298 private int InternalWrite (IntPtr data, uint length)
300 WriteNativeDelegate unmanaged = null;
302 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("write"));
303 unmanaged = (WriteNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(WriteNativeDelegate));
305 if (unmanaged == null) return 0;
307 int __result = unmanaged (this.Handle, data, length);
311 static DelayNativeDelegate Delay_cb_delegate;
312 static DelayNativeDelegate DelayVMCallback {
314 if (Delay_cb_delegate == null)
315 Delay_cb_delegate = new DelayNativeDelegate (Delay_cb);
316 return Delay_cb_delegate;
320 static void OverrideDelay (GLib.GType gtype)
322 OverrideDelay (gtype, DelayVMCallback);
325 static void OverrideDelay (GLib.GType gtype, DelayNativeDelegate callback)
328 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("delay"));
329 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
333 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
334 delegate uint DelayNativeDelegate (IntPtr inst);
336 static uint Delay_cb (IntPtr inst)
339 AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
341 __result = __obj.OnDelay ();
343 } catch (Exception e) {
344 GLib.ExceptionManager.RaiseUnhandledException (e, true);
345 // NOTREACHED: above call does not return.
350 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideDelay")]
351 protected virtual uint OnDelay ()
353 return InternalDelay ();
356 private uint InternalDelay ()
358 DelayNativeDelegate unmanaged = null;
360 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("delay"));
361 unmanaged = (DelayNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DelayNativeDelegate));
363 if (unmanaged == null) return 0;
365 uint __result = unmanaged (this.Handle);
369 static ResetNativeDelegate Reset_cb_delegate;
370 static ResetNativeDelegate ResetVMCallback {
372 if (Reset_cb_delegate == null)
373 Reset_cb_delegate = new ResetNativeDelegate (Reset_cb);
374 return Reset_cb_delegate;
378 static void OverrideReset (GLib.GType gtype)
380 OverrideReset (gtype, ResetVMCallback);
383 static void OverrideReset (GLib.GType gtype, ResetNativeDelegate callback)
386 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("reset"));
387 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
391 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
392 delegate void ResetNativeDelegate (IntPtr inst);
394 static void Reset_cb (IntPtr inst)
397 AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
399 } catch (Exception e) {
400 GLib.ExceptionManager.RaiseUnhandledException (e, false);
404 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideReset")]
405 protected virtual void OnReset ()
410 private void InternalReset ()
412 ResetNativeDelegate unmanaged = null;
414 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("reset"));
415 unmanaged = (ResetNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ResetNativeDelegate));
417 if (unmanaged == null) return;
419 unmanaged (this.Handle);
422 static PauseNativeDelegate Pause_cb_delegate;
423 static PauseNativeDelegate PauseVMCallback {
425 if (Pause_cb_delegate == null)
426 Pause_cb_delegate = new PauseNativeDelegate (Pause_cb);
427 return Pause_cb_delegate;
431 static void OverridePause (GLib.GType gtype)
433 OverridePause (gtype, PauseVMCallback);
436 static void OverridePause (GLib.GType gtype, PauseNativeDelegate callback)
439 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pause"));
440 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
444 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
445 delegate void PauseNativeDelegate (IntPtr inst);
447 static void Pause_cb (IntPtr inst)
450 AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
452 } catch (Exception e) {
453 GLib.ExceptionManager.RaiseUnhandledException (e, false);
457 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverridePause")]
458 protected virtual void OnPause ()
463 private void InternalPause ()
465 PauseNativeDelegate unmanaged = null;
467 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("pause"));
468 unmanaged = (PauseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PauseNativeDelegate));
470 if (unmanaged == null) return;
472 unmanaged (this.Handle);
475 static ResumeNativeDelegate Resume_cb_delegate;
476 static ResumeNativeDelegate ResumeVMCallback {
478 if (Resume_cb_delegate == null)
479 Resume_cb_delegate = new ResumeNativeDelegate (Resume_cb);
480 return Resume_cb_delegate;
484 static void OverrideResume (GLib.GType gtype)
486 OverrideResume (gtype, ResumeVMCallback);
489 static void OverrideResume (GLib.GType gtype, ResumeNativeDelegate callback)
492 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("resume"));
493 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
497 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
498 delegate void ResumeNativeDelegate (IntPtr inst);
500 static void Resume_cb (IntPtr inst)
503 AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
505 } catch (Exception e) {
506 GLib.ExceptionManager.RaiseUnhandledException (e, false);
510 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideResume")]
511 protected virtual void OnResume ()
516 private void InternalResume ()
518 ResumeNativeDelegate unmanaged = null;
520 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("resume"));
521 unmanaged = (ResumeNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ResumeNativeDelegate));
523 if (unmanaged == null) return;
525 unmanaged (this.Handle);
528 static StopNativeDelegate Stop_cb_delegate;
529 static StopNativeDelegate StopVMCallback {
531 if (Stop_cb_delegate == null)
532 Stop_cb_delegate = new StopNativeDelegate (Stop_cb);
533 return Stop_cb_delegate;
537 static void OverrideStop (GLib.GType gtype)
539 OverrideStop (gtype, StopVMCallback);
542 static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback)
545 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop"));
546 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
550 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
551 delegate void StopNativeDelegate (IntPtr inst);
553 static void Stop_cb (IntPtr inst)
556 AudioSink __obj = GLib.Object.GetObject (inst, false) as AudioSink;
558 } catch (Exception e) {
559 GLib.ExceptionManager.RaiseUnhandledException (e, false);
563 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSink), ConnectionMethod="OverrideStop")]
564 protected virtual void OnStop ()
569 private void InternalStop ()
571 StopNativeDelegate unmanaged = null;
573 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop"));
574 unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate));
576 if (unmanaged == null) return;
578 unmanaged (this.Handle);
582 // Internal representation of the wrapped structure ABI.
583 static GLib.AbiStruct _class_abi = null;
584 static public new GLib.AbiStruct class_abi {
586 if (_class_abi == null)
587 _class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
588 new GLib.AbiField("open"
589 , Gst.Audio.AudioBaseSink.class_abi.Fields
590 , (uint) Marshal.SizeOf(typeof(IntPtr)) // open
593 , (uint) Marshal.SizeOf(typeof(IntPtr))
596 new GLib.AbiField("prepare"
598 , (uint) Marshal.SizeOf(typeof(IntPtr)) // prepare
601 , (uint) Marshal.SizeOf(typeof(IntPtr))
604 new GLib.AbiField("unprepare"
606 , (uint) Marshal.SizeOf(typeof(IntPtr)) // unprepare
609 , (uint) Marshal.SizeOf(typeof(IntPtr))
612 new GLib.AbiField("close"
614 , (uint) Marshal.SizeOf(typeof(IntPtr)) // close
617 , (uint) Marshal.SizeOf(typeof(IntPtr))
620 new GLib.AbiField("write"
622 , (uint) Marshal.SizeOf(typeof(IntPtr)) // write
625 , (uint) Marshal.SizeOf(typeof(IntPtr))
628 new GLib.AbiField("delay"
630 , (uint) Marshal.SizeOf(typeof(IntPtr)) // delay
633 , (uint) Marshal.SizeOf(typeof(IntPtr))
636 new GLib.AbiField("reset"
638 , (uint) Marshal.SizeOf(typeof(IntPtr)) // reset
641 , (uint) Marshal.SizeOf(typeof(IntPtr))
644 new GLib.AbiField("pause"
646 , (uint) Marshal.SizeOf(typeof(IntPtr)) // pause
649 , (uint) Marshal.SizeOf(typeof(IntPtr))
652 new GLib.AbiField("resume"
654 , (uint) Marshal.SizeOf(typeof(IntPtr)) // resume
657 , (uint) Marshal.SizeOf(typeof(IntPtr))
660 new GLib.AbiField("stop"
662 , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop
665 , (uint) Marshal.SizeOf(typeof(IntPtr))
668 new GLib.AbiField("extension"
670 , (uint) Marshal.SizeOf(typeof(IntPtr)) // extension
673 , (uint) Marshal.SizeOf(typeof(IntPtr))
683 // End of the ABI representation.
685 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
686 static extern IntPtr gst_audio_sink_get_type();
688 public static new GLib.GType GType {
690 IntPtr raw_ret = gst_audio_sink_get_type();
691 GLib.GType ret = new GLib.GType(raw_ret);
699 GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
702 // Internal representation of the wrapped structure ABI.
703 static GLib.AbiStruct _abi_info = null;
704 static public new GLib.AbiStruct abi_info {
706 if (_abi_info == null)
707 _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
708 new GLib.AbiField("thread"
709 , Gst.Audio.AudioBaseSink.abi_info.Fields
710 , (uint) Marshal.SizeOf(typeof(IntPtr)) // thread
713 , (uint) Marshal.SizeOf(typeof(IntPtr))
716 new GLib.AbiField("_gst_reserved"
718 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
721 , (uint) Marshal.SizeOf(typeof(IntPtr))
731 // End of the ABI representation.