Skip to content
com.iristick.smartglass.core.camera

Class CameraCharacteristics.StreamConfigurationMap

  • java.lang.Object
    • com.iristick.smartglass.core.camera.CameraCharacteristics.StreamConfigurationMap
Enclosing class:
CameraCharacteristics

public abstract static class CameraCharacteristics.StreamConfigurationMap
extends Object

This immutable class contains available stream configurations to set up Surfaces for use in CaptureRequests.

This is the authoritative list of all frame sizes that are supported by a camera.

This also contains the minimum frame durations for each frame size that can be used to compute the effective frame rate when submitting multiple captures.

Method Summary

Modifier and Type Method and Description
abstract int[] getFormats()
Deprecated. 
Manually specifying capture formats has been deprecated.
abstract long getMinFrameDuration(int format, Point size)
Deprecated. 
Manually specifying capture formats has been deprecated.
abstract long getMinFrameDuration(Point size)
Gets the minimum frame duration (in nanoseconds) for the given frame size.
abstract Point[] getSizes()
Gets a list of supported frame sizes.
abstract Point[] getSizes(int format)
Deprecated. 
Manually specifying capture formats has been deprecated.
abstract boolean hasFormat(int format)
Deprecated. 
Manually specifying capture formats has been deprecated.

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

getFormats

@Deprecated
 @CheckResult
 @NonNull
public abstract int[] getFormats()
Deprecated. Manually specifying capture formats has been deprecated.

Gets the supported image formats.

Formats listed in this array are guaranteed to return true if queried with hasFormat(int).

Returns:
The list of supported image formats, defined in CaptureRequest.FORMAT.

hasFormat

@Deprecated
 @CheckResult
public abstract boolean hasFormat(int format)
Deprecated. Manually specifying capture formats has been deprecated.

Determines whether or not surfaces with a particular format can be used as targets for capture requests.

Formats for which this method returns true are guaranteed to exist in the result returned by getFormats().

Parameters:
format - An image format, as defined in CaptureRequest.FORMAT.
Returns:
true if using a surface with this format is supported.

getSizes

@CheckResult
 @NonNull
public abstract Point[] getSizes()

Gets a list of supported frame sizes.

Returns:
An array of supported sizes, in descending order of total pixel count.

getSizes

@Deprecated
 @CheckResult
 @NonNull
public abstract Point[] getSizes(int format)
Deprecated. Manually specifying capture formats has been deprecated.

Gets a list of sizes compatible with the requested image format.

The format should be a supported format, i.e., one of the formats returned by getFormats().

Parameters:
format - An image format, as defined in CaptureRequest.FORMAT.
Returns:
An array of supported sizes (empty if format is not supported), in descending order of total pixel count.

getMinFrameDuration

@CheckResult
public abstract long getMinFrameDuration(@NonNull
                                                      Point size)

Gets the minimum frame duration (in nanoseconds) for the given frame size.

The size should be one returned by getSizes().

When multiple streams are used in a request (i.e., multiple target surfaces with different configurations), the minimum frame duration is the maximum of all individual stream configurations.

Parameters:
size - A supported frame size.
Returns:
The minimum frame duration in nanoseconds.
Throws:
IllegalArgumentException - if size is not compatible.
NullPointerException - if size is null.

getMinFrameDuration

@Deprecated
 @CheckResult
public abstract long getMinFrameDuration(int format,
                                                                   @NonNull
                                                                   Point size)
Deprecated. Manually specifying capture formats has been deprecated.

Gets the minimum frame duration for the format/size combination (in nanoseconds).

The format should be one returned by getFormats(), and size should be one returned by getSizes(int).

When multiple streams are used in a request (i.e., multiple target surfaces with different configurations), the minimum frame duration is the maximum of all individual stream configurations.

Parameters:
format - An image format, as defined in CaptureRequest.FORMAT.
size - A compatible size.
Returns:
The minimum frame duration in nanoseconds.
Throws:
IllegalArgumentException - if the format/size combination is not supported.
NullPointerException - if size is null.