freenect_set_log_level() 개인적인 메소드

private freenect_set_log_level ( IntPtr context, LogLevelOptions level ) : void
context System.IntPtr
level LogLevelOptions
리턴 void
예제 #1
0
        // Initializes the freenect context
        private static void InitializeContext( )
        {
            int result = freenect_init(ref KinectNative.freenectContext, IntPtr.Zero);

            if (result != 0)
            {
                throw new ApplicationException("Could not initialize freenect context. Error Code:" + result);
            }

            // set callback for logging
            KinectNative.freenect_set_log_level(freenectContext, LogLevelOptions.Error);
            KinectNative.freenect_set_log_callback(freenectContext, logCallback);
        }
예제 #2
0
        // Initializes the freenect context
        private static void InitializeContext()
        {
            try
            {
                int result = freenect_init(ref KinectNative.freenectContext, IntPtr.Zero);

                if (result != 0)
                {
                    throw new ApplicationException("Could not initialize freenect context. Error Code:" + result);
                }

                // set callback for logging
                KinectNative.freenect_set_log_level(freenectContext, LogLevelOptions.Error);
                KinectNative.freenect_set_log_callback(freenectContext, logCallback);
            }
            catch (DllNotFoundException ex)
            {
                throw new DllNotFoundException("Freenect.dll library could not be found. Please "
                                               + "make sure that you also have installed LibUSB for your Kinect device.", ex);
            }
        }