Launching symbian media player for video streaming in Qt project

Hello,

Sometimes when you are working with video streaming in
Qt usage of symbian realplayer for playing it might be the optimal
solution.

There are 3 ways for launching
system player with custom URL as a parameter in Qt: the right approach, the
working approach and the new (for me) approach.

  1. Right approach is to launch URL with QDesktopServices::openUrl() as described here. Thats how
    things should be done by Qt framework design. In fact QDesktopServices passing
    its parameter to system handler and system should decide what to do with it.
    So, "rtsp://" url schema should be opened in realplayer, "mailto:://" schema should
    launch the email service, "tel://" should launch phone dialer
    etc. But in Symbian^3 its not working as expected for most of URL schemas. For ex.,
    "rtsp://" is not working. That
    should be fixed in Qt 4.7.2 – i already posted a bug in qt bugtracker for that
    (QTBUG-15136).

    But for URL schema (http://) it works. With one
    disadvantage: default "http://"
    handler is the system browser. So your URL will be opened in Web Browser and only
    after that browser will launch a system player. Same things can be achieved with better UX.

  2. Working approach is to launch system media player directly and pass URL to it as
    parameter. That can be done from Symbian C++ code as described here. Instructions and sample Qt application are
    attached. Disadvantage of that approach is
    SwEvent capability requirement. That mean you’ll need a DevCert certificate or pass Open Signed Online to try your app.
  3. Recently i found 3rd way for launching URLs in system player from Qt: "Simply
    create a .ram file, for example foo.ram into file system. The file must contain
    nothing but the url of the video stream. Then simply open that file with QDesktopServices::openUrl(QUrl::fromLocalFile("c:\test.ram"))
    The source is on DiBo.Its really working at least for S^3 devices with both rtsp:// and http:// transports. I guess this is a preferable solution nowadays.  


P.S. For soultion for mailto:// schema take a look on QTBUG-15136.

instructions.txt

RTSPTest1.zip

headers.zip

Leave a Reply