我有 Android 应用程序,我用前置摄像头拍摄照片。我使用了这里描述的方法:http ://android-er.blogspot.sk/2010/12/add-overlay-on-camera-preview.html 。它适用于搭载 Android 2.3.6 的 Nexus S,适用于搭载 Android 4.1.1 的 HTC One X
它不适用于装有最新 Android 4.2.2 的 Asus Nexus 7,当我尝试拍照时,我在日志中得到了这个:
04-03 22:06:56.181: I/MainSSCActivity(24745): camera take picture START
04-03 22:06:56.191: E/NvOmxCamera(24952): OMX_ERRORTYPE android::NvOmxCamera::getCameraStereoMode(NvxComponent*, NvOmxCameraUserStereoMode&): Error: invalid NVX mode 0.
04-03 22:06:56.191: E/NvOmxCamera(24952): OMX_ERRORTYPE android::NvOmxCamera::getCameraStereoModeAndCaptureInfo(NvxComponent*, NvOmxCameraUserStereoMode&, NVX_STEREOCAPTUREINFO&): getCameraStereoMode failed with 0x00000000
04-03 22:06:56.191: D/NvOsDebugPrintf(24952): NvMMLiteJPEGEncSetAttribute: Incorrect value 0 for stereo capture type
04-03 22:06:56.191: E/NvOmxCameraSettings(24952): OMX_ERRORTYPE android::programStereoInfo(OMX_HANDLETYPE, const NVX_STEREOCAPTUREINFO&, android::NvxWrappers*): pNvxWrappers->OMX_SetConfigIL failed with 0x80001005
04-03 22:06:56.351: I/MainSSCActivity(24745): camera take picture END
04-03 22:06:56.391: I/MainSSCActivity(24745): ***** surface destroyed
04-03 22:06:56.401: I/hwcomposer(130): Setting interactive mode: On
04-03 22:06:56.481: E/BufferQueue(130): [SurfaceView] queueBuffer: SurfaceTexture has been abandoned!
04-03 22:06:56.491: E/SurfaceTextureClient(24952): queueBuffer: error queuing buffer to SurfaceTexture, -19
04-03 22:06:56.491: E/NvOmxCamera(24952): Queue Buffer Failed
04-03 22:06:56.491: A/libc(24952): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 25019 (Binder_3)
04-03 22:06:56.491: D/MainSSCActivity(24745): RAW bytes: null
04-03 22:06:56.491: D/MainSSCActivity(24745): shutter
04-03 22:06:56.591: I/DEBUG(128): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-03 22:06:56.591: I/DEBUG(128): Build fingerprint: 'google/nakasig/tilapia:4.2.2/JDQ39/573038:user/release-keys'
04-03 22:06:56.591: I/DEBUG(128): Revision: '0'
04-03 22:06:56.591: I/DEBUG(128): pid: 24952, tid: 25019, name: Binder_3 >>> /system/bin/mediaserver <<<
04-03 22:06:56.591: I/DEBUG(128): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad
04-03 22:06:56.701: I/DEBUG(128): r0 00000027 r1 deadbaad r2 4022f258 r3 00000000
04-03 22:06:56.701: I/DEBUG(128): r4 00000000 r5 42de4d6c r6 415dc640 r7 411b7c58
04-03 22:06:56.701: I/DEBUG(128): r8 411cfe30 r9 415dc8c8 sl 00000000 fp 00000001
04-03 22:06:56.701: I/DEBUG(128): ip 40be2de4 sp 42de4d68 lr 402022f9 pc 401fe992 cpsr 60000030
04-03 22:06:56.701: I/DEBUG(128): d0 0000000000000000 d1 000000007fc00000
04-03 22:06:56.701: I/DEBUG(128): d2 3fb15bd900000000 d3 3f114ee7df28fa15
04-03 22:06:56.701: I/DEBUG(128): d4 0000000000000000 d5 3ff0000000000000
04-03 22:06:56.701: I/DEBUG(128): d6 0000000541000000 d7 7fc0000000000000
04-03 22:06:56.701: I/DEBUG(128): d8 0000000000000000 d9 0000000000000000
04-03 22:06:56.701: I/DEBUG(128): d10 0000000000000000 d11 0000000000000000
到目前为止,我真的不知道出了什么问题以及如何解决它。有谁能够帮我?提前致谢。