From 126b5379cec2c9f7d5eb51ca8515a5321827e5a0 Mon Sep 17 00:00:00 2001 From: Guosong Zhou Date: Tue, 13 Sep 2016 11:38:18 +0000 Subject: PD#132034: camera: camera hal compatible for Android N Change-Id: I9e0274a237d4e9ff024e706df1b21efa2376a036 (cherry picked from commit 47c602724a22369c43f80a28eb7d1ade8cf79a34) --- 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 +#include #include "util.h" + #ifndef ALIGN #define ALIGN(b,w) (((b)+((w)-1))/(w)*(w)) #endif -- cgit