Exemplo n.º 1
0
 static void OverridePushSampleEvent(GLib.GType gtype, PushSampleEventNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("push_sample"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Exemplo n.º 2
0
        private Gst.FlowReturn InternalPushSampleEvent(Gst.Sample sample)
        {
            PushSampleEventNativeDelegate unmanaged = null;

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

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

            return((Gst.FlowReturn)__result);
        }