/**
   * Returns the directory where the recording should be stored
   *
   * @return the directory of the new recording
   */
  String getRecordingDirectory() {
    if (this.recordingDirectory == null) {
      SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd.HH-mm-ss.");
      this.recordingDirectory =
          dateFormat.format(new Date()) + getID() + ((name != null) ? "_" + name : "");
    }

    return this.recordingDirectory;
  }
Esempio n. 2
0
 /**
  * Generates a file name for the call based on the current date and the names of the peers in the
  * call.
  *
  * @param ext file extension
  * @return the file name for the call
  */
 private String generateCallFilename(String ext) {
   String filename = FORMAT.format(new Date()) + "-call";
   int maxLength = MAX_FILENAME_LENGTH - 2 - filename.length() - ext.length();
   String peerName = getCallPeerName(maxLength);
   filename += ((!peerName.equals("")) ? "-" : "") + peerName + "." + ext;
   return filename;
 }