×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    12

    MMAPI getSnapshot() method takes too much time PLEASE HELP

    I used LWUIT as gui...if anyone gives any suggestion, I appreciate…

    My main problem is that VideoControl.getSnapshot() method takes too much time to return with a byte array…(resolution=2048x1536=>~30second ------ resolution=640x480=>4sec)

    I made a lil experiment on my N78 to see the timing issue while taking photo…I made a function to capture a photo and it also records the current time at some points and writes them to a timing.txt file to understand which method waste how much time…

    private void imageCapture()
    {

    // FIRST point to measure the wasted time by getControl() method
    String time="(1)"+System.currentTimeMillis();
    vc=(VideoControl)vrPlayer.getControl("VideoControl");
    // SECOND point to measure the wasted time by vc.getSnapshot() method
    time=time+"(2)"+System.currentTimeMillis();
    try
    {
    //I tried this line with different resolutions
    capturedImage=vc.getSnapshot("encoding=image/jpg&quality=100&width=2048&height=1536");
    }
    catch (MediaException e1)
    {
    // Auto-generated catch block
    e1.printStackTrace();
    }
    time=time+"(3)"+System.currentTimeMillis();
    mdcmp.stop();
    time=time+"(4)"+System.currentTimeMillis();
    showCaptured();
    time=time+"(5)"+System.currentTimeMillis();
    writeFile();
    time=time+"(6)"+System.currentTimeMillis();

    .....
    }
    ////////////////////////////////////////////////RESULT/////////////////////////////////////////////////////
    vrPlayer.getControl("VideoControl");
    wasted time= 1ms
    vc.getSnapshot();
    ****wasted time= 4080ms****
    mdcmp.stop();
    wasted time= 1ms
    showCaptured();
    wasted time= 457ms
    file size=32.8kb
    resolution=640x480

    vrPlayer.getControl("VideoControl");
    wasted time= 1ms
    vc.getSnapshot();
    ****wasted time= 30380ms****30sec
    mdcmp.stop();
    wasted time= 1ms
    showCaptured();
    wasted time= 4200ms
    file size=978.5kb
    resolution=2048x1536

  2. #2
    Registered User
    Join Date
    Aug 2009
    Posts
    12

    Re: MMAPI getSnapshot() method takes too much time PLEASE HELP

    Is there anyone who achived taking photo in high resolution,displayed and saved it in a few seconds...native camera does

  3. #3
    Regular Contributor
    Join Date
    Oct 2007
    Location
    Pune
    Posts
    189

    Re: MMAPI getSnapshot() method takes too much time PLEASE HELP

    Hello,

    You can change the resolution of 160x120 pixels, if the target is to achieve the highest number of pictures in a small time.

    You can change the storage from byte[] of the images as elements of a vector, a hashtable and an array.

    Use JPEG encoding for good quality of taken photo and good speed performacne.

    Hope this helps you.
    Regards,
    Dinanath


    It's a matter of attitude.

  4. #4
    Registered User
    Join Date
    Aug 2009
    Posts
    12

    Re: MMAPI getSnapshot() method takes too much time PLEASE HELP

    Thank you for your advise but My target is to take photo in high resolution with reasonable time...
    As i said the main problem is that
    ----vc.getSnapshot("encoding=image/jpeg&quality=100&width=2048&height=1536");---- this function takes 30seconds for resolution=2048x1536 or takes 4seconds for resolution=640x480 .... yes if we decrease the resolution time wasted is also decrease but this is not what i want..i wonder that is there anyone tried to take in high resolution and what is the result...may it be caused because of the phone model ?? or i am doing something wrong, i really confused...

Similar Threads

  1. mmapi getSnapshot function :(
    By aqibarain in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2010-05-14, 13:09
  2. Network Time Protocol(Automatic Time Update)
    By lokesh_kumar_s in forum Symbian
    Replies: 1
    Last Post: 2009-07-31, 09:48
  3. Log time bug on 3650. Help me please.
    By hemenkap in forum General Development Questions
    Replies: 2
    Last Post: 2005-06-30, 07:18
  4. Conection - how long time it takes?
    By koperak in forum Bluetooth Technology
    Replies: 2
    Last Post: 2002-12-18, 10:48
  5. SMS time stamp format with time zone parameter?
    By turunhe in forum General Messaging
    Replies: 1
    Last Post: 2002-06-11, 07: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
  •  
×