On May 2, 7:55 am, Nikko Torcita <
nikkotorc...@gmail.com> wrote:
> Hi all,
>
> I've been trying to support generic UVC cameras on android and have been
> successful so far with getting the native camera app to display preview
> images until I tested my code with skype video call and got stuck with a
> buffer memory problem. To break it down,
>
> 1. I'm using the yuv422i-yuyv format since it's the only pixel format
> supported by the uvc camera (Vimicro chipset) that i'm testing. I have also
> set CameraService::Client::registerPreviewBuffers() to support
> HAL_PIXEL_FORMAT_YCbCr_422_I in CameraService.cpp.
>
> 2. I set the size of my preview heap to 'PreviewHeap = width x height x 2'
> since YUV422 takes up 4 bytes per 2 pixels.
>
> From logcat, I get this:
>
> D/CameraHardware(28343): PREVIEW SIZE: w=320 h=240 framerate=30
> E/CameraHardware(28343): virtual android::status_t
> android::CameraHardware::startPreview() :
> D/V4L2Camera(28343): USB Camera now streaming...
> D/libEGL (28734): loaded /system/lib/egl/libGLES_android.so
> D/libEGL (28734): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
> D/libEGL (28734): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
> D/libEGL (28734): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so