diff options
author | Emilian Peev <epeev@mm-sol.com> | 2012-07-30 15:31:58 +0300 |
---|---|---|
committer | Jason Simmons <jsimmons@google.com> | 2012-11-07 14:36:33 -0800 |
commit | 3b13e3f0f4479878f037ab0ef221c6261b75b168 (patch) | |
tree | 055d5fe46be9af3d9b6ab909f2e58fe29992948c | |
parent | 5207a2fbeaaa21c45d4d6bba782f7029f4be3315 (diff) | |
download | omap4-aah-3b13e3f0f4479878f037ab0ef221c6261b75b168.tar.gz |
Camera_test: Reprocessing related updates
- Disable stream capture when reprocess starts.
This was causing a deadlock when trying to
access the tap-out.
- Allows picture format configuration during
stream capture which is needed when the client
needs to select a different one before reprocess.
Change-Id: Ie94ed7ee03c5c21e4e5b56aa60479cddc51f5ce8
Signed-off-by: Emilian Peev <epeev@mm-sol.com>
Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
-rw-r--r-- | test/CameraHal/camera_test_menu.cpp | 10 | ||||
-rw-r--r-- | test/CameraHal/camera_test_script.cpp | 11 |
2 files changed, 19 insertions, 2 deletions
diff --git a/test/CameraHal/camera_test_menu.cpp b/test/CameraHal/camera_test_menu.cpp index dd099db..8d75710 100644 --- a/test/CameraHal/camera_test_menu.cpp +++ b/test/CameraHal/camera_test_menu.cpp @@ -2542,6 +2542,7 @@ int functional_menu() { int k = 0; const char *valstr = NULL; struct CameraInfo cameraInfo; + bool queueEmpty = true; memset(area1, '\0', MAX_LINES*(MAX_SYMBOLS+1)); memset(area2, '\0', MAX_LINES*(MAX_SYMBOLS+1)); @@ -2926,7 +2927,13 @@ int functional_menu() { printf("numpreviewFormat %d\n", numpictureFormat); params.setPictureFormat(pictureFormatArray[pictureFormat]); - if ( hardwareActive ) + queueEmpty = true; + if ( bufferSourceOutputThread.get() ) { + if ( 0 < bufferSourceOutputThread->hasBuffer() ) { + queueEmpty = false; + } + } + if ( hardwareActive && queueEmpty ) camera->setParameters(params.flatten()); break; @@ -3550,6 +3557,7 @@ int functional_menu() { if (bufferSourceOutputThread.get() && bufferSourceOutputThread->hasBuffer()) { + bufferSourceOutputThread->setStreamCapture(false, expBracketIdx); if (hardwareActive) camera->setParameters(params.flatten()); if (bufferSourceInput.get()) { diff --git a/test/CameraHal/camera_test_script.cpp b/test/CameraHal/camera_test_script.cpp index ef43ff9..21ed7e7 100644 --- a/test/CameraHal/camera_test_script.cpp +++ b/test/CameraHal/camera_test_script.cpp @@ -215,6 +215,7 @@ int execute_functional_script(char *script) { int frameRConst = 0; int frameRRange = 0; struct CameraInfo cameraInfo; + bool queueEmpty = true; LOG_FUNCTION_NAME; @@ -549,8 +550,15 @@ int execute_functional_script(char *script) { printf("\nNot supported parameter %s from sensor %d\n\n", cmd + 1, camera_index); } - if ( hardwareActive ) + queueEmpty = true; + if ( bufferSourceOutputThread.get() ) { + if ( 0 < bufferSourceOutputThread->hasBuffer() ) { + queueEmpty = false; + } + } + if ( hardwareActive && queueEmpty ) { camera->setParameters(params.flatten()); + } break; case '-': @@ -1268,6 +1276,7 @@ int execute_functional_script(char *script) { if (bufferSourceOutputThread.get() && bufferSourceOutputThread->hasBuffer()) { + bufferSourceOutputThread->setStreamCapture(false, expBracketIdx); if (hardwareActive) camera->setParameters(params.flatten()); if (bufferSourceInput.get()) { |