Camera causing crash

by blindfold » Sat, 25 Oct 2008 03:22:48 GMT


Sponsored Links
 In running my camera-based app on a real G1, the following debug
output showed up for a JPEG takePicture call:

E/QualcommCameraHardware(22797): QualcommCameraHardware::camera_cb:
@CAMERA_EXIT_CB_FAILURE(14).
E/QualcommCameraHardware(22797): camera cb: invalid state QCS_ERROR
for taking a picture!
D/CameraService(22797): postRaw
E/Camera  (22811): Error 1
D/CameraService(22797): postJpeg
D/AndroidRuntime(22811): Shutting down VM
W/dalvikvm(22811): threadid=3: thread exiting with uncaught exception
(group=0x40013e28)
E/AndroidRuntime(22811): Uncaught handler: thread main exiting due to
uncaught exception

What does this mean? Is it because of a camera resolution mismatch?
(The Android API still offers no means to query for supported camera
resolutions!) Preview is running, and the app runs fine on the SDK 1.0
r1 emulator. What are the possible causes? I do not have a G1 myself
so I cannot test every possible combination and play divide and
conquer.

Thanks.

--~--~---------~--~----~------------~-------~--~----~



Camera causing crash

by blindfold » Sat, 25 Oct 2008 05:45:08 GMT


 Oops, meant 3.1 megapixel, of course.




--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Camera causing crash

by blindfold » Sat, 25 Oct 2008 05:46:44 GMT


 Further tests suggest that the camera crash was caused by not
capturing in G1's native 2048 x 1536 (1.3 megapixel) resolution.
However, for me 1.3 MP is terrible overkill and causing
OutOfMemoryError errors in doing image processing on the physical G1.
What are the supported camera resolutions on the T-Mobile G1? Then I
can at least temporarily hard-code a lower resolution until a
forthcoming SDK 1.x finally adds the necessary APIs for querying
supported camera resolutions (as required once more Android phones,
with different cameras, hit the market). Right now I find the Android
SDK 1.0 r1 camera support too poor for serious use.



--~--~---------~--~----~------------~-------~--~----~



Camera causing crash

by blindfold » Sat, 25 Oct 2008 06:02:49 GMT


 I urgently need to know the *lowest* still image resolution supported
by the T-Mobile G1. Is it for instance 640 x 480 (VGA)?

Thanks
--~--~---------~--~----~------------~-------~--~----~



Camera causing crash

by [EMAIL PROTECTED] » Sat, 25 Oct 2008 06:59:17 GMT


 I don't know if it's the case, but it's possible the camera ONLY
captures at full resolution and to get lower resolution you're
intended to use the image manipulation APIs... someone will need to
confirm this however



--~--~---------~--~----~------------~-------~--~----~



Camera causing crash

by blindfold » Sat, 25 Oct 2008 16:06:54 GMT


 That's what I'm afraid of, that the G1 can only capture at full
resolution. I do use image manipulation APIs for downscaling whenever
possible, but that initial G1 hi-res snapshot presents the bottleneck
in performance and memory (failure with OutOfMemoryError on the real
G1). I hope that the Android Team can at very short notice specify the
unspecified G1 camera properties, since required APIs for querying
supported camera resolutions are missing in SDK 1.0 r1. Furthermore, I
would normally be decoding a low-res preview image instead, but the
SDK 1.0 r1 APIs do not support decoding of the (again unspecified)
preview format, while the preview cannot even be properly positioned
and sized on the screen due to, again, incomplete APIs (let alone
their implementation).

I'm close to being forced to give up on Google Android because of its
immaturity in media processing (in my case camera input, audio
output). Moreover, it is very frustrating to have no indication
whatsoever when the various problems will be fixed. My equivalent
application for Java ME runs fine on almost all modern Nokia (S60)
camera phones (plus some other brands), so I am not talking about any
unrealistic goals here but just talking about fixing what is broken or
missing in Google Android and its implementation on the T-Mobile G1.

Thanks

On Oct 25, 12:58am, "[EMAIL PROTECTED]"



--~--~---------~--~----~------------~-------~--~----~



Camera causing crash

by jrpowers » Sun, 02 Nov 2008 02:50:22 GMT


 You can grab a 480x320 picture, but it still takes a while to come
back after you call takePicture.

The preview format is some YUV format.  I think it's like YUV420P.
I've been able to decode the luminance part (Y) (it's just in-order
byte values), but I haven't tried to recover the color part.







--~--~---------~--~----~------------~-------~--~----~



Camera causing crash

by blindfold » Sun, 02 Nov 2008 04:11:35 GMT


 > You can grab a 480x320 picture, but it still takes a while to come

Thanks! Is this 480x320 for the physical G1, or for the emulator?


It is yuv422sp, which is equivalent to Android's YCbCr_422_SP.


I've now done both, being forced to because the still image capture
was a near guarantee for OutOfMemoryError crashes, but it requires a
bit of reverse engineering. The SDK 1.0 r1 emulator only displays the
Y part, but the preview data also contains the color information for
the moving colored rectangle.




--~--~---------~--~----~------------~-------~--~----~



Camera causing crash

by Jason Proctor » Tue, 04 Nov 2008 02:11:08 GMT


 >It is yuv422sp, which is equivalent to Android's YCbCr_422_SP.

on the G1, Camera claims the preview format is number 16, 
YCbCr_422_SP, but it isn't. it's YCbCr, but in 411 format. hence 
smaller relative frame size than the emulator. it's close to YUV 
411p, but the colour transform function is different for YUV than it 
is for YCbCr. in YUV the colour portion is absolute, whereas in YCbCr 
it's a correction from green.

(i'm no expert, so feel free to correct any of the above!)


this is interesting because i *think* i'm only getting b&w preview 
data on the emulator *and* the G1.

on the emulator, i get straight-up b&w regardless of whether i add in 
the UV component. which makes sense, because the Y component is 
greyscale.

on the G1, in my yuv411p decoder, if i leave out the CbCr portion, i 
get big time green, which is right. if i put them back in, i get a 
greyscale image, correcting the green. this makes sense, but i'm 
wondering why i'm not getting the colour i'm seeing on the screen.

btw my G1 might be broken. the camera always displays previews in the 
wrong orientation. in portrait, i have to turn my head 90deg to see 
the image upright. in landscape, i can hold the camera in portrait 
and see the image fine. other G1s here don't have this problem...


--~--~---------~--~----~------------~-------~--~----~



Camera causing crash

by blindfold » Tue, 04 Nov 2008 07:47:57 GMT


 Thanks Jason! It came as a big surprise to me that the G1 uses 411
instead of the emulator's sole 422 format. That is most welcome
information that is not publicly documented anywhere as far as I know,
making it a recipe for misery in camera-based image processing. If you
run my app on the emulator and press key "g" for the green filter (my
default decoding is in grayscale to save CPU time), then you will see
that it shows a color preview where the SDK 1.0 r1's built-in emulator
only shows the Y (grayscale) component. Of course further work is now
needed to also decode the G1's 411 format (my app still assumes 422).
I must conclude that camera support with Android is currently too
immature for serious and sustainable work.



--~--~---------~--~----~------------~-------~--~----~



Camera causing crash

by Jason Proctor » Tue, 04 Nov 2008 08:39:13 GMT


 others agree with your conclusion and are even pulling their apps 
from the market until there is a fix. i'm not spending any 
significant time with it until something happens, either.





--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Help - Android Market Suspe nds My 鈥淏log App鈥?

You mention the word "Demo", do you have a "Click here to pay" link?, if 
so that'll be the problem. Apps on Market have to have all their 
payments handled by the (currently non-existent) Market payment 
processing system.

Al.
 http://www.***.com/ 





-- 
======
Funky Android Limited is registered in England & Wales with the 
company number  6741909. The registered head office is Kemp House, 
152-160 City Road, London,  EC1V 2NX, UK. 

The views expressed in this email are those of the author and not 
necessarily those of Funky Android Limited, it's associates, or it's 
subsidiaries.


--~--~---------~--~----~------------~-------~--~----~

2. Sharing a map api key during development

Hello all,

I wasn't able to find the answer to this anywhere, so hopefully I'm
not overlooking something simple. We're building an app that makes use
of maps, so I was able to get everything working with a debug API key
fairly easily.

The only thing is that I'm working with another developer and we also
need to provide builds to our client. I tried sharing my
debug.keystore with the other developer and using the Custom debug
keystore to get map tiles to display, but that doesn't seem to work.

Is there a good way to share an API key with other developers during
development? I suppose we could each have our own non source
controlled properties file, but I'm hoping there's a better way.

-------------------
Tony Hillerson
EffectiveUI

--~--~---------~--~----~------------~-------~--~----~

3. 绛斿: Can we test custom zImage on emulator

4. gdb cannot get thread info in a arm device

5. WebView does not load the url

6. getting around password entry after multiple unlocking attempts?

7. File system permission of SD car