仿真器的摄像头内置的应用程序Buggy在升级Froyo / 2.2?仿真器、应用程序、摄像头、Buggy

2023-09-12 07:38:14 作者:素婉纤尘

仿真器的照相机工作正常拍照的2.1 Eclair的。有什么不工作是录制视频,效果显着。 现在运行的工作仅仅是完美无瑕的2.1模拟器使相机的应用程序崩溃的应用程序。我火了意向将其启动:

the Emulator's camera worked fine for taking pictures in 2.1 Eclair. What did not work was recording videos, obviously. Now running an app which worked merely flawless on 2.1 Emulator causes the camera app to crash. I fire up an intent to launch it:

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(TEMP_PHOTO_FILE)));
startActivityForResult(intent, REQUEST_CAMERA);

这将启动相机应用程序,但几秒钟后崩溃。输出是:

This starts the camera app but after a few seconds it crashes. The output is:

06-01 09:57:15.593: DEBUG/libEGL(5212): egl.cfg not found, using default config
06-01 09:57:15.593: DEBUG/libEGL(5212): loaded /system/lib/egl/libGLES_android.so
06-01 09:57:15.733: ERROR/AndroidRuntime(5212): FATAL EXCEPTION: GLThread 11
06-01 09:57:15.733: ERROR/AndroidRuntime(5212): java.lang.IllegalArgumentException: No configs match configSpec
06-01 09:57:15.733: ERROR/AndroidRuntime(5212):     at android.opengl.GLSurfaceView$BaseConfigChooser.chooseConfig(GLSurfaceView.java:760)
06-01 09:57:15.733: ERROR/AndroidRuntime(5212):     at android.opengl.GLSurfaceView$EglHelper.start(GLSurfaceView.java:916)
06-01 09:57:15.733: ERROR/AndroidRuntime(5212):     at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1246)
06-01 09:57:15.733: ERROR/AndroidRuntime(5212):     at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)

其实我只是想看看,如果这令你的错误,从即使EXTRA_OUTPUT指定已被固定在升级Froyo摄像头接收小图像。不幸的是,我甚至不得到测试。 有谁碰到similiar问题?

Actually I just wanted to see if the bug which made you receive a small image from the camera even though EXTRA_OUTPUT was specified has been fixed in FroYo. Unfortunately, I don't even get to test it. Does anyone run into similiar issues?

谢谢, Steff

Thanks, Steff

推荐答案

看起来有相机的要求EGLConfig之间的mistmatch,目前的S / W GL渲染器自带的升级Froyo支持EGLConfigs。看看你是否可以要求RGB565 EGL配置。

It looks there's a mistmatch between the EGLConfig the Camera is requesting and the EGLConfigs currently supported by the s/w GL renderer that comes in Froyo. See if you can request an RGB565 EGL Config.

此外,下面的变化为我工作。它基本上除去模板缓存出EGLConfig作为该配置似乎不支持所有的S / W GL渲染器升级Froyo。添加原配置回来,如果你正在测试在真实设备上,如对Droid。

Moreover, the below changes worked for me. It basically remove the Stencil buffer out of the EGLConfig as that configuration seems to be not supported at all in the s/w GL renderer in Froyo. Add the original config back if you're testing on real devices such as the Droid.

差异--git A / SRC / COM /安卓/摄像头/ UI / GLRootView.java B / SRC / COM /安卓/摄像头/ UI / GLRootView.java 指数d8ae0f8..545c66a

diff --git a/src/com/android/camera/ui/GLRootView.java b/src/com/android/camera/ui/GLRootView.java index d8ae0f8..545c66a

--- a/src/com/android/camera/ui/GLRootView.java  
+++ b/src/com/android/camera/ui/GLRootView.java  
@@ -174,7 +174,8 @@ public class GLRootView extends GLSurfaceView  

     private void initialize() {  
         mFlags |= FLAG_INITIALIZED;  
-        setEGLConfigChooser(8, 8, 8, 8, 0, 4);  
+        setEGLConfigChooser(8, 8, 8, 8, 0, 0);  
         getHolder().setFormat(PixelFormat.TRANSLUCENT);  
         setZOrderOnTop(true);