Results 1 to 2 of 2

Thread: Phonon on symbian

  1. #1
    Join Date
    Aug 2009
    Posts
    33
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Phonon on symbian

    I connot play an mp3 file on my Nokia 5800 phone. The Qt example works fine but my code does not.

    I get this error:

    [Qt Message] "Loading clip failed: Not supported"

    What am i doing wrong?


    Qt Code:
    1. void GooglePlayer:: mediaFilePlaySlot( QByteArray audioData )
    2. {
    3.  
    4. m_mediaFile = new QFile( "e:\response.mp3");
    5. m_mediaFile->open( QIODevice::ReadOnly );
    6. m_mediaFile->write( audioData );
    7. m_mediaFile->close();
    8.  
    9. m_mediaObject->setCurrentSource(Phonon::MediaSource("e:\response.mp3"));
    10. connect(m_mediaObject, SIGNAL(stateChanged(Phonon::State,Phonon::State)),
    11. this, SLOT(stateChangedSlot(Phonon::State,Phonon::State)));
    12. }
    To copy to clipboard, switch view to plain text mode 

    Qt Code:
    1. void GooglePlayer::stateChangedSlot(Phonon::State newstate,Phonon::State oldState )
    2. {
    3. qDebug()<< newstate;
    4. if ( newstate == Phonon::StoppedState )
    5. m_mediaObject->play();
    6.  
    7. if( newstate == Phonon::ErrorState )
    8. {
    9. qWarning()<< m_mediaObject->errorString();
    10. }
    11. }
    To copy to clipboard, switch view to plain text mode 


    Pro file config:

    # Allow network access on Symbian
    symbian:TARGET.CAPABILITY += NetworkServices
    symbian:TARGET.CAPABILITY += ReadUserData
    symbian:TARGET.CAPABILITY += WriteUserData
    symbian:TARGET.CAPABILITY += UserEnvironment

    QT += multimedia
    QT += network
    QT += webkit
    QT += phonon
    MOBILITY += bearer
    MOBILITY += multimedia


    Added after 1 8 minutes:


    Maybe this is my problem ...

    m_mediaFile->open( QIODevice::ReadOnly );

    Sorry I am very tired
    Last edited by emrares; 10th February 2012 at 08:13.

  2. #2
    Join Date
    Aug 2009
    Posts
    33
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Phonon on symbian

    It works now. Sorry for the stupid question, I really tired...

Similar Threads

  1. Replies: 1
    Last Post: 7th February 2012, 19:24
  2. Phonon endless stream - any phonon expert out there?
    By derektmm in forum Qt Programming
    Replies: 1
    Last Post: 23rd September 2011, 16:11
  3. phonon on symbian
    By GAUCHO in forum Qt Programming
    Replies: 2
    Last Post: 29th April 2011, 15:36
  4. Playing Ogg Vorbis with Qt Phonon on Symbian^1
    By freemind in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 16th September 2010, 14:11
  5. Replies: 1
    Last Post: 9th September 2010, 16:49

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.