openvidu-server: CDR recordingStopped event on recordingStatusChanged (stopped)

pull/375/head
pabloFuente 2019-07-15 14:26:08 +02:00
parent 705119d15a
commit a89b12d682
4 changed files with 3 additions and 7 deletions

View File

@ -210,12 +210,9 @@ public class CallDetailRecord {
RecordingManager.finalReason(reason), timestamp); RecordingManager.finalReason(reason), timestamp);
this.log(recordingStoppedEvent); this.log(recordingStoppedEvent);
// FIXME: Summary: update ended recording if recordSessionDestroyed has not been // Summary: update ended recording
// already called
if (sessionManager.getAccumulatedRecordings(recording.getSessionId()) != null) {
sessionManager.getAccumulatedRecordings(recording.getSessionId()).add(recordingStoppedEvent); sessionManager.getAccumulatedRecordings(recording.getSessionId()).add(recordingStoppedEvent);
} }
}
public void recordRecordingStatusChanged(Recording recording, EndReason finalReason, long timestamp, public void recordRecordingStatusChanged(Recording recording, EndReason finalReason, long timestamp,
Status status) { Status status) {

View File

@ -392,7 +392,6 @@ public class ComposedRecordingService extends RecordingService {
filesPath + RecordingManager.RECORDING_ENTITY_FILE + finalRecordingArray[0].getId()); filesPath + RecordingManager.RECORDING_ENTITY_FILE + finalRecordingArray[0].getId());
final long timestamp = System.currentTimeMillis(); final long timestamp = System.currentTimeMillis();
cdr.recordRecordingStopped(finalRecordingArray[0], reason, timestamp);
cdr.recordRecordingStatusChanged(finalRecordingArray[0], reason, timestamp, cdr.recordRecordingStatusChanged(finalRecordingArray[0], reason, timestamp,
finalRecordingArray[0].getStatus()); finalRecordingArray[0].getStatus());
}); });

View File

@ -217,6 +217,7 @@ public class RecordingManager {
final long timestamp = System.currentTimeMillis(); final long timestamp = System.currentTimeMillis();
this.cdr.recordRecordingStatusChanged(recording, reason, timestamp, Status.stopped); this.cdr.recordRecordingStatusChanged(recording, reason, timestamp, Status.stopped);
cdr.recordRecordingStopped(recording, reason, timestamp);
switch (recording.getOutputMode()) { switch (recording.getOutputMode()) {
case COMPOSED: case COMPOSED:

View File

@ -177,7 +177,6 @@ public class SingleStreamRecordingService extends RecordingService {
finalRecordingArray[0] = this.sealMetadataFiles(finalRecordingArray[0]); finalRecordingArray[0] = this.sealMetadataFiles(finalRecordingArray[0]);
final long timestamp = System.currentTimeMillis(); final long timestamp = System.currentTimeMillis();
cdr.recordRecordingStopped(finalRecordingArray[0], reason, timestamp);
cdr.recordRecordingStatusChanged(finalRecordingArray[0], reason, timestamp, cdr.recordRecordingStatusChanged(finalRecordingArray[0], reason, timestamp,
finalRecordingArray[0].getStatus()); finalRecordingArray[0].getStatus());