You Are Here:

Community: Developer Discussion Boards

#1 Old need help about j2me thread! - 2007-05-14, 05:44

Join Date: Apr 2007
Posts: 29
byronlilu's Avatar
byronlilu
Offline
Registered User
I encounter a bigggg problem, which is:
I plan to develop an application on mobile phone, the application
do these following work:
1 open camera
2 capture a snap shot and createa n image
3 analyze this image (this step is very complicated computations, consuming
a lot of cpu resource)
4 if analysis is successful, then display the result, otherwise repeat step 2 - step 4

what i did is :
I creat two thread, one is used for capturing, another is analyzing image,
player is an element of my midlet, code like this:
Player player = null;

VideoControl videoControl = null;

......

// creat player
//realize
// get control
// initlize display mode

//set display full screen(true);

//set visible
// start player
......


this first thread's code like this
{
if (need capture)
capture();
else
sleep a little time
}

the second's code like this
{
// convert image to pixels

// analyze the pixels, include several big loops
}

I found the mobile phone's screen is incontinuous picture, which means
users see the pictures which delay on the screen.

i tried to change the threads' priority, failed
I tried to add sleep() in loop in the second thread,time became too long, almost 25s, it is terrible.

i really need help !
thanks for any reply!

regards
byron
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

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

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
console app running problem xcompass General Symbian C++ 3 2009-05-08 14:26
S60 SDK 3rd edition FP1 Emulator problem justteam Symbian Tools & SDKs 12 2008-03-04 05:44
Link errors when trying to Display bitmap Bkc82 Symbian Media (Graphics & Sounds) 1 2006-01-16 23:46
Is it a bug of j2me in Thread? cach2008 Mobile Java General 2 2004-02-09 02:37
How to recover from a thread in J2ME shahzad73 Mobile Java General 0 2003-02-08 10:16

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia