Can backend of Phonon in Symbian support mp3 with an url?
Page |
1 |
Thanks xsacha and tamhanna who give me so much help in the http://developer.qt.nokia.com/forums/viewthread/2161 [developer.qt.nokia.com]
Now I have another new problems:
I could play the RTSP protocol URL,like “rtsp://qt2.netro.ca/princess_54.3gp” ,etc.
But I still couldn’t play the URL like “http://www.sheyy.net/mp3/she/music7.mp3”.
when I load the http URL, the app showed “Loading clio failed: Not supported”
I supposed that the backend not support the http protocol.
My qt for Symbian is 4.7.1 and mobility is 1.1.0. I used Nokia 5230 and 5800 to test my app.
Anyone would help me? Or anyone would show me how to play http-mp3-URL with Qt?
Thx very much.
19 replies
Hi,Sacha.
For your reminding, I search gstreamer for Symbian, and found this article gstream on symbian [wiki.forum.nokia.com]++
I decided to transplant the Gstreamer to Symbian, and then I found that the Gstreamer just support AU, RAW, WAV, AMR-NB, G711, G729, ILBC. file. It seems not support mp3 file.
The QMediaPlayer could play mp3 files via internet. But I haven’t had a success on the hard device(5th or 3rd)
The test code was very simple:
- QMediaPlayer *player=new QMediaPlayer(this);
- player->setVolume(60);
- player->play();
I build a project of a Qt mobile Application(with UI). and add the code above to the constructor of the project.
I tested the app to play local mp3 file if I changed the URL as a local URL.
Oh,Sacha. I install the newest creator2.1 RC. and I found there are many Warning in my project when I built the project.
It shows:
- WARNING: \QtProject\audioTest\AUDIOTEST_0XE2835CA1.MMP(53) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\osextensions\stdapis\" not found
- WARNING: \QtProject\audioTest\AUDIOTEST_0XE2835CA1.MMP(54) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\osextensions\stdapis\sys\" not found
- WARNING: \QtProject\audioTest\AUDIOTEST_0XE2835CA1.MMP(57) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\oem\" not found
- WARNING: \QtProject\audioTest\AUDIOTEST_0XE2835CA1.MMP(60) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\osextensions\" not found
- WARNING: \QtProject\audioTest\AUDIOTEST_0XE2835CA1.MMP(61) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\domain\osextensions\" not found
- WARNING: \QtProject\audioTest\AUDIOTEST_0XE2835CA1.MMP(62) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\domain\osextensions\loc\" not found
- WARNING: \QtProject\audioTest\AUDIOTEST_0XE2835CA1.MMP(64) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\domain\osextensions\loc\sc\" not found
- WARNING: \QtProject\audioTest\AUDIOTEST_0XE2835CA1.MMP(65) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\domain\middleware\loc\sc\" not found
- WARNING: \QtProject\audioTest\AUDIOTEST_0XE2835CA1.MMP(70) : SYSTEMINCLUDE path "\S60\devices\S60_5th_Edition_SDK_v1.0\epoc32\include\osextensions\stdapis\stlport\" not found
Does the warning effect my project?
Those warnings are normal. I always get them. It’s just including some paths in case they are there I think.
I did not think GStreamer is the problem for Symbian, but for Linux. There may be a similar problem with mp3 codecs though.
I will try this code out and find why it doesn’t work, thanks!
I have hope because when searching for bugs I found none except for the N8 (initial firmware can’t play mp3 with qmediaplayer).
Thank you very much for your test.
The app will emit a signal while the app can’t play the music.
I have just tried to catch errors by a messagebox when running the app with using SIGNAL/SLOT.
the error I catch are “ResourceError” and “AccessDeniedError”, It seems that the QMediaPlayer play files depended on the codec on the phone, I think.
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()
- {
- }
Then run the app on the device, click Open then Play.
So it seems QMediaPlayer works, Phonon doesn’t work.
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;
- if (!fileName.isEmpty())
- fileNames << fileName;
- #else
- #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. = =
Yes. I download from here [qt.nokia.com]
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 [doc.qt.nokia.com] says to use this:
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 [wiki.forum.nokia.com]
You must log in to post a reply. Not a member yet? Register here!


