PDA

View Full Version : Phonon+seek



Fastman
8th September 2010, 08:45
May be can help me...
The method seek () doesn't work

I check:

bool bOk = mediaObject-> isSeekable ();
Returns false.

But widget SeekSlider Works and allows to change video position!

mediaObject = ui.vpPreview->mediaObject();
mediaObject->setTickInterval(20);
ui.seekSlider->setMediaObject(ui.vpPreview->mediaObject());
ui.seekSlider->show();
connect(mediaObject, SIGNAL(tick(qint64)), this, SLOT(state(qint64)));

tbscope
8th September 2010, 09:03
You might want to read this:
http://doc.qt.nokia.com/4.6/phonon-mediaobject.html#isSeekable

wysota
8th September 2010, 09:07
Your code doesn't have to do anything with seekability. Are you sure you stated the problem correctly?

Fastman
8th September 2010, 09:16
You might want to read this:
http://doc.qt.nokia.com/4.6/phonon-mediaobject.html#isSeekable
Yes, you're right. Thank you very much.


Your code doesn't have to do anything with seekability. Are you sure you stated the problem correctly?
I just showed how to bind a slider to video widget.
When on form drag slider - it works.
tbscope correctly pointed out to me that the video does not immediately become a mode seekable, but only after a full load.
I have it checked - it is really true.

wysota
8th September 2010, 09:33
I just showed how to bind a slider to video widget.
When on form drag slider - it works.
tbscope correctly pointed out to me that the video does not immediately become a mode seekable, but only after a full load.
I have it checked - it is really true.
Ok, the code you posted was simply incomplete. You forgot one connect statement :)

Fastman
8th September 2010, 09:57
Ok, the code you posted was simply incomplete. You forgot one connect statement :)
Hmmm... what is wrong ?
I would be glad if correct me:)

wysota
8th September 2010, 10:15
The code doesn't implement any reaction on value changes of the slider, it only reacts on heartbeats of the media object.

Fastman
8th September 2010, 10:26
The code doesn't implement any reaction on value changes of the slider, it only reacts on heartbeats of the media object.
Thx for answer wysota.
But, i see in http://doc.qt.nokia.com/4.6/phonon-seekslider.html#details
and test in my app.
SeekSlider responds to changes (when I move the sliders with the mouse)
I currently still do not have to.

wysota
8th September 2010, 10:31
Oh, my fault... I somehow missed the setMediaObject() call in your code when I looked at it before.