Hello Igor ,
I have checked the above , but when trying to implement the same I came across the some codes where I observe that the zoom feature is enables as in the files ,
/frameworks/av/services/camera/libcameraservice/api1/client2/Parameters.cpp
Further more when trying to find the cause of the failure, we followed the logcat and came across the snippet in the file,
frameworks/base/core/java/android/hardware/camera2/legacy/LegacyRequestMapper.java as
| | // Add all non-zero weight regions to the list |
| | List<MeteringRectangle> meteringRectangleList = new ArrayList<>(); |
| | for (MeteringRectangle rect : meteringRegions) { |
| | if (rect.getMeteringWeight() != MeteringRectangle.METERING_WEIGHT_DONT_CARE) { |
| | meteringRectangleList.add(rect); |
| | } |
| | } |
| | if (meteringRectangleList.size() == 0) { |
| | Log.w(TAG, "Only received metering rectangles with weight 0."); |
| | return Arrays.asList(ParameterUtils.CAMERA_AREA_DEFAULT); |
| | } |
| | // Ignore any regions beyond our maximum supported count |
| | int countMeteringAreas = |
| | Math.min(maxNumMeteringAreas, meteringRectangleList.size()); |
| | List<Camera.Area> meteringAreaList = new ArrayList<>(countMeteringAreas); |
| | for (int i = 0; i < countMeteringAreas; ++i) { |
| | MeteringRectangle rect = meteringRectangleList.get(i); |
| | ParameterUtils.MeteringData meteringData = |
| | ParameterUtils.convertMeteringRectangleToLegacy(activeArray, rect, zoomData); |
| | meteringAreaList.add(meteringData.meteringArea); |
| | } |
Based on this I believe that to enable the zoom feature on the camera the measuring (weighted sum ) of the AWB has to be calculated . From the above code the log is seen Only received metering rectangles with weight 0. and the it is exiting , without setting the metering area for the zoom , and zoom feature.Is it possible to get around this error Can you guide me through this ?
Regards,
Karan