简体   繁体   English

Galaxy Nexus(特别是)摄像头启动预览失败

[英]Galaxy Nexus (Specificaly) camera startPreview failed

I'm having a strange issue on a galaxy nexus when trying to have a live camera view in my app. 尝试在我的应用中进行实时摄影机查看时,我在银河系联系上遇到了一个奇怪的问题。 I get this error in the log cat: 我在日志猫中收到此错误:

06-29 16:31:26.681 I/CameraClient(133): Opening camera 0
06-29 16:31:26.681 I/CameraHAL(133): camera_device open
06-29 16:31:26.970 D/DOMX    (133): ERROR: failed check:(eError == OMX_ErrorNone) || (eError == OMX_ErrorNoMore) - returning error: 0x80001005 - Error returned from OMX API in ducati
06-29 16:31:26.970 E/CameraHAL(133): Error while configuring rotation 0x80001005
06-29 16:31:27.088 I/am_on_resume_called(21274): [0,digifynotes.Activity_Camera]
06-29 16:31:27.111 V/PhoneStatusBar(693): setLightsOn(true)
06-29 16:31:27.205 E/CameraHAL(133): OMX component is not in loaded state
06-29 16:31:27.205 E/CameraHAL(133): setNSF() failed -22
06-29 16:31:27.205 E/CameraHAL(133): Error: CAMERA_QUERY_RESOLUTION_PREVIEW -22
06-29 16:31:27.252 I/MonoDroid(21274): UNHANDLED EXCEPTION: Java.Lang.Exception: Exception of type 'Java.Lang.Exception' was thrown.
06-29 16:31:27.252 I/MonoDroid(21274): at Android.Runtime.JNIEnv.CallVoidMethod (intptr,intptr) <0x00068>
06-29 16:31:27.252 I/MonoDroid(21274): at Android.Hardware.Camera.StartPreview () <0x0007f>
06-29 16:31:27.252 I/MonoDroid(21274): at DigifyNotes.CameraPreviewView.SurfaceChanged (Android.Views.ISurfaceHolder,Android.Graphics.Format,int,int) <0x000d7>
06-29 16:31:27.252 I/MonoDroid(21274): at Android.Views.ISurfaceHolderCallbackInvoker.n_SurfaceChanged_Landroid_view_SurfaceHolder_III (intptr,intptr,intptr,int,int,int) <0x0008b>
06-29 16:31:27.252 I/MonoDroid(21274): at (wrapper dynamic-method) object.4c65d912-497c-4a67-9046-4b33a55403df (intptr,intptr,intptr,int,int,int) <0x0006b>

That very same source code works flawlessly on a Samsung Galaxy Ace 2X (4.0.4) and an LG G2X (2.3.7). 三星Galaxy Ace 2X(4.0.4)和LG G2X(2.3.7)可以完美地使用相同的源代码。 I will later test on a galaxy s4 if my friend lends it to me. 如果我的朋友将其借给我,我将稍后在银河s4上进行测试。

Galaxy Nexus runs Android 4.2.2 I believe. 我相信Galaxy Nexus可以运行Android 4.2.2。

Any one have any ideas? 有人有想法么?

EDIT: Here are my camera classes: 编辑:这是我的相机类:

[Please note I am using mono] [The formatting is more readable if you view it as raw] [请注意,我使用的是单声道] [如果您将其视为原始格式,则格式更易读]

Camera Activity: http://pastebin.com/YPcGXJRB 相机活动: http : //pastebin.com/YPcGXJRB

Camera Preview View: http://pastebin.com/zNf8AWDf 相机预览视图: http : //pastebin.com/zNf8AWDf

Did you try to do this 您是否尝试这样做

android:screenOrientation="landscape" 

to the manifest? 到清单? It seems to me that for some reason it is an orientation problem... 在我看来,由于某种原因,这是一个定向问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM