Phonon VideoWidget 错误:“视频小部件无法正确初始化”
我在 PyQt 邮件列表上问了这个问题,但没有得到任何回复,所以我会在这里碰碰运气。
我遇到了一个令人沮丧的问题(仅限 Windows):当尝试创建 VideoWidget 实例时,我收到错误消息“视频小部件无法正确初始化”。 奇怪的是,在两个独立的 Windows 机器(一个是 Vista,另一个是通过 Parallels 运行的 XP 映像)上完美运行几周后,这个问题才在代码中出现。 我不知道环境发生了什么变化可能导致了这种情况。
我正在使用 Python 2.6 和 PyQt 4.5.4 Windows 安装程序。 我注意到这个问题是去年 11 月提出的,但没有提供解决方案:
http ://www.riverbankcomputing.com/pipermail/pyqt/2008-November/021029.html
我的谷歌搜索没有找到任何可能导致此问题的解释。 有人可以告诉我吗?
I asked this question on the PyQt mailing list, and didn't get any responses, so I'll try my luck here.
I've encountered a frustrating issue (on Windows only): when trying to create a VideoWidget instance, I'm getting the error message "the video widget could not be initialized correctly". Oddly, this just surfaced in the code after several weeks of perfect operation, on two separate Windows boxes (one Vista, the other an XP image running via Parallels). I'm not aware of anything having changed in the environment that may have caused it.
I'm using Python 2.6 and the PyQt 4.5.4 Windows installer. I notice this issue was raised last November, but no solutions were offered:
http://www.riverbankcomputing.com/pipermail/pyqt/2008-November/021029.html
My Googling hasn't turned up any explanations of what may cause this. Can anyone clue me in?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
生成该消息的代码位于
3rdparty/phonon/ds9/videorenderer_vmr9.cpp
中:过滤器的类型为
ComPointer
,其构造函数进行以下失败的调用(运算符调用返回 m_t,它被分配给上面的 m_filter):因此,它在 Windows API 调用中失败。 您可以修改源代码以找出 CoCreateInstance 的返回值是什么,以便隔离原因,但看起来它与您系统上的更改有关,我不知道如何进一步提供帮助。 祝你好运。
The code that generates that message is in
3rdparty/phonon/ds9/videorenderer_vmr9.cpp
:Filter is type
ComPointer<IBaseFilter>
and its constructor makes the following failing call (an operator call returns m_t which is assigned to m_filter above):Thus, it's failing in a Windows API call. You could modify the source code to find out what the return value of CoCreateInstance is in order to isolate the cause, but it looks like it's related to a change on your system and I don't know how to help further. Good luck.
不想回答我自己的问题,但如果其他人遇到这个问题:
这个问题的解决方案最终是特定于硬件的。 Phonon 似乎对特定虚拟机的视频驱动程序有问题 - 在我的例子中是 Parallels。 物理硬件不会出现此问题。 我找不到解决方法。
Hate to answer my own question, but if anyone else encounters this:
The solution to this ended up being hardware-specific. Phonon appears to have issues with the video drivers for particular virtual machines - Parallels in my case. Physical hardware doesn't exhibit the issue. There is no workaround I've been able to find.