PDA

View Full Version : Problems deplying a Phonon app on Fedora



spn
9th April 2010, 08:01
Hi all,

I have made an app that includes an audio player. It is almost identical to the qt music player example. I am using qt 4.4.3 (built with Phonon) and Fedora 12. The application builds and runs on the compiler machine, but I have some problems when deplying on target. I deploy my binary together with the needed qt libraries including libphonon.so. When starting the application, I get the following warnings, and the player won't start:

WARNING: bool Phonon::FactoryPrivate::createBackend() phonon backend plugin could not be loaded
WARNING: Phonon::createPath: Cannot connect Phonon::MediaObject ( no objectName ) to Phonon::AudioOutput ( no objectName ).

I have tried to install the gstreamer backend using yum, link it to /lib/qt4..., uninstalled it and copied libphonon_gstreamer.so from my compiler machine, but I get the same error no matter what I do. Here is part of the constructor of my audio player class:

QList<AudioOutputDevice> ss = Phonon::BackendCapabilities::availableAudioOutputD evices();
error << ERRdebug << "Got " << ss.size() << " devices" << endl;
for (int i=0; i<ss.size(); i++)
{
error << ERRdebug << i << ": " << ss.at(i).name().toStdString() << endl;
}

m_audioOutput = new AudioOutput(Phonon::MusicCategory, this);

m_mediaObject = new MediaObject(this);
m_mediaObject->setTickInterval(1000);
connect(m_mediaObject, SIGNAL(tick(qint64)), this, SLOT(tick(qint64)));
connect(m_mediaObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)),
this, SLOT(stateChanged(Phonon::State, Phonon::State)));
connect(m_mediaObject, SIGNAL(currentSourceChanged(const Phonon::MediaSource &)),
this, SLOT(sourceChanged(const Phonon::MediaSource &)));
Phonon::createPath(m_mediaObject, m_audioOutput);
On my compiler machine, the log prints got 1 device (0: default), but on target I get 0 devices. Note that the audio card works fine when using other applications. Help appreciated.