Skip to content

Commit

Permalink
openvidu-server: CDR recordingStopped event on recordingStatusChanged…
Browse files Browse the repository at this point in the history
… (stopped)
  • Loading branch information
pabloFuente committed Jul 15, 2019
1 parent 705119d commit a89b12d
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,8 @@ public void recordRecordingStopped(Recording recording, EndReason reason, long t
RecordingManager.finalReason(reason), timestamp);
this.log(recordingStoppedEvent);

// FIXME: Summary: update ended recording if recordSessionDestroyed has not been
// already called
if (sessionManager.getAccumulatedRecordings(recording.getSessionId()) != null) {
sessionManager.getAccumulatedRecordings(recording.getSessionId()).add(recordingStoppedEvent);
}
// Summary: update ended recording
sessionManager.getAccumulatedRecordings(recording.getSessionId()).add(recordingStoppedEvent);
}

public void recordRecordingStatusChanged(Recording recording, EndReason finalReason, long timestamp,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ private Recording stopRecordingAudioOnly(Session session, Recording recording, E
filesPath + RecordingManager.RECORDING_ENTITY_FILE + finalRecordingArray[0].getId());

final long timestamp = System.currentTimeMillis();
cdr.recordRecordingStopped(finalRecordingArray[0], reason, timestamp);
cdr.recordRecordingStatusChanged(finalRecordingArray[0], reason, timestamp,
finalRecordingArray[0].getStatus());
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ public Recording stopRecording(Session session, String recordingId, EndReason re

final long timestamp = System.currentTimeMillis();
this.cdr.recordRecordingStatusChanged(recording, reason, timestamp, Status.stopped);
cdr.recordRecordingStopped(recording, reason, timestamp);

switch (recording.getOutputMode()) {
case COMPOSED:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ public Recording stopRecording(Session session, Recording recording, EndReason r
finalRecordingArray[0] = this.sealMetadataFiles(finalRecordingArray[0]);

final long timestamp = System.currentTimeMillis();
cdr.recordRecordingStopped(finalRecordingArray[0], reason, timestamp);
cdr.recordRecordingStatusChanged(finalRecordingArray[0], reason, timestamp,
finalRecordingArray[0].getStatus());

Expand Down

0 comments on commit a89b12d

Please sign in to comment.