summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorSergio Aguirre <saaguirre@ti.com>2012-06-06 23:31:20 -0500
committerDaniel Levin <dendy@ti.com>2012-07-25 08:56:43 -0500
commit19b5fc822ed009e3db72603b0a2ed9bfa7ba8aec (patch)
tree0b4c0bd6f8de3f7b6456ac18a1e86001feb27509 /camera
parent2aa4103a9e20e4dbfa4b6d456f6c5e9f3950b067 (diff)
downloadhardware_ti_omap4-19b5fc822ed009e3db72603b0a2ed9bfa7ba8aec.zip
hardware_ti_omap4-19b5fc822ed009e3db72603b0a2ed9bfa7ba8aec.tar.gz
hardware_ti_omap4-19b5fc822ed009e3db72603b0a2ed9bfa7ba8aec.tar.bz2
CameraHAL: V4LCameraAdapter: Take queueable buffer count properly
Change-Id: Ibae272f0a8580688e84f25ea7f87bc8f8c704726 Signed-off-by: Sergio Aguirre <saaguirre@ti.com>
Diffstat (limited to 'camera')
-rw-r--r--camera/V4LCameraAdapter/V4LCameraAdapter.cpp9
-rw-r--r--camera/inc/V4LCameraAdapter/V4LCameraAdapter.h2
2 files changed, 8 insertions, 3 deletions
diff --git a/camera/V4LCameraAdapter/V4LCameraAdapter.cpp b/camera/V4LCameraAdapter/V4LCameraAdapter.cpp
index 209a98b..52407af 100644
--- a/camera/V4LCameraAdapter/V4LCameraAdapter.cpp
+++ b/camera/V4LCameraAdapter/V4LCameraAdapter.cpp
@@ -258,7 +258,7 @@ status_t V4LCameraAdapter::restartPreview ()
goto EXIT;
}
- for (int i = 0; i < mPreviewBufferCount; i++) {
+ for (int i = 0; i < mPreviewBufferCountQueueable; i++) {
mVideoInfo->buf.index = i;
mVideoInfo->buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
@@ -436,15 +436,18 @@ status_t V4LCameraAdapter::useBuffers(CameraMode mode, CameraBuffer *bufArr, int
switch(mode)
{
case CAMERA_PREVIEW:
+ mPreviewBufferCountQueueable = queueable;
ret = UseBuffersPreview(bufArr, num);
break;
case CAMERA_IMAGE_CAPTURE:
+ mCaptureBufferCountQueueable = queueable;
ret = UseBuffersCapture(bufArr, num);
break;
case CAMERA_VIDEO:
//@warn Video capture is not fully supported yet
+ mPreviewBufferCountQueueable = queueable;
ret = UseBuffersPreview(bufArr, num);
break;
@@ -556,7 +559,7 @@ status_t V4LCameraAdapter::takePicture() {
goto EXIT;
}
- for (int i = 0; i < mCaptureBufferCount; i++) {
+ for (int i = 0; i < mCaptureBufferCountQueueable; i++) {
mVideoInfo->buf.index = i;
mVideoInfo->buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
@@ -683,7 +686,7 @@ status_t V4LCameraAdapter::startPreview()
goto EXIT;
}
- for (int i = 0; i < mPreviewBufferCount; i++) {
+ for (int i = 0; i < mPreviewBufferCountQueueable; i++) {
mVideoInfo->buf.index = i;
mVideoInfo->buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
diff --git a/camera/inc/V4LCameraAdapter/V4LCameraAdapter.h b/camera/inc/V4LCameraAdapter/V4LCameraAdapter.h
index b544f6b..d904e39 100644
--- a/camera/inc/V4LCameraAdapter/V4LCameraAdapter.h
+++ b/camera/inc/V4LCameraAdapter/V4LCameraAdapter.h
@@ -191,7 +191,9 @@ private:
int mPreviewBufferCount;
+ int mPreviewBufferCountQueueable;
int mCaptureBufferCount;
+ int mCaptureBufferCountQueueable;
KeyedVector<CameraBuffer *, int> mPreviewBufs;
KeyedVector<CameraBuffer *, int> mCaptureBufs;
mutable Mutex mPreviewBufsLock;