我们在C#应用程序中使用WMPLib作为嵌入式播放器,但在Windows Media Player中也会出现此问题。在WMP中播放流式波时播放
我们的服务器流式传输音频,并启用流偏移。给定网址:
http://ourserver.com/playback?id=400
它返回一个八位字节或x波流(两者都不起作用)。
WMP开始缓冲并播放来自给定URL的2分钟长波文件(一切正常),但是当我抓取和放下轨道滑块达到其长度的约90%时,播放被切断,WMP显示一般音频错误(c00d11b1)。当我将滑块拉得更近(进一步10-20%)时,播放将继续进行,没有任何错误,并且可以正确播放偏移。我正在使用Windows 7家庭高级版64位。
当我在其他媒体播放器应用程序(VLC)中使用相同的URL时,不会发生错误。
是什么导致了这样的问题?从这种情况
TCP数据包:
WMP =>服务器 - 获得波
GET http://ourserver.com/playback?id=400
Cache-Control: no-cache
Connection: Keep-Alive
Pragma: getIfoFileURI.dlna.org
Accept: */*
Cookie: PHPSESSID=7e5156ec44280a9210570158c5d31475
User-Agent: NSPlayer/12.00.7601.17514 WMFSDK/12.00.7601.17514
GetContentFeatures.DLNA.ORG: 1
Host: 192.168.0.5
服务器=> WMP - 返回文件
HTTP/1.1 200 OK
X-Powered-By: PHP/5.3.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-cache
Pragma: no-cache
Content-Description: File Transfer
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-Dis; filename="sound.wav"
Content-Length: 833658
Accept-Ranges: bytes
Date: Tue, 02 Apr 2013 10:46:01 GMT
Server: lighttpd/1.4.28
声音播放,我们移动滑块... WMP =>服务器 - 获取s ound与偏移量(在范围设定)
GET http://ourserver.com/playback?id=400
Cache-Control: no-cache
Connection: Keep-Alive
Pragma: getIfoFileURI.dlna.org
Accept: */*
Cookie: PHPSESSID=7e5156ec44280a9210570158c5d31475
Range: bytes=733184-833657
User-Agent: NSPlayer/12.00.7601.17514 WMFSDK/12.00.7601.17514
GetContentFeatures.DLNA.ORG: 1
Host: 192.168.0.5
服务器=> WMP - 返回声音
HTTP/1.1 206 Partial Content
X-Powered-By: PHP/5.3.6
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Content-Range: bytes 733184-833657/
Cache-Control: no-cache
Pragma: no-cache
Content-Description: File Transfer
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-Dis; filename="sound.wav"
Content-Length: 833658
Accept-Ranges: bytes
Date: Tue, 02 Apr 2013 10:46:10 GMT
Server: lighttpd/1.4.28
流继续,但WMP切断回放并显示错误。
我们该如何解决这个问题? 感谢您的帮助。