November 28, 2010

lukiluuk lukiluuk
Lab Rat
4 posts

Phonon or QMediaplayer: Set access point to be used

Page  
1

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

23 replies

December 2, 2010

thp thp
Lab Rat
35 posts

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.

December 2, 2010

borut123 borut123
Lab Rat
72 posts

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.

December 2, 2010

thp thp
Lab Rat
35 posts
borut123 wrote:
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.

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?

December 2, 2010

borut123 borut123
Lab Rat
72 posts

yes, ideally it should.

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.

December 2, 2010

thp thp
Lab Rat
35 posts
borut123 wrote:
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.

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 :/

December 2, 2010

QtK QtK
Lab Rat
1140 posts
thp wrote:
borut123 wrote:
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.

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 :/

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.

December 6, 2010

lukiluuk lukiluuk
Lab Rat
4 posts

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

December 7, 2010

hisong1988 hisong1988
Lab Rat
72 posts

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.

 Signature 

I am still searching for….

December 7, 2010

thp thp
Lab Rat
35 posts

hisong1988 wrote:
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.

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).

December 7, 2010

hisong1988 hisong1988
Lab Rat
72 posts

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……

 Signature 

I am still searching for….

December 7, 2010

thp thp
Lab Rat
35 posts
hisong1988 wrote:
I test the QMediaPlayer to play the local file. It was working. Now I struggle to solved how to play mp3 via a URL……

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.

December 7, 2010

hisong1988 hisong1988
Lab Rat
72 posts

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.

  1.     QMediaPlayer *player=new QMediaPlayer(this);
  2.     player->setMedia(QUrl("http://www.cenet.org.cn/userfiles/2009-2-9/20090209213949675.mp3"));
  3.     player->setVolume(60);
  4.     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.

 Signature 

I am still searching for….

December 7, 2010

thp thp
Lab Rat
35 posts
hisong1988 wrote:
Would you help me to have a try on Symbian device(3rd or 5th).

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.

December 7, 2010

QtK QtK
Lab Rat
1140 posts

Also don’t completely rely on that book as lot of things have changed. Always refer to documentation available.

December 7, 2010

hisong1988 hisong1988
Lab Rat
72 posts

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.

 Signature 

I am still searching for….

Page  
1

  ‹‹ Error: PKG file does not exist, ’sis’ and ’installer_sis’ target are only supported for executables or projects with DEPLOYMENT statement      Have any way to read NOKIA phone’s SMS from PC? ››

You must log in to post a reply. Not a member yet? Register here!