Skip to content

Commit

Permalink
fix tvOS error
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo4405 committed Apr 1, 2018
1 parent 22d5e44 commit 8470733
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Sources/Util/DeviceUtil.swift
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import Foundation
import AVFoundation

#if os(iOS) || os(macOS)
extension AVFrameRateRange {
func clamp(rate: Float64) -> Float64 {
return max(minFrameRate, min(maxFrameRate, rate))
}

func contains(rate: Float64) -> Bool {
return (minFrameRate...maxFrameRate) ~= rate
}
}

#if os(iOS) || os(macOS)

extension AVCaptureDevice {
func actualFPS(_ fps: Float64) -> (fps: Float64, duration: CMTime)? {
var durations: [CMTime] = []
Expand Down

0 comments on commit 8470733

Please sign in to comment.