-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
recon-jet running android 4.1.2 exception fix -- set a lower frame rate #1
base: master
Are you sure you want to change the base?
Conversation
…tion in camera.setParameters(). Reworked the code to set the framerate to be LOW_QUALITY since that is all the recon can currently handle 5-19 09:00:13.441 7895-7895/com.example.hello E/PluginManager: Uncaught exception from plugin java.lang.RuntimeException: setParameters failed at android.hardware.Camera.native_setParameters(Native Method) at android.hardware.Camera.setParameters(Camera.java:1410) at com.moonware.cameraserver.CameraConfigurationManager.setDesiredCameraParameters(CameraManager.java:526) at com.moonware.cameraserver.CameraManager.openDriver(CameraManager.java:131) at com.moonware.cameraserver.CameraServer.startCapture(CameraServer.java:460) at com.moonware.cameraserver.CameraServer.startCamera(CameraServer.java:317) at com.moonware.cameraserver.CameraServer.execute(CameraServer.java:102) at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98) at org.apache.cordova.PluginManager.exec(PluginManager.java:133) at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59) at org.apache.cordova.CordovaBridge.promptOnJsPrompt(CordovaBridge.java:135) at org.apache.cordova.engine.SystemWebChromeClient.onJsPrompt(SystemWebChromeClient.java:124) at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:655) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4745) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) at dalvik.system.NativeStart.main(Native Method) 05-19 09:00:13.441 7895-7895/com.example.hello I/Web Console: Failed to start camera capture: setParameters failed at null:27
|
||
param = camera.getParameters(); | ||
param.setPreviewFrameRate(camcorderProfile.videoFrameRate); | ||
camera.setParameters(param); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would you think of cycling through the CamcorderProfiles, beginning with QUALITY_ and working downwards, until we find one that doesn't throw an error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, the quality could be passed as a parameter someplace, but that may be a more obtrusive change.
Reworked the code to set the framerate to be LOW_QUALITY since that is all the recon can currently handle. The exception in setParameters no longer occurs on the recon-jet
5-19 09:00:13.441 7895-7895/com.example.hello E/PluginManager: Uncaught exception from plugin
java.lang.RuntimeException: setParameters failed
at android.hardware.Camera.native_setParameters(Native Method)
at android.hardware.Camera.setParameters(Camera.java:1410)
at com.moonware.cameraserver.CameraConfigurationManager.setDesiredCameraParameters(CameraManager.java:526)
at com.moonware.cameraserver.CameraManager.openDriver(CameraManager.java:131)
at com.moonware.cameraserver.CameraServer.startCapture(CameraServer.java:460)
at com.moonware.cameraserver.CameraServer.startCamera(CameraServer.java:317)
at com.moonware.cameraserver.CameraServer.execute(CameraServer.java:102)
at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:98)
at org.apache.cordova.PluginManager.exec(PluginManager.java:133)
at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
at org.apache.cordova.CordovaBridge.promptOnJsPrompt(CordovaBridge.java:135)
at org.apache.cordova.engine.SystemWebChromeClient.onJsPrompt(SystemWebChromeClient.java:124)
at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:655)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
05-19 09:00:13.441 7895-7895/com.example.hello I/Web Console: Failed to start camera capture: setParameters failed at null:27