Skip to content

Commit

Permalink
Fix compile Error
Browse files Browse the repository at this point in the history
  • Loading branch information
shogo4405 committed Mar 4, 2018
1 parent 53c31d5 commit 30ae42d
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions Sources/Util/DisplayLinkedQueue.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import AVFoundation

final class DisplayLink: NSObject {
var frameInterval: Int = 0
var preferredFramesPerSecond: Int = 0
private(set) var timestamp: CFTimeInterval = 0
private var displayLink: CVDisplayLink?
private weak var delegate: NSObject?
Expand Down Expand Up @@ -54,11 +53,11 @@ protocol DisplayLinkedQueueDelegate: class {
}

final class DisplayLinkedQueue: NSObject {
var running: Bool = false
var bufferTime: TimeInterval = 0.1 // sec
private(set) var duration: TimeInterval = 0
weak var delegate: DisplayLinkedQueueDelegate?
private(set) var duration: TimeInterval = 0

var running: Bool = false
private var isReady: Bool = false
private var buffers: [CMSampleBuffer] = []
private var mediaTime: CFTimeInterval = 0
Expand All @@ -70,11 +69,7 @@ final class DisplayLinkedQueue: NSObject {
guard let displayLink: DisplayLink = displayLink else {
return
}
if #available(iOSApplicationExtension 10.0, *) {
displayLink.preferredFramesPerSecond = 0
} else {
displayLink.frameInterval = 1
}
displayLink.frameInterval = 1
displayLink.add(to: .main, forMode: .commonModes)
}
}
Expand Down

0 comments on commit 30ae42d

Please sign in to comment.