diff options
author | Vladimir Petrov <vppetrov@mm-sol.com> | 2012-09-28 19:41:45 +0300 |
---|---|---|
committer | Jason Simmons <jsimmons@google.com> | 2012-11-07 14:36:33 -0800 |
commit | 18d468a29fde8e8653c142291349e066a27d5da5 (patch) | |
tree | bbd3efeee5b969d9ca29b3eb628b82bf855fef2b | |
parent | ce75a6a467b1a7e833e285276bfa96325584f7d0 (diff) | |
download | omap4-aah-18d468a29fde8e8653c142291349e066a27d5da5.tar.gz |
Camera: Set minimum undequeuable on tap-in
- Will set the minimum undequeuable count on tap-in instead of
setting "1", which in most cases is incorrect value.
Change-Id: I145b12f86d410415f6ed67a058392c89adb6d3c6
Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
-rw-r--r-- | test/CameraHal/camera_test_surfacetexture.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/CameraHal/camera_test_surfacetexture.cpp b/test/CameraHal/camera_test_surfacetexture.cpp index d04d226..2b87b36 100644 --- a/test/CameraHal/camera_test_surfacetexture.cpp +++ b/test/CameraHal/camera_test_surfacetexture.cpp @@ -704,6 +704,7 @@ void BufferSourceInput::setInput(buffer_info_t bufinfo, const char *format, Shot ANativeWindowBuffer* anb; GraphicBufferMapper &mapper = GraphicBufferMapper::get(); int pixformat = HAL_PIXEL_FORMAT_TI_NV12; + size_t tapInMinUndequeued = 0; int aligned_width, aligned_height; aligned_width = ALIGN_UP(bufinfo.crop.right - bufinfo.crop.left, ALIGN_WIDTH); @@ -720,7 +721,10 @@ void BufferSourceInput::setInput(buffer_info_t bufinfo, const char *format, Shot native_window_set_usage(mWindowTapIn.get(), getUsageFromANW(pixformat)); - native_window_set_buffer_count(mWindowTapIn.get(), 1); + mWindowTapIn->perform(mWindowTapIn.get(), + NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, + &tapInMinUndequeued);; + native_window_set_buffer_count(mWindowTapIn.get(), tapInMinUndequeued); native_window_set_buffers_geometry(mWindowTapIn.get(), aligned_width, aligned_height, bufinfo.format); |