strange "active" problem about CActive object and camera callback function

Login to reply to this topic.
Fri, 2007-11-23 03:29
Joined: 2007-11-18
Forum posts: 3

now,i am developing a 2d barcode reader system. the camera preview the barcode,and the decoder model just recognise the frame continuely ,when decodeing is ok,it will stop view finder and show the result.my english is not very good ,here is my code

void CCameraCaptureEngine::ViewFinderFrameReady(CFbsBitmap& aFrame)
{
aFrame.LockHeap();

TUint8* dataAddr=(TUint8*)(aFrame.DataAddress());//the data

iCodeSearch->InputData(dataAddr,240,180,32);//assigment

TInt result=iCodeSearch->Recognise(0);// if it decode correctly

aFrame.UnlockHeap();

if(result==1)//if correct
{
iCodeSearch->OutPutData(iresult);
AsyncStateChange(ERecognizeSucc);//stop preview
}
iController.ViewFinding( aFrame );//show the frame to the screen

}

now the problem comes,when i first start the app(namely start the view finder)it can decode very well,when i restart the view finder for 2nd time through UI,it can't decode any more ,but the preview still goes well .if i pop the menu ,the icodeSearch is "actived",it begin works,and decode quickly.i just press the key to pop meun and do nothing.the why every time i need to pop the menu ,the icodesearch begin to work.
the CCameraCaptureEngine is CActive object

  • Login to reply to this topic.