カスタムカメラを実装しているため、露出時間を設定したいと考えています。
スライダーのプロパティを設定するための私のコードは-
slider.maximumValue = Float(CMTimeGetSeconds(camera.activeFormat.maxExposureDuration))
slider.minimumValue = Float(CMTimeGetSeconds(camera.activeFormat.minExposureDuration))
スライダーが変更されるたびに露出時間を設定しているときに問題が発生します。
そのための私のコードは次のようになります-
change(duration: CMTimeMakeWithSeconds(Double(slider.value), 600), iso: AVCaptureISOCurrent)
しかし、
func CMTimeMakeWithSeconds(_ seconds: Float64, _ preferredTimescale: Int32) -> CMTime
と混同しておりpreferredTimescale
、その値はどうあるべきか、600 で正常に動作していますが、理想的な値は何ですか。