some fixes
This commit is contained in:
1 parent
e1f27cd8b2
commit
95a1c62b54
16 files changed
+137
-51
No files matched your search
@@ -1033,7 +1033,7 @@ final class VideoNoteRecorder: NSObject, ObservableObject, AVCaptureFileOutputRe
|
||||
// consistent no matter which camera is recording.
|
||||
let microphone =
|
||||
AVCaptureDevice.default(
|
||||
.builtInMicrophone,
|
||||
.microphone,
|
||||
for: .audio,
|
||||
position: .back
|
||||
)
|
||||
@@ -1194,7 +1194,7 @@ private actor VideoNoteFileInspector {
|
||||
]
|
||||
)
|
||||
videoInput.expectsMediaDataInRealTime = false
|
||||
videoInput.transform = videoTrack.preferredTransform
|
||||
videoInput.transform = (try? await videoTrack.load(.preferredTransform)) ?? .identity
|
||||
let adaptor = AVAssetWriterInputPixelBufferAdaptor(
|
||||
assetWriterInput: videoInput,
|
||||
sourcePixelBufferAttributes: [
|
||||
@@ -1397,7 +1397,7 @@ private actor VideoNoteFileInspector {
|
||||
return nil
|
||||
}
|
||||
if !hasVideo {
|
||||
transform = source.preferredTransform
|
||||
transform = (try? await source.load(.preferredTransform)) ?? .identity
|
||||
hasVideo = true
|
||||
}
|
||||
cursor = cursor + duration
|
||||
@@ -1431,10 +1431,6 @@ private actor VideoNoteFileInspector {
|
||||
try? FileManager.default.removeItem(at: outputURL)
|
||||
return nil
|
||||
}
|
||||
guard exporter.status == .completed else {
|
||||
try? FileManager.default.removeItem(at: outputURL)
|
||||
return nil
|
||||
}
|
||||
return Finalization(url: outputURL, duration: composition.duration)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user