Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/95.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么AVAudioSessionMediaServicesWereResetNotification经常发生(iOS 10)?_Ios_Avfoundation_Avplayer_Avplayeritem - Fatal编程技术网

为什么AVAudioSessionMediaServicesWereResetNotification经常发生(iOS 10)?

为什么AVAudioSessionMediaServicesWereResetNotification经常发生(iOS 10)?,ios,avfoundation,avplayer,avplayeritem,Ios,Avfoundation,Avplayer,Avplayeritem,我正在使用AVAssetResourceLoaderDelegate为AVPlayer开发视频缓存系统。但我发现有时候媒体服务重置(AVAudioSessionMediaServicesWereResetNotification通知)大约每10秒发生一次,这会导致所有AVPlayerItem和AVPlayer对象重新初始化,并导致播放中断 有人遇到过同样的问题吗?可能是一些线程问题,或者AVAssetResourceLoader的限制 感谢您找到了此问题的解决方案 我在后台异步加载多个AVPla

我正在使用AVAssetResourceLoaderDelegate为AVPlayer开发视频缓存系统。但我发现有时候媒体服务重置(AVAudioSessionMediaServicesWereResetNotification通知)大约每10秒发生一次,这会导致所有AVPlayerItem和AVPlayer对象重新初始化,并导致播放中断

有人遇到过同样的问题吗?可能是一些线程问题,或者AVAssetResourceLoader的限制


感谢您找到了此问题的解决方案


我在后台异步加载多个AVPlayerItems的值和缩略图。关键错误是在分配了AVPlayerItem及其AVAsset的线程中请求了值,但在另一个线程中请求了缩略图(使用AVAssetImageGenerator)。当我将缩略图请求移动到同一线程时,值请求媒体服务重置消失。

我对多个项目的AVAssetImageGenerator有相同的问题,即使它们在同一线程中。你用GCD吗?