Some notes on this thread and some code...
1. You need the Surface and it must be as large as the preview image,
though it doesn't have to be visible.  Don't set
SURFACE_TYPE_PUSH_BUFFERS.
2. Don't try to process the preview in the preview callback.  There
isn't enough time and you will crash the system.  The camera won't
work until after reboot.
3. In a separate Thread, decode the preview data like this:
http://groups.google.com/group/android-developers/msg/d3b29d3ddc8abf9b
 - Hope this helps, David

On Dec 16, 11:42 am, Loechti <[email protected]> wrote:
> Hi, could you post your code?
> i tried it as described above but it crashes on the phone every
> time :/
>
> thanks :)
>
> On 16 Nov., 20:39, Sean <[email protected]> wrote:
>
>
>
> > On Nov 14, 8:49 am, Dave Sparks <[email protected]> wrote:
>
> > > You might be able to get away with not passing a surface into the
> > > camera object. I don't think we've ever tested that. If it doesn't
> > > work, let me know and we'll file a bug to get if fixed.
>
> > It appears that not passing a surface into the camera object does
> > cause a crash.
>
> > > In that case,
> > > you would take the preview frame, do your filter operation on it, and
> > > draw it directly to your own view. Expect the preview to be very laggy
> > > though.
>
> > I was finally able to give the camera a surface that is 0x0 pixels,
> > and then use the preview callback image. The lag isn't a serious
> > problem for my application, although it is unfortunate for those like
> > Blindfold doing augmented reality apps.
>
> > Dave, I just found a post you made on Issue 1271. Very helpful for
> > when I try to crack open the actual data - thanks!:
>
> > (http://code.google.com/p/android/issues/detail?id=1271):
>
> > > The actual format is YCbCr420 semi-planar. The Y-plane is followed by
> > > an interleaved CbCr plane. This is a native format used by the G1 camera, 
> > > hardware
> > > video codecs, and display processor. It enables hardware color conversion 
> > > in the
> > > display processor which is a significant savings over software CC.- Hide 
> > > quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to