-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: - Added possibility to change HDR mode (#13) - Added possibility to change camera exposure (#18) perf: - Camera Preview performance improvements - Capturing Videos performance improvements
- Loading branch information
1 parent
15f83d5
commit fc180d4
Showing
7 changed files
with
178 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// | ||
// AVCaptureDevice++.swift of MijickCameraView | ||
// | ||
// Created by Tomasz Kurylik | ||
// - Twitter: https://twitter.com/tkurylik | ||
// - Mail: [email protected] | ||
// - GitHub: https://github.com/FulcrumOne | ||
// | ||
// Copyright ©2024 Mijick. Licensed under MIT License. | ||
|
||
|
||
import AVKit | ||
|
||
extension AVCaptureDevice { | ||
var hdrMode: CameraHDRMode { | ||
get { | ||
if automaticallyAdjustsVideoHDREnabled { return .auto } | ||
else if isVideoHDREnabled { return .on } | ||
else { return .off } | ||
} | ||
set { | ||
automaticallyAdjustsVideoHDREnabled = newValue == .auto | ||
if newValue != .auto { isVideoHDREnabled = newValue == .on } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// | ||
// CameraExposure.swift of MijickCameraView | ||
// | ||
// Created by Tomasz Kurylik | ||
// - Twitter: https://twitter.com/tkurylik | ||
// - Mail: [email protected] | ||
// - GitHub: https://github.com/FulcrumOne | ||
// | ||
// Copyright ©2024 Mijick. Licensed under MIT License. | ||
|
||
|
||
import AVKit | ||
|
||
struct CameraExposure { | ||
var duration: CMTime = .invalid | ||
var targetBias: Float = 0 | ||
var iso: Float = 0 | ||
var mode: AVCaptureDevice.ExposureMode = .autoExpose | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters