Methods Summary |
---|
private void | buildFlashModes(Camera.Parameters p)
List<String> supportedFlashModes = p.getSupportedFlashModes();
if (supportedFlashModes == null) {
// Camera 1 will return NULL if no flash mode is supported.
mSupportedFlashModes.add(FlashMode.NO_FLASH);
} else {
for (String flash : supportedFlashModes) {
if (Camera.Parameters.FLASH_MODE_AUTO.equals(flash)) {
mSupportedFlashModes.add(FlashMode.AUTO);
} else if (Camera.Parameters.FLASH_MODE_OFF.equals(flash)) {
mSupportedFlashModes.add(FlashMode.OFF);
} else if (Camera.Parameters.FLASH_MODE_ON.equals(flash)) {
mSupportedFlashModes.add(FlashMode.ON);
} else if (Camera.Parameters.FLASH_MODE_RED_EYE.equals(flash)) {
mSupportedFlashModes.add(FlashMode.RED_EYE);
} else if (Camera.Parameters.FLASH_MODE_TORCH.equals(flash)) {
mSupportedFlashModes.add(FlashMode.TORCH);
}
}
}
|
private void | buildFocusModes(Camera.Parameters p)
List<String> supportedFocusModes = p.getSupportedFocusModes();
if (supportedFocusModes != null) {
for (String focus : supportedFocusModes) {
if (Camera.Parameters.FOCUS_MODE_AUTO.equals(focus)) {
mSupportedFocusModes.add(FocusMode.AUTO);
} else if (Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE.equals(focus)) {
mSupportedFocusModes.add(FocusMode.CONTINUOUS_PICTURE);
} else if (Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO.equals(focus)) {
mSupportedFocusModes.add(FocusMode.CONTINUOUS_VIDEO);
} else if (Camera.Parameters.FOCUS_MODE_EDOF.equals(focus)) {
mSupportedFocusModes.add(FocusMode.EXTENDED_DOF);
} else if (Camera.Parameters.FOCUS_MODE_FIXED.equals(focus)) {
mSupportedFocusModes.add(FocusMode.FIXED);
} else if (Camera.Parameters.FOCUS_MODE_INFINITY.equals(focus)) {
mSupportedFocusModes.add(FocusMode.INFINITY);
} else if (Camera.Parameters.FOCUS_MODE_MACRO.equals(focus)) {
mSupportedFocusModes.add(FocusMode.MACRO);
}
}
}
|
private void | buildPictureSizes(Camera.Parameters p)
List<Camera.Size> supportedPictureSizes = p.getSupportedPictureSizes();
if (supportedPictureSizes != null) {
for (Camera.Size s : supportedPictureSizes) {
mSupportedPhotoSizes.add(new Size(s.width, s.height));
}
}
Collections.sort(mSupportedPhotoSizes, mSizeComparator);
|
private void | buildPreviewFpsRange(Camera.Parameters p)
List<int[]> supportedPreviewFpsRange = p.getSupportedPreviewFpsRange();
if (supportedPreviewFpsRange != null) {
mSupportedPreviewFpsRange.addAll(supportedPreviewFpsRange);
}
Collections.sort(mSupportedPreviewFpsRange, mFpsComparator);
|
private void | buildPreviewSizes(Camera.Parameters p)
List<Camera.Size> supportedPreviewSizes = p.getSupportedPreviewSizes();
if (supportedPreviewSizes != null) {
for (Camera.Size s : supportedPreviewSizes) {
mSupportedPreviewSizes.add(new Size(s.width, s.height));
}
}
Collections.sort(mSupportedPreviewSizes, mSizeComparator);
|
private void | buildSceneModes(Camera.Parameters p)
List<String> supportedSceneModes = p.getSupportedSceneModes();
if (supportedSceneModes != null) {
for (String scene : supportedSceneModes) {
if (Camera.Parameters.SCENE_MODE_AUTO.equals(scene)) {
mSupportedSceneModes.add(SceneMode.AUTO);
} else if (Camera.Parameters.SCENE_MODE_ACTION.equals(scene)) {
mSupportedSceneModes.add(SceneMode.ACTION);
} else if (Camera.Parameters.SCENE_MODE_BARCODE.equals(scene)) {
mSupportedSceneModes.add(SceneMode.BARCODE);
} else if (Camera.Parameters.SCENE_MODE_BEACH.equals(scene)) {
mSupportedSceneModes.add(SceneMode.BEACH);
} else if (Camera.Parameters.SCENE_MODE_CANDLELIGHT.equals(scene)) {
mSupportedSceneModes.add(SceneMode.CANDLELIGHT);
} else if (Camera.Parameters.SCENE_MODE_FIREWORKS.equals(scene)) {
mSupportedSceneModes.add(SceneMode.FIREWORKS);
} else if (Camera.Parameters.SCENE_MODE_HDR.equals(scene)) {
mSupportedSceneModes.add(SceneMode.HDR);
} else if (Camera.Parameters.SCENE_MODE_LANDSCAPE.equals(scene)) {
mSupportedSceneModes.add(SceneMode.LANDSCAPE);
} else if (Camera.Parameters.SCENE_MODE_NIGHT.equals(scene)) {
mSupportedSceneModes.add(SceneMode.NIGHT);
} else if (Camera.Parameters.SCENE_MODE_NIGHT_PORTRAIT.equals(scene)) {
mSupportedSceneModes.add(SceneMode.NIGHT_PORTRAIT);
} else if (Camera.Parameters.SCENE_MODE_PARTY.equals(scene)) {
mSupportedSceneModes.add(SceneMode.PARTY);
} else if (Camera.Parameters.SCENE_MODE_PORTRAIT.equals(scene)) {
mSupportedSceneModes.add(SceneMode.PORTRAIT);
} else if (Camera.Parameters.SCENE_MODE_SNOW.equals(scene)) {
mSupportedSceneModes.add(SceneMode.SNOW);
} else if (Camera.Parameters.SCENE_MODE_SPORTS.equals(scene)) {
mSupportedSceneModes.add(SceneMode.SPORTS);
} else if (Camera.Parameters.SCENE_MODE_STEADYPHOTO.equals(scene)) {
mSupportedSceneModes.add(SceneMode.STEADYPHOTO);
} else if (Camera.Parameters.SCENE_MODE_SUNSET.equals(scene)) {
mSupportedSceneModes.add(SceneMode.SUNSET);
} else if (Camera.Parameters.SCENE_MODE_THEATRE.equals(scene)) {
mSupportedSceneModes.add(SceneMode.THEATRE);
}
}
}
|
private void | buildVideoSizes(Camera.Parameters p)
List<Camera.Size> supportedVideoSizes = p.getSupportedVideoSizes();
if (supportedVideoSizes != null) {
for (Camera.Size s : supportedVideoSizes) {
mSupportedVideoSizes.add(new Size(s.width, s.height));
}
}
Collections.sort(mSupportedVideoSizes, mSizeComparator);
|
private void | buildWhiteBalances(Camera.Parameters p)
List<String> supportedWhiteBalances = p.getSupportedFocusModes();
if (supportedWhiteBalances != null) {
for (String wb : supportedWhiteBalances) {
if (Camera.Parameters.WHITE_BALANCE_AUTO.equals(wb)) {
mSupportedWhiteBalances.add(WhiteBalance.AUTO);
} else if (Camera.Parameters.WHITE_BALANCE_CLOUDY_DAYLIGHT.equals(wb)) {
mSupportedWhiteBalances.add(WhiteBalance.CLOUDY_DAYLIGHT);
} else if (Camera.Parameters.WHITE_BALANCE_DAYLIGHT.equals(wb)) {
mSupportedWhiteBalances.add(WhiteBalance.DAYLIGHT);
} else if (Camera.Parameters.WHITE_BALANCE_FLUORESCENT.equals(wb)) {
mSupportedWhiteBalances.add(WhiteBalance.FLUORESCENT);
} else if (Camera.Parameters.WHITE_BALANCE_INCANDESCENT.equals(wb)) {
mSupportedWhiteBalances.add(WhiteBalance.INCANDESCENT);
} else if (Camera.Parameters.WHITE_BALANCE_SHADE.equals(wb)) {
mSupportedWhiteBalances.add(WhiteBalance.SHADE);
} else if (Camera.Parameters.WHITE_BALANCE_TWILIGHT.equals(wb)) {
mSupportedWhiteBalances.add(WhiteBalance.TWILIGHT);
} else if (Camera.Parameters.WHITE_BALANCE_WARM_FLUORESCENT.equals(wb)) {
mSupportedWhiteBalances.add(WhiteBalance.WARM_FLUORESCENT);
}
}
}
|