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.
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With