Skip to content

Commit 5663928

Browse files
authored
Update quality (#7)
1 parent 157d266 commit 5663928

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

Capturer/Basic/Outputs/PhotoOutput.swift

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,14 @@ public final class PhotoOutput: _StatefulObjectBase, OutputNodeType {
3131
}
3232

3333
private let _output = AVCapturePhotoOutput()
34-
private let quality: AVCapturePhotoOutput.QualityPrioritization
3534

3635
public init(quality: AVCapturePhotoOutput.QualityPrioritization = .balanced) {
37-
self.quality = quality
3836
super.init()
3937

4038
_output.isHighResolutionCaptureEnabled = true
4139
_output.maxPhotoQualityPrioritization = quality
4240
}
4341

44-
public func makeCaptureSettings() -> AVCapturePhotoSettings {
45-
46-
let settings = AVCapturePhotoSettings()
47-
48-
settings.photoQualityPrioritization = quality
49-
settings.isHighResolutionPhotoEnabled = true
50-
51-
return settings
52-
}
53-
5442
public func capture(with settings: AVCapturePhotoSettings, completion: @escaping (Result<CapturePhoto, Error>) -> Void) {
5543

5644
var completionWrapper: ((Result<CapturePhoto, Error>) -> Void)!

ComponentCameraDemoUIKit/Demo/DemoInputPreviewViewController.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ final class DemoInputPreviewViewController: UIViewController {
100100

101101
Task { [weak self] in
102102
do {
103-
104-
let result = try await photoOutput.capture(with: photoOutput.makeCaptureSettings())
103+
let settings = AVCapturePhotoSettings()
104+
settings.isHighResolutionPhotoEnabled = true
105+
let result = try await photoOutput.capture(with: settings)
105106

106107
guard let self = self else { return }
107108

0 commit comments

Comments
 (0)