List
Stop Camera Usage
Posted Date: 2018-05-14 17:55     Edited Date: 2018-05-17 5:50     Writer: inactive

Please provide your development details as below;

1. SDK Version: 3.5.1
2. Development Environment: Unity-Android, Unity-iOS
3. Tracker/Scanner: No matter
4. License Type Free / Pro-One Time Fee /
 

Hello once again. We have a new issue. We have several scenes in Unity. So we need to use camera device by other plugins and we can't do it.

We use Your SDK for one scene for AR, and we need to reset camera usage, make it absolutely free of any plugin's usage!

But now we can see, that if we use CameraDevice.Stop() method, it doesn't stop using camera absolutely.

 

How can we stop any camera activity and maxst's usage of the device's camera from code. 

We've tried to find any solution in API but haven't had any result. 

 

We need to erase camera usage, make it absolutely free of any usage in order to use it in our own purposes, but maxst doesn't want to let us do it.

Thank You

Posted Date: 2018-05-15 2:35     Edited Date: 2018-05-15 2:35     Writer: inactive

Thanks for using our sdk.

Most of unity sample codes in our sdk there are camera restarting codes in Update() function.

So..Please move this code to other place you want.

Jack

SDK Team, Maxst

Posted Date: 2018-05-15 17:34     Edited Date: 2018-05-15 17:34     Writer: inactive

Dear friends!

We've tryed all presented codes and maxst doesn't release camera fully. It means, that we have to create smth ourselves, as soon as You can't detect what we are talking about. May be You have time to detect it. For example, add a new scene to Your test project and create a button to load that scene. Than try to use webcamtexture or so on. You'll not be able to use the camera. Your program will still use the hardware after any Stop() methods and so on. 

Posted Date: 2018-05-15 18:26     Edited Date: 2018-05-15 18:26     Writer: inactive

Only one decision now is to wayt for seconds (smth about 3 sec.) before trying to use device's camera afret your DeviceCamera.Stop() method. So we have to wait a few seconds and can't understand why is it so. Of course, this value will depend on the device hardware. So now, do we have any ability to detect, if DeviceCamera.Stop() method have finished and that camera is stopped? 

May be You have any methods to detect if camera is playing. Not only set bool = true, when we trying to DeviceCamera.Play(), but any callback of the DeviceCamera.Stop(); 

 

And we have to understand if it really stops and whed does it happen, not the begining of Stop() method, but the result of the camera stopping.

 

In iother words:

1. We call Stop();

2. Program needs several time moments to really stop using camera.

3. Then and oly then we can use the camera in our purpouses. 

4. How can we detect if camera is usable and Stop() was success?

 

For example. If we have a great performance device, it'll need just a moment to realize Stop method. And if we have average perfomance device, it can need more than 5-6 seconds to stop camera usage.

 

For example, we use caroutine to wait for 3 sec. So if You can undarstand, users with hiend devices will just loose a few seconds, and users with low end devices will have an error with camera usage. 

So please, can You help with that issue. We need a callback from the Stop() method. We can't make a good application without it. 

 

thank You 

Posted Date: 2018-05-15 18:27     Edited Date: 2018-05-15 18:27     Writer: inactive

public void Stop()

352  {

353  if (Application.platform == RuntimePlatform.IPhonePlayer)

354  {

355  NativeStaticAPI.CameraDevice_stop();

356  }

357  else

358  {

359  NativeSharedAPI.CameraDevice_stop();

360  }

361  }

 

 

As You can see, there is no callback of real STATUS of that process

Posted Date: 2018-05-15 22:34     Edited Date: 2018-05-15 22:35     Writer: inactive

ResultCode result = CameraDevice.GetInstance().Start(); 

how a great example!

Lets only imagine, that we'll have an opportunity to do like this, but only with one specail moment:

 

ResultCode result = CameraDevice.GetInstance().Stop();

Why there is no such possibility in API?

 

Thank You

Posted Date: 2018-05-15 23:12     Edited Date: 2018-05-15 23:12     Writer: inactive

We fully understand what are you talking about.

And now we are searching if our sdk have can solve your problem.

Please wait a bit moment.

Thank you.

Posted Date: 2018-05-16 0:59     Edited Date: 2018-05-16 0:59     Writer: inactive

We updated some patch to our public github site.

https://github.com/maxstdev/MaxstARSDK_Unity_Sample/tree/feature/3.5.1.p1-Android_camera_stop

CameraConfiguration sample was modified and now it has camera stop / start button and WebCamTexture stop / start code.

You should find sample scene in MaxstARSamples/Scene/CameraConfiguration.scene

It's not public release and has some restrictions.

- Only 64bit dll for windows was rebuilt

- Only patch for android

 

Posted Date: 2018-05-16 19:02     Edited Date: 2018-05-16 19:02     Writer: inactive

And what about iOS?

Posted Date: 2018-05-16 23:17     Edited Date: 2018-05-16 23:17     Writer: inactive

Hi,

If you confirm that the patch version is what you want then we will apply that solution to ios and mac.

Thanks.

Posted Date: 2018-05-17 5:50     Edited Date: 2018-05-17 5:50     Writer: inactive

We pushed update version to develop branch.

https://github.com/maxstdev/MaxstARSDK_Unity_Sample/tree/develop