Added in API level 31

MultiResolutionStreamInfo


open class MultiResolutionStreamInfo
kotlin.Any
   ↳ android.hardware.camera2.params.MultiResolutionStreamInfo

A utility class describing the properties of one stream of fixed-size image buffers backing a multi-resolution image stream.

A group of MultiResolutionStreamInfo are used to describe the properties of a multi-resolution image stream for a particular format. The android.hardware.camera2.MultiResolutionImageReader class represents a multi-resolution output stream, and is constructed using a group of MultiResolutionStreamInfo. A group of MultiResolutionStreamInfo can also be used to create a multi-resolution reprocessable camera capture session. See android.hardware.camera2.params.InputConfiguration for details.

Summary

Public constructors
MultiResolutionStreamInfo(streamWidth: Int, streamHeight: Int, physicalCameraId: String)

Create a new MultiResolutionStreamInfo.

Public methods
open Boolean
equals(other: Any?)

Check if this MultiResolutionStreamInfo is equal to another MultiResolutionStreamInfo.

open Int

The height of this particular image buffer stream in pixels.

open String

The physical camera Id of this particular image buffer stream.

open Int

The width of this particular image buffer stream in pixels.

open Int

Returns a hash code value for the object.

Public constructors

MultiResolutionStreamInfo

Added in API level 31
MultiResolutionStreamInfo(
    streamWidth: Int,
    streamHeight: Int,
    physicalCameraId: String)

Create a new MultiResolutionStreamInfo.

This class creates a MultiResolutionStreamInfo using image width, image height, and the physical camera Id images originate from.

Normally applications do not need to create these directly. Use android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getOutputInfo or android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getInputInfo to obtain them for a particular format instead.

Parameters
streamWidth Int: The width in pixels of the camera stream Value is 1 or greater
streamHeight Int: The height in pixels of the camera stream Value is 1 or greater
physicalCameraId String: The physical camera Id the camera stream is associated with This value cannot be null.
Exceptions
java.lang.IllegalArgumentException if the streamWidth or streamHeight is invalid (either zero or negative).

Public methods

equals

Added in API level 31
open fun equals(other: Any?): Boolean

Check if this MultiResolutionStreamInfo is equal to another MultiResolutionStreamInfo.

Parameters
obj the reference object with which to compare.
Return
Boolean true if the objects were equal, false otherwise

getHeight

Added in API level 31
open fun getHeight(): Int

The height of this particular image buffer stream in pixels.

Return
Int Value is 1 or greater

getPhysicalCameraId

Added in API level 31
open fun getPhysicalCameraId(): String

The physical camera Id of this particular image buffer stream.

Return
String This value cannot be null.

getWidth

Added in API level 31
open fun getWidth(): Int

The width of this particular image buffer stream in pixels.

Return
Int Value is 1 or greater

hashCode

Added in API level 31
open fun hashCode(): Int

Returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Return
Int a hash code value for this object.