示例#1
0
        public void stopRecording()
        {
            DeviceInteractionHost dr   = Session.dataRecorder;
            Test      currentTest      = Session.currentTest;
            Recording currentRecording = Session.currentRecording;

            dr.stopRecording();
            WebcamViewer.StopRecording();
            endts = _mainWindow.stopwatch.ElapsedMilliseconds;

            Session.currentRecording.fixations         = dr.getCleanFixations();
            Session.currentRecording.saccades          = dr.getSaccades(Session.currentRecording.fixations);
            Session.currentRecording.videoQpcStartTime = startts;
            Session.currentRecording.videoQpcEndTime   = endts;

            String fixationpath = dr.getCleanFixationPath();

            //write fixations
            foreach (Fixation f in Session.currentRecording.fixations)
            {
                dr.writeCleanFixationsToFile(fixationpath, f);
            }

            ////set highest test
            if (currentTest.index > user.highestTestIndex)
            {
                user.highestTestIndex = currentTest.index;
            }


            string[] video   = Directory.GetFiles(WebcamViewer.VideoDirectory, "*.wmv");
            String   dirdata = System.IO.Path.GetFileName(currentRecording.dataDir);

            File.Move(video[0], currentRecording.dataDir + "//" + dirdata + "_U" + ustartts + "_VIDEO_" + "_Q" + startts + "_Q" + endts + ".wmv");
        }
示例#2
0
 private void StopRecordingButton_Click(object sender, RoutedEventArgs e)
 {
     // Stop recording of webcam video to harddisk.
     WebcamViewer.StopRecording();
 }