-rw-r--r-- | Android.mk | 9 | ||||
-rw-r--r--[-rwxr-xr-x] | CameraHal.cpp | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | CameraHal_Module.cpp | 3 | ||||
-rw-r--r--[-rwxr-xr-x] | V4LCameraAdapter/V4LCameraAdapter.cpp | 142 | ||||
-rwxr-xr-x | inc/mjpeg/colorspaces.h | 288 | ||||
-rw-r--r-- | inc/mjpeg/defs.h | 57 | ||||
-rwxr-xr-x | inc/mjpeg/huffman.h | 99 | ||||
-rwxr-xr-x | inc/mjpeg/jutils.h | 149 | ||||
-rwxr-xr-x | mjpeg/colorspaces.c | 2016 | ||||
-rwxr-xr-x | mjpeg/jpegdec.c | 1040 |
10 files changed, 128 insertions, 3679 deletions
diff --git a/CameraHal.cpp b/CameraHal.cpp index 284cb36..fe989df 100755..100644 --- a/CameraHal.cpp +++ b/CameraHal.cpp @@ -1435,7 +1435,11 @@ status_t CameraHal::allocVideoBufs(uint32_t width, uint32_t height, uint32_t buf for (uint32_t i = 0; i< bufferCount; i++){ GraphicBufferAllocator &GrallocAlloc = GraphicBufferAllocator::get(); buffer_handle_t buf; +#if PLATFORM_SDK_VERSION > 22 ret = GrallocAlloc.alloc(width, height, HAL_PIXEL_FORMAT_NV12, CAMHAL_GRALLOC_USAGE, &buf, &stride); +#else + ret = GrallocAlloc.alloc(width, height, HAL_PIXEL_FORMAT_NV12, CAMHAL_GRALLOC_USAGE, &buf, (int32_t*)&stride); +#endif if (ret != NO_ERROR){ CAMHAL_LOGEA("Couldn't allocate video buffers using Gralloc"); ret = -NO_MEMORY; |