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 AudioSrc : Gst.Audio.AudioBaseSrc {
14 public AudioSrc (IntPtr raw) : base(raw) {}
16 protected AudioSrc() : 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 AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
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.AudioSrc), 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 AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
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.AudioSrc), 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 AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
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.AudioSrc), 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 AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
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.AudioSrc), 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 ReadNativeDelegate Read_cb_delegate;
254 static ReadNativeDelegate ReadVMCallback {
256 if (Read_cb_delegate == null)
257 Read_cb_delegate = new ReadNativeDelegate (Read_cb);
258 return Read_cb_delegate;
262 static void OverrideRead (GLib.GType gtype)
264 OverrideRead (gtype, ReadVMCallback);
267 static void OverrideRead (GLib.GType gtype, ReadNativeDelegate callback)
270 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("read"));
271 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
275 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
276 delegate uint ReadNativeDelegate (IntPtr inst, IntPtr data, uint length, ulong timestamp);
278 static uint Read_cb (IntPtr inst, IntPtr data, uint length, ulong timestamp)
281 AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
283 __result = __obj.OnRead (data, length, timestamp);
285 } catch (Exception e) {
286 GLib.ExceptionManager.RaiseUnhandledException (e, true);
287 // NOTREACHED: above call does not return.
292 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), ConnectionMethod="OverrideRead")]
293 protected virtual uint OnRead (IntPtr data, uint length, ulong timestamp)
295 return InternalRead (data, length, timestamp);
298 private uint InternalRead (IntPtr data, uint length, ulong timestamp)
300 ReadNativeDelegate unmanaged = null;
302 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("read"));
303 unmanaged = (ReadNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ReadNativeDelegate));
305 if (unmanaged == null) return 0;
307 uint __result = unmanaged (this.Handle, data, length, timestamp);
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 AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
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.AudioSrc), 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 AudioSrc __obj = GLib.Object.GetObject (inst, false) as AudioSrc;
399 } catch (Exception e) {
400 GLib.ExceptionManager.RaiseUnhandledException (e, false);
404 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioSrc), 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);
423 // Internal representation of the wrapped structure ABI.
424 static GLib.AbiStruct _class_abi = null;
425 static public new GLib.AbiStruct class_abi {
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
434 , (uint) Marshal.SizeOf(typeof(IntPtr))
437 new GLib.AbiField("prepare"
439 , (uint) Marshal.SizeOf(typeof(IntPtr)) // prepare
442 , (uint) Marshal.SizeOf(typeof(IntPtr))
445 new GLib.AbiField("unprepare"
447 , (uint) Marshal.SizeOf(typeof(IntPtr)) // unprepare
450 , (uint) Marshal.SizeOf(typeof(IntPtr))
453 new GLib.AbiField("close"
455 , (uint) Marshal.SizeOf(typeof(IntPtr)) // close
458 , (uint) Marshal.SizeOf(typeof(IntPtr))
461 new GLib.AbiField("read"
463 , (uint) Marshal.SizeOf(typeof(IntPtr)) // read
466 , (uint) Marshal.SizeOf(typeof(IntPtr))
469 new GLib.AbiField("delay"
471 , (uint) Marshal.SizeOf(typeof(IntPtr)) // delay
474 , (uint) Marshal.SizeOf(typeof(IntPtr))
477 new GLib.AbiField("reset"
479 , (uint) Marshal.SizeOf(typeof(IntPtr)) // reset
482 , (uint) Marshal.SizeOf(typeof(IntPtr))
485 new GLib.AbiField("_gst_reserved"
487 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
490 , (uint) Marshal.SizeOf(typeof(IntPtr))
500 // End of the ABI representation.
502 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
503 static extern IntPtr gst_audio_src_get_type();
505 public static new GLib.GType GType {
507 IntPtr raw_ret = gst_audio_src_get_type();
508 GLib.GType ret = new GLib.GType(raw_ret);
516 GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
519 // Internal representation of the wrapped structure ABI.
520 static GLib.AbiStruct _abi_info = null;
521 static public new GLib.AbiStruct abi_info {
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
530 , (uint) Marshal.SizeOf(typeof(IntPtr))
533 new GLib.AbiField("_gst_reserved"
535 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
538 , (uint) Marshal.SizeOf(typeof(IntPtr))
548 // End of the ABI representation.