1 // This file was generated by the Gtk# code generator.
2 // Any changes made will be lost if regenerated.
7 using System.Collections;
8 using System.Collections.Generic;
9 using System.Runtime.InteropServices;
11 #region Autogenerated code
12 public partial class AudioDecoder : Gst.Element {
14 protected AudioDecoder (IntPtr raw) : base(raw) {}
16 protected AudioDecoder() : base(IntPtr.Zero)
18 CreateNativeObject (new string [0], new GLib.Value [0]);
21 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
22 static extern int gst_audio_decoder_get_max_errors(IntPtr raw);
24 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
25 static extern void gst_audio_decoder_set_max_errors(IntPtr raw, int num);
27 [GLib.Property ("max-errors")]
28 public int MaxErrors {
30 int raw_ret = gst_audio_decoder_get_max_errors(Handle);
35 gst_audio_decoder_set_max_errors(Handle, value);
39 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
40 static extern ulong gst_audio_decoder_get_min_latency(IntPtr raw);
42 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
43 static extern void gst_audio_decoder_set_min_latency(IntPtr raw, ulong num);
45 [GLib.Property ("min-latency")]
46 public ulong MinLatency {
48 ulong raw_ret = gst_audio_decoder_get_min_latency(Handle);
53 gst_audio_decoder_set_min_latency(Handle, value);
57 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
58 static extern bool gst_audio_decoder_get_plc(IntPtr raw);
60 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
61 static extern void gst_audio_decoder_set_plc(IntPtr raw, bool enabled);
63 [GLib.Property ("plc")]
66 bool raw_ret = gst_audio_decoder_get_plc(Handle);
71 gst_audio_decoder_set_plc(Handle, value);
75 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
76 static extern ulong gst_audio_decoder_get_tolerance(IntPtr raw);
78 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
79 static extern void gst_audio_decoder_set_tolerance(IntPtr raw, ulong tolerance);
81 [GLib.Property ("tolerance")]
82 public ulong Tolerance {
84 ulong raw_ret = gst_audio_decoder_get_tolerance(Handle);
89 gst_audio_decoder_set_tolerance(Handle, value);
93 public Gst.Pad Sinkpad {
96 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("sinkpad"));
97 return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad;
102 public Gst.Pad Srcpad {
105 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("srcpad"));
106 return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad;
111 public GLib.RecMutex StreamLock {
114 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("stream_lock"));
115 return new GLib.RecMutex((*raw_ptr));
120 public Gst.Segment InputSegment {
123 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("input_segment"));
124 return Gst.Segment.New ((*raw_ptr));
129 public Gst.Segment OutputSegment {
132 IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("output_segment"));
133 return Gst.Segment.New ((*raw_ptr));
138 static StartNativeDelegate Start_cb_delegate;
139 static StartNativeDelegate StartVMCallback {
141 if (Start_cb_delegate == null)
142 Start_cb_delegate = new StartNativeDelegate (Start_cb);
143 return Start_cb_delegate;
147 static void OverrideStart (GLib.GType gtype)
149 OverrideStart (gtype, StartVMCallback);
152 static void OverrideStart (GLib.GType gtype, StartNativeDelegate callback)
155 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start"));
156 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
160 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
161 delegate bool StartNativeDelegate (IntPtr inst);
163 static bool Start_cb (IntPtr inst)
166 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
168 __result = __obj.OnStart ();
170 } catch (Exception e) {
171 GLib.ExceptionManager.RaiseUnhandledException (e, true);
172 // NOTREACHED: above call does not return.
177 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideStart")]
178 protected virtual bool OnStart ()
180 return InternalStart ();
183 private bool InternalStart ()
185 StartNativeDelegate unmanaged = null;
187 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start"));
188 unmanaged = (StartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartNativeDelegate));
190 if (unmanaged == null) return false;
192 bool __result = unmanaged (this.Handle);
196 static StopNativeDelegate Stop_cb_delegate;
197 static StopNativeDelegate StopVMCallback {
199 if (Stop_cb_delegate == null)
200 Stop_cb_delegate = new StopNativeDelegate (Stop_cb);
201 return Stop_cb_delegate;
205 static void OverrideStop (GLib.GType gtype)
207 OverrideStop (gtype, StopVMCallback);
210 static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback)
213 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop"));
214 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
218 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
219 delegate bool StopNativeDelegate (IntPtr inst);
221 static bool Stop_cb (IntPtr inst)
224 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
226 __result = __obj.OnStop ();
228 } catch (Exception e) {
229 GLib.ExceptionManager.RaiseUnhandledException (e, true);
230 // NOTREACHED: above call does not return.
235 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideStop")]
236 protected virtual bool OnStop ()
238 return InternalStop ();
241 private bool InternalStop ()
243 StopNativeDelegate unmanaged = null;
245 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop"));
246 unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate));
248 if (unmanaged == null) return false;
250 bool __result = unmanaged (this.Handle);
254 static SetFormatNativeDelegate SetFormat_cb_delegate;
255 static SetFormatNativeDelegate SetFormatVMCallback {
257 if (SetFormat_cb_delegate == null)
258 SetFormat_cb_delegate = new SetFormatNativeDelegate (SetFormat_cb);
259 return SetFormat_cb_delegate;
263 static void OverrideSetFormat (GLib.GType gtype)
265 OverrideSetFormat (gtype, SetFormatVMCallback);
268 static void OverrideSetFormat (GLib.GType gtype, SetFormatNativeDelegate callback)
271 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_format"));
272 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
276 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
277 delegate bool SetFormatNativeDelegate (IntPtr inst, IntPtr caps);
279 static bool SetFormat_cb (IntPtr inst, IntPtr caps)
282 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
284 __result = __obj.OnSetFormat (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false));
286 } catch (Exception e) {
287 GLib.ExceptionManager.RaiseUnhandledException (e, true);
288 // NOTREACHED: above call does not return.
293 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideSetFormat")]
294 protected virtual bool OnSetFormat (Gst.Caps caps)
296 return InternalSetFormat (caps);
299 private bool InternalSetFormat (Gst.Caps caps)
301 SetFormatNativeDelegate unmanaged = null;
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));
306 if (unmanaged == null) return false;
308 bool __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle);
312 static ParseNativeDelegate Parse_cb_delegate;
313 static ParseNativeDelegate ParseVMCallback {
315 if (Parse_cb_delegate == null)
316 Parse_cb_delegate = new ParseNativeDelegate (Parse_cb);
317 return Parse_cb_delegate;
321 static void OverrideParse (GLib.GType gtype)
323 OverrideParse (gtype, ParseVMCallback);
326 static void OverrideParse (GLib.GType gtype, ParseNativeDelegate callback)
329 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("parse"));
330 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
334 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
335 delegate int ParseNativeDelegate (IntPtr inst, IntPtr adapter, int offset, int length);
337 static int Parse_cb (IntPtr inst, IntPtr adapter, int offset, int length)
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.
351 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideParse")]
352 protected virtual Gst.FlowReturn OnParse (Gst.Base.Adapter adapter, int offset, int length)
354 return InternalParse (adapter, offset, length);
357 private Gst.FlowReturn InternalParse (Gst.Base.Adapter adapter, int offset, int length)
359 ParseNativeDelegate unmanaged = null;
361 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("parse"));
362 unmanaged = (ParseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ParseNativeDelegate));
364 if (unmanaged == null) return (Gst.FlowReturn) 0;
366 int __result = unmanaged (this.Handle, adapter == null ? IntPtr.Zero : adapter.Handle, offset, length);
367 return (Gst.FlowReturn) __result;
370 static HandleFrameNativeDelegate HandleFrame_cb_delegate;
371 static HandleFrameNativeDelegate HandleFrameVMCallback {
373 if (HandleFrame_cb_delegate == null)
374 HandleFrame_cb_delegate = new HandleFrameNativeDelegate (HandleFrame_cb);
375 return HandleFrame_cb_delegate;
379 static void OverrideHandleFrame (GLib.GType gtype)
381 OverrideHandleFrame (gtype, HandleFrameVMCallback);
384 static void OverrideHandleFrame (GLib.GType gtype, HandleFrameNativeDelegate callback)
387 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("handle_frame"));
388 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
392 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
393 delegate int HandleFrameNativeDelegate (IntPtr inst, IntPtr buffer);
395 static int HandleFrame_cb (IntPtr inst, IntPtr buffer)
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.
409 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideHandleFrame")]
410 protected virtual Gst.FlowReturn OnHandleFrame (Gst.Buffer buffer)
412 return InternalHandleFrame (buffer);
415 private Gst.FlowReturn InternalHandleFrame (Gst.Buffer buffer)
417 HandleFrameNativeDelegate unmanaged = null;
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));
422 if (unmanaged == null) return (Gst.FlowReturn) 0;
424 int __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle);
425 return (Gst.FlowReturn) __result;
428 static FlushNativeDelegate Flush_cb_delegate;
429 static FlushNativeDelegate FlushVMCallback {
431 if (Flush_cb_delegate == null)
432 Flush_cb_delegate = new FlushNativeDelegate (Flush_cb);
433 return Flush_cb_delegate;
437 static void OverrideFlush (GLib.GType gtype)
439 OverrideFlush (gtype, FlushVMCallback);
442 static void OverrideFlush (GLib.GType gtype, FlushNativeDelegate callback)
445 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("flush"));
446 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
450 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
451 delegate void FlushNativeDelegate (IntPtr inst, bool hard);
453 static void Flush_cb (IntPtr inst, bool hard)
456 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
457 __obj.OnFlush (hard);
458 } catch (Exception e) {
459 GLib.ExceptionManager.RaiseUnhandledException (e, false);
463 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideFlush")]
464 protected virtual void OnFlush (bool hard)
466 InternalFlush (hard);
469 private void InternalFlush (bool hard)
471 FlushNativeDelegate unmanaged = null;
473 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("flush"));
474 unmanaged = (FlushNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FlushNativeDelegate));
476 if (unmanaged == null) return;
478 unmanaged (this.Handle, hard);
481 static PrePushNativeDelegate PrePush_cb_delegate;
482 static PrePushNativeDelegate PrePushVMCallback {
484 if (PrePush_cb_delegate == null)
485 PrePush_cb_delegate = new PrePushNativeDelegate (PrePush_cb);
486 return PrePush_cb_delegate;
490 static void OverridePrePush (GLib.GType gtype)
492 OverridePrePush (gtype, PrePushVMCallback);
495 static void OverridePrePush (GLib.GType gtype, PrePushNativeDelegate callback)
498 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("pre_push"));
499 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
503 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
504 delegate int PrePushNativeDelegate (IntPtr inst, IntPtr buffer);
506 static int PrePush_cb (IntPtr inst, IntPtr buffer)
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.
520 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverridePrePush")]
521 protected virtual Gst.FlowReturn OnPrePush (Gst.Buffer buffer)
523 return InternalPrePush (buffer);
526 private Gst.FlowReturn InternalPrePush (Gst.Buffer buffer)
528 PrePushNativeDelegate unmanaged = null;
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));
533 if (unmanaged == null) return (Gst.FlowReturn) 0;
535 int __result = unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle);
536 return (Gst.FlowReturn) __result;
539 static SinkEventNativeDelegate SinkEvent_cb_delegate;
540 static SinkEventNativeDelegate SinkEventVMCallback {
542 if (SinkEvent_cb_delegate == null)
543 SinkEvent_cb_delegate = new SinkEventNativeDelegate (SinkEvent_cb);
544 return SinkEvent_cb_delegate;
548 static void OverrideSinkEvent (GLib.GType gtype)
550 OverrideSinkEvent (gtype, SinkEventVMCallback);
553 static void OverrideSinkEvent (GLib.GType gtype, SinkEventNativeDelegate callback)
556 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event"));
557 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
561 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
562 delegate bool SinkEventNativeDelegate (IntPtr inst, IntPtr evnt);
564 static bool SinkEvent_cb (IntPtr inst, IntPtr evnt)
567 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
569 __result = __obj.OnSinkEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false));
571 } catch (Exception e) {
572 GLib.ExceptionManager.RaiseUnhandledException (e, true);
573 // NOTREACHED: above call does not return.
578 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideSinkEvent")]
579 protected virtual bool OnSinkEvent (Gst.Event evnt)
581 return InternalSinkEvent (evnt);
584 private bool InternalSinkEvent (Gst.Event evnt)
586 SinkEventNativeDelegate unmanaged = null;
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));
591 if (unmanaged == null) return false;
593 bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle);
597 static SrcEventNativeDelegate SrcEvent_cb_delegate;
598 static SrcEventNativeDelegate SrcEventVMCallback {
600 if (SrcEvent_cb_delegate == null)
601 SrcEvent_cb_delegate = new SrcEventNativeDelegate (SrcEvent_cb);
602 return SrcEvent_cb_delegate;
606 static void OverrideSrcEvent (GLib.GType gtype)
608 OverrideSrcEvent (gtype, SrcEventVMCallback);
611 static void OverrideSrcEvent (GLib.GType gtype, SrcEventNativeDelegate callback)
614 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event"));
615 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
619 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
620 delegate bool SrcEventNativeDelegate (IntPtr inst, IntPtr evnt);
622 static bool SrcEvent_cb (IntPtr inst, IntPtr evnt)
625 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
627 __result = __obj.OnSrcEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), false));
629 } catch (Exception e) {
630 GLib.ExceptionManager.RaiseUnhandledException (e, true);
631 // NOTREACHED: above call does not return.
636 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideSrcEvent")]
637 protected virtual bool OnSrcEvent (Gst.Event evnt)
639 return InternalSrcEvent (evnt);
642 private bool InternalSrcEvent (Gst.Event evnt)
644 SrcEventNativeDelegate unmanaged = null;
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));
649 if (unmanaged == null) return false;
651 bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle);
655 static OpenNativeDelegate Open_cb_delegate;
656 static OpenNativeDelegate OpenVMCallback {
658 if (Open_cb_delegate == null)
659 Open_cb_delegate = new OpenNativeDelegate (Open_cb);
660 return Open_cb_delegate;
664 static void OverrideOpen (GLib.GType gtype)
666 OverrideOpen (gtype, OpenVMCallback);
669 static void OverrideOpen (GLib.GType gtype, OpenNativeDelegate callback)
672 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("open"));
673 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
677 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
678 delegate bool OpenNativeDelegate (IntPtr inst);
680 static bool Open_cb (IntPtr inst)
683 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
685 __result = __obj.OnOpen ();
687 } catch (Exception e) {
688 GLib.ExceptionManager.RaiseUnhandledException (e, true);
689 // NOTREACHED: above call does not return.
694 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideOpen")]
695 protected virtual bool OnOpen ()
697 return InternalOpen ();
700 private bool InternalOpen ()
702 OpenNativeDelegate unmanaged = null;
704 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("open"));
705 unmanaged = (OpenNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(OpenNativeDelegate));
707 if (unmanaged == null) return false;
709 bool __result = unmanaged (this.Handle);
713 static CloseNativeDelegate Close_cb_delegate;
714 static CloseNativeDelegate CloseVMCallback {
716 if (Close_cb_delegate == null)
717 Close_cb_delegate = new CloseNativeDelegate (Close_cb);
718 return Close_cb_delegate;
722 static void OverrideClose (GLib.GType gtype)
724 OverrideClose (gtype, CloseVMCallback);
727 static void OverrideClose (GLib.GType gtype, CloseNativeDelegate callback)
730 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("close"));
731 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
735 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
736 delegate bool CloseNativeDelegate (IntPtr inst);
738 static bool Close_cb (IntPtr inst)
741 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
743 __result = __obj.OnClose ();
745 } catch (Exception e) {
746 GLib.ExceptionManager.RaiseUnhandledException (e, true);
747 // NOTREACHED: above call does not return.
752 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideClose")]
753 protected virtual bool OnClose ()
755 return InternalClose ();
758 private bool InternalClose ()
760 CloseNativeDelegate unmanaged = null;
762 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("close"));
763 unmanaged = (CloseNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CloseNativeDelegate));
765 if (unmanaged == null) return false;
767 bool __result = unmanaged (this.Handle);
771 static NegotiateNativeDelegate Negotiate_cb_delegate;
772 static NegotiateNativeDelegate NegotiateVMCallback {
774 if (Negotiate_cb_delegate == null)
775 Negotiate_cb_delegate = new NegotiateNativeDelegate (Negotiate_cb);
776 return Negotiate_cb_delegate;
780 static void OverrideNegotiate (GLib.GType gtype)
782 OverrideNegotiate (gtype, NegotiateVMCallback);
785 static void OverrideNegotiate (GLib.GType gtype, NegotiateNativeDelegate callback)
788 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiate"));
789 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
793 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
794 delegate bool NegotiateNativeDelegate (IntPtr inst);
796 static bool Negotiate_cb (IntPtr inst)
799 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
801 __result = __obj.OnNegotiate ();
803 } catch (Exception e) {
804 GLib.ExceptionManager.RaiseUnhandledException (e, true);
805 // NOTREACHED: above call does not return.
810 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideNegotiate")]
811 protected virtual bool OnNegotiate ()
813 return InternalNegotiate ();
816 private bool InternalNegotiate ()
818 NegotiateNativeDelegate unmanaged = null;
820 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("negotiate"));
821 unmanaged = (NegotiateNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(NegotiateNativeDelegate));
823 if (unmanaged == null) return false;
825 bool __result = unmanaged (this.Handle);
829 static DecideAllocationNativeDelegate DecideAllocation_cb_delegate;
830 static DecideAllocationNativeDelegate DecideAllocationVMCallback {
832 if (DecideAllocation_cb_delegate == null)
833 DecideAllocation_cb_delegate = new DecideAllocationNativeDelegate (DecideAllocation_cb);
834 return DecideAllocation_cb_delegate;
838 static void OverrideDecideAllocation (GLib.GType gtype)
840 OverrideDecideAllocation (gtype, DecideAllocationVMCallback);
843 static void OverrideDecideAllocation (GLib.GType gtype, DecideAllocationNativeDelegate callback)
846 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation"));
847 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
851 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
852 delegate bool DecideAllocationNativeDelegate (IntPtr inst, IntPtr query);
854 static bool DecideAllocation_cb (IntPtr inst, IntPtr query)
857 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
859 __result = __obj.OnDecideAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false));
861 } catch (Exception e) {
862 GLib.ExceptionManager.RaiseUnhandledException (e, true);
863 // NOTREACHED: above call does not return.
868 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideDecideAllocation")]
869 protected virtual bool OnDecideAllocation (Gst.Query query)
871 return InternalDecideAllocation (query);
874 private bool InternalDecideAllocation (Gst.Query query)
876 DecideAllocationNativeDelegate unmanaged = null;
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));
881 if (unmanaged == null) return false;
883 bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle);
887 static ProposeAllocationNativeDelegate ProposeAllocation_cb_delegate;
888 static ProposeAllocationNativeDelegate ProposeAllocationVMCallback {
890 if (ProposeAllocation_cb_delegate == null)
891 ProposeAllocation_cb_delegate = new ProposeAllocationNativeDelegate (ProposeAllocation_cb);
892 return ProposeAllocation_cb_delegate;
896 static void OverrideProposeAllocation (GLib.GType gtype)
898 OverrideProposeAllocation (gtype, ProposeAllocationVMCallback);
901 static void OverrideProposeAllocation (GLib.GType gtype, ProposeAllocationNativeDelegate callback)
904 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation"));
905 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
909 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
910 delegate bool ProposeAllocationNativeDelegate (IntPtr inst, IntPtr query);
912 static bool ProposeAllocation_cb (IntPtr inst, IntPtr query)
915 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
917 __result = __obj.OnProposeAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false));
919 } catch (Exception e) {
920 GLib.ExceptionManager.RaiseUnhandledException (e, true);
921 // NOTREACHED: above call does not return.
926 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideProposeAllocation")]
927 protected virtual bool OnProposeAllocation (Gst.Query query)
929 return InternalProposeAllocation (query);
932 private bool InternalProposeAllocation (Gst.Query query)
934 ProposeAllocationNativeDelegate unmanaged = null;
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));
939 if (unmanaged == null) return false;
941 bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle);
945 static SinkQueryNativeDelegate SinkQuery_cb_delegate;
946 static SinkQueryNativeDelegate SinkQueryVMCallback {
948 if (SinkQuery_cb_delegate == null)
949 SinkQuery_cb_delegate = new SinkQueryNativeDelegate (SinkQuery_cb);
950 return SinkQuery_cb_delegate;
954 static void OverrideSinkQuery (GLib.GType gtype)
956 OverrideSinkQuery (gtype, SinkQueryVMCallback);
959 static void OverrideSinkQuery (GLib.GType gtype, SinkQueryNativeDelegate callback)
962 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_query"));
963 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
967 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
968 delegate bool SinkQueryNativeDelegate (IntPtr inst, IntPtr query);
970 static bool SinkQuery_cb (IntPtr inst, IntPtr query)
973 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
975 __result = __obj.OnSinkQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false));
977 } catch (Exception e) {
978 GLib.ExceptionManager.RaiseUnhandledException (e, true);
979 // NOTREACHED: above call does not return.
984 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideSinkQuery")]
985 protected virtual bool OnSinkQuery (Gst.Query query)
987 return InternalSinkQuery (query);
990 private bool InternalSinkQuery (Gst.Query query)
992 SinkQueryNativeDelegate unmanaged = null;
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));
997 if (unmanaged == null) return false;
999 bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle);
1003 static SrcQueryNativeDelegate SrcQuery_cb_delegate;
1004 static SrcQueryNativeDelegate SrcQueryVMCallback {
1006 if (SrcQuery_cb_delegate == null)
1007 SrcQuery_cb_delegate = new SrcQueryNativeDelegate (SrcQuery_cb);
1008 return SrcQuery_cb_delegate;
1012 static void OverrideSrcQuery (GLib.GType gtype)
1014 OverrideSrcQuery (gtype, SrcQueryVMCallback);
1017 static void OverrideSrcQuery (GLib.GType gtype, SrcQueryNativeDelegate callback)
1020 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_query"));
1021 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
1025 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
1026 delegate bool SrcQueryNativeDelegate (IntPtr inst, IntPtr query);
1028 static bool SrcQuery_cb (IntPtr inst, IntPtr query)
1031 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
1033 __result = __obj.OnSrcQuery (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false));
1035 } catch (Exception e) {
1036 GLib.ExceptionManager.RaiseUnhandledException (e, true);
1037 // NOTREACHED: above call does not return.
1042 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideSrcQuery")]
1043 protected virtual bool OnSrcQuery (Gst.Query query)
1045 return InternalSrcQuery (query);
1048 private bool InternalSrcQuery (Gst.Query query)
1050 SrcQueryNativeDelegate unmanaged = null;
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));
1055 if (unmanaged == null) return false;
1057 bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle);
1061 static GetcapsNativeDelegate Getcaps_cb_delegate;
1062 static GetcapsNativeDelegate GetcapsVMCallback {
1064 if (Getcaps_cb_delegate == null)
1065 Getcaps_cb_delegate = new GetcapsNativeDelegate (Getcaps_cb);
1066 return Getcaps_cb_delegate;
1070 static void OverrideGetcaps (GLib.GType gtype)
1072 OverrideGetcaps (gtype, GetcapsVMCallback);
1075 static void OverrideGetcaps (GLib.GType gtype, GetcapsNativeDelegate callback)
1078 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("getcaps"));
1079 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
1083 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
1084 delegate IntPtr GetcapsNativeDelegate (IntPtr inst, IntPtr filter);
1086 static IntPtr Getcaps_cb (IntPtr inst, IntPtr filter)
1089 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
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.
1100 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideGetcaps")]
1101 protected virtual Gst.Caps OnGetcaps (Gst.Caps filter)
1103 return InternalGetcaps (filter);
1106 private Gst.Caps InternalGetcaps (Gst.Caps filter)
1108 GetcapsNativeDelegate unmanaged = null;
1110 IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("getcaps"));
1111 unmanaged = (GetcapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetcapsNativeDelegate));
1113 if (unmanaged == null) return null;
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);
1119 static TransformMetaNativeDelegate TransformMeta_cb_delegate;
1120 static TransformMetaNativeDelegate TransformMetaVMCallback {
1122 if (TransformMeta_cb_delegate == null)
1123 TransformMeta_cb_delegate = new TransformMetaNativeDelegate (TransformMeta_cb);
1124 return TransformMeta_cb_delegate;
1128 static void OverrideTransformMeta (GLib.GType gtype)
1130 OverrideTransformMeta (gtype, TransformMetaVMCallback);
1133 static void OverrideTransformMeta (GLib.GType gtype, TransformMetaNativeDelegate callback)
1136 IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_meta"));
1137 *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback);
1141 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
1142 delegate bool TransformMetaNativeDelegate (IntPtr inst, IntPtr outbuf, IntPtr meta, IntPtr inbuf);
1144 static bool TransformMeta_cb (IntPtr inst, IntPtr outbuf, IntPtr meta, IntPtr inbuf)
1147 AudioDecoder __obj = GLib.Object.GetObject (inst, false) as AudioDecoder;
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));
1151 } catch (Exception e) {
1152 GLib.ExceptionManager.RaiseUnhandledException (e, true);
1153 // NOTREACHED: above call does not return.
1158 [GLib.DefaultSignalHandler(Type=typeof(Gst.Audio.AudioDecoder), ConnectionMethod="OverrideTransformMeta")]
1159 protected virtual bool OnTransformMeta (Gst.Buffer outbuf, Gst.Meta meta, Gst.Buffer inbuf)
1161 return InternalTransformMeta (outbuf, meta, inbuf);
1164 private bool InternalTransformMeta (Gst.Buffer outbuf, Gst.Meta meta, Gst.Buffer inbuf)
1166 TransformMetaNativeDelegate unmanaged = null;
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));
1171 if (unmanaged == null) return false;
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);
1180 // Internal representation of the wrapped structure ABI.
1181 static GLib.AbiStruct _class_abi = null;
1182 static public new GLib.AbiStruct class_abi {
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
1191 , (uint) Marshal.SizeOf(typeof(IntPtr))
1194 new GLib.AbiField("stop"
1196 , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop
1199 , (uint) Marshal.SizeOf(typeof(IntPtr))
1202 new GLib.AbiField("set_format"
1204 , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_format
1207 , (uint) Marshal.SizeOf(typeof(IntPtr))
1210 new GLib.AbiField("parse"
1212 , (uint) Marshal.SizeOf(typeof(IntPtr)) // parse
1215 , (uint) Marshal.SizeOf(typeof(IntPtr))
1218 new GLib.AbiField("handle_frame"
1220 , (uint) Marshal.SizeOf(typeof(IntPtr)) // handle_frame
1223 , (uint) Marshal.SizeOf(typeof(IntPtr))
1226 new GLib.AbiField("flush"
1228 , (uint) Marshal.SizeOf(typeof(IntPtr)) // flush
1231 , (uint) Marshal.SizeOf(typeof(IntPtr))
1234 new GLib.AbiField("pre_push"
1236 , (uint) Marshal.SizeOf(typeof(IntPtr)) // pre_push
1239 , (uint) Marshal.SizeOf(typeof(IntPtr))
1242 new GLib.AbiField("sink_event"
1244 , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_event
1247 , (uint) Marshal.SizeOf(typeof(IntPtr))
1250 new GLib.AbiField("src_event"
1252 , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_event
1255 , (uint) Marshal.SizeOf(typeof(IntPtr))
1258 new GLib.AbiField("open"
1260 , (uint) Marshal.SizeOf(typeof(IntPtr)) // open
1263 , (uint) Marshal.SizeOf(typeof(IntPtr))
1266 new GLib.AbiField("close"
1268 , (uint) Marshal.SizeOf(typeof(IntPtr)) // close
1271 , (uint) Marshal.SizeOf(typeof(IntPtr))
1274 new GLib.AbiField("negotiate"
1276 , (uint) Marshal.SizeOf(typeof(IntPtr)) // negotiate
1278 , "decide_allocation"
1279 , (uint) Marshal.SizeOf(typeof(IntPtr))
1282 new GLib.AbiField("decide_allocation"
1284 , (uint) Marshal.SizeOf(typeof(IntPtr)) // decide_allocation
1286 , "propose_allocation"
1287 , (uint) Marshal.SizeOf(typeof(IntPtr))
1290 new GLib.AbiField("propose_allocation"
1292 , (uint) Marshal.SizeOf(typeof(IntPtr)) // propose_allocation
1293 , "decide_allocation"
1295 , (uint) Marshal.SizeOf(typeof(IntPtr))
1298 new GLib.AbiField("sink_query"
1300 , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_query
1301 , "propose_allocation"
1303 , (uint) Marshal.SizeOf(typeof(IntPtr))
1306 new GLib.AbiField("src_query"
1308 , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_query
1311 , (uint) Marshal.SizeOf(typeof(IntPtr))
1314 new GLib.AbiField("getcaps"
1316 , (uint) Marshal.SizeOf(typeof(IntPtr)) // getcaps
1319 , (uint) Marshal.SizeOf(typeof(IntPtr))
1322 new GLib.AbiField("transform_meta"
1324 , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform_meta
1327 , (uint) Marshal.SizeOf(typeof(IntPtr))
1330 new GLib.AbiField("_gst_reserved"
1332 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 16 // _gst_reserved
1335 , (uint) Marshal.SizeOf(typeof(IntPtr))
1345 // End of the ABI representation.
1347 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1348 static extern IntPtr gst_audio_decoder_get_type();
1350 public static new GLib.GType GType {
1352 IntPtr raw_ret = gst_audio_decoder_get_type();
1353 GLib.GType ret = new GLib.GType(raw_ret);
1358 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1359 static extern IntPtr gst_audio_decoder_allocate_output_buffer(IntPtr raw, UIntPtr size);
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);
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);
1370 public Gst.FlowReturn FinishFrame(Gst.Buffer buf, int frames) {
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;
1377 public Gst.FlowReturn FinishFrame(int frames) {
1378 return FinishFrame (null, frames);
1381 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1382 static extern int gst_audio_decoder_finish_subframe(IntPtr raw, IntPtr buf);
1384 public Gst.FlowReturn FinishSubframe(Gst.Buffer buf) {
1386 int raw_ret = gst_audio_decoder_finish_subframe(Handle, buf == null ? IntPtr.Zero : buf.Handle);
1387 Gst.FlowReturn ret = (Gst.FlowReturn) raw_ret;
1391 public Gst.FlowReturn FinishSubframe() {
1392 return FinishSubframe (null);
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);
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);
1407 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1408 static extern IntPtr gst_audio_decoder_get_audio_info(IntPtr raw);
1410 public Gst.Audio.AudioInfo AudioInfo {
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);
1418 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1419 static extern int gst_audio_decoder_get_delay(IntPtr raw);
1423 int raw_ret = gst_audio_decoder_get_delay(Handle);
1429 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1430 static extern bool gst_audio_decoder_get_drainable(IntPtr raw);
1432 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1433 static extern void gst_audio_decoder_set_drainable(IntPtr raw, bool enabled);
1435 public bool Drainable {
1437 bool raw_ret = gst_audio_decoder_get_drainable(Handle);
1442 gst_audio_decoder_set_drainable(Handle, value);
1446 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1447 static extern int gst_audio_decoder_get_estimate_rate(IntPtr raw);
1449 public int EstimateRate {
1451 int raw_ret = gst_audio_decoder_get_estimate_rate(Handle);
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);
1460 public void GetLatency(out ulong min, out ulong max) {
1461 gst_audio_decoder_get_latency(Handle, out min, out max);
1464 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1465 static extern bool gst_audio_decoder_get_needs_format(IntPtr raw);
1467 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1468 static extern void gst_audio_decoder_set_needs_format(IntPtr raw, bool enabled);
1470 public bool NeedsFormat {
1472 bool raw_ret = gst_audio_decoder_get_needs_format(Handle);
1477 gst_audio_decoder_set_needs_format(Handle, value);
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);
1484 public void GetParseState(out bool sync, out bool eos) {
1485 gst_audio_decoder_get_parse_state(Handle, out sync, out eos);
1488 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1489 static extern int gst_audio_decoder_get_plc_aware(IntPtr raw);
1491 public int PlcAware {
1493 int raw_ret = gst_audio_decoder_get_plc_aware(Handle);
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);
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);
1506 public void MergeTags(Gst.TagMergeMode mode) {
1507 MergeTags (null, mode);
1510 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1511 static extern bool gst_audio_decoder_negotiate(IntPtr raw);
1513 public bool Negotiate() {
1514 bool raw_ret = gst_audio_decoder_negotiate(Handle);
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);
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);
1528 public Gst.Caps ProxyGetcaps() {
1529 return ProxyGetcaps (null, null);
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);
1535 public Gst.Caps AllocationCaps {
1537 gst_audio_decoder_set_allocation_caps(Handle, value == null ? IntPtr.Zero : value.Handle);
1541 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1542 static extern void gst_audio_decoder_set_estimate_rate(IntPtr raw, bool enabled);
1544 public void SetEstimateRate(bool enabled) {
1545 gst_audio_decoder_set_estimate_rate(Handle, enabled);
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);
1551 public void SetLatency(ulong min, ulong max) {
1552 gst_audio_decoder_set_latency(Handle, min, max);
1555 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1556 static extern bool gst_audio_decoder_set_output_caps(IntPtr raw, IntPtr caps);
1558 public bool SetOutputCaps(Gst.Caps caps) {
1559 bool raw_ret = gst_audio_decoder_set_output_caps(Handle, caps == null ? IntPtr.Zero : caps.Handle);
1564 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1565 static extern bool gst_audio_decoder_set_output_format(IntPtr raw, IntPtr info);
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);
1573 [DllImport("gstaudio-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
1574 static extern void gst_audio_decoder_set_plc_aware(IntPtr raw, bool plc);
1576 public void SetPlcAware(bool plc) {
1577 gst_audio_decoder_set_plc_aware(Handle, plc);
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);
1583 public bool UseDefaultPadAcceptcaps {
1585 gst_audio_decoder_set_use_default_pad_acceptcaps(Handle, value);
1590 static AudioDecoder ()
1592 GtkSharp.GstreamerSharp.ObjectManager.Initialize ();
1595 // Internal representation of the wrapped structure ABI.
1596 static GLib.AbiStruct _abi_info = null;
1597 static public new GLib.AbiStruct abi_info {
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
1606 , (uint) Marshal.SizeOf(typeof(IntPtr))
1609 new GLib.AbiField("srcpad"
1611 , (uint) Marshal.SizeOf(typeof(IntPtr)) // srcpad
1614 , (uint) Marshal.SizeOf(typeof(IntPtr))
1617 new GLib.AbiField("stream_lock"
1619 , (uint) Marshal.SizeOf(typeof(GLib.RecMutex.ABI)) // stream_lock
1622 , (long) Marshal.OffsetOf(typeof(GstAudioDecoder_stream_lockAlign), "stream_lock")
1625 new GLib.AbiField("input_segment"
1627 , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // input_segment
1630 , (long) Marshal.OffsetOf(typeof(GstAudioDecoder_input_segmentAlign), "input_segment")
1633 new GLib.AbiField("output_segment"
1635 , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // output_segment
1638 , (long) Marshal.OffsetOf(typeof(GstAudioDecoder_output_segmentAlign), "output_segment")
1641 new GLib.AbiField("priv"
1643 , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv
1646 , (uint) Marshal.SizeOf(typeof(IntPtr))
1649 new GLib.AbiField("_gst_reserved"
1651 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 20 // _gst_reserved
1654 , (uint) Marshal.SizeOf(typeof(IntPtr))
1663 [StructLayout(LayoutKind.Sequential)]
1664 public struct GstAudioDecoder_stream_lockAlign
1667 private GLib.RecMutex.ABI stream_lock;
1670 [StructLayout(LayoutKind.Sequential)]
1671 public struct GstAudioDecoder_input_segmentAlign
1674 private Gst.Segment input_segment;
1677 [StructLayout(LayoutKind.Sequential)]
1678 public struct GstAudioDecoder_output_segmentAlign
1681 private Gst.Segment output_segment;
1685 // End of the ABI representation.