public File getVideoFolder(File parentFolder, Recording recording) {
   File result = parentFolder;
   Date recordingDate = recording.getAnalysis().getCreationDate();
   SimpleDateFormat simpleDateFormat = new SimpleDateFormat(getDateFormatString());
   String parsedDate = simpleDateFormat.format(recordingDate);
   String[] splittedDate = parsedDate.split(FOLDER_SEPARATOR);
   for (String folderName : splittedDate) {
     result = new File(result, folderName);
   }
   return result;
 }
Exemplo n.º 2
0
 public void startRecording(Recording recording, File videoFile) {
   if (videoFile == null || recording == null) {
     throw new IllegalArgumentException("No valid file or recording specified");
   }
   setRecording(recording);
   timeStarted = System.currentTimeMillis();
   getVideoImpl().startRecording(videoFile);
   getLogger().debug("Recording to file " + videoFile.getAbsolutePath());
   recording.setRecordingStatus(RecordingStatus.RECORDING);
   getTimer().restart();
   setState(State.RECORDING);
 }