public void CameraOutputGrabberThreadAddNextFrameToQueuesForProcessingTest()
 {
     CameraOutputGrabberThread thread = new CameraOutputGrabberThread();
     MainWindow window = new MainWindow();
     bool sucess = thread.AddNextFrameToQueuesForProcessing();
     Assert.IsTrue(sucess);
 }
Example #2
0
 //STARTS A CONTINUOUS RUNNING THREAD TO GRAB FRAMES FROM THE CAMERA IN THE BACKGROUND
 private static CameraOutputGrabberThread CreateNewCameraOutputGrabberThread(Camera camera)
 {
     cam_output = new CameraOutputGrabberThread(camera);
     cam_output.StartWorking();
     return cam_output;
 }
Example #3
0
        //THIS RELEASES ALL RESOURCES CONSUMED BY A THREAD GIVEN ITS ID
        public static bool ReleaseThreadResources(String thread_id)
        {
            switch (thread_id)
            {
                case ThreadFactory.PERP_ALERT_THREAD:

                    perp_alert_thread       = null;
                    break;

                case ThreadFactory.STUDENT_ALERT_THREAD:
                    student_alert_thread    = null;
                    break;

                case ThreadFactory.CAMERA_THREAD:
                    cam_output              = null;
                    break;

                case ThreadFactory.CAMERA_THREAD_USING_VIDEO:
                    cam_output_using_video  = null;
                    break;

                case ThreadFactory.LIVE_DISPLAY_UPDATER:
                    live_display_updater    = null;
                    break;

                case ThreadFactory.REVIEW_DISPLAY_UPDATER:
                    review_display_updater  = null;
                    break;

                case ThreadFactory.REVIEW_FACE_DETECTOR:
                    review_face_detector    = null;
                    break;

                case ThreadFactory.LIVE_FACE_DETECTOR:
                    live_face_detector      = null;
                    break;

                case ThreadFactory.PERP_RECOGNIZER:
                    perp_recognizer         = null;
                    break;

                case ThreadFactory.PROGRESS_THREAD:
                    face_recog_progress     = null;
                    face_recog_progress_2   = null;
                    break;

                case ThreadFactory.FACE_DRAWER:
                    face_drawer             = null;
                    break;

                case ThreadFactory.FOOTAGE_SAVER:
                    footage_saver           = null;
                    break;

                case ThreadFactory.VIDEO_THREAD:
                    video_from_file_grabber = null;
                    break;

                case ThreadFactory.VIDEO_THREAD_USING_CAMERA:
                    video_from_camera       = null;
                    break;
            }
            return true;
        }
 public void CameraOutputGrabberThreadDoWorkTest()
 {
     CameraOutputGrabberThread thread = new CameraOutputGrabberThread();
     thread.StartWorking();
     Assert.IsTrue(thread.IsRunning());
 }
 public void CameraOutputGrabberThreadConstructorTest()
 {
     CameraOutputGrabberThread thread = new CameraOutputGrabberThread();
     Assert.IsNotNull(thread);
 }