在后台启动AVAssetExportSession

编程入门 行业动态 更新时间:2024-10-08 13:31:06
本文介绍了在后台启动AVAssetExportSession的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的应用程序进行了一些处理,在某些时候它需要调用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

本文发布于:2023-11-05 10:18:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1560563.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:后台   AVAssetExportSession

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!