public void StopRecording() { SetGUI(ExperimentGUIState.RECORDING_DONE); if (recording != null && !recording.closed) { ulong tEnd = RGBDControl.NOW() + 500; rgbdControl.StopRecording(tEnd); recording.CloseRecording(tEnd); SaveRecording(); } else { Debug.LogWarning("Nothing to stop."); } }
public void StartRecording() { if (recording != null && !recording.closed) { Debug.LogError("Starting recording while having an unclosed recording."); StopRecording(); return; } foreach (SteamVR_TrackedObject to in requiredTrackers) { if (!to.isActiveAndEnabled) { Debug.LogWarning("Need tracker " + to.transform.name + " active before starting recording"); return; } } string pid; if (_rid != "") { pid = _rid; _rid = ""; } else { pid = GenerateNewRecordingID(); } ulong tStart = RGBDControl.NOW() + 520; recording = new Recording(pid, tStart); rgbdControl.StartRecording(tStart, pid); SetGUI(ExperimentGUIState.RECORDING_REC); }