iOS Swift : Error Domain=NSOSStatusErrorDomain Code=-12792?

匿名 (未验证) 提交于 2019-12-03 01:18:02

问题:

I'm trying to get video thumbnails with the following code:

let asset = AVAsset(URL: url)     let imageGenerator = AVAssetImageGenerator(asset: asset)     imageGenerator.appliesPreferredTrackTransform = true      do {         let cgImage = try imgGenerator.copyCGImageAtTime(CMTimeMake(1, 30), actualTime: nil)         let uiImage = UIImage(CGImage: cgImage)         imageview.image = uiImage     }     catch let error as NSError     {         print("Image generation failed with error \(error)")     } 

Sometimes it works and sometime it doesn't showing the following error:

Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x14eab520 {Error Domain=NSOSStatusErrorDomain Code=-12792 "(null)"}, NSLocalizedFailureReason=An unknown error occurred (-12792)}

I have tried to figure out what is Domain=NSOSStatusErrorDomain Code=-12792 but I don't understand how I can get more details about this error code. How can I convert this error code into a string to get relevant information about what this error means?

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!