diff options
Diffstat (limited to 'test/CameraHal/camera_test_surfacetexture.cpp')
-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); |