android - Issues when capturing Multiple Photos: app stops responding, camera preview turns to green and no picture is saved -


I successfully captured a photo using the camera in Android. But when I try to capture 5 photos at once, the app stops responding, the camera preview goes to green and no picture is saved. What I saw in the stack trace is as follows (partial)

03-17 14:19: 54.804: Information / Quake Camer Hardware (19268): deinitpreview e 03-17 14 : 19: 54.804: information / QualcommCameraHardware (19,268): deinitPreview X 03-17 14: 19: 54.804: debug / QualcommCameraHardware (19,268): frame_thread X 03-17 14: 19: 54.834: debug / QualcommCameraHardware (19,268): snapshot_thread e 03-17 14:19: 54.854: debug / CameraService (19,268): takePicture (PID 20509) 03-17 14: 19: 54.884: Warning / AudioFlinger (19,268): 19 :: 55.154: 85 msecs 03-17 14 Blocking Debug / CameraService (19,268) for: postShutter 03-17 14: 19: 55.284: Debug / CameraService (19,268): postRaw 03-17 14:19: 5 5.314: Debug / QualcommCameraHardware (19,268): snapshot_thread X 03-17 14: 19: 55.344: Debug / QualcommCameraHardware (19,268): snapshot_thread E 03-17 14: 19: 55.364: Debug / CameraService (19,268): takePicture (PID 20509) 03-17 14: 19: 55.984: debug / CameraService (19,268): postShutter 03-17 14:19: 56.064: debug / Kamresewa (1 9268): Postro 03-17 14: 19: 56.074: error / Qualcomm Camera Hardware (19268): Original_JPEG_AN Code: JPG_Encoder_ADC failed. 03-17 14: 19: 56.074: Error / QualcommCameraHardware (the 19,268): Failed jpeg encoding 03-17 14: 19: 56.084: Debug / QualcommCameraHardware (19,268): snapshot_thread X 03-17 14: 19: 56.154: Information / Debug (19267): * ** * ** * ** * ** * ** * 03 -17 14: 19: 56.164: iNFO / debug (19267): fingerprint me: 'Google_ion / Google_ion / Sapphire / Sapphire: 1.6 / DRC83 / 14721: user / ADP, test key 03-17 14: 19: 56.164: information / Debug (19267): PID: 19268, TID: 20813 & gt; & Gt; & Gt; / System / bin / media server ... ... 14: 1 9: 59.894: Information / Service Manager (46): Service 'MediaCamera' 03-17 14: 1 9: 59.894: Warne / Camera (2050 9) ): The camera server dies! 03-17 14: 1 9: 59.894: Warne / Camera (2050 9): ICMERA's Death 03-17 14:19: 59.894: Error / Camera (2050 9): Error 100 03-17 14: 19: 59.915 : Warning / Audio System (71): AudioFlinger Server died! 03-17 14: 20: 00.014: Information / Process (71): Sending the signal PID: 18636 SIG: 3 03-17 14: 20: 00.054: INFO / DelWiki (18636): Thread = 7: To indicate Response to 3

I'm calling takePicture method in a loop to capture multiple pictures;

 for  (int m = 0; m   

I'm running HTC Magic on Android 1.6. I think, I'm using the wrong way to take many photos. What is the correct way to capture many photos using the Android Camera API?

I'm not sure the Android API also supports a burst mode. One thing is certain for you, you can not just call Le Picture () in that kind of loop. This is the reason for the misuse of those poor APIs.

How about taking in the next picture? (Obviously you have to keep track of the number of pictures taken.)

Also say, do not assume that it will work on every device.

I wrote the above reply in 2011, the camera has evolved since

Edit: Frame mode is now supported in Camera 2:

See

Comments