Release 1.22.7
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst.Audio / AudioFilter.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 AudioFilter : Gst.Base.BaseTransform {
13
14                 protected AudioFilter (IntPtr raw) : base(raw) {}
15
16                 protected AudioFilter() : base(IntPtr.Zero)
17                 {
18                         CreateNativeObject (new string [0], new GLib.Value [0]);
19                 }
20
21                 public Gst.Audio.AudioInfo Info {
22                         get {
23                                 unsafe {
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);
26                                 }
27                         }
28                 }
29
30                 static SetupNativeDelegate Setup_cb_delegate;
31                 static SetupNativeDelegate SetupVMCallback {
32                         get {
33                                 if (Setup_cb_delegate == null)
34                                         Setup_cb_delegate = new SetupNativeDelegate (Setup_cb);
35                                 return Setup_cb_delegate;
36                         }
37                 }
38
39                 static void OverrideSetup (GLib.GType gtype)
40                 {
41                         OverrideSetup (gtype, SetupVMCallback);
42                 }
43
44                 static void OverrideSetup (GLib.GType gtype, SetupNativeDelegate callback)
45                 {
46                         unsafe {
47                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("setup"));
48                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
49                         }
50                 }
51
52                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
53                 delegate bool SetupNativeDelegate (IntPtr inst, IntPtr info);
54
55                 static bool Setup_cb (IntPtr inst, IntPtr info)
56                 {
57                         try {
58                                 AudioFilter __obj = GLib.Object.GetObject (inst, false) as AudioFilter;
59                                 bool __result;
60                                 __result = __obj.OnSetup (info == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque (info, typeof (Gst.Audio.AudioInfo), false));
61                                 return __result;
62                         } catch (Exception e) {
63                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
64                                 // NOTREACHED: above call does not return.
65                                 throw e;
66                         }
67                 }
68
69                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioFilter), ConnectionMethod="OverrideSetup")]
70                 protected virtual bool OnSetup (Gst.Audio.AudioInfo info)
71                 {
72                         return InternalSetup (info);
73                 }
74
75                 private bool InternalSetup (Gst.Audio.AudioInfo info)
76                 {
77                         SetupNativeDelegate unmanaged = null;
78                         unsafe {
79                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("setup"));
80                                 unmanaged = (SetupNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetupNativeDelegate));
81                         }
82                         if (unmanaged == null) return false;
83
84                         bool __result = unmanaged (this.Handle, info == null ? IntPtr.Zero : info.Handle);
85                         return __result;
86                 }
87
88
89                 // Internal representation of the wrapped structure ABI.
90                 static GLib.AbiStruct _class_abi = null;
91                 static public new GLib.AbiStruct class_abi {
92                         get {
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
98                                                         , null
99                                                         , "_gst_reserved"
100                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
101                                                         , 0
102                                                         ),
103                                                 new GLib.AbiField("_gst_reserved"
104                                                         , -1
105                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
106                                                         , "setup"
107                                                         , null
108                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
109                                                         , 0
110                                                         ),
111                                         });
112
113                                 return _class_abi;
114                         }
115                 }
116
117
118                 // End of the ABI representation.
119
120                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
121                 static extern void gst_audio_filter_class_add_pad_templates(IntPtr allowed_caps);
122
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);
125                 }
126
127                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
128                 static extern IntPtr gst_audio_filter_get_type();
129
130                 public static new GLib.GType GType { 
131                         get {
132                                 IntPtr raw_ret = gst_audio_filter_get_type();
133                                 GLib.GType ret = new GLib.GType(raw_ret);
134                                 return ret;
135                         }
136                 }
137
138
139                 static AudioFilter ()
140                 {
141                         GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
142                 }
143
144                 // Internal representation of the wrapped structure ABI.
145                 static GLib.AbiStruct _abi_info = null;
146                 static public new GLib.AbiStruct abi_info {
147                         get {
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
153                                                         , null
154                                                         , "_gst_reserved"
155                                                         , Gst.Audio.AudioInfo.abi_info.Align
156                                                         , 0
157                                                         ),
158                                                 new GLib.AbiField("_gst_reserved"
159                                                         , -1
160                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) * 4 // _gst_reserved
161                                                         , "info"
162                                                         , null
163                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
164                                                         , 0
165                                                         ),
166                                         });
167
168                                 return _abi_info;
169                         }
170                 }
171
172
173                 // End of the ABI representation.
174
175 #endregion
176         }
177 }