예제 #1
0
        public unsafe IntPtr Push(Gst.TaskPoolFunction func)
        {
            GstSharp.TaskPoolFunctionWrapper func_wrapper = new GstSharp.TaskPoolFunctionWrapper(func);
            func_wrapper.PersistUntilCalled();
            IntPtr error   = IntPtr.Zero;
            IntPtr raw_ret = gst_task_pool_push(Handle, func_wrapper.NativeDelegate, IntPtr.Zero, out error);
            IntPtr ret     = raw_ret;

            if (error != IntPtr.Zero)
            {
                throw new GLib.GException(error);
            }
            return(ret);
        }
예제 #2
0
        private IntPtr InternalPush(Gst.TaskPoolFunction func)
        {
            PushNativeDelegate unmanaged = null;

            unsafe {
                IntPtr *raw_ptr = (IntPtr *)(((long)this.LookupGType().GetThresholdType().GetClassPtr()) + (long)class_abi.GetFieldOffset("push"));
                unmanaged = (PushNativeDelegate)Marshal.GetDelegateForFunctionPointer(*raw_ptr, typeof(PushNativeDelegate));
            }
            if (unmanaged == null)
            {
                throw new InvalidOperationException("No base method to invoke");
            }

            GstSharp.TaskPoolFunctionWrapper func_wrapper = new GstSharp.TaskPoolFunctionWrapper(func);
            func_wrapper.PersistUntilCalled();
            IntPtr error    = IntPtr.Zero;
            IntPtr __result = unmanaged(this.Handle, func_wrapper.NativeDelegate, IntPtr.Zero, out error);

            return(__result);
        }
예제 #3
0
파일: TaskPool.cs 프로젝트: jwzl/ossbuild
		public unsafe IntPtr Push(Gst.TaskPoolFunction func) {
			GstSharp.TaskPoolFunctionWrapper func_wrapper = new GstSharp.TaskPoolFunctionWrapper (func);
			IntPtr error = IntPtr.Zero;
			IntPtr raw_ret = gst_task_pool_push(Handle, func_wrapper.NativeDelegate, IntPtr.Zero, out error);
			IntPtr ret = raw_ret;
			if (error != IntPtr.Zero) throw new Gst.GLib.GException (error);
			return ret;
		}
예제 #4
0
파일: TaskPool.cs 프로젝트: jwzl/ossbuild
		private IntPtr InternalPush (Gst.TaskPoolFunction func)
		{
			PushNativeDelegate unmanaged = GetClassStruct (this.LookupGType ().GetThresholdType (), true).Push;
			if (unmanaged == null) throw new InvalidOperationException ("No base method to invoke");

			GstSharp.TaskPoolFunctionWrapper func_wrapper = new GstSharp.TaskPoolFunctionWrapper (func);
			IntPtr error = IntPtr.Zero;
			IntPtr __result = unmanaged (this.Handle, func_wrapper.NativeDelegate, IntPtr.Zero, out error);
			return __result;
		}