captureOutput function isn't called using setSampleBufferDelegate

后端 未结 6 1992
臣服心动
臣服心动 2021-02-19 03:57

I\'m starting to develop an iOS app and this is my first SO post. I\'m trying to implement a UI view which can show the preview video of the rear camera and process the captured

6条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-19 04:23

    From Swift 4:

    func captureOutput(_ captureOutput: AVCaptureOutput!, 
    didOutputMetadataObjects metadataObjects: [Any]!, from connection: 
    AVCaptureConnection!)  
    

    won't be called as it no longer exists.

    It has been changed to the following :

    func metadataOutput(_ output: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection) 
    

提交回复
热议问题