视频播放器与qt phonon(使用python) [英] video player with qt phonon (using python)
本文介绍了视频播放器与qt phonon(使用python)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Windows xp,我试图让一个简单的视频播放器运行。
I am working on Windows xp and am trying to get a simple video player running.
我试图使用Phonon :: VideoPlayer模块。我连接信号为
I am trying to use Phonon::VideoPlayer module for this. I am connecting the signal as
connect(self.player,SIGNAL("finished()"),self.player.deleteLater)
然后,当按下播放按钮时,它进行以下调用:
and then , when the Play button is pressed, it makes the following call:
self.player.play(Phonon.MediaSource("C:\\vid.mp4"))
但是,这不会在视频播放器小部件中显示视频。我也听不到音频。任何人都可以帮助?
But, this doesn't display the video in the video player widget. Neither can I hear audio. Can anyone help??
我尝试使用不同的视频文件格式,但没有运气。
I tried using different video file formats but no luck.
推荐答案
Phonon::MediaSource mediaSource= Phonon::MediaSource("C:\\vid.mp4");
尝试创建类似这样的媒体源和其他Phonon对象。
Try creating media sources like this and also other Phonon objects..
这篇关于视频播放器与qt phonon(使用python)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文