mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Use .mka extension instead of .mkv for voice recordings, use .smff instead of mkv for call recordings
This commit is contained in:
parent
ace4caca3f
commit
7fb3a6ada3
2 changed files with 5 additions and 3 deletions
|
|
@ -43,6 +43,7 @@ import org.linphone.core.ChatRoom
|
|||
import org.linphone.core.ChatRoomListenerStub
|
||||
import org.linphone.core.EventLog
|
||||
import org.linphone.core.Factory
|
||||
import org.linphone.core.MediaFileFormat
|
||||
import org.linphone.core.Player
|
||||
import org.linphone.core.PlayerListener
|
||||
import org.linphone.core.Recorder
|
||||
|
|
@ -487,7 +488,7 @@ class SendMessageInConversationViewModel @UiThread constructor() : GenericViewMo
|
|||
val core = coreContext.core
|
||||
Log.i("$TAG Creating voice message recorder")
|
||||
val recorderParams = core.createRecorderParams()
|
||||
recorderParams.fileFormat = Recorder.FileFormat.Mkv
|
||||
recorderParams.fileFormat = MediaFileFormat.Mkv
|
||||
|
||||
val recordingAudioDevice = AudioUtils.getAudioRecordingDeviceIdForVoiceMessage()
|
||||
recorderParams.audioDevice = recordingAudioDevice
|
||||
|
|
@ -516,7 +517,8 @@ class SendMessageInConversationViewModel @UiThread constructor() : GenericViewMo
|
|||
}
|
||||
Recorder.State.Closed -> {
|
||||
val extension = when (voiceMessageRecorder.params.fileFormat) {
|
||||
Recorder.FileFormat.Mkv -> "mkv"
|
||||
MediaFileFormat.Smff -> "smff"
|
||||
MediaFileFormat.Mkv -> "mka"
|
||||
else -> "wav"
|
||||
}
|
||||
val tempFileName = "voice-recording-${System.currentTimeMillis()}.$extension"
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ class LinphoneUtils {
|
|||
|
||||
const val RECORDING_FILE_NAME_HEADER = "call_recording_"
|
||||
const val RECORDING_FILE_NAME_URI_TIMESTAMP_SEPARATOR = "_on_"
|
||||
const val RECORDING_FILE_EXTENSION = ".mkv"
|
||||
const val RECORDING_FILE_EXTENSION = ".smff"
|
||||
|
||||
private const val CHAT_ROOM_ID_SEPARATOR = "#~#"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue