After immigrating Swift 4 following function has been stopped being called. I could not find the reason.
func captureOutput(_ captureOutput: AVCaptureOutput!, didOutputSampleBuffer sampleBuffer: CMSampleBuffer!, from connection: AVCaptureConnection!) {
Code
}