我的应用程序进行了一些处理,在某些时候它需要调用AVAssetExportSession。
My app does some processing and at some point it needs to call an AVAssetExportSession.
如果会话已经开始,然后我对应用程序进行后台处理,一切都正常完成。但是,如果我在调用 exportAsynchronouslyWithCompletionHandler 之前对应用程序进行后台处理。我收到此错误:
If the session has already started and then I background the app, everything completes normally. However, if I background the app before calling exportAsynchronouslyWithCompletionHandler. I get this error:
AVAssetExportSessionStatusFailed错误域= AVFoundationErrorDomain代码= -11800操作无法完成UserInfo = 0x1e550db0 {NSLocalizedFailureReason = An发生未知错误(-12985),NSUnderlyingError = 0x1e574910操作无法完成。(OSStatus error -12985。),NSLocalizedDescription =操作无法完成}
是否可以在后台启动AVAssetExportSession?
Is it possible to start an AVAssetExportSession in the background?
推荐答案实际上并非如此可能是因为您无法在后台启动新线程。如果你想在后台做很多事情,你必须在app背景之前异步启动它们。
It actually is not possible due to the fact that you can't start a new thread in the background. If you want to do a lot of things in the background you'll have to start them all asynchronously right before the app backgrounds.
更多推荐
在后台启动AVAssetExportSession
发布评论