在FFmpeg Wiki: Ubuntu之后。所有依赖项,gcc,nasm等都应该是最新的。我在没有Decklink库的情况下成功编译了// ViewController.swift
// DiscGolfScoresheet
import UIKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
updateHole()
}
// Holes available to play
let frontNineList = ["Hole 1", "Hole 2", "Hole 3", "Hole 4", "Hole 5", "Hole 6", "Hole 7", "Hole 8", "Hole 9"]
// Counter to track current hole in play
var currentHoleIndex = 0
// UI elements grouped
@IBOutlet weak var holeLabel: UILabel!
@IBOutlet weak var imageView: UIImageView!
@IBOutlet weak var oneScore: UILabel!
@IBOutlet weak var oneSlider: UISlider!
@IBOutlet weak var twoScore: UILabel!
@IBOutlet weak var twoSlider: UISlider!
// Variables to track players' scores through the rounds
var oneCurrentScore = 0
var twoCurrentScore = 0
// Action to track slider/score changes for player one
@IBAction func oneSliderChanged(_ sender: UISlider) {
let oneCurrentScore = Int(sender.value)
oneScore.text = "Player one's total score: \(oneCurrentScore)"
}
// Action to track slider/score changes for player two
@IBAction func twoSliderChanged(_ sender: UISlider) {
let twoCurrentScore = Int(sender.value)
twoScore.text = "Player two's total score: \(twoCurrentScore)"
}
// Function to cycle through all nine holes with associated pictures and labels
func updateHole() {
holeLabel.text = frontNineList[currentHoleIndex]
let holePicture = frontNineList[currentHoleIndex]
let image = UIImage(named: holePicture)
imageView.image = image
}
// Function to go to next hole when button is selected and to cycle through indefinitely
@IBAction func goToNextHole(_ sender: Any) {
currentHoleIndex += 1
if currentHoleIndex >= frontNineList.count {
currentHoleIndex = 0
}
updateHole()
}
。
现在添加ffmpeg
并从Decklink SDK中添加必需的内容,我得到以下错误。
有什么想法吗?
--enable-decklink