Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
97 views
in Technique[技术] by (71.8m points)

android - Ideas of Source of QualcommCameraHardware native_get_picture: MSM_CAM_IOCTL_GET_PICTURE Connection timed out error?

I am working on a library to make the Camera API easier for developers to consume.

The Droid Incredible 2, in portrait mode, using the rear-facing camera, fails to take a picture. Specifically, I get this sequence in LogCat:

08-18 09:25:52.094: E/QualcommCameraHardware(1368): native_get_picture: MSM_CAM_IOCTL_GET_PICTURE fd 25 error Connection timed out
08-18 09:25:52.094: E/QualcommCameraHardware(1368): getPicture failed!
08-18 09:25:52.094: E/QualcommCameraHardware(1368): get picture failed, giving jpeg callback with NULL data

Those messages occur ~5 seconds after I call takePicture() on the Camera, which fits with some old source code I see for QualcommCameraHardware that sets up a 5000ms timeout on the ioctl() call to speak to the camera hardware.

The net result is that onPictureTaken() is passed a null byte[] of JPEG data, meaning we have no photo.

The device works with my code in all other tested configurations, including working in portrait mode with the front-facing camera.

Does anyone know of something specific that might cause this particular failure?

UPDATE

I can no longer reproduce the error. I would delete the question, but that apparently is not possible once there are answers.

question from:https://stackoverflow.com/questions/18299661/ideas-of-source-of-qualcommcamerahardware-native-get-picture-msm-cam-ioctl-get

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

MSM_CAM_IOCTL_GET_PICTURE is a kernel call which runs the function

static int msm_get_pic(struct msm_sync *sync, void __user *arg)

I downloaded the kernel source for your device from the HTCdev and found the function defined in

drivers/media/video/msm/msm_camera-7x30.c

Could check what are the kernel messages when you take a picture?

adb shell su -c "dmesg"

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...