Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,18 @@ fun RecorderEventsHandler(
else -> throw Exception("Unknown recorder type")
}

batchesFolder.concatenate(
recording.recordingStart,
recording.fileExtension,
durationPerBatchInMilliseconds = settings.intervalDuration,
onProgress = { percentage ->
processingProgress = percentage
}
)
val outputFile = if (batchesFolder.getBatchesForFFmpeg().size == 1) {
batchesFolder.getBatchesForFFmpeg().first()
} else {
batchesFolder.concatenate(
recording.recordingStart,
recording.fileExtension,
durationPerBatchInMilliseconds = settings.intervalDuration,
onProgress = { percentage ->
processingProgress = percentage
}
)
}

// Save file
val name = batchesFolder.getName(
Expand All @@ -196,19 +200,13 @@ fun RecorderEventsHandler(
when (batchesFolder) {
is AudioBatchesFolder -> {
saveAudioFile(
batchesFolder.asInternalGetOutputFile(
recording.recordingStart,
recording.fileExtension,
), name
outputFile, name
)
}

is VideoBatchesFolder -> {
saveVideoFile(
batchesFolder.asInternalGetOutputFile(
recording.recordingStart,
recording.fileExtension,
), name
outputFile, name
)
}
}
Expand Down Expand Up @@ -368,4 +366,4 @@ fun RecorderEventsHandler(
showRecorderError = false
},
)
}
}