i've faced the same issue with the droid's camera. and i think i can
add few details.

1. reboot droid and start droid's "native" camera application
preview is ok (every time after reboot)
2. exit the camera app and start modified (for QCIF) sample app
preview is bad.
3. exit the sample app and start "native" camera app again (no reboot)
preview is bad. and it stays bad until you reboot the droid.

so it seems that all we need is to force camera's reset as it happens
during droid startup. does anyone know how to do this?

On Jun 23, 6:09 am, Ignas <ignas.limanaus...@gmail.com> wrote:
> Hello,
>
> I am seeing a very annoying behavior on Motorola Droid when trying to
> do a simple camera preview at QCIF resolution. And I was wondering if
> someone experienced something similar. Is there a workaround? Am I
> doing something wrong?
>
> Let me explain the situation.
>
> Firstly, right after boot-up, using native camera application there is
> nothing out of ordinary, I see preview each time and it is all
> perfectly well for as long as needed as many times as I want.
>
> The "interesting" behavior starts when I use the slightly modified API
> Demos (full app available in Android SDK, modified file is attached).
> My goal is to preview (and later capture) video at QCIF (176 x 144)
> resolution.
>
> Using CameraPreview module in API Demos application I can start
> preview and capture normally only the first time – picture is clear,
> focused, normal colors, etc. Preview and all is nice. The second time
> I do preview I see a very over-exposed picture, I need to turn it away
> from any light source to see anything, otherwise it is all white. And
> even in the shadow, everything is grainy, as if picture is taken with
> too sensitive settings (high ISO) with too long exposure. The third
> time, it is the opposite – the preview and capture is way too dark. I
> need to point the camera directly into the light source to see even a
> faintest picture. Pointing out of the window does not help, it has to
> be straight into the lamp or sun. The effect is like taking pictures
> with much too low ISO setting – it is way too underexposed.
>
> The overexposed and underexposed sessions interchange, but it is not
> clear-cut which one appears first. So far the prevailing pattern is
> that overexposed one starts first. Now surprise comes when I try using
> native camera application. The pattern continues! It is as if hardware
> or or software (camera process) got "tainted" with the QCIF. This
> continues until I reboot the device.
>
> Another interesting point is that if I allow device to "rest",
> symptoms are much less pronounced after 10 minutes, then in 15 minutes
> they become barely visible. However, it all comes back after the first
> time I capture in QCIF. Nothing like this is visible when resolution
> is higher, say, CIF, VGA or similar. The problem is that, for my
> purposes I need it to be QCIF.
>
> This does look like a problem in HW, drivers, or somewhere around OS.
> Any ideas, workarounds, tricks?
>
> If it is not too much to ask, can somebody try the code modifications
> below to try on your device? I am curious which devices are working
> properly and which are not. Shall we have a vote?
>
> === Device Information ===
> Firmware version: 2.1-update-1
> Baseband version: C_01.3E.03P
> Kernel version: 2.6.29-omap1-g7fa8788 android-bu...@apa26 #1
> Build number: ESE81
>
> === To reproduce ===
> Open CameraPreview.java from <SDK root>/samples/android-7/ApiDemos/src/
> com/example/android/apis/graphics, and add the following method:
>     @Override
>     protected void onMeasure(int w, int h) {
>         super.onMeasure(w, h);
>         setMeasuredDimension(176, 144);
>     }
>
> Also in the surfaceChanged method, add the following line:
>         parameters.setPreviewFrameRate(15);

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to