开发者

video player with qt phonon (using python)

开发者 https://www.devze.com 2022-12-22 21:50 出处:网络
I am working on Windows xp and am trying to get a simple video player running. I am trying to use Phonon::VideoPlayer module for this. I am connecting the signal as

I am working on Windows xp and am trying to get a simple video player running.

I am trying to use Phonon::VideoPlayer module for this. I am connecting the signal as

connect(self.player,开发者_JS百科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.


Try writing

self.player.play(Phonon.MediaSource("C:\\vid.mp4"))

to escape the \


Phonon::MediaSource mediaSource= Phonon::MediaSource("C:\\vid.mp4");

Try creating media sources like this and also other Phonon objects..

0

精彩评论

暂无评论...
验证码 换一张
取 消