Esempio n. 1
0
        //STARTS A NEW FOOTAGE SAVING THREAD
        private static FootageSavingThread CreateFootageSaverThread(Camera camera)
        {
            footage_saver = new FootageSavingThread(camera);
            footage_saver.StartWorking();

            return footage_saver;
        }
Esempio n. 2
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;
        }