summaryrefslogtreecommitdiffstats
path: root/test/CameraHal/camera_test_menu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CameraHal/camera_test_menu.cpp')
-rw-r--r--test/CameraHal/camera_test_menu.cpp56
1 files changed, 30 insertions, 26 deletions
diff --git a/test/CameraHal/camera_test_menu.cpp b/test/CameraHal/camera_test_menu.cpp
index 5b44824..dd099db 100644
--- a/test/CameraHal/camera_test_menu.cpp
+++ b/test/CameraHal/camera_test_menu.cpp
@@ -88,6 +88,7 @@ bool vnftoggle = false;
bool faceDetectToggle = false;
bool metaDataToggle = false;
bool shotConfigFlush = false;
+bool streamCapture = false;
int saturation = 0;
int zoomIDX = 0;
int videoCodecIDX = 0;
@@ -2138,6 +2139,7 @@ void initDefaults() {
caf_mode = 0;
shotConfigFlush = false;
+ streamCapture = false;
vstabtoggle = false;
vnftoggle = false;
AutoExposureLocktoggle = false;
@@ -3495,43 +3497,45 @@ int functional_menu() {
{
int msgType = 0;
- if(isRawPixelFormat(pictureFormatArray[pictureFormat])) {
- createBufferOutputSource();
- if (bufferSourceOutputThread.get()) {
- bufferSourceOutputThread->setBuffer(shotParams);
- }
- } else {
- msgType = CAMERA_MSG_COMPRESSED_IMAGE |
- CAMERA_MSG_RAW_IMAGE;
-#ifdef OMAP_ENHANCEMENT_BURST_CAPTURE
- msgType |= CAMERA_MSG_RAW_BURST;
-#endif
- }
-
if((0 == strcmp(modevalues[capture_mode], "video-mode")) &&
(0 != strcmp(videosnapshotstr, "true"))) {
printf("Video Snapshot is not supported\n");
- } else {
- gettimeofday(&picture_start, 0);
- if ( hardwareActive ) {
- camera->setParameters(params.flatten());
- camera->takePictureWithParameters(msgType, shotParams.flatten());
+ } else if ( hardwareActive ) {
+ if(isRawPixelFormat(pictureFormatArray[pictureFormat])) {
+ createBufferOutputSource();
+ if (bufferSourceOutputThread.get()) {
+ bufferSourceOutputThread->setBuffer(shotParams);
+ bufferSourceOutputThread->setStreamCapture(streamCapture, expBracketIdx);
+ }
+ } else {
+ msgType = CAMERA_MSG_COMPRESSED_IMAGE |
+ CAMERA_MSG_RAW_IMAGE;
+#ifdef OMAP_ENHANCEMENT_BURST_CAPTURE
+ msgType |= CAMERA_MSG_RAW_BURST;
+#endif
}
+
+ gettimeofday(&picture_start, 0);
+ camera->setParameters(params.flatten());
+ camera->takePictureWithParameters(msgType, shotParams.flatten());
}
break;
}
case 'S':
{
- createBufferOutputSource();
- if (bufferSourceOutputThread.get()) {
- if (bufferSourceOutputThread->toggleStreamCapture(expBracketIdx)) {
- setSingleExpGainPreset(shotParams, expBracketIdx, 0, 0);
- // Queue more frames initially
- shotParams.set(ShotParameters::KEY_BURST, BRACKETING_STREAM_BUFFERS);
- } else {
- setDefaultExpGainPreset(shotParams, expBracketIdx);
+ if (streamCapture) {
+ streamCapture = false;
+ setDefaultExpGainPreset(shotParams, expBracketIdx);
+ // Stop streaming
+ if (bufferSourceOutputThread.get()) {
+ bufferSourceOutputThread->setStreamCapture(streamCapture, expBracketIdx);
}
+ } else {
+ streamCapture = true;
+ setSingleExpGainPreset(shotParams, expBracketIdx, 0, 0);
+ // Queue more frames initially
+ shotParams.set(ShotParameters::KEY_BURST, BRACKETING_STREAM_BUFFERS);
}
break;
}