PDA

View Full Version : Problem with the signals emitted in Phonon



Valsylver
26th July 2012, 15:17
Hi,

I display a video using the Phonon module with PyQt, and I created a play/pause button.
The problem is when I want to get the totalTime of the mediaObject() :

Just after setting the source of the video, I can't get the totalTime() of the mediaObject() (it returns 0), it's normal since it is necessary to wait for the totalTimeChanged signal to get this time. But I tried to connect this signal to a custom function, and it never seems to be emitted ... However, when I pause the video, I can get this totalTime(), so I don't understand ...

Do you have a way to fix it ?

Thanks

sonulohani
28th July 2012, 13:48
I dont know python. But see this warning:-

Warning: The total time is not defined before the media object enters the LoadingState (http://doc.qt.nokia.com/4.7-snapshot/phonon.html).

amleto
28th July 2012, 17:20
jso you just have a problem with signal/slot connection. have you debugged this connection?

Valsylver
30th July 2012, 08:30
It works, I made a mistake in the connection. Thanks for your replies