summaryrefslogtreecommitdiffstats
path: root/camera/inc
diff options
context:
space:
mode:
Diffstat (limited to 'camera/inc')
-rwxr-xr-x[-rw-r--r--]camera/inc/V4LCameraAdapter/V4LCameraAdapter.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/camera/inc/V4LCameraAdapter/V4LCameraAdapter.h b/camera/inc/V4LCameraAdapter/V4LCameraAdapter.h
index bc99a6c..e9c910c 100644..100755
--- a/camera/inc/V4LCameraAdapter/V4LCameraAdapter.h
+++ b/camera/inc/V4LCameraAdapter/V4LCameraAdapter.h
@@ -24,11 +24,14 @@
#include "CameraHal.h"
#include "BaseCameraAdapter.h"
#include "DebugUtils.h"
+#include "Decoder_libjpeg.h"
namespace Ti {
namespace Camera {
-#define DEFAULT_PIXEL_FORMAT V4L2_PIX_FMT_YUYV
+//#define DEFAULT_PIXEL_FORMAT V4L2_PIX_FMT_YUYV
+#define DEFAULT_PIXEL_FORMAT V4L2_PIX_FMT_MJPEG
+#define DEFAULT_CAPTURE_FORMAT V4L2_PIX_FMT_YUYV
#define NB_BUFFER 10
#define DEVICE "/dev/videoxx"
@@ -153,7 +156,7 @@ private:
//Used for calculation of the average frame rate during preview
status_t recalculateFPS();
- char * GetFrame(int &index);
+ char * GetFrame(int &index, int &filledLen);
int previewThread();
@@ -199,7 +202,7 @@ private:
int mPreviewBufferCountQueueable;
int mCaptureBufferCount;
int mCaptureBufferCountQueueable;
- android::KeyedVector<CameraBuffer *, int> mPreviewBufs;
+ CameraBuffer *mPreviewBufs[NB_BUFFER];
android::KeyedVector<CameraBuffer *, int> mCaptureBufs;
mutable android::Mutex mPreviewBufsLock;
mutable android::Mutex mCaptureBufsLock;
@@ -230,6 +233,9 @@ private:
int nQueued;
int nDequeued;
+ Decoder_libjpeg jpgdecoder;
+ unsigned char *jpeg_with_dht_buffer[NB_BUFFER];
+ unsigned int jpeg_with_dht_buffer_size;
};
} // namespace Camera