public class AndroidCamera2Settings extends CameraSettings
CameraSettings
for Android Camera 2 API.CameraSettings.GpsData
mAutoExposureLocked, mAutoWhiteBalanceLocked, mCurrentFlashMode, mCurrentFocusMode, mCurrentPhotoFormat, mCurrentPhotoSize, mCurrentPreviewSize, mCurrentSceneMode, mCurrentZoomRatio, mExifThumbnailSize, mExposureCompensationIndex, mFocusAreas, mGeneralSetting, mGpsData, mJpegCompressQuality, mMeteringAreas, mPreviewFpsRangeMax, mPreviewFpsRangeMin, mPreviewFrameRate, mRecordingHintEnabled, mSizesLocked, mVideoStabilizationEnabled, mWhiteBalance
Constructor and Description |
---|
AndroidCamera2Settings(AndroidCamera2Settings other) |
AndroidCamera2Settings(CameraDevice camera,
int template,
Rect activeArray,
Size preview,
Size photo)
Create a settings representation that answers queries of unspecified
options in the same way as the provided template would.
|
Modifier and Type | Method and Description |
---|---|
CameraSettings |
copy() |
Camera2RequestSettingsSet |
getRequestSettings() |
void |
setZoomRatio(float ratio)
Sets the zoom ratio.
|
clearGpsData, getCurrentFlashMode, getCurrentFocusMode, getCurrentPhotoFormat, getCurrentPhotoSize, getCurrentPreviewFormat, getCurrentPreviewSize, getCurrentSceneMode, getCurrentZoomRatio, getExifThumbnailSize, getExposureCompensationIndex, getFocusAreas, getGpsData, getMeteringAreas, getPhotoJpegCompressionQuality, getPreviewFpsRangeMax, getPreviewFpsRangeMin, getPreviewFrameRate, getWhiteBalance, isAutoExposureLocked, isAutoWhiteBalanceLocked, isRecordingHintEnabled, isVideoStabilizationEnabled, setAutoExposureLock, setAutoWhiteBalanceLock, setExifThumbnailSize, setExposureCompensationIndex, setFlashMode, setFocusAreas, setFocusMode, setGpsData, setMeteringAreas, setPhotoFormat, setPhotoJpegCompressionQuality, setPhotoSize, setPreviewFormat, setPreviewFpsRange, setPreviewFrameRate, setPreviewSize, setRecordingHintEnabled, setSceneMode, setSetting, setVideoStabilization, setWhiteBalance
public AndroidCamera2Settings(CameraDevice camera, int template, Rect activeArray, Size preview, Size photo) throws CameraAccessException
The default settings provided by the given template are only ever used
for reporting back to the client app (i.e. when it queries an option
it didn't explicitly set first). Camera2RequestSettingsSet
s
generated by an instance of this class will have any settings not
modified using one of that instance's mutators forced to default, so that
their effective values when submitting a capture request will be those of
the template that is provided to the camera framework at that time.
camera
- Device from which to draw default settings
(non-null
).template
- Specific template to use for the defaults.activeArray
- Boundary coordinates of the sensor's active array
(non-null
).preview
- Dimensions of preview streams.photo
- Dimensions of captured images.IllegalArgumentException
- If camera
or activeArray
is null
.CameraAccessException
- Upon internal framework/driver failure.public AndroidCamera2Settings(AndroidCamera2Settings other)
public CameraSettings copy()
copy
in class CameraSettings
public void setZoomRatio(float ratio)
CameraSettings
setZoomRatio
in class CameraSettings
ratio
- The new zoom ratio. Should be in the range between 1.0 to
the value returned from com.android.camera.cameradevice.CameraCapabilities#getMaxZoomRatio()
.public Camera2RequestSettingsSet getRequestSettings()