Release 1.22.7
[platform/upstream/gstreamer.git] / subprojects / gstreamer-sharp / sources / generated / Gst.Audio / AudioDecoder.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 AudioDecoder : Gst.Element {
13
14                 protected AudioDecoder (IntPtr raw) : base(raw) {}
15
16                 protected AudioDecoder() : base(IntPtr.Zero)
17                 {
18                         CreateNativeObject (new string [0], new GLib.Value [0]);
19                 }
20
21                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
22                 static extern int gst_audio_decoder_get_max_errors(IntPtr raw);
23
24                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
25                 static extern void gst_audio_decoder_set_max_errors(IntPtr raw, int num);
26
27                 [GLib.Property ("max-errors")]
28                 public int MaxErrors {
29                         get  {
30                                 int raw_ret = gst_audio_decoder_get_max_errors(Handle);
31                                 int ret = raw_ret;
32                                 return ret;
33                         }
34                         set  {
35                                 gst_audio_decoder_set_max_errors(Handle, value);
36                         }
37                 }
38
39                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
40                 static extern ulong gst_audio_decoder_get_min_latency(IntPtr raw);
41
42                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
43                 static extern void gst_audio_decoder_set_min_latency(IntPtr raw, ulong num);
44
45                 [GLib.Property ("min-latency")]
46                 public ulong MinLatency {
47                         get  {
48                                 ulong raw_ret = gst_audio_decoder_get_min_latency(Handle);
49                                 ulong ret = raw_ret;
50                                 return ret;
51                         }
52                         set  {
53                                 gst_audio_decoder_set_min_latency(Handle, value);
54                         }
55                 }
56
57                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
58                 static extern bool gst_audio_decoder_get_plc(IntPtr raw);
59
60                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
61                 static extern void gst_audio_decoder_set_plc(IntPtr raw, bool enabled);
62
63                 [GLib.Property ("plc")]
64                 public bool Plc {
65                         get  {
66                                 bool raw_ret = gst_audio_decoder_get_plc(Handle);
67                                 bool ret = raw_ret;
68                                 return ret;
69                         }
70                         set  {
71                                 gst_audio_decoder_set_plc(Handle, value);
72                         }
73                 }
74
75                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
76                 static extern ulong gst_audio_decoder_get_tolerance(IntPtr raw);
77
78                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
79                 static extern void gst_audio_decoder_set_tolerance(IntPtr raw, ulong tolerance);
80
81                 [GLib.Property ("tolerance")]
82                 public ulong Tolerance {
83                         get  {
84                                 ulong raw_ret = gst_audio_decoder_get_tolerance(Handle);
85                                 ulong ret = raw_ret;
86                                 return ret;
87                         }
88                         set  {
89                                 gst_audio_decoder_set_tolerance(Handle, value);
90                         }
91                 }
92
93                 public Gst.Pad Sinkpad {
94                         get {
95                                 unsafe {
96                                         IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("sinkpad"));
97                                         return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad;
98                                 }
99                         }
100                 }
101
102                 public Gst.Pad Srcpad {
103                         get {
104                                 unsafe {
105                                         IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("srcpad"));
106                                         return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad;
107                                 }
108                         }
109                 }
110
111                 public GLib.RecMutex StreamLock {
112                         get {
113                                 unsafe {
114                                         IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("stream_lock"));
115                                         return new GLib.RecMutex((*raw_ptr));
116                                 }
117                         }
118                 }
119
120                 public Gst.Segment InputSegment {
121                         get {
122                                 unsafe {
123                                         IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("input_segment"));
124                                         return Gst.Segment.New ((*raw_ptr));
125                                 }
126                         }
127                 }
128
129                 public Gst.Segment OutputSegment {
130                         get {
131                                 unsafe {
132                                         IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("output_segment"));
133                                         return Gst.Segment.New ((*raw_ptr));
134                                 }
135                         }
136                 }
137
138                 static StartNativeDelegate Start_cb_delegate;
139                 static StartNativeDelegate StartVMCallback {
140                         get {
141                                 if (Start_cb_delegate == null)
142                                         Start_cb_delegate = new StartNativeDelegate (Start_cb);
143                                 return Start_cb_delegate;
144                         }
145                 }
146
147                 static void OverrideStart (GLib.GType gtype)
148                 {
149                         OverrideStart (gtype, StartVMCallback);
150                 }
151
152                 static void OverrideStart (GLib.GType gtype, StartNativeDelegate callback)
153                 {
154                         unsafe {
155                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start"));
156                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
157                         }
158                 }
159
160                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
161                 delegate bool StartNativeDelegate (IntPtr inst);
162
163                 static bool Start_cb (IntPtr inst)
164                 {
165                         try {
166                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
167                                 bool __result;
168                                 __result = __obj.OnStart ();
169                                 return __result;
170                         } catch (Exception e) {
171                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
172                                 // NOTREACHED: above call does not return.
173                                 throw e;
174                         }
175                 }
176
177                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideStart")]
178                 protected virtual bool OnStart ()
179                 {
180                         return InternalStart ();
181                 }
182
183                 private bool InternalStart ()
184                 {
185                         StartNativeDelegate unmanaged = null;
186                         unsafe {
187                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start"));
188                                 unmanaged = (StartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartNativeDelegate));
189                         }
190                         if (unmanaged == null) return false;
191
192                         bool __result = unmanaged (this.Handle);
193                         return __result;
194                 }
195
196                 static StopNativeDelegate Stop_cb_delegate;
197                 static StopNativeDelegate StopVMCallback {
198                         get {
199                                 if (Stop_cb_delegate == null)
200                                         Stop_cb_delegate = new StopNativeDelegate (Stop_cb);
201                                 return Stop_cb_delegate;
202                         }
203                 }
204
205                 static void OverrideStop (GLib.GType gtype)
206                 {
207                         OverrideStop (gtype, StopVMCallback);
208                 }
209
210                 static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback)
211                 {
212                         unsafe {
213                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop"));
214                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
215                         }
216                 }
217
218                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
219                 delegate bool StopNativeDelegate (IntPtr inst);
220
221                 static bool Stop_cb (IntPtr inst)
222                 {
223                         try {
224                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
225                                 bool __result;
226                                 __result = __obj.OnStop ();
227                                 return __result;
228                         } catch (Exception e) {
229                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
230                                 // NOTREACHED: above call does not return.
231                                 throw e;
232                         }
233                 }
234
235                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideStop")]
236                 protected virtual bool OnStop ()
237                 {
238                         return InternalStop ();
239                 }
240
241                 private bool InternalStop ()
242                 {
243                         StopNativeDelegate unmanaged = null;
244                         unsafe {
245                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop"));
246                                 unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate));
247                         }
248                         if (unmanaged == null) return false;
249
250                         bool __result = unmanaged (this.Handle);
251                         return __result;
252                 }
253
254                 static SetFormatNativeDelegate SetFormat_cb_delegate;
255                 static SetFormatNativeDelegate SetFormatVMCallback {
256                         get {
257                                 if (SetFormat_cb_delegate == null)
258                                         SetFormat_cb_delegate = new SetFormatNativeDelegate (SetFormat_cb);
259                                 return SetFormat_cb_delegate;
260                         }
261                 }
262
263                 static void OverrideSetFormat (GLib.GType gtype)
264                 {
265                         OverrideSetFormat (gtype, SetFormatVMCallback);
266                 }
267
268                 static void OverrideSetFormat (GLib.GType gtype, SetFormatNativeDelegate callback)
269                 {
270                         unsafe {
271                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_format"));
272                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
273                         }
274                 }
275
276                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
277                 delegate bool SetFormatNativeDelegate (IntPtr inst, IntPtr caps);
278
279                 static bool SetFormat_cb (IntPtr inst, IntPtr caps)
280                 {
281                         try {
282                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
283                                 bool __result;
284                                 __result = __obj.OnSetFormat (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false));
285                                 return __result;
286                         } catch (Exception e) {
287                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
288                                 // NOTREACHED: above call does not return.
289                                 throw e;
290                         }
291                 }
292
293                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideSetFormat")]
294                 protected virtual bool OnSetFormat (Gst.Caps caps)
295                 {
296                         return InternalSetFormat (caps);
297                 }
298
299                 private bool InternalSetFormat (Gst.Caps caps)
300                 {
301                         SetFormatNativeDelegate unmanaged = null;
302                         unsafe {
303                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_format"));
304                                 unmanaged = (SetFormatNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetFormatNativeDelegate));
305                         }
306                         if (unmanaged == null) return false;
307
308                         bool __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle);
309                         return __result;
310                 }
311
312                 static ParseNativeDelegate Parse_cb_delegate;
313                 static ParseNativeDelegate ParseVMCallback {
314                         get {
315                                 if (Parse_cb_delegate == null)
316                                         Parse_cb_delegate = new ParseNativeDelegate (Parse_cb);
317                                 return Parse_cb_delegate;
318                         }
319                 }
320
321                 static void OverrideParse (GLib.GType gtype)
322                 {
323                         OverrideParse (gtype, ParseVMCallback);
324                 }
325
326                 static void OverrideParse (GLib.GType gtype, ParseNativeDelegate callback)
327                 {
328                         unsafe {
329                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("parse"));
330                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
331                         }
332                 }
333
334                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
335                 delegate int ParseNativeDelegate (IntPtr inst, IntPtr adapter, int offset, int length);
336
337                 static int Parse_cb (IntPtr inst, IntPtr adapter, int offset, int length)
338                 {
339                         try {
340                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
341                                 Gst.FlowReturn __result;
342                                 __result = __obj.OnParse (GLib.Object.GetObject(adapter) as Gst.Base.Adapter, offset, length);
343                                 return (int) __result;
344                         } catch (Exception e) {
345                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
346                                 // NOTREACHED: above call does not return.
347                                 throw e;
348                         }
349                 }
350
351                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideParse")]
352                 protected virtual Gst.FlowReturn OnParse (Gst.Base.Adapter adapter, int offset, int length)
353                 {
354                         return InternalParse (adapter, offset, length);
355                 }
356
357                 private Gst.FlowReturn InternalParse (Gst.Base.Adapter adapter, int offset, int length)
358                 {
359                         ParseNativeDelegate unmanaged = null;
360                         unsafe {
361                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("parse"));
362                                 unmanaged = (ParseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ParseNativeDelegate));
363                         }
364                         if (unmanaged == null) return (Gst.FlowReturn) 0;
365
366                         int __result = unmanaged (this.Handle, adapter == null ? IntPtr.Zero : adapter.Handle, offset, length);
367                         return (Gst.FlowReturn) __result;
368                 }
369
370                 static HandleFrameNativeDelegate HandleFrame_cb_delegate;
371                 static HandleFrameNativeDelegate HandleFrameVMCallback {
372                         get {
373                                 if (HandleFrame_cb_delegate == null)
374                                         HandleFrame_cb_delegate = new HandleFrameNativeDelegate (HandleFrame_cb);
375                                 return HandleFrame_cb_delegate;
376                         }
377                 }
378
379                 static void OverrideHandleFrame (GLib.GType gtype)
380                 {
381                         OverrideHandleFrame (gtype, HandleFrameVMCallback);
382                 }
383
384                 static void OverrideHandleFrame (GLib.GType gtype, HandleFrameNativeDelegate callback)
385                 {
386                         unsafe {
387                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_frame"));
388                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
389                         }
390                 }
391
392                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
393                 delegate int HandleFrameNativeDelegate (IntPtr inst, IntPtr buffer);
394
395                 static int HandleFrame_cb (IntPtr inst, IntPtr buffer)
396                 {
397                         try {
398                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
399                                 Gst.FlowReturn __result;
400                                 __result = __obj.OnHandleFrame (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false));
401                                 return (int) __result;
402                         } catch (Exception e) {
403                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
404                                 // NOTREACHED: above call does not return.
405                                 throw e;
406                         }
407                 }
408
409                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideHandleFrame")]
410                 protected virtual Gst.FlowReturn OnHandleFrame (Gst.Buffer buffer)
411                 {
412                         return InternalHandleFrame (buffer);
413                 }
414
415                 private Gst.FlowReturn InternalHandleFrame (Gst.Buffer buffer)
416                 {
417                         HandleFrameNativeDelegate unmanaged = null;
418                         unsafe {
419                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_frame"));
420                                 unmanaged = (HandleFrameNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(HandleFrameNativeDelegate));
421                         }
422                         if (unmanaged == null) return (Gst.FlowReturn) 0;
423
424                         int __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle);
425                         return (Gst.FlowReturn) __result;
426                 }
427
428                 static FlushNativeDelegate Flush_cb_delegate;
429                 static FlushNativeDelegate FlushVMCallback {
430                         get {
431                                 if (Flush_cb_delegate == null)
432                                         Flush_cb_delegate = new FlushNativeDelegate (Flush_cb);
433                                 return Flush_cb_delegate;
434                         }
435                 }
436
437                 static void OverrideFlush (GLib.GType gtype)
438                 {
439                         OverrideFlush (gtype, FlushVMCallback);
440                 }
441
442                 static void OverrideFlush (GLib.GType gtype, FlushNativeDelegate callback)
443                 {
444                         unsafe {
445                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("flush"));
446                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
447                         }
448                 }
449
450                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
451                 delegate void FlushNativeDelegate (IntPtr inst, bool hard);
452
453                 static void Flush_cb (IntPtr inst, bool hard)
454                 {
455                         try {
456                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
457                                 __obj.OnFlush (hard);
458                         } catch (Exception e) {
459                                 GLib.ExceptionManager.RaiseUnhandledException (e, false);
460                         }
461                 }
462
463                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideFlush")]
464                 protected virtual void OnFlush (bool hard)
465                 {
466                         InternalFlush (hard);
467                 }
468
469                 private void InternalFlush (bool hard)
470                 {
471                         FlushNativeDelegate unmanaged = null;
472                         unsafe {
473                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("flush"));
474                                 unmanaged = (FlushNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FlushNativeDelegate));
475                         }
476                         if (unmanaged == null) return;
477
478                         unmanaged (this.Handle, hard);
479                 }
480
481                 static PrePushNativeDelegate PrePush_cb_delegate;
482                 static PrePushNativeDelegate PrePushVMCallback {
483                         get {
484                                 if (PrePush_cb_delegate == null)
485                                         PrePush_cb_delegate = new PrePushNativeDelegate (PrePush_cb);
486                                 return PrePush_cb_delegate;
487                         }
488                 }
489
490                 static void OverridePrePush (GLib.GType gtype)
491                 {
492                         OverridePrePush (gtype, PrePushVMCallback);
493                 }
494
495                 static void OverridePrePush (GLib.GType gtype, PrePushNativeDelegate callback)
496                 {
497                         unsafe {
498                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pre_push"));
499                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
500                         }
501                 }
502
503                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
504                 delegate int PrePushNativeDelegate (IntPtr inst, IntPtr buffer);
505
506                 static int PrePush_cb (IntPtr inst, IntPtr buffer)
507                 {
508                         try {
509                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
510                                 Gst.FlowReturn __result;
511                                 __result = __obj.OnPrePush (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false));
512                                 return (int) __result;
513                         } catch (Exception e) {
514                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
515                                 // NOTREACHED: above call does not return.
516                                 throw e;
517                         }
518                 }
519
520                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverridePrePush")]
521                 protected virtual Gst.FlowReturn OnPrePush (Gst.Buffer buffer)
522                 {
523                         return InternalPrePush (buffer);
524                 }
525
526                 private Gst.FlowReturn InternalPrePush (Gst.Buffer buffer)
527                 {
528                         PrePushNativeDelegate unmanaged = null;
529                         unsafe {
530                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("pre_push"));
531                                 unmanaged = (PrePushNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrePushNativeDelegate));
532                         }
533                         if (unmanaged == null) return (Gst.FlowReturn) 0;
534
535                         int __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle);
536                         return (Gst.FlowReturn) __result;
537                 }
538
539                 static SinkEventNativeDelegate SinkEvent_cb_delegate;
540                 static SinkEventNativeDelegate SinkEventVMCallback {
541                         get {
542                                 if (SinkEvent_cb_delegate == null)
543                                         SinkEvent_cb_delegate = new SinkEventNativeDelegate (SinkEvent_cb);
544                                 return SinkEvent_cb_delegate;
545                         }
546                 }
547
548                 static void OverrideSinkEvent (GLib.GType gtype)
549                 {
550                         OverrideSinkEvent (gtype, SinkEventVMCallback);
551                 }
552
553                 static void OverrideSinkEvent (GLib.GType gtype, SinkEventNativeDelegate callback)
554                 {
555                         unsafe {
556                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event"));
557                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
558                         }
559                 }
560
561                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
562                 delegate bool SinkEventNativeDelegate (IntPtr inst, IntPtr evnt);
563
564                 static bool SinkEvent_cb (IntPtr inst, IntPtr evnt)
565                 {
566                         try {
567                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
568                                 bool __result;
569                                 __result = __obj.OnSinkEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false));
570                                 return __result;
571                         } catch (Exception e) {
572                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
573                                 // NOTREACHED: above call does not return.
574                                 throw e;
575                         }
576                 }
577
578                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideSinkEvent")]
579                 protected virtual bool OnSinkEvent (Gst.Event evnt)
580                 {
581                         return InternalSinkEvent (evnt);
582                 }
583
584                 private bool InternalSinkEvent (Gst.Event evnt)
585                 {
586                         SinkEventNativeDelegate unmanaged = null;
587                         unsafe {
588                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event"));
589                                 unmanaged = (SinkEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkEventNativeDelegate));
590                         }
591                         if (unmanaged == null) return false;
592
593                         bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle);
594                         return __result;
595                 }
596
597                 static SrcEventNativeDelegate SrcEvent_cb_delegate;
598                 static SrcEventNativeDelegate SrcEventVMCallback {
599                         get {
600                                 if (SrcEvent_cb_delegate == null)
601                                         SrcEvent_cb_delegate = new SrcEventNativeDelegate (SrcEvent_cb);
602                                 return SrcEvent_cb_delegate;
603                         }
604                 }
605
606                 static void OverrideSrcEvent (GLib.GType gtype)
607                 {
608                         OverrideSrcEvent (gtype, SrcEventVMCallback);
609                 }
610
611                 static void OverrideSrcEvent (GLib.GType gtype, SrcEventNativeDelegate callback)
612                 {
613                         unsafe {
614                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event"));
615                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
616                         }
617                 }
618
619                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
620                 delegate bool SrcEventNativeDelegate (IntPtr inst, IntPtr evnt);
621
622                 static bool SrcEvent_cb (IntPtr inst, IntPtr evnt)
623                 {
624                         try {
625                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
626                                 bool __result;
627                                 __result = __obj.OnSrcEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false));
628                                 return __result;
629                         } catch (Exception e) {
630                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
631                                 // NOTREACHED: above call does not return.
632                                 throw e;
633                         }
634                 }
635
636                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideSrcEvent")]
637                 protected virtual bool OnSrcEvent (Gst.Event evnt)
638                 {
639                         return InternalSrcEvent (evnt);
640                 }
641
642                 private bool InternalSrcEvent (Gst.Event evnt)
643                 {
644                         SrcEventNativeDelegate unmanaged = null;
645                         unsafe {
646                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event"));
647                                 unmanaged = (SrcEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcEventNativeDelegate));
648                         }
649                         if (unmanaged == null) return false;
650
651                         bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle);
652                         return __result;
653                 }
654
655                 static OpenNativeDelegate Open_cb_delegate;
656                 static OpenNativeDelegate OpenVMCallback {
657                         get {
658                                 if (Open_cb_delegate == null)
659                                         Open_cb_delegate = new OpenNativeDelegate (Open_cb);
660                                 return Open_cb_delegate;
661                         }
662                 }
663
664                 static void OverrideOpen (GLib.GType gtype)
665                 {
666                         OverrideOpen (gtype, OpenVMCallback);
667                 }
668
669                 static void OverrideOpen (GLib.GType gtype, OpenNativeDelegate callback)
670                 {
671                         unsafe {
672                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("open"));
673                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
674                         }
675                 }
676
677                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
678                 delegate bool OpenNativeDelegate (IntPtr inst);
679
680                 static bool Open_cb (IntPtr inst)
681                 {
682                         try {
683                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
684                                 bool __result;
685                                 __result = __obj.OnOpen ();
686                                 return __result;
687                         } catch (Exception e) {
688                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
689                                 // NOTREACHED: above call does not return.
690                                 throw e;
691                         }
692                 }
693
694                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideOpen")]
695                 protected virtual bool OnOpen ()
696                 {
697                         return InternalOpen ();
698                 }
699
700                 private bool InternalOpen ()
701                 {
702                         OpenNativeDelegate unmanaged = null;
703                         unsafe {
704                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("open"));
705                                 unmanaged = (OpenNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(OpenNativeDelegate));
706                         }
707                         if (unmanaged == null) return false;
708
709                         bool __result = unmanaged (this.Handle);
710                         return __result;
711                 }
712
713                 static CloseNativeDelegate Close_cb_delegate;
714                 static CloseNativeDelegate CloseVMCallback {
715                         get {
716                                 if (Close_cb_delegate == null)
717                                         Close_cb_delegate = new CloseNativeDelegate (Close_cb);
718                                 return Close_cb_delegate;
719                         }
720                 }
721
722                 static void OverrideClose (GLib.GType gtype)
723                 {
724                         OverrideClose (gtype, CloseVMCallback);
725                 }
726
727                 static void OverrideClose (GLib.GType gtype, CloseNativeDelegate callback)
728                 {
729                         unsafe {
730                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close"));
731                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
732                         }
733                 }
734
735                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
736                 delegate bool CloseNativeDelegate (IntPtr inst);
737
738                 static bool Close_cb (IntPtr inst)
739                 {
740                         try {
741                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
742                                 bool __result;
743                                 __result = __obj.OnClose ();
744                                 return __result;
745                         } catch (Exception e) {
746                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
747                                 // NOTREACHED: above call does not return.
748                                 throw e;
749                         }
750                 }
751
752                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideClose")]
753                 protected virtual bool OnClose ()
754                 {
755                         return InternalClose ();
756                 }
757
758                 private bool InternalClose ()
759                 {
760                         CloseNativeDelegate unmanaged = null;
761                         unsafe {
762                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("close"));
763                                 unmanaged = (CloseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CloseNativeDelegate));
764                         }
765                         if (unmanaged == null) return false;
766
767                         bool __result = unmanaged (this.Handle);
768                         return __result;
769                 }
770
771                 static NegotiateNativeDelegate Negotiate_cb_delegate;
772                 static NegotiateNativeDelegate NegotiateVMCallback {
773                         get {
774                                 if (Negotiate_cb_delegate == null)
775                                         Negotiate_cb_delegate = new NegotiateNativeDelegate (Negotiate_cb);
776                                 return Negotiate_cb_delegate;
777                         }
778                 }
779
780                 static void OverrideNegotiate (GLib.GType gtype)
781                 {
782                         OverrideNegotiate (gtype, NegotiateVMCallback);
783                 }
784
785                 static void OverrideNegotiate (GLib.GType gtype, NegotiateNativeDelegate callback)
786                 {
787                         unsafe {
788                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiate"));
789                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
790                         }
791                 }
792
793                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
794                 delegate bool NegotiateNativeDelegate (IntPtr inst);
795
796                 static bool Negotiate_cb (IntPtr inst)
797                 {
798                         try {
799                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
800                                 bool __result;
801                                 __result = __obj.OnNegotiate ();
802                                 return __result;
803                         } catch (Exception e) {
804                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
805                                 // NOTREACHED: above call does not return.
806                                 throw e;
807                         }
808                 }
809
810                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideNegotiate")]
811                 protected virtual bool OnNegotiate ()
812                 {
813                         return InternalNegotiate ();
814                 }
815
816                 private bool InternalNegotiate ()
817                 {
818                         NegotiateNativeDelegate unmanaged = null;
819                         unsafe {
820                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiate"));
821                                 unmanaged = (NegotiateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NegotiateNativeDelegate));
822                         }
823                         if (unmanaged == null) return false;
824
825                         bool __result = unmanaged (this.Handle);
826                         return __result;
827                 }
828
829                 static DecideAllocationNativeDelegate DecideAllocation_cb_delegate;
830                 static DecideAllocationNativeDelegate DecideAllocationVMCallback {
831                         get {
832                                 if (DecideAllocation_cb_delegate == null)
833                                         DecideAllocation_cb_delegate = new DecideAllocationNativeDelegate (DecideAllocation_cb);
834                                 return DecideAllocation_cb_delegate;
835                         }
836                 }
837
838                 static void OverrideDecideAllocation (GLib.GType gtype)
839                 {
840                         OverrideDecideAllocation (gtype, DecideAllocationVMCallback);
841                 }
842
843                 static void OverrideDecideAllocation (GLib.GType gtype, DecideAllocationNativeDelegate callback)
844                 {
845                         unsafe {
846                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation"));
847                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
848                         }
849                 }
850
851                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
852                 delegate bool DecideAllocationNativeDelegate (IntPtr inst, IntPtr query);
853
854                 static bool DecideAllocation_cb (IntPtr inst, IntPtr query)
855                 {
856                         try {
857                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
858                                 bool __result;
859                                 __result = __obj.OnDecideAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false));
860                                 return __result;
861                         } catch (Exception e) {
862                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
863                                 // NOTREACHED: above call does not return.
864                                 throw e;
865                         }
866                 }
867
868                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideDecideAllocation")]
869                 protected virtual bool OnDecideAllocation (Gst.Query query)
870                 {
871                         return InternalDecideAllocation (query);
872                 }
873
874                 private bool InternalDecideAllocation (Gst.Query query)
875                 {
876                         DecideAllocationNativeDelegate unmanaged = null;
877                         unsafe {
878                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation"));
879                                 unmanaged = (DecideAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DecideAllocationNativeDelegate));
880                         }
881                         if (unmanaged == null) return false;
882
883                         bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle);
884                         return __result;
885                 }
886
887                 static ProposeAllocationNativeDelegate ProposeAllocation_cb_delegate;
888                 static ProposeAllocationNativeDelegate ProposeAllocationVMCallback {
889                         get {
890                                 if (ProposeAllocation_cb_delegate == null)
891                                         ProposeAllocation_cb_delegate = new ProposeAllocationNativeDelegate (ProposeAllocation_cb);
892                                 return ProposeAllocation_cb_delegate;
893                         }
894                 }
895
896                 static void OverrideProposeAllocation (GLib.GType gtype)
897                 {
898                         OverrideProposeAllocation (gtype, ProposeAllocationVMCallback);
899                 }
900
901                 static void OverrideProposeAllocation (GLib.GType gtype, ProposeAllocationNativeDelegate callback)
902                 {
903                         unsafe {
904                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation"));
905                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
906                         }
907                 }
908
909                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
910                 delegate bool ProposeAllocationNativeDelegate (IntPtr inst, IntPtr query);
911
912                 static bool ProposeAllocation_cb (IntPtr inst, IntPtr query)
913                 {
914                         try {
915                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
916                                 bool __result;
917                                 __result = __obj.OnProposeAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false));
918                                 return __result;
919                         } catch (Exception e) {
920                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
921                                 // NOTREACHED: above call does not return.
922                                 throw e;
923                         }
924                 }
925
926                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideProposeAllocation")]
927                 protected virtual bool OnProposeAllocation (Gst.Query query)
928                 {
929                         return InternalProposeAllocation (query);
930                 }
931
932                 private bool InternalProposeAllocation (Gst.Query query)
933                 {
934                         ProposeAllocationNativeDelegate unmanaged = null;
935                         unsafe {
936                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation"));
937                                 unmanaged = (ProposeAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ProposeAllocationNativeDelegate));
938                         }
939                         if (unmanaged == null) return false;
940
941                         bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle);
942                         return __result;
943                 }
944
945                 static SinkQueryNativeDelegate SinkQuery_cb_delegate;
946                 static SinkQueryNativeDelegate SinkQueryVMCallback {
947                         get {
948                                 if (SinkQuery_cb_delegate == null)
949                                         SinkQuery_cb_delegate = new SinkQueryNativeDelegate (SinkQuery_cb);
950                                 return SinkQuery_cb_delegate;
951                         }
952                 }
953
954                 static void OverrideSinkQuery (GLib.GType gtype)
955                 {
956                         OverrideSinkQuery (gtype, SinkQueryVMCallback);
957                 }
958
959                 static void OverrideSinkQuery (GLib.GType gtype, SinkQueryNativeDelegate callback)
960                 {
961                         unsafe {
962                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_query"));
963                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
964                         }
965                 }
966
967                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
968                 delegate bool SinkQueryNativeDelegate (IntPtr inst, IntPtr query);
969
970                 static bool SinkQuery_cb (IntPtr inst, IntPtr query)
971                 {
972                         try {
973                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
974                                 bool __result;
975                                 __result = __obj.OnSinkQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false));
976                                 return __result;
977                         } catch (Exception e) {
978                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
979                                 // NOTREACHED: above call does not return.
980                                 throw e;
981                         }
982                 }
983
984                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideSinkQuery")]
985                 protected virtual bool OnSinkQuery (Gst.Query query)
986                 {
987                         return InternalSinkQuery (query);
988                 }
989
990                 private bool InternalSinkQuery (Gst.Query query)
991                 {
992                         SinkQueryNativeDelegate unmanaged = null;
993                         unsafe {
994                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_query"));
995                                 unmanaged = (SinkQueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkQueryNativeDelegate));
996                         }
997                         if (unmanaged == null) return false;
998
999                         bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle);
1000                         return __result;
1001                 }
1002
1003                 static SrcQueryNativeDelegate SrcQuery_cb_delegate;
1004                 static SrcQueryNativeDelegate SrcQueryVMCallback {
1005                         get {
1006                                 if (SrcQuery_cb_delegate == null)
1007                                         SrcQuery_cb_delegate = new SrcQueryNativeDelegate (SrcQuery_cb);
1008                                 return SrcQuery_cb_delegate;
1009                         }
1010                 }
1011
1012                 static void OverrideSrcQuery (GLib.GType gtype)
1013                 {
1014                         OverrideSrcQuery (gtype, SrcQueryVMCallback);
1015                 }
1016
1017                 static void OverrideSrcQuery (GLib.GType gtype, SrcQueryNativeDelegate callback)
1018                 {
1019                         unsafe {
1020                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_query"));
1021                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
1022                         }
1023                 }
1024
1025                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
1026                 delegate bool SrcQueryNativeDelegate (IntPtr inst, IntPtr query);
1027
1028                 static bool SrcQuery_cb (IntPtr inst, IntPtr query)
1029                 {
1030                         try {
1031                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
1032                                 bool __result;
1033                                 __result = __obj.OnSrcQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false));
1034                                 return __result;
1035                         } catch (Exception e) {
1036                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
1037                                 // NOTREACHED: above call does not return.
1038                                 throw e;
1039                         }
1040                 }
1041
1042                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideSrcQuery")]
1043                 protected virtual bool OnSrcQuery (Gst.Query query)
1044                 {
1045                         return InternalSrcQuery (query);
1046                 }
1047
1048                 private bool InternalSrcQuery (Gst.Query query)
1049                 {
1050                         SrcQueryNativeDelegate unmanaged = null;
1051                         unsafe {
1052                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_query"));
1053                                 unmanaged = (SrcQueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcQueryNativeDelegate));
1054                         }
1055                         if (unmanaged == null) return false;
1056
1057                         bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle);
1058                         return __result;
1059                 }
1060
1061                 static GetcapsNativeDelegate Getcaps_cb_delegate;
1062                 static GetcapsNativeDelegate GetcapsVMCallback {
1063                         get {
1064                                 if (Getcaps_cb_delegate == null)
1065                                         Getcaps_cb_delegate = new GetcapsNativeDelegate (Getcaps_cb);
1066                                 return Getcaps_cb_delegate;
1067                         }
1068                 }
1069
1070                 static void OverrideGetcaps (GLib.GType gtype)
1071                 {
1072                         OverrideGetcaps (gtype, GetcapsVMCallback);
1073                 }
1074
1075                 static void OverrideGetcaps (GLib.GType gtype, GetcapsNativeDelegate callback)
1076                 {
1077                         unsafe {
1078                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("getcaps"));
1079                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
1080                         }
1081                 }
1082
1083                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
1084                 delegate IntPtr GetcapsNativeDelegate (IntPtr inst, IntPtr filter);
1085
1086                 static IntPtr Getcaps_cb (IntPtr inst, IntPtr filter)
1087                 {
1088                         try {
1089                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
1090                                 Gst.Caps __result;
1091                                 __result = __obj.OnGetcaps (filter == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (filter, typeof (Gst.Caps), false));
1092                                 return __result == null ? IntPtr.Zero : __result.OwnedCopy;
1093                         } catch (Exception e) {
1094                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
1095                                 // NOTREACHED: above call does not return.
1096                                 throw e;
1097                         }
1098                 }
1099
1100                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideGetcaps")]
1101                 protected virtual Gst.Caps OnGetcaps (Gst.Caps filter)
1102                 {
1103                         return InternalGetcaps (filter);
1104                 }
1105
1106                 private Gst.Caps InternalGetcaps (Gst.Caps filter)
1107                 {
1108                         GetcapsNativeDelegate unmanaged = null;
1109                         unsafe {
1110                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("getcaps"));
1111                                 unmanaged = (GetcapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetcapsNativeDelegate));
1112                         }
1113                         if (unmanaged == null) return null;
1114
1115                         IntPtr __result = unmanaged (this.Handle, filter == null ? IntPtr.Zero : filter.Handle);
1116                         return __result == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (__result, typeof (Gst.Caps), true);
1117                 }
1118
1119                 static TransformMetaNativeDelegate TransformMeta_cb_delegate;
1120                 static TransformMetaNativeDelegate TransformMetaVMCallback {
1121                         get {
1122                                 if (TransformMeta_cb_delegate == null)
1123                                         TransformMeta_cb_delegate = new TransformMetaNativeDelegate (TransformMeta_cb);
1124                                 return TransformMeta_cb_delegate;
1125                         }
1126                 }
1127
1128                 static void OverrideTransformMeta (GLib.GType gtype)
1129                 {
1130                         OverrideTransformMeta (gtype, TransformMetaVMCallback);
1131                 }
1132
1133                 static void OverrideTransformMeta (GLib.GType gtype, TransformMetaNativeDelegate callback)
1134                 {
1135                         unsafe {
1136                                 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_meta"));
1137                                 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
1138                         }
1139                 }
1140
1141                 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
1142                 delegate bool TransformMetaNativeDelegate (IntPtr inst, IntPtr outbuf, IntPtr meta, IntPtr inbuf);
1143
1144                 static bool TransformMeta_cb (IntPtr inst, IntPtr outbuf, IntPtr meta, IntPtr inbuf)
1145                 {
1146                         try {
1147                                 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
1148                                 bool __result;
1149                                 __result = __obj.OnTransformMeta (outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (outbuf, typeof (Gst.Buffer), false), Gst.Meta.New (meta), inbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (inbuf, typeof (Gst.Buffer), false));
1150                                 return __result;
1151                         } catch (Exception e) {
1152                                 GLib.ExceptionManager.RaiseUnhandledException (e, true);
1153                                 // NOTREACHED: above call does not return.
1154                                 throw e;
1155                         }
1156                 }
1157
1158                 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideTransformMeta")]
1159                 protected virtual bool OnTransformMeta (Gst.Buffer outbuf, Gst.Meta meta, Gst.Buffer inbuf)
1160                 {
1161                         return InternalTransformMeta (outbuf, meta, inbuf);
1162                 }
1163
1164                 private bool InternalTransformMeta (Gst.Buffer outbuf, Gst.Meta meta, Gst.Buffer inbuf)
1165                 {
1166                         TransformMetaNativeDelegate unmanaged = null;
1167                         unsafe {
1168                                 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_meta"));
1169                                 unmanaged = (TransformMetaNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformMetaNativeDelegate));
1170                         }
1171                         if (unmanaged == null) return false;
1172
1173                         IntPtr native_meta = GLib.Marshaller.StructureToPtrAlloc (meta);
1174                         bool __result = unmanaged (this.Handle, outbuf == null ? IntPtr.Zero : outbuf.Handle, native_meta, inbuf == null ? IntPtr.Zero : inbuf.Handle);
1175                         Marshal.FreeHGlobal (native_meta);
1176                         return __result;
1177                 }
1178
1179
1180                 // Internal representation of the wrapped structure ABI.
1181                 static GLib.AbiStruct _class_abi = null;
1182                 static public new GLib.AbiStruct class_abi {
1183                         get {
1184                                 if (_class_abi == null)
1185                                         _class_abi = new GLib.AbiStruct (new List<GLib.AbiField>{ 
1186                                                 new GLib.AbiField("start"
1187                                                         , Gst.Element.class_abi.Fields
1188                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // start
1189                                                         , null
1190                                                         , "stop"
1191                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1192                                                         , 0
1193                                                         ),
1194                                                 new GLib.AbiField("stop"
1195                                                         , -1
1196                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop
1197                                                         , "start"
1198                                                         , "set_format"
1199                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1200                                                         , 0
1201                                                         ),
1202                                                 new GLib.AbiField("set_format"
1203                                                         , -1
1204                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_format
1205                                                         , "stop"
1206                                                         , "parse"
1207                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1208                                                         , 0
1209                                                         ),
1210                                                 new GLib.AbiField("parse"
1211                                                         , -1
1212                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // parse
1213                                                         , "set_format"
1214                                                         , "handle_frame"
1215                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1216                                                         , 0
1217                                                         ),
1218                                                 new GLib.AbiField("handle_frame"
1219                                                         , -1
1220                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // handle_frame
1221                                                         , "parse"
1222                                                         , "flush"
1223                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1224                                                         , 0
1225                                                         ),
1226                                                 new GLib.AbiField("flush"
1227                                                         , -1
1228                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // flush
1229                                                         , "handle_frame"
1230                                                         , "pre_push"
1231                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1232                                                         , 0
1233                                                         ),
1234                                                 new GLib.AbiField("pre_push"
1235                                                         , -1
1236                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // pre_push
1237                                                         , "flush"
1238                                                         , "sink_event"
1239                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1240                                                         , 0
1241                                                         ),
1242                                                 new GLib.AbiField("sink_event"
1243                                                         , -1
1244                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_event
1245                                                         , "pre_push"
1246                                                         , "src_event"
1247                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1248                                                         , 0
1249                                                         ),
1250                                                 new GLib.AbiField("src_event"
1251                                                         , -1
1252                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_event
1253                                                         , "sink_event"
1254                                                         , "open"
1255                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1256                                                         , 0
1257                                                         ),
1258                                                 new GLib.AbiField("open"
1259                                                         , -1
1260                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // open
1261                                                         , "src_event"
1262                                                         , "close"
1263                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1264                                                         , 0
1265                                                         ),
1266                                                 new GLib.AbiField("close"
1267                                                         , -1
1268                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // close
1269                                                         , "open"
1270                                                         , "negotiate"
1271                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1272                                                         , 0
1273                                                         ),
1274                                                 new GLib.AbiField("negotiate"
1275                                                         , -1
1276                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // negotiate
1277                                                         , "close"
1278                                                         , "decide_allocation"
1279                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1280                                                         , 0
1281                                                         ),
1282                                                 new GLib.AbiField("decide_allocation"
1283                                                         , -1
1284                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // decide_allocation
1285                                                         , "negotiate"
1286                                                         , "propose_allocation"
1287                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1288                                                         , 0
1289                                                         ),
1290                                                 new GLib.AbiField("propose_allocation"
1291                                                         , -1
1292                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // propose_allocation
1293                                                         , "decide_allocation"
1294                                                         , "sink_query"
1295                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1296                                                         , 0
1297                                                         ),
1298                                                 new GLib.AbiField("sink_query"
1299                                                         , -1
1300                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_query
1301                                                         , "propose_allocation"
1302                                                         , "src_query"
1303                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1304                                                         , 0
1305                                                         ),
1306                                                 new GLib.AbiField("src_query"
1307                                                         , -1
1308                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_query
1309                                                         , "sink_query"
1310                                                         , "getcaps"
1311                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1312                                                         , 0
1313                                                         ),
1314                                                 new GLib.AbiField("getcaps"
1315                                                         , -1
1316                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // getcaps
1317                                                         , "src_query"
1318                                                         , "transform_meta"
1319                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1320                                                         , 0
1321                                                         ),
1322                                                 new GLib.AbiField("transform_meta"
1323                                                         , -1
1324                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform_meta
1325                                                         , "getcaps"
1326                                                         , "_gst_reserved"
1327                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1328                                                         , 0
1329                                                         ),
1330                                                 new GLib.AbiField("_gst_reserved"
1331                                                         , -1
1332                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) * 16 // _gst_reserved
1333                                                         , "transform_meta"
1334                                                         , null
1335                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1336                                                         , 0
1337                                                         ),
1338                                         });
1339
1340                                 return _class_abi;
1341                         }
1342                 }
1343
1344
1345                 // End of the ABI representation.
1346
1347                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1348                 static extern IntPtr gst_audio_decoder_get_type();
1349
1350                 public static new GLib.GType GType { 
1351                         get {
1352                                 IntPtr raw_ret = gst_audio_decoder_get_type();
1353                                 GLib.GType ret = new GLib.GType(raw_ret);
1354                                 return ret;
1355                         }
1356                 }
1357
1358                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1359                 static extern IntPtr gst_audio_decoder_allocate_output_buffer(IntPtr raw, UIntPtr size);
1360
1361                 public Gst.Buffer AllocateOutputBuffer(ulong size) {
1362                         IntPtr raw_ret = gst_audio_decoder_allocate_output_buffer(Handle, new UIntPtr (size));
1363                         Gst.Buffer ret = raw_ret == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Buffer), true);
1364                         return ret;
1365                 }
1366
1367                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1368                 static extern int gst_audio_decoder_finish_frame(IntPtr raw, IntPtr buf, int frames);
1369
1370                 public Gst.FlowReturn FinishFrame(Gst.Buffer buf, int frames) {
1371                         buf.Owned = false;
1372                         int raw_ret = gst_audio_decoder_finish_frame(Handle, buf == null ? IntPtr.Zero : buf.Handle, frames);
1373                         Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret;
1374                         return ret;
1375                 }
1376
1377                 public Gst.FlowReturn FinishFrame(int frames) {
1378                         return FinishFrame (null, frames);
1379                 }
1380
1381                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1382                 static extern int gst_audio_decoder_finish_subframe(IntPtr raw, IntPtr buf);
1383
1384                 public Gst.FlowReturn FinishSubframe(Gst.Buffer buf) {
1385                         buf.Owned = false;
1386                         int raw_ret = gst_audio_decoder_finish_subframe(Handle, buf == null ? IntPtr.Zero : buf.Handle);
1387                         Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret;
1388                         return ret;
1389                 }
1390
1391                 public Gst.FlowReturn FinishSubframe() {
1392                         return FinishSubframe (null);
1393                 }
1394
1395                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1396                 static extern void gst_audio_decoder_get_allocator(IntPtr raw, out IntPtr allocator, IntPtr parms);
1397
1398                 public void GetAllocator(out Gst.Allocator allocator, out Gst.AllocationParams parms) {
1399                         IntPtr native_allocator;
1400                         IntPtr native_parms = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.AllocationParams)));
1401                         gst_audio_decoder_get_allocator(Handle, out native_allocator, native_parms);
1402                         allocator = GLib.Object.GetObject(native_allocator, true) as Gst.Allocator;
1403                         parms = Gst.AllocationParams.New (native_parms);
1404                         Marshal.FreeHGlobal (native_parms);
1405                 }
1406
1407                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1408                 static extern IntPtr gst_audio_decoder_get_audio_info(IntPtr raw);
1409
1410                 public Gst.Audio.AudioInfo AudioInfo { 
1411                         get {
1412                                 IntPtr raw_ret = gst_audio_decoder_get_audio_info(Handle);
1413                                 Gst.Audio.AudioInfo ret = raw_ret == IntPtr.Zero ? null : (Gst.Audio.AudioInfo) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Audio.AudioInfo), true);
1414                                 return ret;
1415                         }
1416                 }
1417
1418                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1419                 static extern int gst_audio_decoder_get_delay(IntPtr raw);
1420
1421                 public int Delay { 
1422                         get {
1423                                 int raw_ret = gst_audio_decoder_get_delay(Handle);
1424                                 int ret = raw_ret;
1425                                 return ret;
1426                         }
1427                 }
1428
1429                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1430                 static extern bool gst_audio_decoder_get_drainable(IntPtr raw);
1431
1432                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1433                 static extern void gst_audio_decoder_set_drainable(IntPtr raw, bool enabled);
1434
1435                 public bool Drainable { 
1436                         get {
1437                                 bool raw_ret = gst_audio_decoder_get_drainable(Handle);
1438                                 bool ret = raw_ret;
1439                                 return ret;
1440                         }
1441                         set {
1442                                 gst_audio_decoder_set_drainable(Handle, value);
1443                         }
1444                 }
1445
1446                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1447                 static extern int gst_audio_decoder_get_estimate_rate(IntPtr raw);
1448
1449                 public int EstimateRate { 
1450                         get {
1451                                 int raw_ret = gst_audio_decoder_get_estimate_rate(Handle);
1452                                 int ret = raw_ret;
1453                                 return ret;
1454                         }
1455                 }
1456
1457                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1458                 static extern void gst_audio_decoder_get_latency(IntPtr raw, out ulong min, out ulong max);
1459
1460                 public void GetLatency(out ulong min, out ulong max) {
1461                         gst_audio_decoder_get_latency(Handle, out min, out max);
1462                 }
1463
1464                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1465                 static extern bool gst_audio_decoder_get_needs_format(IntPtr raw);
1466
1467                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1468                 static extern void gst_audio_decoder_set_needs_format(IntPtr raw, bool enabled);
1469
1470                 public bool NeedsFormat { 
1471                         get {
1472                                 bool raw_ret = gst_audio_decoder_get_needs_format(Handle);
1473                                 bool ret = raw_ret;
1474                                 return ret;
1475                         }
1476                         set {
1477                                 gst_audio_decoder_set_needs_format(Handle, value);
1478                         }
1479                 }
1480
1481                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1482                 static extern void gst_audio_decoder_get_parse_state(IntPtr raw, out bool sync, out bool eos);
1483
1484                 public void GetParseState(out bool sync, out bool eos) {
1485                         gst_audio_decoder_get_parse_state(Handle, out sync, out eos);
1486                 }
1487
1488                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1489                 static extern int gst_audio_decoder_get_plc_aware(IntPtr raw);
1490
1491                 public int PlcAware { 
1492                         get {
1493                                 int raw_ret = gst_audio_decoder_get_plc_aware(Handle);
1494                                 int ret = raw_ret;
1495                                 return ret;
1496                         }
1497                 }
1498
1499                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1500                 static extern void gst_audio_decoder_merge_tags(IntPtr raw, IntPtr tags, int mode);
1501
1502                 public void MergeTags(Gst.TagList tags, Gst.TagMergeMode mode) {
1503                         gst_audio_decoder_merge_tags(Handle, tags == null ? IntPtr.Zero : tags.Handle, (int) mode);
1504                 }
1505
1506                 public void MergeTags(Gst.TagMergeMode mode) {
1507                         MergeTags (null, mode);
1508                 }
1509
1510                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1511                 static extern bool gst_audio_decoder_negotiate(IntPtr raw);
1512
1513                 public bool Negotiate() {
1514                         bool raw_ret = gst_audio_decoder_negotiate(Handle);
1515                         bool ret = raw_ret;
1516                         return ret;
1517                 }
1518
1519                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1520                 static extern IntPtr gst_audio_decoder_proxy_getcaps(IntPtr raw, IntPtr caps, IntPtr filter);
1521
1522                 public Gst.Caps ProxyGetcaps(Gst.Caps caps, Gst.Caps filter) {
1523                         IntPtr raw_ret = gst_audio_decoder_proxy_getcaps(Handle, caps == null ? IntPtr.Zero : caps.Handle, filter == null ? IntPtr.Zero : filter.Handle);
1524                         Gst.Caps ret = raw_ret == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (raw_ret, typeof (Gst.Caps), true);
1525                         return ret;
1526                 }
1527
1528                 public Gst.Caps ProxyGetcaps() {
1529                         return ProxyGetcaps (null, null);
1530                 }
1531
1532                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1533                 static extern void gst_audio_decoder_set_allocation_caps(IntPtr raw, IntPtr allocation_caps);
1534
1535                 public Gst.Caps AllocationCaps { 
1536                         set {
1537                                 gst_audio_decoder_set_allocation_caps(Handle, value == null ? IntPtr.Zero : value.Handle);
1538                         }
1539                 }
1540
1541                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1542                 static extern void gst_audio_decoder_set_estimate_rate(IntPtr raw, bool enabled);
1543
1544                 public void SetEstimateRate(bool enabled) {
1545                         gst_audio_decoder_set_estimate_rate(Handle, enabled);
1546                 }
1547
1548                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1549                 static extern void gst_audio_decoder_set_latency(IntPtr raw, ulong min, ulong max);
1550
1551                 public void SetLatency(ulong min, ulong max) {
1552                         gst_audio_decoder_set_latency(Handle, min, max);
1553                 }
1554
1555                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1556                 static extern bool gst_audio_decoder_set_output_caps(IntPtr raw, IntPtr caps);
1557
1558                 public bool SetOutputCaps(Gst.Caps caps) {
1559                         bool raw_ret = gst_audio_decoder_set_output_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle);
1560                         bool ret = raw_ret;
1561                         return ret;
1562                 }
1563
1564                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1565                 static extern bool gst_audio_decoder_set_output_format(IntPtr raw, IntPtr info);
1566
1567                 public bool SetOutputFormat(Gst.Audio.AudioInfo info) {
1568                         bool raw_ret = gst_audio_decoder_set_output_format(Handle, info == null ? IntPtr.Zero : info.Handle);
1569                         bool ret = raw_ret;
1570                         return ret;
1571                 }
1572
1573                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1574                 static extern void gst_audio_decoder_set_plc_aware(IntPtr raw, bool plc);
1575
1576                 public void SetPlcAware(bool plc) {
1577                         gst_audio_decoder_set_plc_aware(Handle, plc);
1578                 }
1579
1580                 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1581                 static extern void gst_audio_decoder_set_use_default_pad_acceptcaps(IntPtr raw, bool use);
1582
1583                 public bool UseDefaultPadAcceptcaps { 
1584                         set {
1585                                 gst_audio_decoder_set_use_default_pad_acceptcaps(Handle, value);
1586                         }
1587                 }
1588
1589
1590                 static AudioDecoder ()
1591                 {
1592                         GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
1593                 }
1594
1595                 // Internal representation of the wrapped structure ABI.
1596                 static GLib.AbiStruct _abi_info = null;
1597                 static public new GLib.AbiStruct abi_info {
1598                         get {
1599                                 if (_abi_info == null)
1600                                         _abi_info = new GLib.AbiStruct (new List<GLib.AbiField>{ 
1601                                                 new GLib.AbiField("sinkpad"
1602                                                         , Gst.Element.abi_info.Fields
1603                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // sinkpad
1604                                                         , null
1605                                                         , "srcpad"
1606                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1607                                                         , 0
1608                                                         ),
1609                                                 new GLib.AbiField("srcpad"
1610                                                         , -1
1611                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // srcpad
1612                                                         , "sinkpad"
1613                                                         , "stream_lock"
1614                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1615                                                         , 0
1616                                                         ),
1617                                                 new GLib.AbiField("stream_lock"
1618                                                         , -1
1619                                                         , (uint) Marshal.SizeOf(typeof(GLib.RecMutex.ABI)) // stream_lock
1620                                                         , "srcpad"
1621                                                         , "input_segment"
1622                                                         , (long) Marshal.OffsetOf(typeof(GstAudioDecoder_stream_lockAlign), "stream_lock")
1623                                                         , 0
1624                                                         ),
1625                                                 new GLib.AbiField("input_segment"
1626                                                         , -1
1627                                                         , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // input_segment
1628                                                         , "stream_lock"
1629                                                         , "output_segment"
1630                                                         , (long) Marshal.OffsetOf(typeof(GstAudioDecoder_input_segmentAlign), "input_segment")
1631                                                         , 0
1632                                                         ),
1633                                                 new GLib.AbiField("output_segment"
1634                                                         , -1
1635                                                         , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // output_segment
1636                                                         , "input_segment"
1637                                                         , "priv"
1638                                                         , (long) Marshal.OffsetOf(typeof(GstAudioDecoder_output_segmentAlign), "output_segment")
1639                                                         , 0
1640                                                         ),
1641                                                 new GLib.AbiField("priv"
1642                                                         , -1
1643                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
1644                                                         , "output_segment"
1645                                                         , "_gst_reserved"
1646                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1647                                                         , 0
1648                                                         ),
1649                                                 new GLib.AbiField("_gst_reserved"
1650                                                         , -1
1651                                                         , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _gst_reserved
1652                                                         , "priv"
1653                                                         , null
1654                                                         , (uint) Marshal.SizeOf(typeof(IntPtr))
1655                                                         , 0
1656                                                         ),
1657                                         });
1658
1659                                 return _abi_info;
1660                         }
1661                 }
1662
1663                 [StructLayout(LayoutKind.Sequential)]
1664                 public struct GstAudioDecoder_stream_lockAlign
1665                 {
1666                         sbyte f1;
1667                         private GLib.RecMutex.ABI stream_lock;
1668                 }
1669
1670                 [StructLayout(LayoutKind.Sequential)]
1671                 public struct GstAudioDecoder_input_segmentAlign
1672                 {
1673                         sbyte f1;
1674                         private Gst.Segment input_segment;
1675                 }
1676
1677                 [StructLayout(LayoutKind.Sequential)]
1678                 public struct GstAudioDecoder_output_segmentAlign
1679                 {
1680                         sbyte f1;
1681                         private Gst.Segment output_segment;
1682                 }
1683
1684
1685                 // End of the ABI representation.
1686
1687 #endregion
1688         }
1689 }