Phonon or QMediaplayer: Set access point to be used
-
Hi
I'm developing an application that plays an mp3 stream via the network. With WLAN connection It can play the stream without problems (Phonon player and QMediaplayer). But under UMTS connection, it doesn't use the UMTS network but tries to open an connection to the WLAN network. If no WLAN connection exists, it gives an error. Is it possible to set the access point that phonon or qmediaplayer should use manually? Or is it a setting in the phone (i'm testing on nokia N97 with Qt 4.6.3).Cheers, Luki
-
You should be able to use the Bearer Management features of Qt Mobility 1.0 to define which access point to use:
http://doc.qt.nokia.com/qtmobility-1.0/bearer-management.html
I found that on a Symbian^3 device, I had to remove a "Streaming" UMTS access point from my access point configuration on the device to use WLAN instead of the UMTS network. Sometimes, deleting the WLAN access point also helps, although that's just a workaround. I don't know if the problem is with Symbian, Qt or something in between.
QMediaPlayer also sometimes uses a different access point compared to what QNetworkAccessManager uses (in an application where I get a list of streams via QNetworkAccessManager and then play the streams using QMediaPlayer).
There is also the option of changing priorities in the access point list on the device. You can't control this through the program, though.
-
[quote author="borut123" date="1291287396"]
I'm almost 100% sure that access point for media player on symbian phones can not be set with Qt.
The only thing you can do, is to inform the user that he should set the desired access point manually on the phone.[/quote]Shouldn't the Media Player ideally use the default/existing connection that is also used by e.g. the Web Browser? It seems to me that QMediaPlayer has some other way of determining which access point to use (as it definitely does not use the default). Is this a bug in QMediaPlayer? Or in the Symbian backend for it?
-
[quote author="borut123" date="1291291820"]
it uses the same access point as it is set for media streaming.
don't know exactly where it is set, but as I remember, it should be in realplayer's settings.
[/quote]That was helpful! It is indeed the case. For the record, on Symbian^3, you will find this setting in: Settings, Application settings, Videos, Access point in use. Funnily enough, the menu entry is called "Videos", but the title of the settings page is called Streaming settings.
There should be an option "Use default access point" or something that automatically uses whatever is configured for normal internet connections. Unfortunately, this is not a Qt issue, and I don't think there is a public Symbian bugtracker :/
-
[quote author="thp" date="1291292148"][quote author="borut123" date="1291291820"]
it uses the same access point as it is set for media streaming.
don't know exactly where it is set, but as I remember, it should be in realplayer's settings.
[/quote]That was helpful! It is indeed the case. For the record, on Symbian^3, you will find this setting in: Settings, Application settings, Videos, Access point in use. Funnily enough, the menu entry is called "Videos", but the title of the settings page is called Streaming settings.
There should be an option "Use default access point" or something that automatically uses whatever is configured for normal internet connections. Unfortunately, this is not a Qt issue, and I don't think there is a public Symbian bugtracker :/[/quote]
Well you can raise a bug report with symbian.org bugtracker. The site will be closed only by end of this month. However, the bugs raised will be notified to the package owner.
-
Yeah, indeed. In the meantime I found out the same. You have to set the access point manually in realplayer streaming settings. But I raised a bug report in Qt. I think this could be a Qt issue, as it should be possible to set the access point directly in phonon or qmediaplayer.
Cheers
-
Hello thp, Your suggestions were very helpful.Now I could play the RTSP URL through the QMediaPlayer and MediaObject of Phonon.But I still cound'n play mp3 via internet
When I use MeidaObject of Phonon, it showed:"Loading clio failed: Not supported"
It seems that the backend of Phonon not supported the http mp3 stream.When I use QMediaPlayer of QtMobility, It showed nothing,but I could see the active network.
My qt for symbian is 4.7.1 and mobility is 1.1.0. I used nokia5230 and 5800 to test my app.
Now,what should I do? would you help me,thx.
-
[quote author="hisong1988" date="1291715137"]When I use QMediaPlayer of QtMobility, It showed nothing,but I could see the active network.
My qt for symbian is 4.7.1 and mobility is 1.1.0. I used nokia5230 and 5800 to test my app.[/quote]
You could try player->setVolume() and make sure that you are using the "Generic" profile on your mobile phone, not the "Silent" profile. Don't know if it's a problem on Symbian, but it is on Maemo. (I'm assuming that if you say "active network", it means that you can see the data being requested and streamed, so maybe the problem is just that you don't hear it :)
You can also connect to the positionChanged(qint64) signal of the QMediaPlayer and see if the position gets updated when playing (i.e. use qDebug() to output the position on the console).
-
Hello thp,
thank you so much for talking back!
I had seted the Volume certainly.And my phone is "Generic" all the time.I also installed an software to monitor the flow through network when I using QMediaPlayer.
The software I installed showed that the app had generated almost 10KB of network traffic characteristics. And the app would never generate any more. It's not normal.I test the QMediaPlayer to play the local file. It was working.
Now I struggle to solved how to play mp3 via a URL...... -
[quote author="hisong1988" date="1291718748"]I test the QMediaPlayer to play the local file. It was working.
Now I struggle to solved how to play mp3 via a URL......[/quote]You could try different MP3 URLs or even radio streams. Maybe the specific MP3 or URL you try to playback has some problems. Other than that, I'm out of ideas. If you can, try to minimize the code that you use to play something back (a minimal example demonstrating the problem) and post the code in a pastebin and link the pasted code here.
-
Sorry to reply for you so late.
I had already try other URLs......
Would you help me to have a try on Symbian device(3rd or 5th).
The code I writed is very simple from the book name Widely Qt for Symbian.
@
QMediaPlayer *player=new QMediaPlayer(this);
player->setMedia(QUrl("http://www.cenet.org.cn/userfiles/2009-2-9/20090209213949675.mp3"));
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.
Sorry,I don't know how to post my code in a pastebin. would you leave your Email for me? Or my Email is hisong1988@gmail.com, I could post the whole project to you.
-
[quote author="hisong1988" date="1291722235"]Would you help me to have a try on Symbian device(3rd or 5th).[/quote]
Try it on Qt Simulator. If it does work in the Simulator but not on the device, file a bug report.
It might also be an idea to check if you can access the URL via the normal media player or web browser on the device. Maybe the URL is blocked.
-
Also don't completely rely on that book as lot of things have changed. Always refer to documentation available.
-
Oh, I can use the web browser to surf Internet.
The URL is OK. I can use it on the computer.
I think I need to learn how to use Symbian SDK to develop what I need.It's so upset now.
I always think that Qt is perfect for nokia released so many versions in a short time.Thanks for the test for me.
What do you think of Qt for Symbian run on Symbian(3rd or 5th) devices?
I found there are many place need to be improved since I had been studied Qt for Symbian almost 2 month. -
[quote author="hisong1988" date="1291724952"]
What do you think of Qt for Symbian run on Symbian(3rd or 5th) devices?
I found there are many place need to be improved since I had been studied Qt for Symbian almost 2 month.[/quote]Qt for Symbian is supported on all S60 3rd ed FP 1 device onwards. Yes lots of improvements are required and thats one of the reasons you find constant update on new releases for both SDK and IDE.
-
[quote author="hisong1988" date="1291724952"]What do you think of Qt for Symbian run on Symbian(3rd or 5th) devices?[/quote]
My personal opinion? If you can choose, target only Symbian^3^, and also wait for Qt 4.7 (should be released with the next firmware update), so you can develop stuff with QML. Of course, not everyone can choose and you might want to take advantage of the greater deployment base than just relying on S^3^.
-
[quote author="xsacha" date="1291726695"]Symbian^1^ gets the same Qt functionality as Symbian^3^ as far as I know. Except multi-touch of course.
So no reason not to target it as well. You can currently deploy Qt4.6.3 apps on there.[/quote]Yes, but no Qt 4.7 / QML so far. Might come in the future, yes. But what about the performance then? Will older Symbian devices have enough power to run these apps? I'd be more than happy to be able to target Qt apps for Symbian 1 as well, but the fact is, that we are not there yet :/ There's an experimental Qt 4.7 for Symbian 3 available from Forum Nokia already, though. Let's hope it comes to Symbian1 as well.