Skip to content
Open
Show file tree
Hide file tree
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 @@ -16,7 +16,6 @@ import app.myzel394.alibi.ui.RECORDER_MEDIA_SELECTED_VALUE
import com.arthenica.ffmpegkit.FFmpegKitConfig
import java.io.File
import java.io.FileDescriptor
import java.time.LocalDateTime

class AudioBatchesFolder(
override val context: Context,
Expand All @@ -38,7 +37,6 @@ class AudioBatchesFolder(
private var mediaFileFileDescriptor: ParcelFileDescriptor? = null

override fun getOutputFileForFFmpeg(
date: LocalDateTime,
extension: String,
fileName: String,
): String {
Expand Down
5 changes: 0 additions & 5 deletions app/src/main/java/app/myzel394/alibi/helpers/BatchesFolder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ abstract class BatchesFolder(
}

abstract fun getOutputFileForFFmpeg(
date: LocalDateTime,
extension: String,
fileName: String,
): String
Expand All @@ -244,19 +243,16 @@ abstract class BatchesFolder(

suspend fun concatenate(
recording: RecordingInformation,
filenameFormat: AppSettings.FilenameFormat,
disableCache: Boolean? = null,
onNextParameterTry: (String) -> Unit = {},
onProgress: (Float?) -> Unit = {},
fileName: String,
): String {
val disableCache = disableCache ?: (type != BatchType.INTERNAL)
val date = recording.getStartDateForFilename(filenameFormat)

if (!disableCache && checkIfOutputAlreadyExists(fileName)
) {
return getOutputFileForFFmpeg(
date = recording.recordingStart,
extension = recording.fileExtension,
fileName = fileName,
)
Expand All @@ -272,7 +268,6 @@ abstract class BatchesFolder(
val filePaths = getBatchesForFFmpeg()

val outputFile = getOutputFileForFFmpeg(
date = date,
extension = recording.fileExtension,
fileName = fileName,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import app.myzel394.alibi.ui.RECORDER_MEDIA_SELECTED_VALUE
import app.myzel394.alibi.ui.VIDEO_RECORDING_BATCHES_SUBFOLDER_NAME
import com.arthenica.ffmpegkit.FFmpegKitConfig
import java.io.File
import java.time.LocalDateTime

class VideoBatchesFolder(
override val context: Context,
Expand All @@ -40,7 +39,6 @@ class VideoBatchesFolder(
private var customParcelFileDescriptor: ParcelFileDescriptor? = null

override fun getOutputFileForFFmpeg(
date: LocalDateTime,
extension: String,
fileName: String,
): String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,12 @@ fun RecorderEventsHandler(
}

val fileName = batchesFolder.getName(
recording.recordingStart,
recording.getStartDateForFilename(filenameFormat = settings.filenameFormat),
recording.fileExtension,
)

batchesFolder.concatenate(
recording,
filenameFormat = settings.filenameFormat,
fileName = fileName,
onProgress = { percentage ->
processingProgress = percentage
Expand Down