mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-18 23:05:26 +02:00
chore: Cleanup
This commit is contained in:
parent
e94bfded6c
commit
7722127796
@ -63,9 +63,6 @@ data class AudioRecorderExporter(
|
||||
it.path
|
||||
}
|
||||
val filePath = FFmpegKitConfig.getSafParameter(context, uri, "rw")
|
||||
println("!!!!!!!!!!!!!!!!!!1")
|
||||
println(getFolder(context).listFiles()?.map { it.name })
|
||||
println(filePath)
|
||||
val fileName = recording.recordingStart
|
||||
.format(DateTimeFormatter.ISO_DATE_TIME)
|
||||
.toString()
|
||||
@ -73,23 +70,19 @@ data class AudioRecorderExporter(
|
||||
.replace(".", "_")
|
||||
val outputFile = FFmpegKitConfig.getSafParameterForWrite(
|
||||
context,
|
||||
(folder.uri.path + "/$fileName.aac").toUri()
|
||||
folder.createFile("audio/aac", "${fileName}.aac")!!.uri,
|
||||
)
|
||||
|
||||
val command = "-protocol_whitelist saf,concat,content,file,subfile " +
|
||||
"-i 'concat:${filePath}' -y" +
|
||||
val command = "-protocol_whitelist saf,concat,content,file,subfile" +
|
||||
" -i 'concat:${filePath}' -y" +
|
||||
" -acodec copy" +
|
||||
" -metadata title='$fileName' " +
|
||||
" -metadata title='$fileName'" +
|
||||
" -metadata date='${recording.recordingStart.format(DateTimeFormatter.ISO_DATE_TIME)}'" +
|
||||
" -metadata batch_count='${filePaths.size}'" +
|
||||
" -metadata batch_duration='${recording.intervalDuration}'" +
|
||||
" -metadata max_duration='${recording.maxDuration}'" +
|
||||
" $outputFile"
|
||||
|
||||
println("--------------------")
|
||||
println(command)
|
||||
println(outputFile)
|
||||
|
||||
val session = FFmpegKit.execute(command)
|
||||
|
||||
if (!ReturnCode.isSuccess(session.returnCode)) {
|
||||
@ -134,9 +127,6 @@ data class AudioRecorderExporter(
|
||||
return@forEach
|
||||
}
|
||||
|
||||
println(
|
||||
"symlinking ${folder.uri}/${it.name} to ${destinationFolder.absolutePath}/${it.name}"
|
||||
)
|
||||
|
||||
Os.symlink(
|
||||
"${folder.uri}/${it.name}",
|
||||
|
@ -81,7 +81,6 @@ class AudioRecorderService : IntervalRecorderService() {
|
||||
}
|
||||
}
|
||||
|
||||
println("outputformat eta: ${settings!!.outputFormat}")
|
||||
setOutputFormat(settings!!.outputFormat)
|
||||
|
||||
setAudioEncoder(settings!!.encoder)
|
||||
|
Loading…
x
Reference in New Issue
Block a user