FileDocCategorySizeDatePackage
HighSpeedVideoConfiguration.javaAPI DocAndroid 5.1 API4738Thu Mar 12 22:22:10 GMT 2015android.hardware.camera2.params

HighSpeedVideoConfiguration

public final class HighSpeedVideoConfiguration extends Object
Immutable class to store the available {@link CameraCharacteristics#CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS high speed video configurations}
see
CameraCharacteristics#CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS
hide

Fields Summary
private final int
mWidth
private final int
mHeight
private final int
mFpsMin
private final int
mFpsMax
private final android.util.Size
mSize
private final android.util.Range
mFpsRange
Constructors Summary
public HighSpeedVideoConfiguration(int width, int height, int fpsMin, int fpsMax)
Create a new {@link HighSpeedVideoConfiguration}.

param
width image width, in pixels (positive)
param
height image height, in pixels (positive)
param
fpsMin minimum frames per second for the configuration (positive)
param
fpsMax maximum frames per second for the configuration (larger or equal to 60)
throws
IllegalArgumentException if width/height/fpsMin were not positive or fpsMax less than 60
hide

        if (fpsMax < 60) {
            throw new IllegalArgumentException("fpsMax must be at least 60");
        }
        mFpsMax = fpsMax;
        mWidth = checkArgumentPositive(width, "width must be positive");
        mHeight = checkArgumentPositive(height, "height must be positive");
        mFpsMin = checkArgumentPositive(fpsMin, "fpsMin must be positive");
        mSize = new Size(mWidth, mHeight);
        mFpsRange = new Range<Integer>(mFpsMin, mFpsMax);
    
Methods Summary
public booleanequals(java.lang.Object obj)
Check if this {@link HighSpeedVideoConfiguration} is equal to another {@link HighSpeedVideoConfiguration}.

Two configurations are equal if and only if each of the respective elements is equal.

return
{@code true} if the objects were equal, {@code false} otherwise

        if (obj == null) {
            return false;
        }
        if (this == obj) {
            return true;
        }
        if (obj instanceof HighSpeedVideoConfiguration) {
            final HighSpeedVideoConfiguration other = (HighSpeedVideoConfiguration) obj;
            return mWidth == other.mWidth &&
                    mHeight == other.mHeight &&
                    mFpsMin == other.mFpsMin &&
                    mFpsMax == other.mFpsMax;
        }
        return false;
    
public intgetFpsMax()
Return the maximum frame per second of the high speed video configuration.

return
fpsMax >= 60

        return mFpsMax;
    
public intgetFpsMin()
Return the minimum frame per second of the high speed video configuration.

return
fpsMin > 0

        return mFpsMin;
    
public android.util.RangegetFpsRange()
Convenience method to return the FPS range of this high speed video configuration.

return
a Range with high bound >= 60

        return mFpsRange;
    
public intgetHeight()
Return the height of the high speed video configuration.

return
height > 0

        return mHeight;
    
public android.util.SizegetSize()
Convenience method to return the size of this high speed video configuration.

return
a Size with positive width and height

        return mSize;
    
public intgetWidth()
Return the width of the high speed video configuration.

return
width > 0

        return mWidth;
    
public inthashCode()
{@inheritDoc}

        return HashCodeHelpers.hashCode(mWidth, mHeight, mFpsMin, mFpsMax);