Alnitak
13th September 2010, 13:08
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();
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
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();
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