Can backend of Phonon in Symbian support mp3 with an url?
Thanks xsacha and tamhanna who give me so much help in the "http://developer.qt.nokia.com/forums/viewthread/2161":http://developer.qt.nokia.com/forums/viewthread/2161
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.
And I used the QMediaPlayer of QtMobility to play the Http URL, there is no effect.
It showed nothing only I could see the active network.
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.
I'm pretty sure it doesn't mind the protocol (http), but might not like mp3. I had problems with it on Ubuntu until I included gstreamer backend for Phonon.
If you have some test code that just plays an mp3/3gp with Qt (Phonon/QMediaPlayer), I could test it out and try and get it to work for you.
For your reminding, I search gstreamer for Symbian, and found this article "gstream on symbian":http://wiki.forum.nokia.com/index.php/GStreamer_on_Symbian_using_Carbide_C++
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);
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.
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.
If I want to develop an app that could play music via an URL using Symbian SDK.
Waht should I do? Would you give me some hints?
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:
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:
QString fileName = QFileDialog::getOpenFileName(this, tr("Open Files"), "/");
fileNames << fileName;
QStringList fileNames = QFileDialog::getOpenFileNames(this, tr("Open Files"));
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. = =
Did it connect to a network? You saw it connect to WiFi/3G? It may be that networking was not enabled.
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.
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.
Yes. I download from "here":http://qt.nokia.com/products/qt-addons/mobility
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);
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
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.
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 email@example.com. Thanks very much...
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 :-)
hi,anselmolsm. Thank you very much.
I''ve always thought that only I can do is to use the link.
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.