hi,
I'm in trouble understanding the behaviour of seekSlider giving me when playing a .flv video from the net.
Here the code I use:
mediaObject=videoPlayer->mediaObject();
mediaObject->setCurrentSource(Phonon::MediaSource(url));
mediaObject->setObjectName("Video_output");
videoPlayer->videoWidget()->setObjectName("Videowidget");
audioOutput = videoPlayer->audioOutput();
audioOutput->setObjectName("Audio_output");
seekSlider->setMediaObject(mediaObject);
seekSlider->setSingleStep(1000);
connect(mediaObject, SIGNAL(tick(qint64)), this, SLOT(tick(qint64)));
connect(mediaObject, SIGNAL(seekableChanged(bool)), this, SLOT(seekableChanged(bool)));
connect(mediaObject, SIGNAL(finished()), this, SLOT(onVideoPlayFinished()) );
mediaObject->play();
mediaObject=videoPlayer->mediaObject();
mediaObject->setCurrentSource(Phonon::MediaSource(url));
mediaObject->setObjectName("Video_output");
videoPlayer->videoWidget()->setObjectName("Videowidget");
audioOutput = videoPlayer->audioOutput();
audioOutput->setObjectName("Audio_output");
seekSlider->setMediaObject(mediaObject);
seekSlider->setSingleStep(1000);
connect(mediaObject, SIGNAL(tick(qint64)), this, SLOT(tick(qint64)));
connect(mediaObject, SIGNAL(seekableChanged(bool)), this, SLOT(seekableChanged(bool)));
connect(mediaObject, SIGNAL(finished()), this, SLOT(onVideoPlayFinished()) );
mediaObject->play();
To copy to clipboard, switch view to plain text mode
when I use videoPlayer->seek(n) or move it manually in the gui and the url (streming from internet) is a .mp4 the slider works, when its a .flv the video restarts. But when the .flv is stored on the hd it works as expected.
The seekableChanged always return true.
thanks for any suggestions
regards
Marco
Bookmarks