summaryrefslogtreecommitdiff
authorGuosong Zhou <guosong.zhou@amlogic.com>2016-09-13 11:38:18 (GMT)
committer Guosong Zhou <guosong.zhou@amlogic.com>2016-09-14 05:37:00 (GMT)
commit126b5379cec2c9f7d5eb51ca8515a5321827e5a0 (patch)
tree130345750ab50571b1dc4dca491f37249d2c04a3
parent5432e2f4a1ef9841088a8adc9eceeb57437a5036 (diff)
downloadcamera-126b5379cec2c9f7d5eb51ca8515a5321827e5a0.zip
camera-126b5379cec2c9f7d5eb51ca8515a5321827e5a0.tar.gz
camera-126b5379cec2c9f7d5eb51ca8515a5321827e5a0.tar.bz2
PD#132034: camera: camera hal compatible for Android N
Change-Id: I9e0274a237d4e9ff024e706df1b21efa2376a036 (cherry picked from commit 47c602724a22369c43f80a28eb7d1ade8cf79a34)
Diffstat
-rw-r--r--v3/EmulatedCameraFactory.cpp2
-rw-r--r--v3/EmulatedFakeCamera3.cpp10
-rw-r--r--[-rwxr-xr-x]v3/fake-pipeline2/util.c2
3 files changed, 12 insertions, 2 deletions
diff --git a/v3/EmulatedCameraFactory.cpp b/v3/EmulatedCameraFactory.cpp
index 42569fd..c5b255d 100644
--- a/v3/EmulatedCameraFactory.cpp
+++ b/v3/EmulatedCameraFactory.cpp
@@ -118,7 +118,7 @@ EmulatedCameraFactory::EmulatedCameraFactory()
}
mHotplugThread = new EmulatedCameraHotplugThread(&cameraIdVector[0],
mEmulatedCameraNum);
- mHotplugThread->run();
+ mHotplugThread->run("");
}
mConstructedOK = true;
diff --git a/v3/EmulatedFakeCamera3.cpp b/v3/EmulatedFakeCamera3.cpp
index b6b25c2..c4dae65 100644
--- a/v3/EmulatedFakeCamera3.cpp
+++ b/v3/EmulatedFakeCamera3.cpp
@@ -859,13 +859,21 @@ const camera_metadata_t* EmulatedFakeCamera3::constructDefaultRequestSettings(
/** android.color */
+#if PLATFORM_SDK_VERSION >= 23
+ static const camera_metadata_rational colorTransform[9] = {
+ {1, 1}, {0, 1}, {0, 1},
+ {0, 1}, {1, 1}, {0, 1},
+ {0, 1}, {0, 1}, {1, 1}
+ };
+ settings.update(ANDROID_COLOR_CORRECTION_TRANSFORM, colorTransform, 9);
+#else
static const float colorTransform[9] = {
1.0f, 0.f, 0.f,
0.f, 1.f, 0.f,
0.f, 0.f, 1.f
};
settings.update(ANDROID_COLOR_CORRECTION_TRANSFORM, colorTransform, 9);
-
+#endif
/** android.tonemap */
static const float tonemapCurve[4] = {
0.f, 0.f,
diff --git a/v3/fake-pipeline2/util.c b/v3/fake-pipeline2/util.c
index 690f853..dd0e22b 100755..100644
--- a/v3/fake-pipeline2/util.c
+++ b/v3/fake-pipeline2/util.c
@@ -1,6 +1,8 @@
#include <utils/Log.h>
+#include <string.h>
#include "util.h"
+
#ifndef ALIGN
#define ALIGN(b,w) (((b)+((w)-1))/(w)*(w))
#endif