gpsProcessingMethod = "unknown";
// GPS fields in CameraParameters are not set by implementation
- wbMode = ANDROID_CONTROL_AWB_AUTO;
+ wbMode = ANDROID_CONTROL_AWB_MODE_AUTO;
params.set(CameraParameters::KEY_WHITE_BALANCE,
CameraParameters::WHITE_BALANCE_AUTO);
if (addComma) supportedWhiteBalance += ",";
addComma = true;
switch (availableWhiteBalanceModes.data.u8[i]) {
- case ANDROID_CONTROL_AWB_AUTO:
+ case ANDROID_CONTROL_AWB_MODE_AUTO:
supportedWhiteBalance +=
CameraParameters::WHITE_BALANCE_AUTO;
break;
- case ANDROID_CONTROL_AWB_INCANDESCENT:
+ case ANDROID_CONTROL_AWB_MODE_INCANDESCENT:
supportedWhiteBalance +=
CameraParameters::WHITE_BALANCE_INCANDESCENT;
break;
- case ANDROID_CONTROL_AWB_FLUORESCENT:
+ case ANDROID_CONTROL_AWB_MODE_FLUORESCENT:
supportedWhiteBalance +=
CameraParameters::WHITE_BALANCE_FLUORESCENT;
break;
- case ANDROID_CONTROL_AWB_WARM_FLUORESCENT:
+ case ANDROID_CONTROL_AWB_MODE_WARM_FLUORESCENT:
supportedWhiteBalance +=
CameraParameters::WHITE_BALANCE_WARM_FLUORESCENT;
break;
- case ANDROID_CONTROL_AWB_DAYLIGHT:
+ case ANDROID_CONTROL_AWB_MODE_DAYLIGHT:
supportedWhiteBalance +=
CameraParameters::WHITE_BALANCE_DAYLIGHT;
break;
- case ANDROID_CONTROL_AWB_CLOUDY_DAYLIGHT:
+ case ANDROID_CONTROL_AWB_MODE_CLOUDY_DAYLIGHT:
supportedWhiteBalance +=
CameraParameters::WHITE_BALANCE_CLOUDY_DAYLIGHT;
break;
- case ANDROID_CONTROL_AWB_TWILIGHT:
+ case ANDROID_CONTROL_AWB_MODE_TWILIGHT:
supportedWhiteBalance +=
CameraParameters::WHITE_BALANCE_TWILIGHT;
break;
- case ANDROID_CONTROL_AWB_SHADE:
+ case ANDROID_CONTROL_AWB_MODE_SHADE:
supportedWhiteBalance +=
CameraParameters::WHITE_BALANCE_SHADE;
break;
// Skipping values not mappable to v1 API
- case ANDROID_CONTROL_AWB_OFF:
+ case ANDROID_CONTROL_AWB_MODE_OFF:
addComma = false;
break;
default:
supportedWhiteBalance);
}
- effectMode = ANDROID_CONTROL_EFFECT_OFF;
+ effectMode = ANDROID_CONTROL_EFFECT_MODE_OFF;
params.set(CameraParameters::KEY_EFFECT,
CameraParameters::EFFECT_NONE);
if (addComma) supportedEffects += ",";
addComma = true;
switch (availableEffects.data.u8[i]) {
- case ANDROID_CONTROL_EFFECT_OFF:
+ case ANDROID_CONTROL_EFFECT_MODE_OFF:
supportedEffects +=
CameraParameters::EFFECT_NONE;
break;
- case ANDROID_CONTROL_EFFECT_MONO:
+ case ANDROID_CONTROL_EFFECT_MODE_MONO:
supportedEffects +=
CameraParameters::EFFECT_MONO;
break;
- case ANDROID_CONTROL_EFFECT_NEGATIVE:
+ case ANDROID_CONTROL_EFFECT_MODE_NEGATIVE:
supportedEffects +=
CameraParameters::EFFECT_NEGATIVE;
break;
- case ANDROID_CONTROL_EFFECT_SOLARIZE:
+ case ANDROID_CONTROL_EFFECT_MODE_SOLARIZE:
supportedEffects +=
CameraParameters::EFFECT_SOLARIZE;
break;
- case ANDROID_CONTROL_EFFECT_SEPIA:
+ case ANDROID_CONTROL_EFFECT_MODE_SEPIA:
supportedEffects +=
CameraParameters::EFFECT_SEPIA;
break;
- case ANDROID_CONTROL_EFFECT_POSTERIZE:
+ case ANDROID_CONTROL_EFFECT_MODE_POSTERIZE:
supportedEffects +=
CameraParameters::EFFECT_POSTERIZE;
break;
- case ANDROID_CONTROL_EFFECT_WHITEBOARD:
+ case ANDROID_CONTROL_EFFECT_MODE_WHITEBOARD:
supportedEffects +=
CameraParameters::EFFECT_WHITEBOARD;
break;
- case ANDROID_CONTROL_EFFECT_BLACKBOARD:
+ case ANDROID_CONTROL_EFFECT_MODE_BLACKBOARD:
supportedEffects +=
CameraParameters::EFFECT_BLACKBOARD;
break;
- case ANDROID_CONTROL_EFFECT_AQUA:
+ case ANDROID_CONTROL_EFFECT_MODE_AQUA:
supportedEffects +=
CameraParameters::EFFECT_AQUA;
break;
params.set(CameraParameters::KEY_SUPPORTED_EFFECTS, supportedEffects);
}
- antibandingMode = ANDROID_CONTROL_AE_ANTIBANDING_AUTO;
+ antibandingMode = ANDROID_CONTROL_AE_ANTIBANDING_MODE_AUTO;
params.set(CameraParameters::KEY_ANTIBANDING,
CameraParameters::ANTIBANDING_AUTO);
if (addComma) supportedAntibanding += ",";
addComma = true;
switch (availableAntibandingModes.data.u8[i]) {
- case ANDROID_CONTROL_AE_ANTIBANDING_OFF:
+ case ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF:
supportedAntibanding +=
CameraParameters::ANTIBANDING_OFF;
break;
- case ANDROID_CONTROL_AE_ANTIBANDING_50HZ:
+ case ANDROID_CONTROL_AE_ANTIBANDING_MODE_50HZ:
supportedAntibanding +=
CameraParameters::ANTIBANDING_50HZ;
break;
- case ANDROID_CONTROL_AE_ANTIBANDING_60HZ:
+ case ANDROID_CONTROL_AE_ANTIBANDING_MODE_60HZ:
supportedAntibanding +=
CameraParameters::ANTIBANDING_60HZ;
break;
- case ANDROID_CONTROL_AE_ANTIBANDING_AUTO:
+ case ANDROID_CONTROL_AE_ANTIBANDING_MODE_AUTO:
supportedAntibanding +=
CameraParameters::ANTIBANDING_AUTO;
break;
}
camera_metadata_ro_entry_t flashAvailable =
- staticInfo(ANDROID_FLASH_AVAILABLE, 1, 1);
+ staticInfo(ANDROID_FLASH_INFO_AVAILABLE, 1, 1);
if (!flashAvailable.count) return NO_INIT;
camera_metadata_ro_entry_t availableAeModes =
"," + CameraParameters::FLASH_MODE_TORCH;
for (size_t i=0; i < availableAeModes.count; i++) {
if (availableAeModes.data.u8[i] ==
- ANDROID_CONTROL_AE_ON_AUTO_FLASH_REDEYE) {
+ ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE) {
supportedFlashModes = supportedFlashModes + "," +
CameraParameters::FLASH_MODE_RED_EYE;
break;
}
camera_metadata_ro_entry_t minFocusDistance =
- staticInfo(ANDROID_LENS_MINIMUM_FOCUS_DISTANCE, 1, 1);
+ staticInfo(ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE, 1, 1);
if (!minFocusDistance.count) return NO_INIT;
camera_metadata_ro_entry_t availableAfModes =
if (addComma) supportedFocusModes += ",";
addComma = true;
switch (availableAfModes.data.u8[i]) {
- case ANDROID_CONTROL_AF_AUTO:
+ case ANDROID_CONTROL_AF_MODE_AUTO:
supportedFocusModes +=
CameraParameters::FOCUS_MODE_AUTO;
break;
- case ANDROID_CONTROL_AF_MACRO:
+ case ANDROID_CONTROL_AF_MODE_MACRO:
supportedFocusModes +=
CameraParameters::FOCUS_MODE_MACRO;
break;
- case ANDROID_CONTROL_AF_CONTINUOUS_VIDEO:
+ case ANDROID_CONTROL_AF_MODE_CONTINUOUS_VIDEO:
supportedFocusModes +=
CameraParameters::FOCUS_MODE_CONTINUOUS_VIDEO;
break;
- case ANDROID_CONTROL_AF_CONTINUOUS_PICTURE:
+ case ANDROID_CONTROL_AF_MODE_CONTINUOUS_PICTURE:
supportedFocusModes +=
CameraParameters::FOCUS_MODE_CONTINUOUS_PICTURE;
break;
- case ANDROID_CONTROL_AF_EDOF:
+ case ANDROID_CONTROL_AF_MODE_EDOF:
supportedFocusModes +=
CameraParameters::FOCUS_MODE_EDOF;
break;
// Not supported in old API
- case ANDROID_CONTROL_AF_OFF:
+ case ANDROID_CONTROL_AF_MODE_OFF:
addComma = false;
break;
default:
focusingAreas.add(Parameters::Area(0,0,0,0,0));
camera_metadata_ro_entry_t availableFocalLengths =
- staticInfo(ANDROID_LENS_AVAILABLE_FOCAL_LENGTHS);
+ staticInfo(ANDROID_LENS_INFO_AVAILABLE_FOCAL_LENGTHS);
if (!availableFocalLengths.count) return NO_INIT;
float minFocalLength = availableFocalLengths.data.f[0];
params.setFloat(CameraParameters::KEY_FOCAL_LENGTH, minFocalLength);
camera_metadata_ro_entry_t sensorSize =
- staticInfo(ANDROID_SENSOR_PHYSICAL_SIZE, 2, 2);
+ staticInfo(ANDROID_SENSOR_INFO_PHYSICAL_SIZE, 2, 2);
if (!sensorSize.count) return NO_INIT;
// The fields of view here assume infinity focus, maximum wide angle
exposureCompensation);
camera_metadata_ro_entry_t exposureCompensationRange =
- staticInfo(ANDROID_CONTROL_AE_EXP_COMPENSATION_RANGE, 2, 2);
+ staticInfo(ANDROID_CONTROL_AE_COMPENSATION_RANGE, 2, 2);
if (!exposureCompensationRange.count) return NO_INIT;
params.set(CameraParameters::KEY_MAX_EXPOSURE_COMPENSATION,
exposureCompensationRange.data.i32[0]);
camera_metadata_ro_entry_t exposureCompensationStep =
- staticInfo(ANDROID_CONTROL_AE_EXP_COMPENSATION_STEP, 1, 1);
+ staticInfo(ANDROID_CONTROL_AE_COMPENSATION_STEP, 1, 1);
if (!exposureCompensationStep.count) return NO_INIT;
params.setFloat(CameraParameters::KEY_EXPOSURE_COMPENSATION_STEP,
params.set(CameraParameters::KEY_MAX_ZOOM, NUM_ZOOM_STEPS - 1);
camera_metadata_ro_entry_t maxDigitalZoom =
- staticInfo(ANDROID_SCALER_AVAILABLE_MAX_ZOOM, /*minCount*/1, /*maxCount*/1);
+ staticInfo(ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM, /*minCount*/1, /*maxCount*/1);
if (!maxDigitalZoom.count) return NO_INIT;
{
status_t Parameters::buildFastInfo() {
camera_metadata_ro_entry_t activeArraySize =
- staticInfo(ANDROID_SENSOR_ACTIVE_ARRAY_SIZE, 2, 2);
+ staticInfo(ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE, 2, 2);
if (!activeArraySize.count) return NO_INIT;
int32_t arrayWidth = activeArraySize.data.i32[0];
int32_t arrayHeight = activeArraySize.data.i32[1];
camera_metadata_ro_entry_t availableFaceDetectModes =
- staticInfo(ANDROID_STATS_AVAILABLE_FACE_DETECT_MODES);
+ staticInfo(ANDROID_STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES);
if (!availableFaceDetectModes.count) return NO_INIT;
uint8_t bestFaceDetectMode =
- ANDROID_STATS_FACE_DETECTION_OFF;
+ ANDROID_STATISTICS_FACE_DETECT_MODE_OFF;
for (size_t i = 0 ; i < availableFaceDetectModes.count; i++) {
switch (availableFaceDetectModes.data.u8[i]) {
- case ANDROID_STATS_FACE_DETECTION_OFF:
+ case ANDROID_STATISTICS_FACE_DETECT_MODE_OFF:
break;
- case ANDROID_STATS_FACE_DETECTION_SIMPLE:
+ case ANDROID_STATISTICS_FACE_DETECT_MODE_SIMPLE:
if (bestFaceDetectMode !=
- ANDROID_STATS_FACE_DETECTION_FULL) {
+ ANDROID_STATISTICS_FACE_DETECT_MODE_FULL) {
bestFaceDetectMode =
- ANDROID_STATS_FACE_DETECTION_SIMPLE;
+ ANDROID_STATISTICS_FACE_DETECT_MODE_SIMPLE;
}
break;
- case ANDROID_STATS_FACE_DETECTION_FULL:
+ case ANDROID_STATISTICS_FACE_DETECT_MODE_FULL:
bestFaceDetectMode =
- ANDROID_STATS_FACE_DETECTION_FULL;
+ ANDROID_STATISTICS_FACE_DETECT_MODE_FULL;
break;
default:
ALOGE("%s: Camera %d: Unknown face detect mode %d:",
}
camera_metadata_ro_entry_t maxFacesDetected =
- staticInfo(ANDROID_STATS_MAX_FACE_COUNT, 1, 1);
+ staticInfo(ANDROID_STATISTICS_INFO_MAX_FACE_COUNT, 1, 1);
if (!maxFacesDetected.count) return NO_INIT;
int32_t maxFaces = maxFacesDetected.data.i32[0];
camera_metadata_ro_entry_t sceneModeOverrides =
staticInfo(ANDROID_CONTROL_SCENE_MODE_OVERRIDES);
camera_metadata_ro_entry_t minFocusDistance =
- staticInfo(ANDROID_LENS_MINIMUM_FOCUS_DISTANCE);
+ staticInfo(ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE);
bool fixedLens = (minFocusDistance.data.f[0] == 0);
if (sceneModeOverrides.count > 0) {
uint8_t aeMode =
sceneModeOverrides.data.u8[i * kModesPerSceneMode + 0];
switch(aeMode) {
- case ANDROID_CONTROL_AE_ON:
+ case ANDROID_CONTROL_AE_MODE_ON:
modes.flashMode = FLASH_MODE_OFF;
break;
- case ANDROID_CONTROL_AE_ON_AUTO_FLASH:
+ case ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH:
modes.flashMode = FLASH_MODE_AUTO;
break;
- case ANDROID_CONTROL_AE_ON_ALWAYS_FLASH:
+ case ANDROID_CONTROL_AE_MODE_ON_ALWAYS_FLASH:
modes.flashMode = FLASH_MODE_ON;
break;
- case ANDROID_CONTROL_AE_ON_AUTO_FLASH_REDEYE:
+ case ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE:
modes.flashMode = FLASH_MODE_RED_EYE;
break;
default:
uint8_t afMode =
sceneModeOverrides.data.u8[i * kModesPerSceneMode + 2];
switch(afMode) {
- case ANDROID_CONTROL_AF_OFF:
+ case ANDROID_CONTROL_AF_MODE_OFF:
modes.focusMode = fixedLens ?
FOCUS_MODE_FIXED : FOCUS_MODE_INFINITY;
break;
- case ANDROID_CONTROL_AF_AUTO:
- case ANDROID_CONTROL_AF_MACRO:
- case ANDROID_CONTROL_AF_CONTINUOUS_VIDEO:
- case ANDROID_CONTROL_AF_CONTINUOUS_PICTURE:
- case ANDROID_CONTROL_AF_EDOF:
+ case ANDROID_CONTROL_AF_MODE_AUTO:
+ case ANDROID_CONTROL_AF_MODE_MACRO:
+ case ANDROID_CONTROL_AF_MODE_CONTINUOUS_VIDEO:
+ case ANDROID_CONTROL_AF_MODE_CONTINUOUS_PICTURE:
+ case ANDROID_CONTROL_AF_MODE_EDOF:
modes.focusMode = static_cast<focusMode_t>(afMode);
break;
default:
if (validatedParams.flashMode != flashMode) {
camera_metadata_ro_entry_t flashAvailable =
- staticInfo(ANDROID_FLASH_AVAILABLE, 1, 1);
+ staticInfo(ANDROID_FLASH_INFO_AVAILABLE, 1, 1);
if (!flashAvailable.data.u8[0] &&
validatedParams.flashMode != Parameters::FLASH_MODE_OFF) {
ALOGE("%s: Requested flash mode \"%s\" is not supported: "
fastInfo.sceneModeOverrides.
valueFor(validatedParams.sceneMode).wbMode;
} else {
- validatedParams.wbMode = ANDROID_CONTROL_AWB_OFF;
+ validatedParams.wbMode = ANDROID_CONTROL_AWB_MODE_OFF;
}
- if (validatedParams.wbMode == ANDROID_CONTROL_AWB_OFF) {
+ if (validatedParams.wbMode == ANDROID_CONTROL_AWB_MODE_OFF) {
validatedParams.wbMode = wbModeStringToEnum(
newParams.get(CameraParameters::KEY_WHITE_BALANCE) );
}
validatedParams.currentAfTriggerId = -1;
if (validatedParams.focusMode != Parameters::FOCUS_MODE_FIXED) {
camera_metadata_ro_entry_t minFocusDistance =
- staticInfo(ANDROID_LENS_MINIMUM_FOCUS_DISTANCE);
+ staticInfo(ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE);
if (minFocusDistance.data.f[0] == 0) {
ALOGE("%s: Requested focus mode \"%s\" is not available: "
"fixed focus lens",
validatedParams.exposureCompensation =
newParams.getInt(CameraParameters::KEY_EXPOSURE_COMPENSATION);
camera_metadata_ro_entry_t exposureCompensationRange =
- staticInfo(ANDROID_CONTROL_AE_EXP_COMPENSATION_RANGE);
+ staticInfo(ANDROID_CONTROL_AE_COMPENSATION_RANGE);
if ((validatedParams.exposureCompensation <
exposureCompensationRange.data.i32[0]) ||
(validatedParams.exposureCompensation >
ATRACE_CALL();
status_t res;
- uint8_t metadataMode = ANDROID_REQUEST_METADATA_FULL;
+ uint8_t metadataMode = ANDROID_REQUEST_METADATA_MODE_FULL;
res = request->update(ANDROID_REQUEST_METADATA_MODE,
&metadataMode, 1);
if (res != OK) return res;
// to the other.
bool sceneModeActive =
sceneMode != (uint8_t)ANDROID_CONTROL_SCENE_MODE_UNSUPPORTED;
- uint8_t reqControlMode = ANDROID_CONTROL_AUTO;
+ uint8_t reqControlMode = ANDROID_CONTROL_MODE_AUTO;
if (enableFaceDetect || sceneModeActive) {
- reqControlMode = ANDROID_CONTROL_USE_SCENE_MODE;
+ reqControlMode = ANDROID_CONTROL_MODE_USE_SCENE_MODE;
}
res = request->update(ANDROID_CONTROL_MODE,
&reqControlMode, 1);
&reqSceneMode, 1);
if (res != OK) return res;
- uint8_t reqFlashMode = ANDROID_FLASH_OFF;
- uint8_t reqAeMode = ANDROID_CONTROL_AE_OFF;
+ uint8_t reqFlashMode = ANDROID_FLASH_MODE_OFF;
+ uint8_t reqAeMode = ANDROID_CONTROL_AE_MODE_OFF;
switch (flashMode) {
case Parameters::FLASH_MODE_OFF:
- reqAeMode = ANDROID_CONTROL_AE_ON; break;
+ reqAeMode = ANDROID_CONTROL_AE_MODE_ON; break;
case Parameters::FLASH_MODE_AUTO:
- reqAeMode = ANDROID_CONTROL_AE_ON_AUTO_FLASH; break;
+ reqAeMode = ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH; break;
case Parameters::FLASH_MODE_ON:
- reqAeMode = ANDROID_CONTROL_AE_ON_ALWAYS_FLASH; break;
+ reqAeMode = ANDROID_CONTROL_AE_MODE_ON_ALWAYS_FLASH; break;
case Parameters::FLASH_MODE_TORCH:
- reqAeMode = ANDROID_CONTROL_AE_ON;
- reqFlashMode = ANDROID_FLASH_TORCH;
+ reqAeMode = ANDROID_CONTROL_AE_MODE_ON;
+ reqFlashMode = ANDROID_FLASH_MODE_TORCH;
break;
case Parameters::FLASH_MODE_RED_EYE:
- reqAeMode = ANDROID_CONTROL_AE_ON_AUTO_FLASH_REDEYE; break;
+ reqAeMode = ANDROID_CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE; break;
default:
ALOGE("%s: Camera %d: Unknown flash mode %d", __FUNCTION__,
cameraId, flashMode);
if (res != OK) return res;
float reqFocusDistance = 0; // infinity focus in diopters
- uint8_t reqFocusMode = ANDROID_CONTROL_AF_OFF;
+ uint8_t reqFocusMode = ANDROID_CONTROL_AF_MODE_OFF;
switch (focusMode) {
case Parameters::FOCUS_MODE_AUTO:
case Parameters::FOCUS_MODE_MACRO:
break;
case Parameters::FOCUS_MODE_INFINITY:
case Parameters::FOCUS_MODE_FIXED:
- reqFocusMode = ANDROID_CONTROL_AF_OFF;
+ reqFocusMode = ANDROID_CONTROL_AF_MODE_OFF;
break;
default:
ALOGE("%s: Camera %d: Unknown focus mode %d", __FUNCTION__,
if (res != OK) return res;
delete[] reqFocusingAreas;
- res = request->update(ANDROID_CONTROL_AE_EXP_COMPENSATION,
+ res = request->update(ANDROID_CONTROL_AE_EXPOSURE_COMPENSATION,
&exposureCompensation, 1);
if (res != OK) return res;
if (res != OK) return res;
uint8_t reqVstabMode = videoStabilization ?
- ANDROID_CONTROL_VIDEO_STABILIZATION_ON :
- ANDROID_CONTROL_VIDEO_STABILIZATION_OFF;
+ ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_ON :
+ ANDROID_CONTROL_VIDEO_STABILIZATION_MODE_OFF;
res = request->update(ANDROID_CONTROL_VIDEO_STABILIZATION_MODE,
&reqVstabMode, 1);
if (res != OK) return res;
uint8_t reqFaceDetectMode = enableFaceDetect ?
fastInfo.bestFaceDetectMode :
- (uint8_t)ANDROID_STATS_FACE_DETECTION_OFF;
- res = request->update(ANDROID_STATS_FACE_DETECT_MODE,
+ (uint8_t)ANDROID_STATISTICS_FACE_DETECT_MODE_OFF;
+ res = request->update(ANDROID_STATISTICS_FACE_DETECT_MODE,
&reqFaceDetectMode, 1);
if (res != OK) return res;
int Parameters::wbModeStringToEnum(const char *wbMode) {
return
!wbMode ?
- ANDROID_CONTROL_AWB_AUTO :
+ ANDROID_CONTROL_AWB_MODE_AUTO :
!strcmp(wbMode, CameraParameters::WHITE_BALANCE_AUTO) ?
- ANDROID_CONTROL_AWB_AUTO :
+ ANDROID_CONTROL_AWB_MODE_AUTO :
!strcmp(wbMode, CameraParameters::WHITE_BALANCE_INCANDESCENT) ?
- ANDROID_CONTROL_AWB_INCANDESCENT :
+ ANDROID_CONTROL_AWB_MODE_INCANDESCENT :
!strcmp(wbMode, CameraParameters::WHITE_BALANCE_FLUORESCENT) ?
- ANDROID_CONTROL_AWB_FLUORESCENT :
+ ANDROID_CONTROL_AWB_MODE_FLUORESCENT :
!strcmp(wbMode, CameraParameters::WHITE_BALANCE_WARM_FLUORESCENT) ?
- ANDROID_CONTROL_AWB_WARM_FLUORESCENT :
+ ANDROID_CONTROL_AWB_MODE_WARM_FLUORESCENT :
!strcmp(wbMode, CameraParameters::WHITE_BALANCE_DAYLIGHT) ?
- ANDROID_CONTROL_AWB_DAYLIGHT :
+ ANDROID_CONTROL_AWB_MODE_DAYLIGHT :
!strcmp(wbMode, CameraParameters::WHITE_BALANCE_CLOUDY_DAYLIGHT) ?
- ANDROID_CONTROL_AWB_CLOUDY_DAYLIGHT :
+ ANDROID_CONTROL_AWB_MODE_CLOUDY_DAYLIGHT :
!strcmp(wbMode, CameraParameters::WHITE_BALANCE_TWILIGHT) ?
- ANDROID_CONTROL_AWB_TWILIGHT :
+ ANDROID_CONTROL_AWB_MODE_TWILIGHT :
!strcmp(wbMode, CameraParameters::WHITE_BALANCE_SHADE) ?
- ANDROID_CONTROL_AWB_SHADE :
+ ANDROID_CONTROL_AWB_MODE_SHADE :
-1;
}
const char* Parameters::wbModeEnumToString(uint8_t wbMode) {
switch (wbMode) {
- case ANDROID_CONTROL_AWB_AUTO:
+ case ANDROID_CONTROL_AWB_MODE_AUTO:
return CameraParameters::WHITE_BALANCE_AUTO;
- case ANDROID_CONTROL_AWB_INCANDESCENT:
+ case ANDROID_CONTROL_AWB_MODE_INCANDESCENT:
return CameraParameters::WHITE_BALANCE_INCANDESCENT;
- case ANDROID_CONTROL_AWB_FLUORESCENT:
+ case ANDROID_CONTROL_AWB_MODE_FLUORESCENT:
return CameraParameters::WHITE_BALANCE_FLUORESCENT;
- case ANDROID_CONTROL_AWB_WARM_FLUORESCENT:
+ case ANDROID_CONTROL_AWB_MODE_WARM_FLUORESCENT:
return CameraParameters::WHITE_BALANCE_WARM_FLUORESCENT;
- case ANDROID_CONTROL_AWB_DAYLIGHT:
+ case ANDROID_CONTROL_AWB_MODE_DAYLIGHT:
return CameraParameters::WHITE_BALANCE_DAYLIGHT;
- case ANDROID_CONTROL_AWB_CLOUDY_DAYLIGHT:
+ case ANDROID_CONTROL_AWB_MODE_CLOUDY_DAYLIGHT:
return CameraParameters::WHITE_BALANCE_CLOUDY_DAYLIGHT;
- case ANDROID_CONTROL_AWB_TWILIGHT:
+ case ANDROID_CONTROL_AWB_MODE_TWILIGHT:
return CameraParameters::WHITE_BALANCE_TWILIGHT;
- case ANDROID_CONTROL_AWB_SHADE:
+ case ANDROID_CONTROL_AWB_MODE_SHADE:
return CameraParameters::WHITE_BALANCE_SHADE;
default:
ALOGE("%s: Unknown AWB mode enum: %d",
int Parameters::effectModeStringToEnum(const char *effectMode) {
return
!effectMode ?
- ANDROID_CONTROL_EFFECT_OFF :
+ ANDROID_CONTROL_EFFECT_MODE_OFF :
!strcmp(effectMode, CameraParameters::EFFECT_NONE) ?
- ANDROID_CONTROL_EFFECT_OFF :
+ ANDROID_CONTROL_EFFECT_MODE_OFF :
!strcmp(effectMode, CameraParameters::EFFECT_MONO) ?
- ANDROID_CONTROL_EFFECT_MONO :
+ ANDROID_CONTROL_EFFECT_MODE_MONO :
!strcmp(effectMode, CameraParameters::EFFECT_NEGATIVE) ?
- ANDROID_CONTROL_EFFECT_NEGATIVE :
+ ANDROID_CONTROL_EFFECT_MODE_NEGATIVE :
!strcmp(effectMode, CameraParameters::EFFECT_SOLARIZE) ?
- ANDROID_CONTROL_EFFECT_SOLARIZE :
+ ANDROID_CONTROL_EFFECT_MODE_SOLARIZE :
!strcmp(effectMode, CameraParameters::EFFECT_SEPIA) ?
- ANDROID_CONTROL_EFFECT_SEPIA :
+ ANDROID_CONTROL_EFFECT_MODE_SEPIA :
!strcmp(effectMode, CameraParameters::EFFECT_POSTERIZE) ?
- ANDROID_CONTROL_EFFECT_POSTERIZE :
+ ANDROID_CONTROL_EFFECT_MODE_POSTERIZE :
!strcmp(effectMode, CameraParameters::EFFECT_WHITEBOARD) ?
- ANDROID_CONTROL_EFFECT_WHITEBOARD :
+ ANDROID_CONTROL_EFFECT_MODE_WHITEBOARD :
!strcmp(effectMode, CameraParameters::EFFECT_BLACKBOARD) ?
- ANDROID_CONTROL_EFFECT_BLACKBOARD :
+ ANDROID_CONTROL_EFFECT_MODE_BLACKBOARD :
!strcmp(effectMode, CameraParameters::EFFECT_AQUA) ?
- ANDROID_CONTROL_EFFECT_AQUA :
+ ANDROID_CONTROL_EFFECT_MODE_AQUA :
-1;
}
int Parameters::abModeStringToEnum(const char *abMode) {
return
!abMode ?
- ANDROID_CONTROL_AE_ANTIBANDING_AUTO :
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE_AUTO :
!strcmp(abMode, CameraParameters::ANTIBANDING_AUTO) ?
- ANDROID_CONTROL_AE_ANTIBANDING_AUTO :
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE_AUTO :
!strcmp(abMode, CameraParameters::ANTIBANDING_OFF) ?
- ANDROID_CONTROL_AE_ANTIBANDING_OFF :
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE_OFF :
!strcmp(abMode, CameraParameters::ANTIBANDING_50HZ) ?
- ANDROID_CONTROL_AE_ANTIBANDING_50HZ :
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE_50HZ :
!strcmp(abMode, CameraParameters::ANTIBANDING_60HZ) ?
- ANDROID_CONTROL_AE_ANTIBANDING_60HZ :
+ ANDROID_CONTROL_AE_ANTIBANDING_MODE_60HZ :
-1;
}
// chosen to maximize its area on the sensor
camera_metadata_ro_entry_t maxDigitalZoom =
- staticInfo(ANDROID_SCALER_AVAILABLE_MAX_ZOOM);
+ staticInfo(ANDROID_SCALER_AVAILABLE_MAX_DIGITAL_ZOOM);
// For each zoom step by how many pixels more do we change the zoom
float zoomIncrement = (maxDigitalZoom.data.f[0] - 1) /
(NUM_ZOOM_STEPS-1);