PDA

View Full Version : How to install phonon on qtx11-4.5.2 in linux..?



balajir
27th July 2009, 09:08
Hi,

I want to install phonon on Qt in linux. In order to use that I have to install gstreamer in linux for phonon backend.

But i dunno what i shoul do next.. Kindly answer me for the questions i have:

1. What gstreamer (plugin_base or devel etc..) i should download and how to install or configure that in my linux.?

2. What is the configure script for installing phonon on qtx11-4.5.2?

Kindly help me.. If i am not in a right forum then kindly let me know where i can get answer..

Thanks in advance

Balaji

yogeshgokul
27th July 2009, 09:20
Hi,

I want to install phonon on Qt in linux. In order to use that I have to install gstreamer in linux for phonon backend.

But i dunno what i shoul do next.. Kindly answer me for the questions i have:

1. What gstreamer (plugin_base or devel etc..) i should download and how to install or configure that in my linux.?


Most of Linux distributions provide packages of GStreamer. You should find these in your distribution's package repository. If not, download the latest source and build it, it should be straight fwd.



2. What is the configure script for installing phonon on qtx11-4.5.2?

Just configure and build Qt with phonon support, it will find out the beckend for gstreamer automatically.

balajir
27th July 2009, 09:49
Thanks..

so fedora 9 already contains gstreamer support right?

./configure -phonon

Is this correct?

Thanks,
Balaji.S.R

yogeshgokul
27th July 2009, 10:24
Yes :) , Go ahead. Better refer INSTALL, README. For all possible config options, so only one time configuration is required.

balajir
27th July 2009, 10:45
When i configure using

./configure -phonon

it configured for few minutes and showing some report.. I dunno what to do.. Kindly check it and help me..

It is showing..

Phonon support cannot be enabled due to functionality tests!
Turn on verbose messaging (-v) to ./configure to see the final report.
If you believe this message is in error you may use the continue
switch (-continue) to ./configure to continue.
[root@localhost qt-x11-opensource-src-4.5.2]#

Kindly help

Thanks,
Balaji.S.R

jpn
27th July 2009, 11:03
Try installing packages gstreamer-devel and gstreamer-plugins-base-devel or similar.

balajir
27th July 2009, 11:08
Hi,

Where can i get these packages.. In gstreamer download site the gstreamer and gs_plugin_base is available but devel is not there..

After getting that where i should install these packages.. Is it must to install in any specific folder?

Thanks,
Balaji.S.R

jpn
27th July 2009, 12:36
Use the package manager of your distribution?

balajir
27th July 2009, 12:46
I dont understand..

I am using fedora 9....

I am new to linux.. Today only i started working on it.

Also i can get the devel of gstreamer and plugins in that site..

Kindly help me if possible..

Thanks in advance,
Balaji

jpn
27th July 2009, 13:01
Then perhaps you should learn the basics of your distribution before you try to start programming there? :)

I don't use Fedora myself but I'd guess it's more or less something like this:

sudo yum install gstreamer-devel gstreamer-plugins-base-devel
or use the graphical front end. I'm not even 100% sure about the package names, use the tools of your distribution to search for them.

balajir
27th July 2009, 13:06
Hi,

k but where did you get the gstreamer-devel and gstreamer plugin_base-devel..

Kindly pass me the link if you have..

Thanks,
Balaji

jpn
27th July 2009, 13:11
Let me Google a link for you. Here you go: http://fedoraproject.org/wiki/User_Guide_-_Managing_Software

balajir
27th July 2009, 13:23
Hi,

Thanks.. I will check it and tell..

Regards,
Balaji

balajir
28th July 2009, 10:41
Installed gstreamer-devel and gstreamer plugin base-devel successfully..

Also now configured qt with phonon, gmake and gmake-install successfully..

also set environment variable by

PATH=/usr/local/Trolltech/Qt-4.5.2/bin:$PATH
export PATH

Now i dont know how to run sample phonon example in linux..?

I went to the example directory say "musicplayer" and tried these things

qmake -project
qmake
make
when i give make it is showing error



[root@localhost musicplayer]# ls
main.cpp mainwindow.cpp mainwindow.h Makefile musicplayer musicplayer.debug musicplayer.pro
[root@localhost musicplayer]# qmake -project
[root@localhost musicplayer]# qmake
[root@localhost musicplayer]# make
g++ -c -pipe -O2 -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../mkspecs/linux-g++ -I. -I../../../include/QtCore -I../../../include/QtGui -I../../../include -I. -I. -o main.o main.cpp
In file included from main.cpp:43:
mainwindow.h:46:18: error: Phonon: No such file or directory
mainwindow.h:47:30: error: Phonon/AudioOutput: No such file or directory
mainwindow.h:48:29: error: Phonon/SeekSlider: No such file or directory
mainwindow.h:49:30: error: Phonon/MediaObject: No such file or directory
mainwindow.h:50:31: error: Phonon/VolumeSlider: No such file or directory
mainwindow.h:51:38: error: Phonon/BackendCapabilities: No such file or directory
In file included from main.cpp:43:
mainwindow.h:78: error: âPhononâ has not been declared
mainwindow.h:78: error: expected â,â or â...â before ânewStateâ
mainwindow.h:80: error: expected â,â or â...â before â::â token
mainwindow.h:80: error: ISO C++ forbids declaration of âPhononâ with no type
mainwindow.h:81: error: âPhononâ has not been declared
mainwindow.h:81: error: expected â,â or â...â before ânewStateâ
mainwindow.h:92: error: âPhononâ has not been declared
mainwindow.h:92: error: ISO C++ forbids declaration of âSeekSliderâ with no type
mainwindow.h:92: error: expected â;â before â*â token
mainwindow.h:93: error: âPhononâ has not been declared
mainwindow.h:93: error: ISO C++ forbids declaration of âMediaObjectâ with no type
mainwindow.h:93: error: expected â;â before â*â token
mainwindow.h:94: error: âPhononâ has not been declared
mainwindow.h:94: error: ISO C++ forbids declaration of âMediaObjectâ with no type
mainwindow.h:94: error: expected â;â before â*â token
mainwindow.h:95: error: âPhononâ has not been declared
mainwindow.h:95: error: ISO C++ forbids declaration of âAudioOutputâ with no type
mainwindow.h:95: error: expected â;â before â*â token
mainwindow.h:96: error: âPhononâ has not been declared
mainwindow.h:96: error: ISO C++ forbids declaration of âVolumeSliderâ with no type
mainwindow.h:96: error: expected â;â before â*â token
mainwindow.h:97: error: âPhononâ was not declared in this scope
mainwindow.h:97: error: template argument 1 is invalid
make: *** [main.o] Error 1
[root@localhost musicplayer]# ls
main.cpp mainwindow.cpp mainwindow.h Makefile musicplayer musicplayer.debug musicplayer.pro
[root@localhost musicplayer]#


Kindly help me what i should do..

Thnaks,
Balaji.S.R

jpn
28th July 2009, 10:54
You should have NOT run "qmake -project". The example already had a properly working .pro file. Restore the original .pro file from the tarball and leave out the "qmake -project" step this time.

balajir
28th July 2009, 11:08
How to restore the original .pro file from the tarball?

How to run phonon on Qt examples?

yogeshgokul
28th July 2009, 11:16
How to restore the original .pro file from the tarball?
Or you just add
Qt += phonon
in your .pro file.



How to run phonon on Qt examples?

run ?? :confused::confused::confused:

If you want to add phonon module, just add above line.

balajir
28th July 2009, 11:24
Even basic examples are not running properly(not phonon)

.pro is already created in QT examples..

I just did

qmake application.pro
qmake
./application

But when i give ./application to run, it throws an error that

"Cannot connect to the X server"

Kindly help me..

Balaji.S.R

yogeshgokul
28th July 2009, 11:30
Why 2 times, you are calling "qmake" ?:confused::confused:
"qmake" never builds your project.
Would have called "make".
Please, refer QtAssistant, I think you require some basics.;)

jpn
28th July 2009, 11:31
"Cannot connect to the X server"

This means you are not using qmake from Qt/X11 4.5.2 as you claim, but from Qt for Embedded Linux. What does "qmake -v" output?

balajir
28th July 2009, 11:34
Ya i know that..

I want you to see this once

http://linuxhelp.blogspot.com/2006/01/creating-and-compiling-qt-projects-on.html

By doing qmake name.pro will create a platform specific Makefile.. This Make file is not in my directory.. Just cpp,.h and .pro files alone in directory so I gave qmake name.pro to create a Makefile..

Are you saying because of giving qmake i am getting the previous errors?

Thanks,
Balaji.S.R

balajir
28th July 2009, 11:41
This means you are not using qmake from Qt/X11 4.5.2 as you claim, but from Qt for Embedded Linux. What does "qmake -v" output?

Sorry I dont understand...

Kindly tell me clearly what i should do to solve the error and run a phonon example..

Also whats the exact problem..?

Balaji.S.R

jpn
28th July 2009, 11:49
Please learn to use your computer first. Maybe then come back to programming.

balajir
28th July 2009, 12:14
Please learn to use your computer first. Maybe then come back to programming.

I know to use my Computer.. I myself find a solution for my problem......

Anyways Thanks for your advice and help...

balajir
28th July 2009, 12:34
qmake -v output is


QMake version 2.01a
Using Qt version 4.5.2 in /usr/local/Trolltech/Qt-4.5.2/lib

jpn
28th July 2009, 13:23
Oops, I somehow misread "Cannot connect to the X server" as "Cannot connect to the QWS server". :) Ok, so do you have an X server running? Anyhow this problem is not related to Qt, it's related to your environment.

balajir
29th July 2009, 06:09
[QUOTE=jpn;111377]do you have an X server running? QUOTE]

I checked whether Xserer is there...



[root@localhost /]# locate Xserver
/etc/X11/xdm/Xservers
/etc/kde/kdm/Xservers
/usr/share/man/man1/Xserver.1.gz
[root@localhost /]#


and when I tried to startX



[root@localhost /]# startx
xauth: creating new authority file /root/.serverauth.14699
xauth: creating new authority file /root/.Xauthority
xauth: creating new authority file /root/.Xauthority


Fatal server error:
Server is already active for display 0
If this server is no longer running, remove /tmp/.X0-lock
and start again.

Invalid MIT-MAGIC-COOKIE-1 keygiving up.
xinit: Resource temporarily unavailable (errno 11): unable to connect to X server
xinit: No such process (errno 3): Server error.
[root@localhost /]#


If this place is not to ask these questions then Could you please tell me where I can ask...

Regards,
Balaji.S.R

TTGator
16th September 2009, 15:13
I assume you have figured out by now, but I think you need to run

./application -qws

Rajeshsan
11th February 2010, 11:14
Hi to all.. plz i need to install phonon on Linux PC(Slackware). I tried to install ALSA first, I'm not able to do it. Please help me who have compiled phonon on Linux. I need to know which all the packages of ALSA should be installed first. First i will install ALSA then i will compile phonon.. Please assist me..