AVAssetExportSession在后台工作 [英] AVAssetExportSession working in background

查看:820
本文介绍了AVAssetExportSession在后台工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图来管理AVAssetExportSession工作时,应用程序在后台。我有iOS 6的设备和测试它。所以我米制作混音,并尝试导出音频。当应用程序是在前台I M使得一切OK,但如果我要去后台I M越来越AVAssetExportSessionStatusFailed并且必须从开始创建它。那么,有没有可能使背景混音工作的?

I tried to manage AVAssetExportSession working when app in background. I have iOS 6 device and testing it there. So i m making audio mix and trying to export audio. When app is in foreground i m making all OK, but if i m going to background i m getting AVAssetExportSessionStatusFailed and have to create it from beginning. So, is it ever possible to make audio mixing work in background?

我米试图使[exportSession exportAsynchronouslyWithCompletionHandler:在NSOperationQueue或得到全局队列 - 但结果是一样的 - 它停止时,应用程序在后台准备,之后发送失败。

I m trying to make [exportSession exportAsynchronouslyWithCompletionHandler: ] in NSOperationQueue or getting global queue - but the results is the same - it stops when app going in background and sending failed afterwards.

有没有人有AVAssetExportSession在后台工作的例子吗?

Does anyone have an example with AVAssetExportSession working in background?

推荐答案

我已经发现了适用于音频的解决方案,我没有尝试过的视频

I have found a solution which works for audio, I have not tried video

如果您更新后台模式,在该项目的功能设置,包括音频。这将允许出口。

If you update your "Background Modes" setting in the capabilities of the project to include Audio. It will allow the export.

这是为在后台播放音乐。

This is intended for playing music in the background.

----编辑---

---- Edit ---

这也适用于视频

这篇关于AVAssetExportSession在后台工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆