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<const OLECHAR *>(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<const OLECHAR *>(url.toString().utf16()), L"Source", &source); 这段代码执行失败,无法加载 http 协议的视频流。

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

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

或者使用使用 QtAV。


ps: 安卓上没有此问题。

获取b站视频在线播放源

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值