Thursday, March 6, 2014

Fail to connect to camera service


I met Fail to connect to camera service
do when developing cameraHow is this going? Camera Resource is not released yet? Problem or something else?<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
Maybe
camera.stopPreview ();
camera.release ();
camera = null;

Reply:
In general, you do not freed before the camera, so do not even go up again to connect
Reply:
Okay, thank you ah
Reply:

I was doing camera development, want to set the focal length
This is what I find the program on the focal length settings from the Internet

There is a mobile phone application that it is possible to achieve a zoom, however, my application not;!!

. Camera.getParameters () isZoomSupported () -> true
. Camera.getParameters () isSmoothZoomSupported () -> false

In this case, how can I achieve zoom it??

I have two phones:
A.moto me1 ZoomSupported and SmoothZoom are supported, I tested, can zoom!
B.HTC G8 is above this case, ZoomSupported support, SmoothZoom does not support, so call: Camera.startSmoothZoom (zoom) no response, but it took a photo program on the phone, there is a zoom function, indicating

Under SmoothZoom without support should also be able to achieve a zoom function!
I tried using
Camera.getParameters () setZoom (zoom);.
Or:
Camera.Parameters localParameters = mCamera.getParameters ();
mCamera.getParameters () set ("taking-picture-zoom", zoom);.
localParameters.set ("taking-picture-zoom", zoom);
No reaction!
Is not to change the zoom, the need is to operate???


In addition, I will, HTC's own photo program decompile it, code it found no call too:
Camera.startSmoothZoom (zoom);
But there is found, the call over:
Camera.Parameters localParameters = mCamera.getParameters ();
mCamera.getParameters () set ("taking-picture-zoom", zoom);.
localParameters.set ("taking-picture-zoom", zoom);
There is found that it used a. So dynamic link library!

There, Camera360 this software, but also to achieve a zoom!

I do not know how they are implemented!!???

You know how to do it? Thank you, ah,
Reply:
Not properly closed Camera, restart the simulator on the line next
Reply:
Is not no permission to add, I also encountered this problem, because I forgot to add permissions
Reply:
You said zoom question, write their own can not be achieved, others applications can be realized, according to your description, it should be someone else to write C code, area code by calling this C camera zoom, you can try to change Under his program, so the package to take over someone else's, too, calls the same way, so that we can achieve it. . . Go try it

No comments:

Post a Comment