×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jun 2013
    Posts
    2

    playing 3gp video on Asha devices.

    Hello!
    I trying to play video on Asha devices. (I using 311 for test).
    So, I have 14mB video file in filesystem of phone.
    When I play it from SE emulator, it work good.
    When I used real Asha 311 device, i have Out of memory, though I used stream.
    Is it possible to playback these big 3gp files on Asha ?


    String path = "file://localhost/" + currDirName + fileName;
    FileConnection fc = (FileConnection)Connector.open(path);

    player = Manager.createPlayer(fc.openInputStream(), "video/3gpp");
    // a listener to handle player events like starting, closing etc
    player.addPlayerListener(this);

    player.setLoopCount(-1); // play indefinitely
    player.prefetch(); // prefetch
    player.realize(); // realize

    player.start(); // and start

    ///and playerListener-
    VideoControl vc = null;
    if((vc = (VideoControl)player.getControl("VideoControl")) != null)
    {
    Item videoDisp =(Item)vc.initDisplayMode(vc.USE_GUI_PRIMITIVE, null);
    form.append(videoDisp);
    }
    display.setCurrent(form);

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,696

    Re: playing 3gp video on Asha devices.

    If this file seems to be too large, you may consider testing with a smaller one first. Even with one you can bundle in the JAR file. You can check this old know issue, if it helps: http://www.developer.nokia.com/Commu..._(Known_Issue)
    Is that 'localhost' thing valid? It may be safer to check the registry, see http://www.developer.nokia.com/Commu...ems_in_Java_ME (and its links to other articles)

  3. #3
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    686

    Re: playing 3gp video on Asha devices.

    Hi,

    First of all you need to add the following to your jad attributes
    progressive_download: enabled
    Secondly you cant use the InputStream method of the manager.createPlayer you need to use the URL method and pass the FILE path
    also you can skip the prefetch and realize ( you also have them in the wrong order since realize state comes before the prefetched state) and just use player.start() without the other two.

    It should work for you.

  4. #4
    Registered User
    Join Date
    Jun 2013
    Posts
    2

    Re: playing 3gp video on Asha devices.

    Thanks for the help, but unfortunately, did not help. I added an attribute to the jad file, removed prefetch and release, as before, it's still working on the emulator, but on real device i have Out of memory

  5. #5
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    686

    Re: playing 3gp video on Asha devices.

    did you also open the connector directly with the file path and NOT the inputstream ?

Similar Threads

  1. rtsp links playing on asha device with webapps
    By pctAsha in forum Nokia Asha Web Apps
    Replies: 0
    Last Post: 2013-06-10, 13:14
  2. Asha Platform devices are now available in Publishing tool
    By Kalle Nevala in forum Publishing to Nokia Store
    Replies: 4
    Last Post: 2013-06-05, 12:57
  3. Images not showing on Asha devices (and maybe others) for s40 web app
    By peoplepilot in forum Nokia Asha Web Apps
    Replies: 3
    Last Post: 2012-12-17, 07:31

Posting Permissions

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