// This file was generated by the Gtk# code generator. // Any changes made will be lost if regenerated. namespace Gst.Base { using System; using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; #region Autogenerated code public partial class BaseTransform : Gst.Element { protected BaseTransform (IntPtr raw) : base(raw) {} protected BaseTransform() : base(IntPtr.Zero) { CreateNativeObject (new string [0], new GLib.Value [0]); } [GLib.Property ("qos")] public bool Qos { get { GLib.Value val = GetProperty ("qos"); bool ret = (bool) val; val.Dispose (); return ret; } set { GLib.Value val = new GLib.Value(value); SetProperty("qos", val); val.Dispose (); } } public Gst.Pad Sinkpad { get { unsafe { IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("sinkpad")); return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad; } } } public Gst.Pad Srcpad { get { unsafe { IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("srcpad")); return GLib.Object.GetObject((*raw_ptr)) as Gst.Pad; } } } public bool HaveSegment { get { unsafe { bool* raw_ptr = (bool*)(((byte*)Handle) + abi_info.GetFieldOffset("have_segment")); return (*raw_ptr); } } } public Gst.Segment Segment { get { unsafe { IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("segment")); return Gst.Segment.New ((*raw_ptr)); } } } public Gst.Buffer QueuedBuf { get { unsafe { IntPtr* raw_ptr = (IntPtr*)(((byte*)Handle) + abi_info.GetFieldOffset("queued_buf")); return (*raw_ptr) == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque ((*raw_ptr), typeof (Gst.Buffer), false); } } } static TransformCapsNativeDelegate TransformCaps_cb_delegate; static TransformCapsNativeDelegate TransformCapsVMCallback { get { if (TransformCaps_cb_delegate == null) TransformCaps_cb_delegate = new TransformCapsNativeDelegate (TransformCaps_cb); return TransformCaps_cb_delegate; } } static void OverrideTransformCaps (GLib.GType gtype) { OverrideTransformCaps (gtype, TransformCapsVMCallback); } static void OverrideTransformCaps (GLib.GType gtype, TransformCapsNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_caps")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate IntPtr TransformCapsNativeDelegate (IntPtr inst, int direction, IntPtr caps, IntPtr filter); static IntPtr TransformCaps_cb (IntPtr inst, int direction, IntPtr caps, IntPtr filter) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; Gst.Caps __result; __result = __obj.OnTransformCaps ((Gst.PadDirection) direction, caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false), filter == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (filter, typeof (Gst.Caps), false)); return __result == null ? IntPtr.Zero : __result.OwnedCopy; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideTransformCaps")] protected virtual Gst.Caps OnTransformCaps (Gst.PadDirection direction, Gst.Caps caps, Gst.Caps filter) { return InternalTransformCaps (direction, caps, filter); } private Gst.Caps InternalTransformCaps (Gst.PadDirection direction, Gst.Caps caps, Gst.Caps filter) { TransformCapsNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_caps")); unmanaged = (TransformCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformCapsNativeDelegate)); } if (unmanaged == null) return null; IntPtr __result = unmanaged (this.Handle, (int) direction, caps == null ? IntPtr.Zero : caps.Handle, filter == null ? IntPtr.Zero : filter.Handle); return __result == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (__result, typeof (Gst.Caps), true); } static FixateCapsNativeDelegate FixateCaps_cb_delegate; static FixateCapsNativeDelegate FixateCapsVMCallback { get { if (FixateCaps_cb_delegate == null) FixateCaps_cb_delegate = new FixateCapsNativeDelegate (FixateCaps_cb); return FixateCaps_cb_delegate; } } static void OverrideFixateCaps (GLib.GType gtype) { OverrideFixateCaps (gtype, FixateCapsVMCallback); } static void OverrideFixateCaps (GLib.GType gtype, FixateCapsNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("fixate_caps")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate IntPtr FixateCapsNativeDelegate (IntPtr inst, int direction, IntPtr caps, IntPtr othercaps); static IntPtr FixateCaps_cb (IntPtr inst, int direction, IntPtr caps, IntPtr othercaps) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; Gst.Caps __result; __result = __obj.OnFixateCaps ((Gst.PadDirection) direction, caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false), othercaps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (othercaps, typeof (Gst.Caps), true)); return __result == null ? IntPtr.Zero : __result.OwnedCopy; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideFixateCaps")] protected virtual Gst.Caps OnFixateCaps (Gst.PadDirection direction, Gst.Caps caps, Gst.Caps othercaps) { return InternalFixateCaps (direction, caps, othercaps); } private Gst.Caps InternalFixateCaps (Gst.PadDirection direction, Gst.Caps caps, Gst.Caps othercaps) { FixateCapsNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("fixate_caps")); unmanaged = (FixateCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FixateCapsNativeDelegate)); } if (unmanaged == null) return null; othercaps.Owned = false; IntPtr __result = unmanaged (this.Handle, (int) direction, caps == null ? IntPtr.Zero : caps.Handle, othercaps == null ? IntPtr.Zero : othercaps.Handle); return __result == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (__result, typeof (Gst.Caps), true); } static AcceptCapsNativeDelegate AcceptCaps_cb_delegate; static AcceptCapsNativeDelegate AcceptCapsVMCallback { get { if (AcceptCaps_cb_delegate == null) AcceptCaps_cb_delegate = new AcceptCapsNativeDelegate (AcceptCaps_cb); return AcceptCaps_cb_delegate; } } static void OverrideAcceptCaps (GLib.GType gtype) { OverrideAcceptCaps (gtype, AcceptCapsVMCallback); } static void OverrideAcceptCaps (GLib.GType gtype, AcceptCapsNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("accept_caps")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool AcceptCapsNativeDelegate (IntPtr inst, int direction, IntPtr caps); static bool AcceptCaps_cb (IntPtr inst, int direction, IntPtr caps) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; bool __result; __result = __obj.OnAcceptCaps ((Gst.PadDirection) direction, caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false)); return __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideAcceptCaps")] protected virtual bool OnAcceptCaps (Gst.PadDirection direction, Gst.Caps caps) { return InternalAcceptCaps (direction, caps); } private bool InternalAcceptCaps (Gst.PadDirection direction, Gst.Caps caps) { AcceptCapsNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("accept_caps")); unmanaged = (AcceptCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(AcceptCapsNativeDelegate)); } if (unmanaged == null) return false; bool __result = unmanaged (this.Handle, (int) direction, caps == null ? IntPtr.Zero : caps.Handle); return __result; } static SetCapsNativeDelegate SetCaps_cb_delegate; static SetCapsNativeDelegate SetCapsVMCallback { get { if (SetCaps_cb_delegate == null) SetCaps_cb_delegate = new SetCapsNativeDelegate (SetCaps_cb); return SetCaps_cb_delegate; } } static void OverrideSetCaps (GLib.GType gtype) { OverrideSetCaps (gtype, SetCapsVMCallback); } static void OverrideSetCaps (GLib.GType gtype, SetCapsNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("set_caps")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool SetCapsNativeDelegate (IntPtr inst, IntPtr incaps, IntPtr outcaps); static bool SetCaps_cb (IntPtr inst, IntPtr incaps, IntPtr outcaps) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; bool __result; __result = __obj.OnSetCaps (incaps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (incaps, typeof (Gst.Caps), false), outcaps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (outcaps, typeof (Gst.Caps), false)); return __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideSetCaps")] protected virtual bool OnSetCaps (Gst.Caps incaps, Gst.Caps outcaps) { return InternalSetCaps (incaps, outcaps); } private bool InternalSetCaps (Gst.Caps incaps, Gst.Caps outcaps) { SetCapsNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("set_caps")); unmanaged = (SetCapsNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SetCapsNativeDelegate)); } if (unmanaged == null) return false; bool __result = unmanaged (this.Handle, incaps == null ? IntPtr.Zero : incaps.Handle, outcaps == null ? IntPtr.Zero : outcaps.Handle); return __result; } static QueryNativeDelegate Query_cb_delegate; static QueryNativeDelegate QueryVMCallback { get { if (Query_cb_delegate == null) Query_cb_delegate = new QueryNativeDelegate (Query_cb); return Query_cb_delegate; } } static void OverrideQuery (GLib.GType gtype) { OverrideQuery (gtype, QueryVMCallback); } static void OverrideQuery (GLib.GType gtype, QueryNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("query")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool QueryNativeDelegate (IntPtr inst, int direction, IntPtr query); static bool Query_cb (IntPtr inst, int direction, IntPtr query) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; bool __result; __result = __obj.OnQuery ((Gst.PadDirection) direction, query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); return __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideQuery")] protected virtual bool OnQuery (Gst.PadDirection direction, Gst.Query query) { return InternalQuery (direction, query); } private bool InternalQuery (Gst.PadDirection direction, Gst.Query query) { QueryNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("query")); unmanaged = (QueryNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(QueryNativeDelegate)); } if (unmanaged == null) return false; bool __result = unmanaged (this.Handle, (int) direction, query == null ? IntPtr.Zero : query.Handle); return __result; } static DecideAllocationNativeDelegate DecideAllocation_cb_delegate; static DecideAllocationNativeDelegate DecideAllocationVMCallback { get { if (DecideAllocation_cb_delegate == null) DecideAllocation_cb_delegate = new DecideAllocationNativeDelegate (DecideAllocation_cb); return DecideAllocation_cb_delegate; } } static void OverrideDecideAllocation (GLib.GType gtype) { OverrideDecideAllocation (gtype, DecideAllocationVMCallback); } static void OverrideDecideAllocation (GLib.GType gtype, DecideAllocationNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool DecideAllocationNativeDelegate (IntPtr inst, IntPtr query); static bool DecideAllocation_cb (IntPtr inst, IntPtr query) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; bool __result; __result = __obj.OnDecideAllocation (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); return __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideDecideAllocation")] protected virtual bool OnDecideAllocation (Gst.Query query) { return InternalDecideAllocation (query); } private bool InternalDecideAllocation (Gst.Query query) { DecideAllocationNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("decide_allocation")); unmanaged = (DecideAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(DecideAllocationNativeDelegate)); } if (unmanaged == null) return false; bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle); return __result; } static FilterMetaNativeDelegate FilterMeta_cb_delegate; static FilterMetaNativeDelegate FilterMetaVMCallback { get { if (FilterMeta_cb_delegate == null) FilterMeta_cb_delegate = new FilterMetaNativeDelegate (FilterMeta_cb); return FilterMeta_cb_delegate; } } static void OverrideFilterMeta (GLib.GType gtype) { OverrideFilterMeta (gtype, FilterMetaVMCallback); } static void OverrideFilterMeta (GLib.GType gtype, FilterMetaNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("filter_meta")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool FilterMetaNativeDelegate (IntPtr inst, IntPtr query, IntPtr api, IntPtr parms); static bool FilterMeta_cb (IntPtr inst, IntPtr query, IntPtr api, IntPtr parms) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; bool __result; __result = __obj.OnFilterMeta (query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false), new GLib.GType(api), parms == IntPtr.Zero ? null : (Gst.Structure) GLib.Opaque.GetOpaque (parms, typeof (Gst.Structure), false)); return __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideFilterMeta")] protected virtual bool OnFilterMeta (Gst.Query query, GLib.GType api, Gst.Structure parms) { return InternalFilterMeta (query, api, parms); } private bool InternalFilterMeta (Gst.Query query, GLib.GType api, Gst.Structure parms) { FilterMetaNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("filter_meta")); unmanaged = (FilterMetaNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(FilterMetaNativeDelegate)); } if (unmanaged == null) return false; bool __result = unmanaged (this.Handle, query == null ? IntPtr.Zero : query.Handle, api.Val, parms == null ? IntPtr.Zero : parms.Handle); return __result; } static ProposeAllocationNativeDelegate ProposeAllocation_cb_delegate; static ProposeAllocationNativeDelegate ProposeAllocationVMCallback { get { if (ProposeAllocation_cb_delegate == null) ProposeAllocation_cb_delegate = new ProposeAllocationNativeDelegate (ProposeAllocation_cb); return ProposeAllocation_cb_delegate; } } static void OverrideProposeAllocation (GLib.GType gtype) { OverrideProposeAllocation (gtype, ProposeAllocationVMCallback); } static void OverrideProposeAllocation (GLib.GType gtype, ProposeAllocationNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool ProposeAllocationNativeDelegate (IntPtr inst, IntPtr decide_query, IntPtr query); static bool ProposeAllocation_cb (IntPtr inst, IntPtr decide_query, IntPtr query) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; bool __result; __result = __obj.OnProposeAllocation (decide_query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (decide_query, typeof (Gst.Query), false), query == IntPtr.Zero ? null : (Gst.Query) GLib.Opaque.GetOpaque (query, typeof (Gst.Query), false)); return __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideProposeAllocation")] protected virtual bool OnProposeAllocation (Gst.Query decide_query, Gst.Query query) { return InternalProposeAllocation (decide_query, query); } private bool InternalProposeAllocation (Gst.Query decide_query, Gst.Query query) { ProposeAllocationNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("propose_allocation")); unmanaged = (ProposeAllocationNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(ProposeAllocationNativeDelegate)); } if (unmanaged == null) return false; bool __result = unmanaged (this.Handle, decide_query == null ? IntPtr.Zero : decide_query.Handle, query == null ? IntPtr.Zero : query.Handle); return __result; } static TransformSizeNativeDelegate TransformSize_cb_delegate; static TransformSizeNativeDelegate TransformSizeVMCallback { get { if (TransformSize_cb_delegate == null) TransformSize_cb_delegate = new TransformSizeNativeDelegate (TransformSize_cb); return TransformSize_cb_delegate; } } static void OverrideTransformSize (GLib.GType gtype) { OverrideTransformSize (gtype, TransformSizeVMCallback); } static void OverrideTransformSize (GLib.GType gtype, TransformSizeNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_size")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool TransformSizeNativeDelegate (IntPtr inst, int direction, IntPtr caps, UIntPtr size, IntPtr othercaps, out UIntPtr othersize); static bool TransformSize_cb (IntPtr inst, int direction, IntPtr caps, UIntPtr size, IntPtr othercaps, out UIntPtr othersize) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; bool __result; ulong myothersize; __result = __obj.OnTransformSize ((Gst.PadDirection) direction, caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false), (ulong) size, othercaps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (othercaps, typeof (Gst.Caps), false), out myothersize); othersize = new UIntPtr (myothersize); return __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideTransformSize")] protected virtual bool OnTransformSize (Gst.PadDirection direction, Gst.Caps caps, ulong size, Gst.Caps othercaps, out ulong othersize) { return InternalTransformSize (direction, caps, size, othercaps, out othersize); } private bool InternalTransformSize (Gst.PadDirection direction, Gst.Caps caps, ulong size, Gst.Caps othercaps, out ulong othersize) { TransformSizeNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_size")); unmanaged = (TransformSizeNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformSizeNativeDelegate)); } if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); UIntPtr native_othersize; bool __result = unmanaged (this.Handle, (int) direction, caps == null ? IntPtr.Zero : caps.Handle, new UIntPtr (size), othercaps == null ? IntPtr.Zero : othercaps.Handle, out native_othersize); othersize = (ulong) native_othersize; return __result; } static GetUnitSizeNativeDelegate GetUnitSize_cb_delegate; static GetUnitSizeNativeDelegate GetUnitSizeVMCallback { get { if (GetUnitSize_cb_delegate == null) GetUnitSize_cb_delegate = new GetUnitSizeNativeDelegate (GetUnitSize_cb); return GetUnitSize_cb_delegate; } } static void OverrideGetUnitSize (GLib.GType gtype) { OverrideGetUnitSize (gtype, GetUnitSizeVMCallback); } static void OverrideGetUnitSize (GLib.GType gtype, GetUnitSizeNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("get_unit_size")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool GetUnitSizeNativeDelegate (IntPtr inst, IntPtr caps, out UIntPtr size); static bool GetUnitSize_cb (IntPtr inst, IntPtr caps, out UIntPtr size) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; bool __result; ulong mysize; __result = __obj.OnGetUnitSize (caps == IntPtr.Zero ? null : (Gst.Caps) GLib.Opaque.GetOpaque (caps, typeof (Gst.Caps), false), out mysize); size = new UIntPtr (mysize); return __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideGetUnitSize")] protected virtual bool OnGetUnitSize (Gst.Caps caps, out ulong size) { return InternalGetUnitSize (caps, out size); } private bool InternalGetUnitSize (Gst.Caps caps, out ulong size) { GetUnitSizeNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("get_unit_size")); unmanaged = (GetUnitSizeNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GetUnitSizeNativeDelegate)); } if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); UIntPtr native_size; bool __result = unmanaged (this.Handle, caps == null ? IntPtr.Zero : caps.Handle, out native_size); size = (ulong) native_size; return __result; } static StartNativeDelegate Start_cb_delegate; static StartNativeDelegate StartVMCallback { get { if (Start_cb_delegate == null) Start_cb_delegate = new StartNativeDelegate (Start_cb); return Start_cb_delegate; } } static void OverrideStart (GLib.GType gtype) { OverrideStart (gtype, StartVMCallback); } static void OverrideStart (GLib.GType gtype, StartNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool StartNativeDelegate (IntPtr inst); static bool Start_cb (IntPtr inst) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; bool __result; __result = __obj.OnStart (); return __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideStart")] protected virtual bool OnStart () { return InternalStart (); } private bool InternalStart () { StartNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("start")); unmanaged = (StartNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StartNativeDelegate)); } if (unmanaged == null) return false; bool __result = unmanaged (this.Handle); return __result; } static StopNativeDelegate Stop_cb_delegate; static StopNativeDelegate StopVMCallback { get { if (Stop_cb_delegate == null) Stop_cb_delegate = new StopNativeDelegate (Stop_cb); return Stop_cb_delegate; } } static void OverrideStop (GLib.GType gtype) { OverrideStop (gtype, StopVMCallback); } static void OverrideStop (GLib.GType gtype, StopNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool StopNativeDelegate (IntPtr inst); static bool Stop_cb (IntPtr inst) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; bool __result; __result = __obj.OnStop (); return __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideStop")] protected virtual bool OnStop () { return InternalStop (); } private bool InternalStop () { StopNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("stop")); unmanaged = (StopNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(StopNativeDelegate)); } if (unmanaged == null) return false; bool __result = unmanaged (this.Handle); return __result; } static SinkEventNativeDelegate SinkEvent_cb_delegate; static SinkEventNativeDelegate SinkEventVMCallback { get { if (SinkEvent_cb_delegate == null) SinkEvent_cb_delegate = new SinkEventNativeDelegate (SinkEvent_cb); return SinkEvent_cb_delegate; } } static void OverrideSinkEvent (GLib.GType gtype) { OverrideSinkEvent (gtype, SinkEventVMCallback); } static void OverrideSinkEvent (GLib.GType gtype, SinkEventNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool SinkEventNativeDelegate (IntPtr inst, IntPtr evnt); static bool SinkEvent_cb (IntPtr inst, IntPtr evnt) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; bool __result; __result = __obj.OnSinkEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), true)); return __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideSinkEvent")] protected virtual bool OnSinkEvent (Gst.Event evnt) { return InternalSinkEvent (evnt); } private bool InternalSinkEvent (Gst.Event evnt) { SinkEventNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("sink_event")); unmanaged = (SinkEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SinkEventNativeDelegate)); } if (unmanaged == null) return false; evnt.Owned = false; bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); return __result; } static SrcEventNativeDelegate SrcEvent_cb_delegate; static SrcEventNativeDelegate SrcEventVMCallback { get { if (SrcEvent_cb_delegate == null) SrcEvent_cb_delegate = new SrcEventNativeDelegate (SrcEvent_cb); return SrcEvent_cb_delegate; } } static void OverrideSrcEvent (GLib.GType gtype) { OverrideSrcEvent (gtype, SrcEventVMCallback); } static void OverrideSrcEvent (GLib.GType gtype, SrcEventNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool SrcEventNativeDelegate (IntPtr inst, IntPtr evnt); static bool SrcEvent_cb (IntPtr inst, IntPtr evnt) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; bool __result; __result = __obj.OnSrcEvent (evnt == IntPtr.Zero ? null : (Gst.Event) GLib.Opaque.GetOpaque (evnt, typeof (Gst.Event), true)); return __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideSrcEvent")] protected virtual bool OnSrcEvent (Gst.Event evnt) { return InternalSrcEvent (evnt); } private bool InternalSrcEvent (Gst.Event evnt) { SrcEventNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("src_event")); unmanaged = (SrcEventNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SrcEventNativeDelegate)); } if (unmanaged == null) return false; evnt.Owned = false; bool __result = unmanaged (this.Handle, evnt == null ? IntPtr.Zero : evnt.Handle); return __result; } static PrepareOutputBufferNativeDelegate PrepareOutputBuffer_cb_delegate; static PrepareOutputBufferNativeDelegate PrepareOutputBufferVMCallback { get { if (PrepareOutputBuffer_cb_delegate == null) PrepareOutputBuffer_cb_delegate = new PrepareOutputBufferNativeDelegate (PrepareOutputBuffer_cb); return PrepareOutputBuffer_cb_delegate; } } static void OverridePrepareOutputBuffer (GLib.GType gtype) { OverridePrepareOutputBuffer (gtype, PrepareOutputBufferVMCallback); } static void OverridePrepareOutputBuffer (GLib.GType gtype, PrepareOutputBufferNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare_output_buffer")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate int PrepareOutputBufferNativeDelegate (IntPtr inst, IntPtr input, out IntPtr outbuf); static int PrepareOutputBuffer_cb (IntPtr inst, IntPtr input, out IntPtr outbuf) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; Gst.FlowReturn __result; Gst.Buffer myoutbuf; __result = __obj.OnPrepareOutputBuffer (input == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (input, typeof (Gst.Buffer), false), out myoutbuf); outbuf = myoutbuf == null ? IntPtr.Zero : myoutbuf.Handle; return (int) __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverridePrepareOutputBuffer")] protected virtual Gst.FlowReturn OnPrepareOutputBuffer (Gst.Buffer input, out Gst.Buffer outbuf) { return InternalPrepareOutputBuffer (input, out outbuf); } private Gst.FlowReturn InternalPrepareOutputBuffer (Gst.Buffer input, out Gst.Buffer outbuf) { PrepareOutputBufferNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("prepare_output_buffer")); unmanaged = (PrepareOutputBufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PrepareOutputBufferNativeDelegate)); } if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); IntPtr native_outbuf; int __result = unmanaged (this.Handle, input == null ? IntPtr.Zero : input.Handle, out native_outbuf); outbuf = native_outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_outbuf, typeof (Gst.Buffer), true); return (Gst.FlowReturn) __result; } static CopyMetadataNativeDelegate CopyMetadata_cb_delegate; static CopyMetadataNativeDelegate CopyMetadataVMCallback { get { if (CopyMetadata_cb_delegate == null) CopyMetadata_cb_delegate = new CopyMetadataNativeDelegate (CopyMetadata_cb); return CopyMetadata_cb_delegate; } } static void OverrideCopyMetadata (GLib.GType gtype) { OverrideCopyMetadata (gtype, CopyMetadataVMCallback); } static void OverrideCopyMetadata (GLib.GType gtype, CopyMetadataNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("copy_metadata")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool CopyMetadataNativeDelegate (IntPtr inst, IntPtr input, IntPtr outbuf); static bool CopyMetadata_cb (IntPtr inst, IntPtr input, IntPtr outbuf) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; bool __result; __result = __obj.OnCopyMetadata (input == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (input, typeof (Gst.Buffer), false), outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (outbuf, typeof (Gst.Buffer), false)); return __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideCopyMetadata")] protected virtual bool OnCopyMetadata (Gst.Buffer input, Gst.Buffer outbuf) { return InternalCopyMetadata (input, outbuf); } private bool InternalCopyMetadata (Gst.Buffer input, Gst.Buffer outbuf) { CopyMetadataNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("copy_metadata")); unmanaged = (CopyMetadataNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CopyMetadataNativeDelegate)); } if (unmanaged == null) return false; bool __result = unmanaged (this.Handle, input == null ? IntPtr.Zero : input.Handle, outbuf == null ? IntPtr.Zero : outbuf.Handle); return __result; } static TransformMetaNativeDelegate TransformMeta_cb_delegate; static TransformMetaNativeDelegate TransformMetaVMCallback { get { if (TransformMeta_cb_delegate == null) TransformMeta_cb_delegate = new TransformMetaNativeDelegate (TransformMeta_cb); return TransformMeta_cb_delegate; } } static void OverrideTransformMeta (GLib.GType gtype) { OverrideTransformMeta (gtype, TransformMetaVMCallback); } static void OverrideTransformMeta (GLib.GType gtype, TransformMetaNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_meta")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate bool TransformMetaNativeDelegate (IntPtr inst, IntPtr outbuf, IntPtr meta, IntPtr inbuf); static bool TransformMeta_cb (IntPtr inst, IntPtr outbuf, IntPtr meta, IntPtr inbuf) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; bool __result; __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)); return __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideTransformMeta")] protected virtual bool OnTransformMeta (Gst.Buffer outbuf, Gst.Meta meta, Gst.Buffer inbuf) { return InternalTransformMeta (outbuf, meta, inbuf); } private bool InternalTransformMeta (Gst.Buffer outbuf, Gst.Meta meta, Gst.Buffer inbuf) { TransformMetaNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_meta")); unmanaged = (TransformMetaNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformMetaNativeDelegate)); } if (unmanaged == null) return false; IntPtr native_meta = GLib.Marshaller.StructureToPtrAlloc (meta); bool __result = unmanaged (this.Handle, outbuf == null ? IntPtr.Zero : outbuf.Handle, native_meta, inbuf == null ? IntPtr.Zero : inbuf.Handle); Marshal.FreeHGlobal (native_meta); return __result; } static BeforeTransformNativeDelegate BeforeTransform_cb_delegate; static BeforeTransformNativeDelegate BeforeTransformVMCallback { get { if (BeforeTransform_cb_delegate == null) BeforeTransform_cb_delegate = new BeforeTransformNativeDelegate (BeforeTransform_cb); return BeforeTransform_cb_delegate; } } static void OverrideBeforeTransform (GLib.GType gtype) { OverrideBeforeTransform (gtype, BeforeTransformVMCallback); } static void OverrideBeforeTransform (GLib.GType gtype, BeforeTransformNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("before_transform")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void BeforeTransformNativeDelegate (IntPtr inst, IntPtr buffer); static void BeforeTransform_cb (IntPtr inst, IntPtr buffer) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; __obj.OnBeforeTransform (buffer == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buffer, typeof (Gst.Buffer), false)); } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, false); } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideBeforeTransform")] protected virtual void OnBeforeTransform (Gst.Buffer buffer) { InternalBeforeTransform (buffer); } private void InternalBeforeTransform (Gst.Buffer buffer) { BeforeTransformNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("before_transform")); unmanaged = (BeforeTransformNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(BeforeTransformNativeDelegate)); } if (unmanaged == null) return; unmanaged (this.Handle, buffer == null ? IntPtr.Zero : buffer.Handle); } static TransformNativeDelegate Transform_cb_delegate; static TransformNativeDelegate TransformVMCallback { get { if (Transform_cb_delegate == null) Transform_cb_delegate = new TransformNativeDelegate (Transform_cb); return Transform_cb_delegate; } } static void OverrideTransform (GLib.GType gtype) { OverrideTransform (gtype, TransformVMCallback); } static void OverrideTransform (GLib.GType gtype, TransformNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate int TransformNativeDelegate (IntPtr inst, IntPtr inbuf, IntPtr outbuf); static int Transform_cb (IntPtr inst, IntPtr inbuf, IntPtr outbuf) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; Gst.FlowReturn __result; __result = __obj.OnTransform (inbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (inbuf, typeof (Gst.Buffer), false), outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (outbuf, typeof (Gst.Buffer), false)); return (int) __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideTransform")] protected virtual Gst.FlowReturn OnTransform (Gst.Buffer inbuf, Gst.Buffer outbuf) { return InternalTransform (inbuf, outbuf); } private Gst.FlowReturn InternalTransform (Gst.Buffer inbuf, Gst.Buffer outbuf) { TransformNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform")); unmanaged = (TransformNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformNativeDelegate)); } if (unmanaged == null) return (Gst.FlowReturn) 0; int __result = unmanaged (this.Handle, inbuf == null ? IntPtr.Zero : inbuf.Handle, outbuf == null ? IntPtr.Zero : outbuf.Handle); return (Gst.FlowReturn) __result; } static TransformIpNativeDelegate TransformIp_cb_delegate; static TransformIpNativeDelegate TransformIpVMCallback { get { if (TransformIp_cb_delegate == null) TransformIp_cb_delegate = new TransformIpNativeDelegate (TransformIp_cb); return TransformIp_cb_delegate; } } static void OverrideTransformIp (GLib.GType gtype) { OverrideTransformIp (gtype, TransformIpVMCallback); } static void OverrideTransformIp (GLib.GType gtype, TransformIpNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_ip")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate int TransformIpNativeDelegate (IntPtr inst, IntPtr buf); static int TransformIp_cb (IntPtr inst, IntPtr buf) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; Gst.FlowReturn __result; __result = __obj.OnTransformIp (buf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (buf, typeof (Gst.Buffer), false)); return (int) __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideTransformIp")] protected virtual Gst.FlowReturn OnTransformIp (Gst.Buffer buf) { return InternalTransformIp (buf); } private Gst.FlowReturn InternalTransformIp (Gst.Buffer buf) { TransformIpNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("transform_ip")); unmanaged = (TransformIpNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(TransformIpNativeDelegate)); } if (unmanaged == null) return (Gst.FlowReturn) 0; int __result = unmanaged (this.Handle, buf == null ? IntPtr.Zero : buf.Handle); return (Gst.FlowReturn) __result; } static SubmitInputBufferNativeDelegate SubmitInputBuffer_cb_delegate; static SubmitInputBufferNativeDelegate SubmitInputBufferVMCallback { get { if (SubmitInputBuffer_cb_delegate == null) SubmitInputBuffer_cb_delegate = new SubmitInputBufferNativeDelegate (SubmitInputBuffer_cb); return SubmitInputBuffer_cb_delegate; } } static void OverrideSubmitInputBuffer (GLib.GType gtype) { OverrideSubmitInputBuffer (gtype, SubmitInputBufferVMCallback); } static void OverrideSubmitInputBuffer (GLib.GType gtype, SubmitInputBufferNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("submit_input_buffer")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate int SubmitInputBufferNativeDelegate (IntPtr inst, bool is_discont, IntPtr input); static int SubmitInputBuffer_cb (IntPtr inst, bool is_discont, IntPtr input) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; Gst.FlowReturn __result; __result = __obj.OnSubmitInputBuffer (is_discont, input == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (input, typeof (Gst.Buffer), false)); return (int) __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideSubmitInputBuffer")] protected virtual Gst.FlowReturn OnSubmitInputBuffer (bool is_discont, Gst.Buffer input) { return InternalSubmitInputBuffer (is_discont, input); } private Gst.FlowReturn InternalSubmitInputBuffer (bool is_discont, Gst.Buffer input) { SubmitInputBufferNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("submit_input_buffer")); unmanaged = (SubmitInputBufferNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(SubmitInputBufferNativeDelegate)); } if (unmanaged == null) return (Gst.FlowReturn) 0; int __result = unmanaged (this.Handle, is_discont, input == null ? IntPtr.Zero : input.Handle); return (Gst.FlowReturn) __result; } static GenerateOutputNativeDelegate GenerateOutput_cb_delegate; static GenerateOutputNativeDelegate GenerateOutputVMCallback { get { if (GenerateOutput_cb_delegate == null) GenerateOutput_cb_delegate = new GenerateOutputNativeDelegate (GenerateOutput_cb); return GenerateOutput_cb_delegate; } } static void OverrideGenerateOutput (GLib.GType gtype) { OverrideGenerateOutput (gtype, GenerateOutputVMCallback); } static void OverrideGenerateOutput (GLib.GType gtype, GenerateOutputNativeDelegate callback) { unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) gtype.GetClassPtr()) + (long) class_abi.GetFieldOffset("generate_output")); *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate) callback); } } [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate int GenerateOutputNativeDelegate (IntPtr inst, out IntPtr outbuf); static int GenerateOutput_cb (IntPtr inst, out IntPtr outbuf) { try { BaseTransform __obj = GLib.Object.GetObject (inst, false) as BaseTransform; Gst.FlowReturn __result; Gst.Buffer myoutbuf; __result = __obj.OnGenerateOutput (out myoutbuf); outbuf = myoutbuf == null ? IntPtr.Zero : myoutbuf.Handle; return (int) __result; } catch (Exception e) { GLib.ExceptionManager.RaiseUnhandledException (e, true); // NOTREACHED: above call does not return. throw e; } } [GLib.DefaultSignalHandler(Type=typeof(Gst.Base.BaseTransform), ConnectionMethod="OverrideGenerateOutput")] protected virtual Gst.FlowReturn OnGenerateOutput (out Gst.Buffer outbuf) { return InternalGenerateOutput (out outbuf); } private Gst.FlowReturn InternalGenerateOutput (out Gst.Buffer outbuf) { GenerateOutputNativeDelegate unmanaged = null; unsafe { IntPtr* raw_ptr = (IntPtr*)(((long) this.LookupGType().GetThresholdType().GetClassPtr()) + (long) class_abi.GetFieldOffset("generate_output")); unmanaged = (GenerateOutputNativeDelegate) Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(GenerateOutputNativeDelegate)); } if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke"); IntPtr native_outbuf; int __result = unmanaged (this.Handle, out native_outbuf); outbuf = native_outbuf == IntPtr.Zero ? null : (Gst.Buffer) GLib.Opaque.GetOpaque (native_outbuf, typeof (Gst.Buffer), true); return (Gst.FlowReturn) __result; } // Internal representation of the wrapped structure ABI. static GLib.AbiStruct _class_abi = null; static public new GLib.AbiStruct class_abi { get { if (_class_abi == null) _class_abi = new GLib.AbiStruct (new List{ new GLib.AbiField("passthrough_on_same_caps" , Gst.Element.class_abi.Fields , (uint) Marshal.SizeOf(typeof(bool)) // passthrough_on_same_caps , null , "transform_ip_on_passthrough" , (long) Marshal.OffsetOf(typeof(GstBaseTransform_passthrough_on_same_capsAlign), "passthrough_on_same_caps") , 0 ), new GLib.AbiField("transform_ip_on_passthrough" , -1 , (uint) Marshal.SizeOf(typeof(bool)) // transform_ip_on_passthrough , "passthrough_on_same_caps" , "transform_caps" , (long) Marshal.OffsetOf(typeof(GstBaseTransform_transform_ip_on_passthroughAlign), "transform_ip_on_passthrough") , 0 ), new GLib.AbiField("transform_caps" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform_caps , "transform_ip_on_passthrough" , "fixate_caps" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("fixate_caps" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // fixate_caps , "transform_caps" , "accept_caps" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("accept_caps" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // accept_caps , "fixate_caps" , "set_caps" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("set_caps" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // set_caps , "accept_caps" , "query" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("query" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // query , "set_caps" , "decide_allocation" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("decide_allocation" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // decide_allocation , "query" , "filter_meta" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("filter_meta" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // filter_meta , "decide_allocation" , "propose_allocation" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("propose_allocation" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // propose_allocation , "filter_meta" , "transform_size" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("transform_size" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform_size , "propose_allocation" , "get_unit_size" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("get_unit_size" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // get_unit_size , "transform_size" , "start" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("start" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // start , "get_unit_size" , "stop" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("stop" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // stop , "start" , "sink_event" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("sink_event" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // sink_event , "stop" , "src_event" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("src_event" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // src_event , "sink_event" , "prepare_output_buffer" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("prepare_output_buffer" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // prepare_output_buffer , "src_event" , "copy_metadata" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("copy_metadata" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // copy_metadata , "prepare_output_buffer" , "transform_meta" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("transform_meta" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform_meta , "copy_metadata" , "before_transform" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("before_transform" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // before_transform , "transform_meta" , "transform" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("transform" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform , "before_transform" , "transform_ip" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("transform_ip" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // transform_ip , "transform" , "submit_input_buffer" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("submit_input_buffer" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // submit_input_buffer , "transform_ip" , "generate_output" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("generate_output" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // generate_output , "submit_input_buffer" , "_gst_reserved" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("_gst_reserved" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 18 // _gst_reserved , "generate_output" , null , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), }); return _class_abi; } } [StructLayout(LayoutKind.Sequential)] public struct GstBaseTransform_passthrough_on_same_capsAlign { sbyte f1; private bool passthrough_on_same_caps; } [StructLayout(LayoutKind.Sequential)] public struct GstBaseTransform_transform_ip_on_passthroughAlign { sbyte f1; private bool transform_ip_on_passthrough; } // End of the ABI representation. [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_base_transform_get_type(); public static new GLib.GType GType { get { IntPtr raw_ret = gst_base_transform_get_type(); GLib.GType ret = new GLib.GType(raw_ret); return ret; } } [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gst_base_transform_get_allocator(IntPtr raw, out IntPtr allocator, IntPtr parms); public void GetAllocator(out Gst.Allocator allocator, out Gst.AllocationParams parms) { IntPtr native_allocator; IntPtr native_parms = Marshal.AllocHGlobal (Marshal.SizeOf (typeof (Gst.AllocationParams))); gst_base_transform_get_allocator(Handle, out native_allocator, native_parms); allocator = GLib.Object.GetObject(native_allocator, true) as Gst.Allocator; parms = Gst.AllocationParams.New (native_parms); Marshal.FreeHGlobal (native_parms); } [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern IntPtr gst_base_transform_get_buffer_pool(IntPtr raw); public Gst.BufferPool BufferPool { get { IntPtr raw_ret = gst_base_transform_get_buffer_pool(Handle); Gst.BufferPool ret = GLib.Object.GetObject(raw_ret, true) as Gst.BufferPool; return ret; } } [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gst_base_transform_is_in_place(IntPtr raw); public bool IsInPlace { get { bool raw_ret = gst_base_transform_is_in_place(Handle); bool ret = raw_ret; return ret; } } [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gst_base_transform_is_passthrough(IntPtr raw); public bool IsPassthrough { get { bool raw_ret = gst_base_transform_is_passthrough(Handle); bool ret = raw_ret; return ret; } } [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gst_base_transform_is_qos_enabled(IntPtr raw); public bool IsQosEnabled { get { bool raw_ret = gst_base_transform_is_qos_enabled(Handle); bool ret = raw_ret; return ret; } } [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gst_base_transform_reconfigure(IntPtr raw); public bool Reconfigure() { bool raw_ret = gst_base_transform_reconfigure(Handle); bool ret = raw_ret; return ret; } [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gst_base_transform_reconfigure_sink(IntPtr raw); public void ReconfigureSink() { gst_base_transform_reconfigure_sink(Handle); } [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gst_base_transform_reconfigure_src(IntPtr raw); public void ReconfigureSrc() { gst_base_transform_reconfigure_src(Handle); } [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gst_base_transform_set_gap_aware(IntPtr raw, bool gap_aware); public bool GapAware { set { gst_base_transform_set_gap_aware(Handle, value); } } [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gst_base_transform_set_in_place(IntPtr raw, bool in_place); public bool InPlace { set { gst_base_transform_set_in_place(Handle, value); } } [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gst_base_transform_set_passthrough(IntPtr raw, bool passthrough); public bool Passthrough { set { gst_base_transform_set_passthrough(Handle, value); } } [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gst_base_transform_set_prefer_passthrough(IntPtr raw, bool prefer_passthrough); public bool PreferPassthrough { set { gst_base_transform_set_prefer_passthrough(Handle, value); } } [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gst_base_transform_set_qos_enabled(IntPtr raw, bool enabled); public bool QosEnabled { set { gst_base_transform_set_qos_enabled(Handle, value); } } [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gst_base_transform_update_qos(IntPtr raw, double proportion, long diff, ulong timestamp); public void UpdateQos(double proportion, long diff, ulong timestamp) { gst_base_transform_update_qos(Handle, proportion, diff, timestamp); } [DllImport("gstbase-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern bool gst_base_transform_update_src_caps(IntPtr raw, IntPtr updated_caps); public bool UpdateSrcCaps(Gst.Caps updated_caps) { bool raw_ret = gst_base_transform_update_src_caps(Handle, updated_caps == null ? IntPtr.Zero : updated_caps.Handle); bool ret = raw_ret; return ret; } static BaseTransform () { GtkSharp.GstreamerSharp.ObjectManager.Initialize (); } // Internal representation of the wrapped structure ABI. static GLib.AbiStruct _abi_info = null; static public new GLib.AbiStruct abi_info { get { if (_abi_info == null) _abi_info = new GLib.AbiStruct (new List{ new GLib.AbiField("sinkpad" , Gst.Element.abi_info.Fields , (uint) Marshal.SizeOf(typeof(IntPtr)) // sinkpad , null , "srcpad" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("srcpad" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // srcpad , "sinkpad" , "have_segment" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("have_segment" , -1 , (uint) Marshal.SizeOf(typeof(bool)) // have_segment , "srcpad" , "segment" , (long) Marshal.OffsetOf(typeof(GstBaseTransform_have_segmentAlign), "have_segment") , 0 ), new GLib.AbiField("segment" , -1 , (uint) Marshal.SizeOf(typeof(Gst.Segment)) // segment , "have_segment" , "queued_buf" , (long) Marshal.OffsetOf(typeof(GstBaseTransform_segmentAlign), "segment") , 0 ), new GLib.AbiField("queued_buf" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // queued_buf , "segment" , "priv" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("priv" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) // priv , "queued_buf" , "_gst_reserved" , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), new GLib.AbiField("_gst_reserved" , -1 , (uint) Marshal.SizeOf(typeof(IntPtr)) * 19 // _gst_reserved , "priv" , null , (uint) Marshal.SizeOf(typeof(IntPtr)) , 0 ), }); return _abi_info; } } [StructLayout(LayoutKind.Sequential)] public struct GstBaseTransform_have_segmentAlign { sbyte f1; private bool have_segment; } [StructLayout(LayoutKind.Sequential)] public struct GstBaseTransform_segmentAlign { sbyte f1; private Gst.Segment segment; } // End of the ABI representation. #endregion } }