Esempio n. 1
0
 static void OverrideCreateRingbuffer(GLib.GType gtype, CreateRingbufferNativeDelegate callback)
 {
     unsafe {
         IntPtr *raw_ptr = (IntPtr *)(((long)gtype.GetClassPtr()) + (long)class_abi.GetFieldOffset("create_ringbuffer"));
         *raw_ptr = Marshal.GetFunctionPointerForDelegate((Delegate)callback);
     }
 }
Esempio n. 2
0
        private Gst.Audio.AudioRingBuffer InternalCreateRingbuffer()
        {
            CreateRingbufferNativeDelegate unmanaged = null;

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

            IntPtr __result = unmanaged(this.Handle);

            return(GLib.Object.GetObject(__result) as Gst.Audio.AudioRingBuffer);
        }