PDA

View Full Version : Cannot connect phonon



balajir
15th July 2009, 05:38
Hi,

I configured qt4.4 with phonon and use phonon in my sample application. When i run the project and try to play a song, it doesn't play.

In output log it shows warning like this..,

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

What i should do to solve this problem. Kindly help

I am using qt4.4 beta, vs2005.

Thanks in advance,
Bala

yogeshgokul
15th July 2009, 06:59
Have you got, this dll built in your qt dir?
QTDIR\plugins\phonon_backend\phonon_ds94.dll

And I am not sure but may be you require directx dlls to run this multimedia apps. Because DirectShow, QuickTime, and GStreamer will be required for sound apps.

balajir
15th July 2009, 07:23
No, phonon_ds94.dll is not in my qt dir... there is no folder named "phonon_backend" in plugin folder.. I got phonon.dll in my lib... thats al..

What i should do now to get this dll for phonon backend?

Kindly help me what i need to do?

Thanks in advance
Bala

yogeshgokul
15th July 2009, 07:34
I dont know, what configure options you chose @ the time of building qt with phonon support. But ideally you should have that dll, on windows. You try one thing, in your .pro file add this
QT += phonon.

balajir
15th July 2009, 07:45
I configured qt with phonon like this

configure -platform win32-msvc2005 -phonon

and QT+= phonon is in my pro file...

For phonon_backend should i download and install anything in my system before configuring qt.. like gstreamer etc... If so what i should and may i know the procedure..

Thanks in advance
Bala

yogeshgokul
15th July 2009, 07:52
I suggest you should go through this similar post

http://www.qtcentre.org/forum/f-qt-programming-2/t-phonon-module-question-help-needed-20848.html

This says how to configure qt for phonon support.
See, on windows phonon uses DirectShow that uses DirectX, on Mac it uses QuickTime, on Linux it uses GStreamer.
Some version of DX is by-default installed on windows.
I cannot tell you the exact procedure because I uses Qt binary installer for windows and that builds it well with phonon support.

balajir
15th July 2009, 09:36
Thank you..

you mean u r using qt creator. even i used qt creator but it is also showing the same problem.

I dunno how to get that phonon_ds94.dll.. Might be problem will be solved if i find that.

Thanks 4 ur reply.
Bala

yogeshgokul
15th July 2009, 10:05
Thank you..
you mean u r using qt creator. even i used qt creator but it is also showing the same problem.
No, qt creator is not a matter here, thats just IDE, the important is how qt library framework built.

Can you send me your code, I will try that on my environment. Because I have phonon support. If it run on my environment, then may be you have to re-configure the qt.

yogeshgokul
15th July 2009, 10:25
One more thing, I want to add here.
I tried building Qt sound example for sound player.
It runs well by-default. But if I delete the phonon_backend folder, then it doesn't do anything. But its not giving any warning also.

balajir
15th July 2009, 11:44
I just created a sample for phonon and i added the .cpp coding here.. when clicking pushButton it should work.



#include "mediastream.h"
#include "ui_mediastream.h"

CMediaStream::CMediaStream(QWidget *parent)
: QMainWindow(parent), ui(new Ui::CMediaStream)
{
ui->setupUi(this);

}

CMediaStream::~CMediaStream()
{
delete ui;
}

void CMediaStream::on_pushButton_clicked()
{
Phonon::MediaObject *mediaObject = new Phonon::MediaObject(this);
mediaObject->setCurrentSource(QString("E:/qt_spotify/multimedia/mp3/Beethoven.mp3"));
Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory, this);

Phonon::createPath(mediaObject, audioOutput);
Phonon::SeekSlider *slider = new Phonon::SeekSlider(this);


slider->setObjectName(QString::fromUtf8("SeekSlider"));
slider->setGeometry(QRect(220, 140, 150, 24));
slider->setMediaObject(mediaObject);
slider->show();
mediaObject->play();

}

And i configured with phonon, but there is no backend folder in that...

Can u plz explain wat qt you are using.. Are you using qt creator or open source.. how u configured if open source.. wat are the additional framework or libraries you installed for qt.. And should i include any extra environment path other that qt/bin path.

Thanks in advance
Bala

balajir
15th July 2009, 11:50
I am using qt-win-opensource-src-4.4.0-beta1

and my environment variables are

include
-------
C:\Program Files\Microsoft Visual Studio 8\VC\include;
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include;
E:\QT_FOR_VS2005\qt-win-opensource-src-4.4.0-beta1\include;
C:\Program Files\Microsoft DirectX SDK (March 2008)\Include;

lib
----
C:\Program Files\Microsoft Visual Studio 8\VC\lib;
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib;
E:\QT_FOR_VS2005\qt-win-opensource-src-4.4.0-beta1\lib;
C:\Program Files\Microsoft DirectX SDK (March 2008)\Lib;

path
-----
%QTDIR%\bin;
C:\Program Files\Microsoft DirectX SDK (March 2008)\Utilities\Bin\x86;
E:\QT_FOR_VS2005\qt-win-opensource-src-4.4.0-beta1\bin;
C:\Program Files\Microsoft Visual Studio 8\VC\bin;
C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin;;
E:\gstreamer\bin


system include
--------------
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\;

system lib
------------
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Lib\.

system path
---------------
C:\Program Files\PC Connectivity Solution\;
E:\Symbian\S60\S60_5th_Edition_SDK_v0.9_4\epoc32\g cc\bin;
E:\Symbian\S60\S60_5th_Edition_SDK_v0.9_4\epoc32\t ools;
E:\Symbian\CarbideC++\x86Build\Symbian_Tools\Comma nd_Line_Tools;
E:\Symbian\Perl\bin;
C:\Program Files\Microsoft DirectX SDK (March 2008)\Utilities\Bin\x86;
C:\WINDOWS\system32;
C:\WINDOWS;
C:\WINDOWS\System32\Wbem;
C:\Program Files\Microsoft SQL Server\90\Tools\binn\;
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\.;
C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\WinNT\.;;;
C:\Program Files\Common Files\Symbian\tools;
E:\Symbian\ARMtoolchain\CSL Arm Toolchain\bin

yogeshgokul
15th July 2009, 11:51
pls use qt code for code wrap..


Can u plz explain wat qt you are using..
Qt4.5.2 Commercial edition

Are you using qt creator or open source..
I am using visual studio 2008.


wat are the additional framework or libraries you installed for qt..
Nothing.


And should i include any extra environment path other that qt/bin path.
Not required. The path upto bin is fine.