Android APIs
public final class

InputConfiguration

extends Object
java.lang.Object
   ↳ android.hardware.camera2.params.InputConfiguration

Class Overview

Immutable class to store an input configuration that is used to create a reprocessable capture session.

Summary

Public Constructors
InputConfiguration(int width, int height, int format)
Create an input configration with the width, height, and user-defined format.
Public Methods
boolean equals(Object obj)
Check if this InputConfiguration is equal to another InputConfiguration.
int getFormat()
Get the format of this input configration.
int getHeight()
Get the height of this input configration.
int getWidth()
Get the width of this input configration.
int hashCode()
Returns an integer hash code for this object.
String toString()
Return this InputConfiguration as a string representation.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public InputConfiguration (int width, int height, int format)

Added in API level 23

Create an input configration with the width, height, and user-defined format.

Images of an user-defined format are accessible by applications. Use SCALER_STREAM_CONFIGURATION_MAP to query supported input formats

Parameters
width Width of the input buffers.
height Height of the input buffers.
format Format of the input buffers. One of ImageFormat or PixelFormat constants.

Public Methods

public boolean equals (Object obj)

Added in API level 23

Check if this InputConfiguration is equal to another InputConfiguration.

Two input configurations are equal if and only if they have the same widths, heights, and formats.

Parameters
obj the object to compare this instance with.
Returns
  • true if the objects were equal, false otherwise.

public int getFormat ()

Added in API level 23

Get the format of this input configration.

Returns
  • format of this input configuration.

public int getHeight ()

Added in API level 23

Get the height of this input configration.

Returns
  • height of this input configuration.

public int getWidth ()

Added in API level 23

Get the width of this input configration.

Returns
  • width of this input configuration.

public int hashCode ()

Added in API level 23

Returns an integer hash code for this object. By contract, any two objects for which equals(Object) returns true must return the same hash code value. This means that subclasses of Object usually override both methods or neither method.

Note that hash values must not change over time unless information used in equals comparisons also changes.

See Writing a correct hashCode method if you intend implementing your own hashCode method.

Returns
  • this object's hash code.

public String toString ()

Added in API level 23

Return this InputConfiguration as a string representation.

"InputConfiguration(w:%d, h:%d, format:%d)", where %d represents the width, height, and format, respectively.

Returns