QML 播放 http 协议开头的视频流的一些问题

好吧,其实就是移动宽带的锅,看不了视频就是移动宽带丧心病狂的屏蔽了一堆网站。


在 Window 7 下,使用 QML 的 MediaPlayer 播放在线视频时打印如下错误码:

DirectShowPlayerService::doSetUrlSource: Unresolved error code 800c0005

大体是设置播放源失败。

然后在 QML video element and UNC paths 这个帖子中发现了一些线索。

以下为 mattlc 的帖子

Hi,

After many different codec tests, I still have a problem but I can focus on it much more precisely.

I installed MPC in order to have a stable directshow player.

With the codec tweak tools, I disabled all third part codecs and I was able to play a local mp4 file by using native DTV/DVD windows codec on MPC and Qt Player.

I also tried q remote http mp4 file :

on MPC : OK (using quartz.dll = DirectShow Source Filters for remote files and haali splitter.ax splitter for mp4)
on Qt Player : KO.
QtMultimedia fail to find a DirectShow source filter.
Here is the line which fails in DirectShow Qt Plugin class (DirectShowPlayerService):
@hr = m_graph->AddSourceFilter(reinterpret_cast(url.toString().utf16()), L"Source", &source);@

"m_graph" is a IFilterGraph2 implementation created by the DirectShow "CoCreateInstance" function.

This class (DirectShowPlayerService) use static GUIDs for building both the graph and the source filter. I didn't managed to find any of these GUID in my available codecs and in directshow api reference.

Can you or anyone tell me if this sound like a Qt bug or a wrong codec environment ?

Thanks a lot.

@fas.ysk : thanks for all of your help

大体就是 Qt 插件加载 m_graph->AddSourceFilter(reinterpret_cast(url.toString().utf16()), L"Source", &source); 这段代码执行失败,无法加载 http 协议的视频流。

具体的 bug 描述在 Implementation of DirectShow in QtMultimediaKit can be incomplete.

解决方案,暂时没有,或许安装 LAV 或者其他 ShowDirect 的解码器就可以解决吧。。。

或者使用使用 QtAV。


ps: 安卓上没有此问题。

获取b站视频在线播放源

你可能感兴趣的:(QtQuick,杂谈)