PDA

View Full Version : [solved] Phonon::createPath problem on windows



skoczo
11th December 2010, 18:52
Hello. I wrote application to listen internet radio. All works fine on linux but i have problem with windows. On windows with sdk application it works but when i try to run my application on windows without QT sdk i have error.
I have problem after this line

path=Phono::createPath(mediaObject,audioOutput);
I check if this path is valid and i get false.

Do you have idea where is problem?

This is all code to phonon on:


mediaObject = new Phonon::MediaObject(this);
audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);

if(mediaObject==NULL||mediaObject->errorType()!=0||audioOutput==NULL)
{
if(mediaObject!=NULL)
QMessageBox::critical(this,tr("Error!"),tr("Nie można uruchomić serwera dźwięku.\nByć może jest zjęty przez inny program.")+
tr("\nAplikacja zostanie zamknięta."+mediaObject->errorType())
,QMessageBox::Ok);
else
QMessageBox::critical(this,tr("Błąd!"),tr("Nie można uruchomić serwera dźwięku.\nByć może jest zjęty przez inny program.")+
tr("\nAplikacja zostanie zamknięta.")
,QMessageBox::Ok);
exit(-1);
}

path = Phonon::createPath(mediaObject, audioOutput);

################
I get error here
################
while(!path.isValid())
{
if(QMessageBox::Ok==QMessageBox::critical(this,tr("Error!"),tr("Path is not vaild.\nAplikacja zostanie zamknięta."),QMessageBox::Ok|QMessageBox::Retry))
exit(-1);
else
path.reconnect(mediaObject,audioOutput);
}


I add this dll files to application folder:
- libgcc_s_dw2-1.dll
- mingwm10.dll
- phonon.dll
- phonon4.dll
- QtCore4.dll
- QtGui4.dll
- QtNetwork.dll

Edit:
Always when i create topic I find solution. So the solution is to create phonon_backend folder and put there dll phono files :) That`s all. So sorry for create topic and for my english