November 23, 2011

lisec lisec
Lab Rat
2 posts

QtMultimediaKit ignores Wi-Fi connection

 

TL;DR QtMultimediaKit streams files only over 3G :(

I’m having some issues with QtMultimediaKit and Audo/Video elements on Symbian (C7-00 with Anna update). The problem occurs when I try to play a video (or an audio file) from an URL— app tries to activate 3G connection and download files over that. If I run the app in ‘Offline’ profile an ‘Access denied’ popup is shown while the rest of the app follows the profile and works accordingly (XMLHttpRequests issued from QML).

I tried with both Video and Audio QML elements as well as QMediaPlayer class from C++, unfortunately, it fails in all cases.

  1. Item {
  2.   Audio {
  3.     id: audioPlayer
  4.     muted: false
  5.     autoLoad: true
  6.     source: "http://dl.dropbox.com/u/61185/Spiralling.mp3"
  7.   }
  8.   Button { text: "Play"; onClicked: audoPlayer.play() }
  9. }

After a minute or so it should report NetworkError and ‘Symbian:-34’ in the ‘errorString’ property, which apparently stands for ‘network connection closed’.

Am I doing something wrong? Because I can’t see why it’s not working :(

Also, possibly unrelated, I couldn’t include ‘bearer’ and ‘multimedia’ modules in the same app, it spits some errors regarding QNetworkConfiguration being an incomplete type or something like that.

2 replies

November 24, 2011

chriadam chriadam
Ant Farmer
118 posts

Hi, can you check “Settings->ApplicationSettings->Videos->Access Point In Use” and see if it will use wifi if you set that manually? I believe that you should be able to modify the access point to use via mobility APIs also, but I don’t personally know how (bearer management APIs or system info APIs I’d guess).

If you can’t use bearer and multimedia together, that sounds … like a bug. Can you post the full errors you see when you attempt to do so? I assume that you have all the required capabilities added to your .pro file?

November 24, 2011

lisec lisec
Lab Rat
2 posts

That really did help, I wasn’t even aware of those settings (they do feel a bit unintuitive).

https://gist.github.com/1391710 — the other error occurs when I include bearer and multimedia APIs (MOBILITY += bearer multimedia) in the .pro file (with NetworkServices, ReadUserData and WriteUserData capabilities) and then #include <QMediaPlayer> and #include <QNetworkSession>. I guess the first few lines of the log say everything… I should have read them earlier :)

Thank you for your help!

 
  ‹‹ Problem running Qt Embedded Application      Cross compiling library not found ››

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