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 AudioFilter : Gst.Base.BaseTransform {
14 protected AudioFilter (IntPtr raw) : base(raw) {}
16 protected AudioFilter() : base(IntPtr.Zero)
18 CreateNativeObject (new string [0], new GLib.Value [0]);
21 public Gst.Audio.AudioInfo Info {
24 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("info"));
25 return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Audio.AudioInfo), false);
30 static SetupNativeDelegate Setup_cb_delegate;
31 static SetupNativeDelegate SetupVMCallback {
33 if (Setup_cb_delegate == null)
34 Setup_cb_delegate = new SetupNativeDelegate (Setup_cb);
35 return Setup_cb_delegate;
39 static void OverrideSetup (GLib.GType gtype)
41 OverrideSetup (gtype, SetupVMCallback);
44 static void OverrideSetup (GLib.GType gtype, SetupNativeDelegate callback)
47 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("setup"));
48 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
52 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
53 delegate bool SetupNativeDelegate (IntPtr inst, IntPtr info);
55 static bool Setup_cb (IntPtr inst, IntPtr info)
58 AudioFilter __obj = GLib.Object.GetObject (inst, false) as AudioFilter;
60 __result = __obj.OnSetup (info == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque (info, typeof (Gst.Audio.AudioInfo), false));
62 } catch (Exception e) {
63 GLib.ExceptionManager.RaiseUnhandledException (e, true);
64 // NOTREACHED: above call does not return.
69 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioFilter), ConnectionMethod="OverrideSetup")]
70 protected virtual bool OnSetup (Gst.Audio.AudioInfo info)
72 return InternalSetup (info);
75 private bool InternalSetup (Gst.Audio.AudioInfo info)
77 SetupNativeDelegate unmanaged = null;
79 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("setup"));
80 unmanaged = (SetupNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetupNativeDelegate));
82 if (unmanaged == null) return false;
84 bool __result = unmanaged (this.Handle, info == null ? IntPtr.Zero : info.Handle);
89 // Internal representation of the wrapped structure ABI.
90 static GLib.AbiStruct _class_abi = null;
91 static public new GLib.AbiStruct class_abi {
93 if (_class_abi == null)
94 _class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{
95 new GLib.AbiField("setup"
96 , Gst.Base.BaseTransform.class_abi.Fields
97 , (uint) Marshal.SizeOf(typeof(IntPtr)) // setup
100 , (uint) Marshal.SizeOf(typeof(IntPtr))
103 new GLib.AbiField("_gst_reserved"
105 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
108 , (uint) Marshal.SizeOf(typeof(IntPtr))
118 // End of the ABI representation.
120 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
121 static extern void gst_audio_filter_class_add_pad_templates(IntPtr allowed_caps);
123 public static void AddAudioPadTemplate(Gst.Caps allowed_caps) {
124 gst_audio_filter_class_add_pad_templates(allowed_caps == null ? IntPtr.Zero : allowed_caps.Handle);
127 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
128 static extern IntPtr gst_audio_filter_get_type();
130 public static new GLib.GType GType {
132 IntPtr raw_ret = gst_audio_filter_get_type();
133 GLib.GType ret = new GLib.GType(raw_ret);
139 static AudioFilter ()
141 GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
144 // Internal representation of the wrapped structure ABI.
145 static GLib.AbiStruct _abi_info = null;
146 static public new GLib.AbiStruct abi_info {
148 if (_abi_info == null)
149 _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{
150 new GLib.AbiField("info"
151 , Gst.Base.BaseTransform.abi_info.Fields
152 , Gst.Audio.AudioInfo.abi_info.Size // info
155 , Gst.Audio.AudioInfo.abi_info.Align
158 new GLib.AbiField("_gst_reserved"
160 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
163 , (uint) Marshal.SizeOf(typeof(IntPtr))
173 // End of the ABI representation.