Starting AVAssetExportSession in the Background

前端 未结 3 977
伪装坚强ぢ
伪装坚强ぢ 2020-12-17 22:45

My app does some processing and at some point it needs to call an AVAssetExportSession.

If the session has already started and then I background the app, everything

相关标签:
3条回答
  • 2020-12-17 23:25

    You can start AVAssetExportSession in background. The only limitations in AVFoundation to performing work in the background, are using AVVideoCompositions or AVMutableVideoCompositions. AVVideoCompositions are using the GPU, and the GPU cannot be used in the background.

    0 讨论(0)
  • 2020-12-17 23:35

    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.

    0 讨论(0)
  • 2020-12-17 23:35

    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.

    0 讨论(0)
提交回复
热议问题