Camera and media editor improvements

This commit is contained in:
Ilya Laktyushin
2023-05-10 17:10:27 +04:00
parent c114f218b9
commit d15c48ff07
104 changed files with 9805 additions and 676 deletions

View File

@@ -12,7 +12,8 @@ struct MediaPreset {
}
var hasAudio: Bool {
return !self.audioSettings.isEmpty
return false
//return !self.audioSettings.isEmpty
}
}
@@ -132,7 +133,12 @@ final class VideoRecorder {
}
}
private var skippedCount = 0
func appendVideo(sampleBuffer: CMSampleBuffer) {
if self.skippedCount < 2 {
self.skippedCount += 1
return
}
self.queue.async {
guard let assetWriter = self.assetWriter, let videoInput = self.videoInput, (self.isRecording || self.isStopping) && !self.finishedWriting else {
return