Esempio n. 1
0
 static void OverrideCreate(GLib.GType gtype, CreateNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("create"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Esempio n. 2
0
        private Gst.FlowReturn InternalCreate(Gst.Buffer buf)
        {
            CreateNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("create"));
                unmanaged = (CreateNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(CreateNativeDelegate));
            }
            if (unmanaged == null)
            {
                return((Gst.FlowReturn) 0);
            }

            int __result = unmanaged(this.Handle, buf == null ? IntPtr.Zero : buf.Handle);

            return((Gst.FlowReturn)__result);
        }
Esempio n. 3
0
		static void OverrideCreate (Gst.GLib.GType gtype, CreateNativeDelegate callback)
		{
			GstPushSrcClass class_iface = GetClassStruct (gtype, false);
			class_iface.Create = callback;
			OverrideClassStruct (gtype, class_iface);
		}