×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    15

    Question Playing video on Symbian and resources question

    Hello.

    I'm trying to implement application which will list available video files and it can play any of them.

    (1)The question is: I want videos to be built into the app, I want to play any by choosing it with GUI.

    Playback: I've tried Phonon::VideoPlayer and QMovie classes, each one plays movie when compiled on windows. Have not tested on Symbian yet.
    Resources: I've tried to compile video files into resource. I've added each file to the .qrc file. After a compilation there is a .cpp file containing byte arrays for each file.
    (2)The question is: I can load image from resources, but I can not load a video file. I've tried QFileInfo(":/video/some.mp4"), and exists() returns true. But trying QMovie(":/video/some.mp4"), ->frameCount returns -1. Phonon::VideoPlayer does not play it too.

    So, can you help me with the main question (1) or the derivated one (2), please?

    Thanks in advance,
    AI aka SAns.

  2. #2
    Registered User
    Join Date
    Jan 2010
    Posts
    15

    Re: Playing video on Symbian and resources question

    I've tried QFileInfo->size() and it returns the correct value(the file has exactly the same size on my HDD). I'm still not able to play video from resources.

    (3)The next question is: how to include videos with my app? It's a bad idea to make an app separately and then add videos to it's folder. Especialy since there is no folder for a common Symbian app on device.

  3. #3
    Registered User
    Join Date
    Jan 2010
    Posts
    15

    Re: Playing video on Symbian and resources question

    Is there no Qt expert to answer at least one of this questions?

  4. #4
    Registered User
    Join Date
    Jan 2010
    Posts
    15

    Howto: bundle some videos into app sis package?

    I've tried to add videos to the resources. But:
    -this results in enormous executable
    -even since FileInfo(":/some-video.mp4").exists() returns true, and even size of the file is the right one, Phonon rejects to playback file from resources

    Is there a way to distribute videos with app? And what can I do to restrict access to this videos?

  5. #5
    Registered User
    Join Date
    Mar 2008
    Posts
    26

    Thumbs down Issue Loading Phonon::MediaSource using QResource

    I cannot play a audio file when loading it from QResource using QT4.6. Based on my tests I can assure that the audio file is not corrupted and that phonon lib works, so there is something going on my code that I'm not able to catch. Here's my code:

    const QString url = "http://<my_server>/mediainfo/beep.wav"; //THIS WORKS!!
    Phonon::MediaSource msrc = Phonon::MediaSource(QUrl(url)); //THIS WORKS!!


    const QString url = ":/qrc/beep.wav"; //THIS DOES NOT WORK!!
    Phonon::MediaSource msrc = Phonon::MediaSource(url); //THIS DOES NOT WORK!!

    Phonon::MediaObject *music = Phonon::createPlayer(Phonon::NotificationCategory,msrc);
    music->play();



    Like I said "beep.wav" file is fine because when playing using QUrl, it works. I've trying loading the file from QResource using alias, putting in another directory with no success.

    Some additional information:
    - This code was working just fine on Qt 4.5.3

    - When loading phonon using "#include <Phonon/MediaObject>" gives me a error "error: Phonon/MediaObject: No such file or directory" but I'm able to compile if I use "#include <MediaObject>"

    - dpkg -l gstreamer0.10-plugins-good

    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
    |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
    ||/ Name Version Description
    +++-=============================-=============================-==========================================================================
    ii gstreamer0.10-plugins-good 0.10.16-git276-0maemo4+0m5 GStreamer plugins from the "good" set


    - dpkg -l "libqt4-*"

    Desired=Unknown/Install/Remove/Purge/Hold
    | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
    |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
    ||/ Name Version Description
    +++-=============================-=============================-==========================================================================
    ii libqt4-maemo5-core 4.6.2~git20100212-0maemo1 Qt 4 core module
    ii libqt4-maemo5-dbus 4.6.2~git20100212-0maemo1 Qt 4 D-Bus module
    ii libqt4-maemo5-dev 4.6.2~git20100212-0maemo1 Qt 4 development files
    ii libqt4-maemo5-examples 4.6.2~git20100212-0maemo1 Qt 4 Maemo5 example applications
    ii libqt4-maemo5-gui 4.6.2~git20100212-0maemo1 Qt 4 GUI module
    ii libqt4-maemo5-maemo5 4.6.2~git20100212-0maemo1 Qt 4 Maemo5 module
    ii libqt4-maemo5-multimedia 4.6.2~git20100212-0maemo1 Qt 4 Multimedia Libraries
    ii libqt4-maemo5-network 4.6.2~git20100212-0maemo1 Qt 4 network module
    ii libqt4-maemo5-opengl 4.6.2~git20100212-0maemo1 Qt 4 OpenGL module
    un libqt4-maemo5-opengl-dev <none> (no description available)
    ii libqt4-maemo5-phonon 4.6.2~git20100212-0maemo1 Qt 4 Phonon Libraries
    ii libqt4-maemo5-script 4.6.2~git20100212-0maemo1 Qt 4 script module
    ii libqt4-maemo5-sql 4.6.2~git20100212-0maemo1 Qt 4 SQL module
    un libqt4-maemo5-sql-sqlite <none> (no description available)
    ii libqt4-maemo5-svg 4.6.2~git20100212-0maemo1 Qt 4 SVG module
    ii libqt4-maemo5-test 4.6.2~git20100212-0maemo1 Qt 4 test module
    ii libqt4-maemo5-webkit 4.6.2~git20100212-0maemo1 Qt 4 WebKit module
    ii libqt4-maemo5-xml 4.6.2~git20100212-0maemo1 Qt 4 XML module
    ii libqt4-maemo5-xmlpatterns 4.6.2~git20100212-0maemo1 Qt 4 XML Patterns module

  6. #6
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Playing video on Symbian and resources question

    This was reported against Qt 4.6.x:
    http://bugreports.qt.nokia.com/browse/QTBUG-6562

Similar Threads

  1. Qt for Symbian development resources
    By liuxg in forum [Archived] Qt General ( Qt技术)
    Replies: 55
    Last Post: 2011-01-26, 04:06
  2. Replies: 1
    Last Post: 2009-04-02, 05:41
  3. Camera API on Symbian 9.1 (Nokia N80)
    By srigans1 in forum Symbian Media (Closed)
    Replies: 4
    Last Post: 2007-10-20, 05:31
  4. newbie: How to use Symbian C++ Resources!
    By Audun Holme in forum Symbian
    Replies: 5
    Last Post: 2006-06-05, 14:44
  5. resources and symbian version
    By jack44 in forum Symbian
    Replies: 0
    Last Post: 2005-03-08, 13:00

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×