Have you guys tested it previewing to a surfaceview instead?  I'm
wondering if it doesn't behave differently there.

On May 28, 12:25 am, karan parikh <karan.n...@gmail.com> wrote:
> Hey All,
>       @Robert: Yes. I am talking about the same function call. If you read
> the documentation for that, It says that a new copy is assigned everytime.
> You could also verify it with the allocation tracker. It is assigning that
> memory multiple times.
>       @Tom: Yes a new object reference is supplied each time.
> My suggestions:
> 1. We could implement a different jar file so that the frame gets
> overwritten everytime. But then I believe this would remove the portability
> from the application.
> 2. We can change the garbage collector or play around with the memory
> allocation for that very thread. I believe each thread has a generational
> gc. We could further look into that. We could overwrite the memory for that
> particular allocation each time, rather than freeing it and reallocating the
> same.
> 3. We can ask some one from google to look into it directly and create an
> issue, which I will be doing by tonight.
> Please let me know your suggestions to remove this bottleneck.
> Thanks for commenting.
> Regards,
> Karan.
>
>
>
> On Tue, May 26, 2009 at 1:17 PM, Tom Gibara <m...@tomgibara.com> wrote:
> > I'm pretty sure I have looked into this in the past and found that a
> > different object reference is supplied on each call.
> > Tom.
>
> > 2009/5/26 Robert Green <rbgrn....@gmail.com>
>
> >> Are you talking about the method Camera.PreviewCallback.onPreviewFrame
> >> (byte[] arg0, anrdoid.hardware.Camera arg1) ?
>
> >> Is it allocating a new byte[] for every call?
>
> >> I would think it would keep its same byte[] and reuse it for each
> >> call.
>
> >> Posting more code may help.  Thanks
>
> >> On May 25, 9:30 pm, Karan Parikh <karan.n...@gmail.com> wrote:
> >> > Hey All,
> >> >       I am developing a camera application , where the frame rate is
> >> > important. However, camera uses a preview callback function which
> >> > allocates a byte[] array of 230400 bytes, which makes it necessary for
> >> > the garbage collection to step in. Can someone suggest me a way to
> >> > avoid garbage collection stepping in ?
> >> > Thanks in advance.
> >> > Regards,
> >> > Karan.
>
> --
> Regards,
> -Karan.
--~--~---------~--~----~------------~-------~--~----~
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