namespace android {
+int32_t SUPPORT_THUMBNAIL_REAR_SIZE[3][2] =
+{
+ {160, 120},
+ {160, 90},
+ {144, 96}
+};
+
+int32_t SUPPORT_THUMBNAIL_FRONT_SIZE[4][2] =
+{
+ {160, 120},
+ {160, 160},
+ {160, 90},
+ {144, 96}
+};
+
class Sensor {
public:
/**
// android.jpeg
- static const int32_t jpegThumbnailSizes[] = {
- 160, 120,
- 160, 160,
- 160, 90,
- 144, 96,
- 0, 0
- };
+ size_t sizeOfThumbnailList = (cameraId) ? sizeof(SUPPORT_THUMBNAIL_FRONT_SIZE) /
+ sizeof(int32_t) : sizeof(SUPPORT_THUMBNAIL_REAR_SIZE) / sizeof(int32_t);
+
+ // Copy sizes from front or back camera
+ int32_t jpegThumbnailSizes[sizeOfThumbnailList + 2];
+
+ if (cameraId) {
+ memcpy(jpegThumbnailSizes, SUPPORT_THUMBNAIL_FRONT_SIZE,
+ sizeof(int32_t) * sizeOfThumbnailList);
+ } else {
+ memcpy(jpegThumbnailSizes, SUPPORT_THUMBNAIL_REAR_SIZE,
+ sizeof(int32_t) * sizeOfThumbnailList);
+ }
+
+ // Always include 0,0 size in list
+ jpegThumbnailSizes[sizeOfThumbnailList] = 0;
+ jpegThumbnailSizes[sizeOfThumbnailList + 1] = 0;
ADD_OR_SIZE(ANDROID_JPEG_AVAILABLE_THUMBNAIL_SIZES,
jpegThumbnailSizes, sizeof(jpegThumbnailSizes)/sizeof(int32_t));
*
*/
+#ifndef EXYNOS_CAMERA_2_H
+#define EXYNOS_CAMERA_2_H
+
#include <hardware/camera2.h>
#include <camera/Camera.h>
#include <camera/CameraParameters.h>
namespace android {
+extern int32_t SUPPORT_THUMBNAIL_REAR_SIZE[3][2];
+extern int32_t SUPPORT_THUMBNAIL_FRONT_SIZE[4][2];
+
struct ExynosCamera2Info
{
public:
int m_cameraId;
};
}
+
+#endif
//REAR Camera
if(this->getCameraId() == 0) {
- sizeOfSupportList = sizeof(SUPPORT_THUMBNAIL_REAR_SIZE) / (sizeof(int)*2);
+ sizeOfSupportList = sizeof(SUPPORT_THUMBNAIL_REAR_SIZE) / (sizeof(int32_t)*2);
for(int i = 0; i < sizeOfSupportList; i++) {
if((SUPPORT_THUMBNAIL_REAR_SIZE[i][0] == w) &&(SUPPORT_THUMBNAIL_REAR_SIZE[i][1] == h))
}
else {
- sizeOfSupportList = sizeof(SUPPORT_THUMBNAIL_FRONT_SIZE) / (sizeof(int)*2);
+ sizeOfSupportList = sizeof(SUPPORT_THUMBNAIL_FRONT_SIZE) / (sizeof(int32_t)*2);
for(int i = 0; i < sizeOfSupportList; i++) {
if((SUPPORT_THUMBNAIL_FRONT_SIZE[i][0] == w) &&(SUPPORT_THUMBNAIL_FRONT_SIZE[i][1] == h))