Log in or register to post comments

How to stop calling "renderFrameQCAR" method.

August 4, 2011 - 3:11am #1

Hi all.

I'm downloaded all SDK and every example works fine, but now in ImageTargets example I want to replace chips and stones for my own generates images with Target Management Tool.

I've generated my target (xml & dat) for a image with 2 star rating, and replace config.xml and dat files into the original project, I am able to track the image which i uploaded using Target Management Tool.

My requirement is once the image got tracked "renderFrameQCAR" method should not be called and player should start playing the video. Currently this method is calling for every frame even after i called these methods [self onDestroy] and also [self stopCamera].

I am developing this on iPhone4.0 device with iOS4.2.1 using MACOSX 10.6.4 machine

How this can be acheived, please give your valuable suggestions. Thanks in advance.

Re: How to stop calling "renderFrameQCAR" method.

August 5, 2011 - 7:52am #6
shivintu wrote:

Thank you very much MOSR, i will try it.

I tried it, its working.Thank you.

Re: How to stop calling "renderFrameQCAR" method.

August 5, 2011 - 7:47am #5
MoSR wrote:

Hi shivintu,

I replicated your use-case and observed your symptom. Adding [view onPause] before you call [view onDestroy] will stop the renderFrameQCAR being called.

It is advisable to call these from the main thread and not from within renderFrameQCAR. Note that one or more frames may still be drawn whilst your code is responding to the scenario.

This solution is suggested from my own experimentation and has not been validated other than in my tests.

If you want to restart QCAR later, then please note the "Reinitialising QCAR" thread:

http://ar.qualcomm.at/node/2000724

Thank you very much MOSR, i will try it.

Re: How to stop calling "renderFrameQCAR" method.

August 5, 2011 - 6:39am #4

Hi shivintu,

I replicated your use-case and observed your symptom. Adding [view onPause] before you call [view onDestroy] will stop the renderFrameQCAR being called.

It is advisable to call these from the main thread and not from within renderFrameQCAR. Note that one or more frames may still be drawn whilst your code is responding to the scenario.

This solution is suggested from my own experimentation and has not been validated other than in my tests.

If you want to restart QCAR later, then please note the "Reinitialising QCAR" thread:

http://ar.qualcomm.at/node/2000724

Re: How to stop calling "renderFrameQCAR" method.

August 4, 2011 - 5:41am #3
shunt wrote:

Hi,

I am unsure what your use-case is. Do you want to stop tracking the target as soon as you detect it? Or do you want to continue to track the target but stop rendering the camera images? Or something else?

-- Steve

Hi Steve, Thanks for quick reply, yes, I want to stop tracking the target as soon as I detect it, and also need to play some video.

Re: How to stop calling "renderFrameQCAR" method.

August 4, 2011 - 5:22am #2

Hi,

I am unsure what your use-case is. Do you want to stop tracking the target as soon as you detect it? Or do you want to continue to track the target but stop rendering the camera images? Or something else?

-- Steve

Log in or register to post comments