AVPlayer失败状态

时间:2014-05-21 17:20:34

标签: ios avfoundation

我正在研究做hls流媒体的iOS应用程序。我也有它的mac版本。该应用程序在Mac上正常运行,但在iOS上,播放器在要求内容时会进入失败状态。

以下是我从播放器获取的错误信息。

400691600095 [3CED718C] DEBUG Apple: [MyMovieView.m:1996] backtrace: (
    0   MyApp                             0x007f9333 -[MyMovieView(Private) handleNewLoadState:] + 362
    1   MyApp                             0x007f6f93 -[MyMovieView observeValueForKeyPath:ofObject:change:context:] + 466
    2   Foundation                          0x306b8c8f <redacted> + 34
    3   Foundation                          0x306b8bdb <redacted> + 402
    4   Foundation                          0x306b8c8f <redacted> + 34
    5   Foundation                          0x306b8bdb <redacted> + 402
    6   Foundation                          0x306965d1 <redacted> + 272
    7   Foundation                          0x30696275 <redacted> + 344
    8   Foundation                          0x306828cd <redacted> + 88
    9   AVFoundation                        0x2ec1ad81 <redacted> + 44
    10  AVFoundation                        0x2ec1d097 <redacted> + 182
    11  AVFoundation                        0x2ec28ee5 <redacted> + 2524
    12  libdispatch.dylib                   0x3ae11833 <redacted> + 10
    13  libdispatch.dylib                   0x3ae1181f <redacted> + 22
    14  libdispatch.dylib                   0x3ae1849f <redacted> + 278
    15  CoreFoundation                      0x2fd2c8f1 <redacted> + 8
    16  CoreFoundation                      0x2fd2b1c5 <redacted> + 1300
    17  CoreFoundation                      0x2fc95f4f CFRunLoopRunSpecific + 522
    18  CoreFoundation                      0x2fc95d33 CFRunLoopRunInMode + 106
    19  GraphicsServices                    0x34bbb663 GSEventRunModal + 138
    20  UIKit                               0x325e116d UIApplicationMain + 1136
    21  MyApp                             0x0000ad71 main + 192
    22  libdyld.dylib                       0x3ae36ab7 <redacted> + 2
)
1400691600097 [3CED718C] DEBUG Apple: [MyMovieView.m:2006] <MyAVAssetProxy: 0x197eb70> <AVURLAsset: 0x670b270, URL = http://127.0.0.1:12000/stream/vplaylist.m3u8?id=192.168.1.114-7cf95af1535e80c4a77c>
1400691600102 [3CED718C] DEBUG Apple: [MyMovieView.m:2008] error during movie playback: Error Domain=NSURLErrorDomain Code=-1002 "**unsupported URL**" UserInfo=0x6dd1cc0 {NSUnderlyingError=0x6dd1650 "The operation couldn’t be completed. (OSStatus error -1002.)", NSLocalizedDescription=unsupported URL} (null)
1400691600102 [3CED718C] DEBUG Apple: [MyMovieView.m:2108] additional info for playback error Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL" UserInfo=0x6dd1cc0 {NSUnderlyingError=0x6dd1650 "The operation couldn’t be completed. (OSStatus error -1002.)", NSLocalizedDescription=unsupported URL}: (null)
1400691600103 [3CED718C] DEBUG Apple: [MyMovieView.m:1506] Observing <AVPlayerLayer: 0x670e730>, player.rate
1400691600103 [3CED718C] DEBUG Apple: [MyMovieView.m:1506] Observing <AVPlayerLayer: 0x670e730>, player.currentItem.status
1400691600104 [3CED718C] DEBUG Apple: [MyMovieView.m:1993] load state changed from unknown to unknown
1400691600113 [3CED718C] DEBUG Apple: [PlaybackViewController.m:1370] playback failed: {
    NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=51 \"unsupported URL\" UserInfo=0x6dd1cc0 {NSUnderlyingError=0x6dd1650 \"The operation couldn\U2019t be completed. (OSStatus error -1002.)\", NSLocalizedDescription=unsupported URL}";

我的限制是我不能透露更多但是我试图找出可能出错的地方。为什么播放器说不支持的网址&#39;玩家对vplaylist,播放列表和内容的请求是成功的。我还看到HTTP代理已经开始获取第一个段,但由于某种原因,播放器在获取段数据时进入失败状态。

我知道在Mac和iOS上的hls流媒体之间存在差异,我试图解决这些问题。我是AVFoundation的新手:)

任何帮助都会感激不尽。

0 个答案:

没有答案