From: Alex Ray Date: Thu, 26 Sep 2013 21:06:42 +0000 (-0700) Subject: libcamera2: Static characteristic metadata fixes X-Git-Tag: cm-11.0-XNPH22R-bacon-03d77315ea~1^2~3^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1b2236edfaed20ebf8087a3017042989dfa7b1fe;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_exynos5.git libcamera2: Static characteristic metadata fixes Bug: 10838063 Change-Id: I28b841bda396312c0a2999cd5844640527a9fc77 --- diff --git a/libcamera2/ExynosCamera2.cpp b/libcamera2/ExynosCamera2.cpp index b38d619..c384a76 100644 --- a/libcamera2/ExynosCamera2.cpp +++ b/libcamera2/ExynosCamera2.cpp @@ -425,6 +425,11 @@ status_t ExynosCamera2::constructStaticInfo(camera_metadata_t **info, ANDROID_LENS_FACING_FRONT : ANDROID_LENS_FACING_BACK; ADD_OR_SIZE(ANDROID_LENS_FACING, &lensFacing, 1); + // android.request + static const int32_t maxNumOutputStreams[] = {1, 3, 1}; + ADD_OR_SIZE(ANDROID_REQUEST_MAX_NUM_OUTPUT_STREAMS, maxNumOutputStreams, + sizeof(maxNumOutputStreams)/sizeof(int32_t)); + // android.sensor ADD_OR_SIZE(ANDROID_SENSOR_INFO_EXPOSURE_TIME_RANGE, Sensor::kExposureTimeRange, 2); @@ -449,7 +454,9 @@ status_t ExynosCamera2::constructStaticInfo(camera_metadata_t **info, m_curCameraInfo->sensorW, m_curCameraInfo->sensorH }; ADD_OR_SIZE(ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE, pixelArraySize, 2); - ADD_OR_SIZE(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE, pixelArraySize,2); + + int32_t activeArraySize[4] = { 0, 0, pixelArraySize[0], pixelArraySize[1]}; + ADD_OR_SIZE(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE, activeArraySize,4); ADD_OR_SIZE(ANDROID_SENSOR_INFO_WHITE_LEVEL, &Sensor::kMaxRawValue, 1); @@ -461,6 +468,10 @@ status_t ExynosCamera2::constructStaticInfo(camera_metadata_t **info, ADD_OR_SIZE(ANDROID_SENSOR_BLACK_LEVEL_PATTERN, blackLevelPattern, sizeof(blackLevelPattern)/sizeof(int32_t)); + static const int32_t orientation[1] = {0}; + ADD_OR_SIZE(ANDROID_SENSOR_ORIENTATION, + orientation, 1); + //TODO: sensor color calibration fields // android.flash