Phonon - videoPlayer Error
Hello, $username!
I'm using Phonon::videoPlayer from Windows+Qt 4.6 in my music player project as core of it.
The bug is that some mp3-files cannot be opened and Phonon::videoPlayerInstance->mediaObject()->errorString() is:
Quote:
the operation cannot be performed because the pins are not connected ($80040209)
I tried to pick out the plot of error-generating code, so its something like this:
Code:
{
this->starter = starter;
core.mediaObject()->setTickInterval(1000);
sources.clear();
connect(core.mediaObject(), SIGNAL(stateChanged(Phonon::State, Phonon::State)),
this, SLOT(stateChanged(Phonon::State, Phonon::State)));
QStringList list
= QFileDialog::getOpenFileNames(0,
"Phonon Test",
".",tr
("audios (*.mp3 *.wma *.ogg *.wave *.midi)"));
for (int i = 0; i < list.size(); i++){
Phonon::MediaSource source(list.at(i));
sources.insert(i,source);
}
core.mediaObject()->setCurrentSource(sources.at(0));
core.play();
}
void Tester::stateChanged(Phonon::State newstate, Phonon::State oldstate)
{
if (newstate == Phonon::ErrorState) {
core.mediaObject()->errorString(),
if (core.mediaObject()->errorType() == Phonon::FatalError) {
starter->exit();
} else {
core.mediaObject()->stop();
}
}
}
As you see, its just clean code with no extraordinary using of Qt.
Anybody knows, is it problem of Windows sound libraries or something else?
Re: Phonon - videoPlayer Error