diff options
author | Emilian Peev <epeev@mm-sol.com> | 2012-07-30 15:31:58 +0300 |
---|---|---|
committer | Daniel Levin <dendy@ti.com> | 2012-11-26 20:09:17 +0200 |
commit | 0d85ffa021927c1214c6d739a9bef7d6bda5789f (patch) | |
tree | 45893b620d38a45a6c0b53c59c7a6ef2acd478db /test | |
parent | 434e9ef7a597fab307ab4c8a56e5141f72d44e83 (diff) | |
download | hardware_ti_omap4-0d85ffa021927c1214c6d739a9bef7d6bda5789f.zip hardware_ti_omap4-0d85ffa021927c1214c6d739a9bef7d6bda5789f.tar.gz hardware_ti_omap4-0d85ffa021927c1214c6d739a9bef7d6bda5789f.tar.bz2 |
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>
Diffstat (limited to 'test')
-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()) { |