Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Can backend of Phonon in Symbian support mp3 with an url?
Forum Updated to NodeBB v4.3 + New Features

Can backend of Phonon in Symbian support mp3 with an url?

Scheduled Pinned Locked Moved Mobile and Embedded
20 Posts 4 Posters 9.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xsacha
    wrote on last edited by
    #8

    Using: C:\Qt\4.7.1-symbian\demos\qmediaplayer\qmediaplayer.pro
    It uses Phonon back-end and plays MP3s perfectly on Nokia 5800 here :)

    Edit: Nevermind, only local files. HTTP not working as you said.

    Edit#2: Got it working using HTTP with: C:\Qt\mobility110\demos\player\player.pro

    In 'player.cpp' change the following function:
    @
    void Player::open()
    {
    playlist->addMedia(QUrl("http://www.sheyy.net/mp3/she/music7.mp3"));
    }
    @
    Then run the app on the device, click Open then Play.

    So it seems QMediaPlayer works, Phonon doesn't work.

    • Sacha
    1 Reply Last reply
    0
    • H Offline
      H Offline
      hisong1988
      wrote on last edited by
      #9

      Hi,Sacha. I'm sorry to bother you again.

      I'm almost in desperation.

      I try as you said above: I add the code to the open() function the following:
      @
      void Player::open()
      {
      #ifdef Q_WS_MAEMO_5
      QStringList fileNames;
      QString fileName = QFileDialog::getOpenFileName(this, tr("Open Files"), "/");
      if (!fileName.isEmpty())
      fileNames << fileName;
      #else
      QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Open Files"));
      playlist->addMedia(QUrl("http://www.sheyy.net/mp3/she/music7.mp3"));*
      #endif
      addToPlaylist(fileNames);
      }
      @

      and I built the project,I clicked "open", and then arose a dialog,and I cancel it.
      the "music" item appeared. I clicked the "music7.mp3" item.
      and then the app showed "loading" and then "Buffering 0%",and last: no sound.
      I also tested it on the 5800 device.

      I could see the active network.
      the player can play the local mp3 file. = =

      I am still searching for....

      1 Reply Last reply
      0
      • X Offline
        X Offline
        xsacha
        wrote on last edited by
        #10

        Did it connect to a network? You saw it connect to WiFi/3G? It may be that networking was not enabled.

        • Sacha
        1 Reply Last reply
        0
        • H Offline
          H Offline
          hisong1988
          wrote on last edited by
          #11

          Sorry to reply so late.

          I can use the network to surf the internet. so the network is all right.
          I couldn't use 3G now. only I could use are GSM and WIFI.

          I am still searching for....

          1 Reply Last reply
          0
          • X Offline
            X Offline
            xsacha
            wrote on last edited by
            #12

            Can you be sure you are compiling with QtMobility 1.10 and not QtMobility 1.02?
            It is actually a bit difficult to install over NokiaQtSDK.

            • Sacha
            1 Reply Last reply
            0
            • H Offline
              H Offline
              hisong1988
              wrote on last edited by
              #13

              Yes. I download from "here":http://qt.nokia.com/products/qt-addons/mobility

              I am still searching for....

              1 Reply Last reply
              0
              • X Offline
                X Offline
                xsacha
                wrote on last edited by
                #14

                Did you compile? Just wondering how you installed. I think you may still be using 1.02?

                Do you have playlist->setCurrentIndex(..) or playlist->setCurrentPosition(..)?
                setCurrentIndex is 1.02 API, setCurrentPosition is 1.10 API afaik.

                I ask because I just installed 1.02 and got this thing with Buffering.. 0%. It seems the HTTP loading in 1.02 is just empty (no code).

                The "documentation":http://doc.qt.nokia.com/qtmobility-1.1.0/multimedia.html#audio says to use this:
                @
                player = new QMediaPlayer;

                playlist = new QMediaPlaylist(player);
                playlist->addMedia(QUrl("http://example.com/myfile1.mp3"));
                playlist->addMedia(QUrl("http://example.com/myfile2.mp3"));
                ...
                playlist->setCurrentPosition(1);
                player->play();
                @

                • Sacha
                1 Reply Last reply
                0
                • H Offline
                  H Offline
                  hisong1988
                  wrote on last edited by
                  #15

                  Oh,I never changed the version of Qt mobility.

                  I didn't compile the Qt mobility. I downloaded the binary version of mobility. and decompression to the corresponding directory followed the "course":http://wiki.forum.nokia.com/index.php/Setting_up_environment_for_Qt_Mobility_API

                  I am still searching for....

                  1 Reply Last reply
                  0
                  • X Offline
                    X Offline
                    xsacha
                    wrote on last edited by
                    #16

                    Oh, I just checked the QtMobility 1.10 they offer at that link. Very strange, it seems outdated?? It also uses setCurrentIndex.
                    I don't know what's going on honestly, lol.

                    • Sacha
                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      hisong1988
                      wrote on last edited by
                      #17

                      Hello,Sacha, are you available now?

                      I searched for the answer for my question,but I failed. You said you had run the app developed with the QMediaPlayer on 5800, would you post the .sis file or the source code to me for a test? I have a 5800 too.

                      My Email is hisong1988@gmail.com. Thanks very much...

                      I am still searching for....

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        anselmolsm
                        wrote on last edited by
                        #18

                        hisong1988, just a tip: You can send private messages using the "send email" link in the user profile page. For example, "xsacha":http://developer.qt.nokia.com/member/5268 :-)

                        Anselmo L. S. Melo (anselmolsm)

                        1 Reply Last reply
                        0
                        • H Offline
                          H Offline
                          hisong1988
                          wrote on last edited by
                          #19

                          hi,anselmolsm. Thank you very much.
                          I''ve always thought that only I can do is to use the link.

                          I am still searching for....

                          1 Reply Last reply
                          0
                          • D Offline
                            D Offline
                            darshanh
                            wrote on last edited by
                            #20

                            Hi,

                            I am facing the same problem...
                            When I am trying to play the music file over the network using http, no sound is played.

                            I am able to play the files with rtsp url.

                            While playing the mp3 file using Phonon, an error is displayed "Clip failed. Format not supported".

                            The app does not give any error while using QMediaPlayer. But buffering is always 0% and no sound is played.

                            I am using Qt 4.7.1 and mobility 1.1.

                            Please let me know the comments.

                            1 Reply Last reply
                            0

                            • Login

                            • Login or register to search.
                            • First post
                              Last post
                            0
                            • Categories
                            • Recent
                            • Tags
                            • Popular
                            • Users
                            • Groups
                            • Search
                            • Get Qt Extensions
                            • Unsolved