unable to create phonon application on Qt


 
Thread Tools Search this Thread
Top Forums Programming unable to create phonon application on Qt
# 1  
Old 07-26-2011
Network unable to create phonon application on Qt

Hi I am new to QT.I am running Qt 4.7 on Fedora 9.My Application crashes with the the following statements. on execution of
return app.exec();
The inferior stopped because it received a signal from the Operating System.

Signal name : SIGSEGV
Signal meaning :Segmentation faultSmilie

The crash happens on call of the following
Code:
Phonon::MediaObject *music =
Phonon::createPlayer(Phonon::MusicCategory,
                      Phonon::MediaSource("/root/Desktop/song/abc.mp3"));
music->play();

I am pasting my main.cpp below. Please help.

Code:
#include <QtGui/QApplication>
#include "qmlapplicationviewer.h"
#include <iostream>
#include <fstream>
#include <string>
#include <getopt.h>
#include <id3/misc_support.h>
#include <QtGui/QWidget>
#include <QtGui/QApplication>
#include <QtCore/QTimerEvent>
#include <QtGui/QShowEvent>
#include <QtGui/QIcon>
#include <QtCore/QBasicTimer>
#include <QtGui/QAction>

#include <phonon/audiooutput.h>
#include <phonon/backendcapabilities.h>
#include <phonon/effect.h>
#include <phonon/effectparameter.h>
#include <phonon/effectwidget.h>
#include <phonon/mediaobject.h>
#include <phonon/seekslider.h>
#include <phonon/videowidget.h>
#include <phonon/volumeslider.h>
#include <phonon/mediasource.h>
 #include <Phonon>

#include <sys/types.h>
#include <sys/stat.h>

using namespace std;

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

    QmlApplicationViewer viewer;
    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
    viewer.setMainQmlFile(QLatin1String("qml/mp02/main.qml"));
    viewer.showExpanded();

    Phonon::MediaObject *music =
Phonon::createPlayer(Phonon::MusicCategory,
                      Phonon::MediaSource("/root/Desktop/song/abc.mp3"));
music->play();


    return app.exec();
}


Last edited by pludi; 07-26-2011 at 04:34 AM..
# 2  
Old 07-26-2011
You should always check NULL pointers, ie
Phonon::MediaObject *music
# 3  
Old 07-28-2011
same problem persists with the change

Hi ,I had alter the program


Phonon::MediaObject *music =new Phonon::MediaObject;
music= NULL;
music =
Phonon::createPlayer(Phonon::MusicCategory, Phonon::MediaSource("/root/Desktop/song/abc.mp3"));

if( music!= NULL)
music->play();

the problem persists even after the change.

I have a similar even when i run the qmediaplayer demo on my system.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Programming

The application was unable to start correctly(0xc0150002).

Dear Team, please help me on the issue "The application was unable to start correctly(0xc0150002).click ok to close the application" Have created the build using installshield 2012. dll was generated from VS2008. Used 3rd party libraries.Included all the libraries,dll. This was the first tme... (1 Reply)
Discussion started by: SA_Palani
1 Replies

2. Ubuntu

Which is the best application to create recovery disk?

Hi Experts.... I am using Ubuntu 12.04 LTS 32-Bit edition on my laptop I just reinstalled OS for some reason and installed many application packages using sudo as well as by downloading, now I would like to create recovery disk so that if I reinstall OS once again, I should be able to install... (7 Replies)
Discussion started by: Akshay Hegde
7 Replies

3. IP Networking

Unable to access web application hosted in same network

All, I have various web applications hosted in a client network. These web apps are accessed through a Apache web server. We have deployed a new web application server and it is not serviced through the Apache web server. So i am unable to access this applications. But i am able to access... (3 Replies)
Discussion started by: vel4ever
3 Replies

4. Red Hat

How to create PATH for a application?

hi every one In linux, how to create a PATH for a application ? i searched, but no positive response any one like me got stuck with this problem? (3 Replies)
Discussion started by: rajeshz
3 Replies

5. UNIX and Linux Applications

phonon-backend-gstreamer vs phonon-backend-vlc vs phonon-backend-xine

phonon-backend-gstreamer vs phonon-backend-vlc vs phonon-backend-xine What are the advantages and disadvantages of phonon-backend-gstreamer, phonon-backend-vlc, and phonon-backend-xine. I was reading this and got curious. ... (1 Reply)
Discussion started by: cokedude
1 Replies

6. Shell Programming and Scripting

Unable to run application using ssh

I'm testing a C++ based application (HLR) in my solaris system. Whenever i start the application remotely from some other solaris server using ssh command the application throws an error and goes down. command i used: ssh root@192.168.151.77 "./start_hlr.sh" Below is the error observed : ... (1 Reply)
Discussion started by: Arun_Linux
1 Replies

7. Shell Programming and Scripting

File creating in another path.. application unable to locate

I am submitting a concurrent program (of HOST tyme) from Oracle apps screen, The MAIN shell program submits another program, (child) which is also a Shell program. The child writes data to log file. Now the main program, read the log and do some calculations and sends the data to user through... (1 Reply)
Discussion started by: Pradeep Garine
1 Replies

8. Linux

do u know some application id that create admin id

Hi All, I got this problem with my var logs, it got failed login as admin because it doesn't exist every 15 minutes and everyday. Do you know some applications that try to create an application id as "admin"? The problem is that this is a test server, so lots of applications installed and... (2 Replies)
Discussion started by: itik
2 Replies
Login or Register to Ask a Question