List of utility methods to do Camera Set
void | setBarcodeSceneMode(Camera.Parameters parameters) set Barcode Scene Mode if (Camera.Parameters.SCENE_MODE_BARCODE.equals(parameters .getSceneMode())) { Log.i(TAG, "Barcode scene mode already set"); return; String sceneMode = findSettableValue("scene mode", parameters.getSupportedSceneModes(), Camera.Parameters.SCENE_MODE_BARCODE); ... |
void | setBestExposure(Camera.Parameters parameters, boolean lightOn) set Best Exposure int minExposure = parameters.getMinExposureCompensation(); int maxExposure = parameters.getMaxExposureCompensation(); float step = parameters.getExposureCompensationStep(); if ((minExposure != 0 || maxExposure != 0) && step > 0.0f) { float targetCompensation = lightOn ? MIN_EXPOSURE_COMPENSATION : MAX_EXPOSURE_COMPENSATION; int compensationSteps = Math.round(targetCompensation / step); float actualCompensation = step * compensationSteps; ... |
void | setBestPreviewFPS(Camera.Parameters parameters) set Best Preview FPS setBestPreviewFPS(parameters, MIN_FPS, MAX_FPS); |
void | setBestPreviewFPS(Camera.Parameters parameters, int minFPS, int maxFPS) set Best Preview FPS List<int[]> supportedPreviewFpsRanges = parameters .getSupportedPreviewFpsRange(); Log.i(TAG, "Supported FPS ranges: " + toString(supportedPreviewFpsRanges)); if (supportedPreviewFpsRanges != null && !supportedPreviewFpsRanges.isEmpty()) { int[] suitableFPSRange = null; for (int[] fpsRange : supportedPreviewFpsRanges) { ... |
void | setCameraDisplayOrientation(Context mContext, int cameraId, Camera camera) set Camera Display Orientation CameraInfo info = new CameraInfo(); Camera.getCameraInfo(cameraId, info); int rotation = ((Activity) mContext).getWindowManager() .getDefaultDisplay().getRotation(); int degrees = 0; switch (rotation) { case Surface.ROTATION_0: degrees = 0; ... |
void | setFocus(Camera.Parameters parameters, boolean autoFocus, boolean disableContinuous, boolean safeMode) set Focus List<String> supportedFocusModes = parameters .getSupportedFocusModes(); String focusMode = null; if (autoFocus) { if (safeMode || disableContinuous) { focusMode = findSettableValue("focus mode", supportedFocusModes, Camera.Parameters.FOCUS_MODE_AUTO); ... |
void | setFocusArea(Camera.Parameters parameters) set Focus Area if (parameters.getMaxNumFocusAreas() > 0) { Log.i(TAG, "Old focus areas: " + toString(parameters.getFocusAreas())); List<Camera.Area> middleArea = buildMiddleArea(AREA_PER_1000); Log.i(TAG, "Setting focus area to : " + toString(middleArea)); parameters.setFocusAreas(middleArea); } else { ... |
void | setInvertColor(Camera.Parameters parameters) set Invert Color if (Camera.Parameters.EFFECT_NEGATIVE.equals(parameters .getColorEffect())) { Log.i(TAG, "Negative effect already set"); return; String colorMode = findSettableValue("color effect", parameters.getSupportedColorEffects(), Camera.Parameters.EFFECT_NEGATIVE); ... |
void | setMetering(Camera.Parameters parameters) set Metering if (parameters.getMaxNumMeteringAreas() > 0) { Log.i(TAG, "Old metering areas: " + parameters.getMeteringAreas()); List<Camera.Area> middleArea = buildMiddleArea(AREA_PER_1000); Log.i(TAG, "Setting metering area to : " + toString(middleArea)); parameters.setMeteringAreas(middleArea); } else { Log.i(TAG, "Device does not support metering areas"); ... |
void | setTorch(Camera.Parameters parameters, boolean on) set Torch List<String> supportedFlashModes = parameters .getSupportedFlashModes(); String flashMode; if (on) { flashMode = findSettableValue("flash mode", supportedFlashModes, Camera.Parameters.FLASH_MODE_TORCH, Camera.Parameters.FLASH_MODE_ON); ... |