This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Qt, Phonon and KDE

Tags: None
(comma "," separated)
ptyxs
Registered Member
Posts
8
Karma
0

Qt, Phonon and KDE

Mon Jul 19, 2010 6:48 pm
Hi,
a small Qt program using Phonon like the following one, wrote and compiled under Qt Creator 2.0 and Qt 4.6.3 compiles. However, it runs under GNOME and IceWM, but NOT under KDE 4.4.3, under my Mandriva Linux 2010.1 Pwp : any attempt to run it gives an error message :
Code: Select all
/home/cassian/essai_phonon-build-desktop/essai_phonon: symbol lookup error: /usr/lib/kde4/plugins/phonon_backend/phonon_gstreamer.so: undefined symbol: _ZN6Phonon12PulseSupport11getInstanceEv


and the program stops immediately. Any Qt program not using Phonon runs correctly. Why this problem with Phonon under KDE ?? Do you know any possibility to avoid it ?

Here is this sample program :

Code: Select all
#include <QtGui>

#include <phonon/AudioOutput>
#include <phonon/MediaObject>

int main(int argc, char * argv[])
{
    QApplication a(argc, argv);
    a.setApplicationName("choin");

    Phonon::MediaObject  *mediaObject;
    mediaObject = createPlayer(Phonon::NotificationCategory);
mediaObject->setCurrentSource(QUrl::fromLocalFile("/home/cassian/Programmes/C++/sandbox/svn/zzg/sounds/Explosion.wav"));
    mediaObject->play();

    return a.exec();
}

Last edited by ptyxs on Tue Jul 20, 2010 6:00 am, edited 1 time in total.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Qt, Phonon and KDE

Tue Jul 20, 2010 4:35 am
The problem is that the Phonon library you have built does not have Pulseaudio support compiled in, yet the GStreamer backend present does have it compiled in.

Please recompile Phonon completely, with the appropriate *-devel packages installed. Also ensure that your libraries are found correctly, by setting LD_LIBRARY_PATHS to the appropriate library directories.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
ptyxs
Registered Member
Posts
8
Karma
0

Re: Qt, Phonon and KDE

Tue Jul 20, 2010 6:12 am
Thank you for your answer.

I installed Phonon indirectly from the .bin file "Qt Sdk for Linux" from the official Qt site.


On my Linux distribution repositories I don't see any specific Phonon package. Nor do I find any specific Phonon package on Qt offcial site.

Where do you suggest I can find a specific appropriate Phonon package to compile on my computer ?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Qt, Phonon and KDE

Tue Jul 20, 2010 6:22 am
Qt ships with it a snapshot of Phonon. Unfortunately, all versions prior to Qt 4.7 contain and outdated snapshot.

Phonon uses Git as it's source code management system, and can be cloned from http://gitorious.org/phonon/phonon


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
ptyxs
Registered Member
Posts
8
Karma
0

Re: Qt, Phonon and KDE

Tue Jul 20, 2010 8:22 am
Thanks for these information.

I am however rather surprised that KDE (differently than other Linux Desktops) could not make it possible to run current Qt Phonon version under KDE environments, as long as Qt 4.7 is not available !
Please care a lot for your users comfort !!
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Qt, Phonon and KDE

Wed Jul 21, 2010 4:41 am
The problem in question is that KDE is the Phonon Upstream, and Qt simply ships a snapshot of it. As a result, recent enhancements, such as the addition of Pulseaudio support, and the ability to retrieve raw audio and video data were done upstream in KDE, and only recently synced in by Qt.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft