public abstract class CameraSettings extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CameraSettings.GpsData
An immutable class storing GPS related information.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
mAutoExposureLocked |
protected boolean |
mAutoWhiteBalanceLocked |
protected CameraCapabilities.FlashMode |
mCurrentFlashMode |
protected CameraCapabilities.FocusMode |
mCurrentFocusMode |
protected int |
mCurrentPhotoFormat |
protected Size |
mCurrentPhotoSize |
protected Size |
mCurrentPreviewSize |
protected CameraCapabilities.SceneMode |
mCurrentSceneMode |
protected float |
mCurrentZoomRatio |
protected Size |
mExifThumbnailSize |
protected int |
mExposureCompensationIndex |
protected List<Camera.Area> |
mFocusAreas |
protected Map<String,String> |
mGeneralSetting |
protected CameraSettings.GpsData |
mGpsData |
protected byte |
mJpegCompressQuality |
protected List<Camera.Area> |
mMeteringAreas |
protected int |
mPreviewFpsRangeMax |
protected int |
mPreviewFpsRangeMin |
protected int |
mPreviewFrameRate |
protected boolean |
mRecordingHintEnabled |
protected boolean |
mSizesLocked |
protected boolean |
mVideoStabilizationEnabled |
protected CameraCapabilities.WhiteBalance |
mWhiteBalance |
Modifier | Constructor and Description |
---|---|
protected |
CameraSettings() |
protected |
CameraSettings(CameraSettings src)
Copy constructor.
|
protected final List<Camera.Area> mMeteringAreas
protected final List<Camera.Area> mFocusAreas
protected boolean mSizesLocked
protected int mPreviewFpsRangeMin
protected int mPreviewFpsRangeMax
protected int mPreviewFrameRate
protected Size mCurrentPreviewSize
protected Size mCurrentPhotoSize
protected byte mJpegCompressQuality
protected int mCurrentPhotoFormat
protected float mCurrentZoomRatio
protected int mExposureCompensationIndex
protected CameraCapabilities.FlashMode mCurrentFlashMode
protected CameraCapabilities.FocusMode mCurrentFocusMode
protected CameraCapabilities.SceneMode mCurrentSceneMode
protected CameraCapabilities.WhiteBalance mWhiteBalance
protected boolean mVideoStabilizationEnabled
protected boolean mAutoExposureLocked
protected boolean mAutoWhiteBalanceLocked
protected boolean mRecordingHintEnabled
protected CameraSettings.GpsData mGpsData
protected Size mExifThumbnailSize
protected CameraSettings()
protected CameraSettings(CameraSettings src)
src
- The source settings.public abstract CameraSettings copy()
@Deprecated public void setSetting(String key, String value)
public void setPreviewFpsRange(int min, int max)
setPreviewFrameRate(int)
.min
- The min FPS.max
- The max FPS.public int getPreviewFpsRangeMin()
public int getPreviewFpsRangeMax()
public void setPreviewFrameRate(int frameRate)
setPreviewFpsRange(int, int)
.frameRate
- The target frame rate.public int getPreviewFrameRate()
public Size getCurrentPreviewSize()
public boolean setPreviewSize(Size previewSize)
previewSize
- The size to use for preview.public void setPreviewFormat(int format)
format
- android.graphics.ImageFormat}.
public int getCurrentPreviewFormat()
android.graphics.ImageFormat}.
public Size getCurrentPhotoSize()
public boolean setPhotoSize(Size photoSize)
photoSize
- The size to use for preview.public void setPhotoFormat(int format)
format
- The format for the photos taken.android.graphics.ImageFormat}.
public int getCurrentPhotoFormat()
android.graphics.ImageFormat}.
public void setPhotoJpegCompressionQuality(int quality)
quality
- The quality for JPEG.public int getPhotoJpegCompressionQuality()
public float getCurrentZoomRatio()
public void setZoomRatio(float ratio)
ratio
- The new zoom ratio. Should be in the range between 1.0 to
the value returned from com.android.camera.cameradevice.CameraCapabilities#getMaxZoomRatio()
.UnsupportedOperationException
- if the ratio is not
supported.public void setExposureCompensationIndex(int index)
public int getExposureCompensationIndex()
public void setAutoExposureLock(boolean locked)
public boolean isAutoExposureLocked()
public void setMeteringAreas(List<Camera.Area> areas)
areas
- The areas for autoexposure. The coordinate system has domain
and range [-1000,1000], measured relative to the visible
preview image, with orientation matching that of the sensor.
This means the coordinates must be transformed to account
for the devices rotation---but not the zoom level---before
being passed into this method.public List<Camera.Area> getMeteringAreas()
public CameraCapabilities.FlashMode getCurrentFlashMode()
public void setFlashMode(CameraCapabilities.FlashMode flashMode)
public void setFocusMode(CameraCapabilities.FocusMode focusMode)
focusMode
- The focus mode to use.public CameraCapabilities.FocusMode getCurrentFocusMode()
public void setFocusAreas(List<Camera.Area> areas)
areas
- The areas to focus. The coordinate system has domain and
range [-1000,1000], measured relative to the visible preview
image, with orientation matching that of the sensor. This
means the coordinates must be transformed to account for
the devices rotation---but not the zoom level---before being
passed into this method.public List<Camera.Area> getFocusAreas()
public void setWhiteBalance(CameraCapabilities.WhiteBalance whiteBalance)
public CameraCapabilities.WhiteBalance getWhiteBalance()
public void setAutoWhiteBalanceLock(boolean locked)
public boolean isAutoWhiteBalanceLocked()
public CameraCapabilities.SceneMode getCurrentSceneMode()
public void setSceneMode(CameraCapabilities.SceneMode sceneMode)
sceneMode
- The scene mode to use.UnsupportedOperationException
- if it's not supported.public void setVideoStabilization(boolean enabled)
public boolean isVideoStabilizationEnabled()
public void setRecordingHintEnabled(boolean hintEnabled)
public boolean isRecordingHintEnabled()
public void setGpsData(CameraSettings.GpsData data)
public CameraSettings.GpsData getGpsData()
public void clearGpsData()
public void setExifThumbnailSize(Size s)
s
- The size for the thumbnail. If null
, agent will not
set a thumbnail size.public Size getExifThumbnailSize()