Class StreamConfigurationMap¶
- java.lang.Object
-
- com.iristick.smartglass.support.camera2.params.StreamConfigurationMap
com.iristick.smartglass.core.camera
package instead.@Deprecated public abstract class StreamConfigurationMap extends Object
Immutable class to store the available stream
configurations
to set up
Surfaces
for creating a
capture session
with
CameraDevice.createCaptureSession(java.util.List<android.view.Surface>, com.iristick.smartglass.support.camera2.CameraCaptureSession.StateCallback, android.os.Handler)
.
This is the authoritative list for all output formats (and sizes respectively for that format) that are supported by a camera device.
This also contains the minimum frame durations and stall durations for each format/size combination that can be used to calculate effective frame rate when submitting multiple captures.
An instance of this object is available from CameraCharacteristics
using the
CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP
key and the
CameraCharacteristics.get(com.iristick.smartglass.support.camera2.CameraCharacteristics.Key<TE, TIA, TII>)
method.
- Since:
- Android API level 21
Constructor Summary¶
Constructor and Description |
---|
StreamConfigurationMap()
Deprecated.
|
Method Summary¶
Modifier and Type | Method and Description |
---|---|
abstract boolean |
equals(Object obj)
Deprecated.
Check if this
StreamConfigurationMap is equal to another
StreamConfigurationMap . |
abstract Size[] |
getHighResolutionOutputSizes(int format)
Deprecated.
Get a list of supported high resolution sizes, which cannot operate at full BURST_CAPTURE
rate.
|
abstract Range<Integer>[] |
getHighSpeedVideoFpsRanges()
Deprecated.
Get a list of supported high speed video recording FPS ranges.
|
abstract Range<Integer>[] |
getHighSpeedVideoFpsRangesFor(Size size)
Deprecated.
Get the frame per second ranges (fpsMin, fpsMax) for input high speed video size.
|
abstract Size[] |
getHighSpeedVideoSizes()
Deprecated.
Get a list of supported high speed video recording sizes.
|
abstract Size[] |
getHighSpeedVideoSizesFor(Range<Integer> fpsRange)
Deprecated.
Get the supported video sizes for an input high speed FPS range.
|
abstract int[] |
getInputFormats()
Deprecated.
Get the image
format input formats in this stream configuration. |
abstract Size[] |
getInputSizes(int format)
Deprecated.
Get the supported input sizes for this input format.
|
abstract int[] |
getOutputFormats()
Deprecated.
Get the image
format output formats in this stream configuration. |
abstract <T> long |
getOutputMinFrameDuration(Class<T> klass,
Size size)
Deprecated.
Get the minimum
frame duration
for the class/size combination (in nanoseconds). |
abstract long |
getOutputMinFrameDuration(int format,
Size size)
Deprecated.
Get the minimum
frame duration
for the format/size combination (in nanoseconds). |
abstract <T> Size[] |
getOutputSizes(Class<T> klass)
Deprecated.
Get a list of sizes compatible with
klass to use as an output. |
abstract Size[] |
getOutputSizes(int format)
Deprecated.
Get a list of sizes compatible with the requested image
format . |
abstract <T> long |
getOutputStallDuration(Class<T> klass,
Size size)
Deprecated.
Get the stall duration for the class/size combination (in nanoseconds).
|
abstract long |
getOutputStallDuration(int format,
Size size)
Deprecated.
Get the stall duration for the format/size combination (in nanoseconds).
|
abstract int[] |
getValidOutputFormatsForInput(int inputFormat)
Deprecated.
Get the image
format output formats for a reprocessing input format. |
static <T> boolean |
isOutputSupportedFor(Class<T> klass)
Deprecated.
Determine whether or not output streams can be configured with a particular class
as a consumer.
|
abstract boolean |
isOutputSupportedFor(int format)
Deprecated.
Determine whether or not output surfaces with a particular user-defined format can be passed
createCaptureSession . |
abstract boolean |
isOutputSupportedFor(Surface surface)
Deprecated.
Determine whether or not the
surface in its current state is suitable to be included
in a capture session as an output. |
abstract String |
toString()
Deprecated.
Return this
StreamConfigurationMap as a string representation. |
Methods inherited from class java.lang.Object¶
getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail¶
StreamConfigurationMap¶
public StreamConfigurationMap()
Method Detail¶
getOutputFormats¶
public abstract int[] getOutputFormats()
format
output formats in this stream configuration.
All image formats returned by this function will be defined in either ImageFormat
,
PixelFormat
or CameraFormat
(and there is no possibility of collision).
Formats listed in this array are guaranteed to return true if queried with
isOutputSupportedFor(int)
.
- Returns:
- an array of integer format
- See Also:
ImageFormat
,PixelFormat
,CameraFormat
getValidOutputFormatsForInput¶
public abstract int[] getValidOutputFormatsForInput(int inputFormat)
format
output formats for a reprocessing input format.
When submitting a CaptureRequest
with an input Surface of a given format,
the only allowed target outputs of the CaptureRequest
are the ones with a format
listed in the return value of this method. Including any other output Surface as a target
will throw an IllegalArgumentException. If no output format is supported given the input
format, an empty int[] will be returned.
All image formats returned by this function will be defined in either ImageFormat
,
PixelFormat
or CameraFormat
(and there is no possibility of collision).
Formats listed in this array are guaranteed to return true if queried with
isOutputSupportedFor(int)
.
- Parameters:
inputFormat
- AnImageFormat
,PixelFormat
orCameraFormat
code.- Returns:
- an array of integer format
- Since:
- Android API level 23
- See Also:
ImageFormat
,PixelFormat
,CameraFormat
getInputFormats¶
public abstract int[] getInputFormats()
format
input formats in this stream configuration.
All image formats returned by this function will be defined in either ImageFormat
,
PixelFormat
or CameraFormat
(and there is no possibility of collision).
- Returns:
- an array of integer format
- Since:
- Android API level 23
- See Also:
ImageFormat
,PixelFormat
,CameraFormat
getInputSizes¶
public abstract Size[] getInputSizes(int format)
The format must have come from getInputFormats()
; otherwise
null
is returned.
- Parameters:
format
- a format fromgetInputFormats()
- Returns:
- a non-empty array of sizes, or
null
if the format was not available. - Since:
- Android API level 23
isOutputSupportedFor¶
public abstract boolean isOutputSupportedFor(int format)
createCaptureSession
.
This method determines that the output format
is supported by the camera device;
each output surface
target may or may not itself support that format
.
Refer to the class which provides the surface for additional documentation.
Formats for which this returns true
are guaranteed to exist in the result
returned by getOutputSizes(java.lang.Class<T>)
.
- Parameters:
format
- an image format from eitherImageFormat
,PixelFormat
orCameraFormat
- Returns:
true
iff using asurface
with thisformat
will be supported withCameraDevice.createCaptureSession(java.util.List<android.view.Surface>, com.iristick.smartglass.support.camera2.CameraCaptureSession.StateCallback, android.os.Handler)
- Throws:
IllegalArgumentException
- if the image format was not a defined named constant from eitherImageFormat
,PixelFormat
orCameraFormat
- See Also:
ImageFormat
,PixelFormat
,CameraFormat
,CameraDevice.createCaptureSession(java.util.List<android.view.Surface>, com.iristick.smartglass.support.camera2.CameraCaptureSession.StateCallback, android.os.Handler)
isOutputSupportedFor¶
public static <T> boolean isOutputSupportedFor(Class<T> klass)
The following list is generally usable for outputs:
ImageReader
- Recommended for image processing or streaming to external resources (such as a file or network)MediaRecorder
- Recommended for recording video (simple to use)MediaCodec
- Recommended for recording video (more complicated to use, with more flexibility)Allocation
- Recommended for image processing withRenderScript
SurfaceHolder
- Recommended for low-power camera preview withSurfaceView
SurfaceTexture
- Recommended for OpenGL-accelerated preview processing or compositing withTextureView
Generally speaking this means that creating a Surface
from that class may
provide a producer endpoint that is suitable to be used with
CameraDevice.createCaptureSession(java.util.List<android.view.Surface>, com.iristick.smartglass.support.camera2.CameraCaptureSession.StateCallback, android.os.Handler)
.
Since not all of the above classes support output of all format and size combinations,
the particular combination should be queried with isOutputSupportedFor(Surface)
.
- Type Parameters:
T
- Class type- Parameters:
klass
- a non-null
Class
object reference- Returns:
true
if this class is supported as an output,false
otherwise- Throws:
NullPointerException
- ifklass
wasnull
- See Also:
CameraDevice.createCaptureSession(java.util.List<android.view.Surface>, com.iristick.smartglass.support.camera2.CameraCaptureSession.StateCallback, android.os.Handler)
,isOutputSupportedFor(Surface)
isOutputSupportedFor¶
public abstract boolean isOutputSupportedFor(Surface surface)
surface
in its current state is suitable to be included
in a capture session
as an output.
Not all surfaces are usable with the CameraDevice
, and not all configurations
of that surface
are compatible. Some classes that provide the surface
are
compatible with the CameraDevice
in general
(see isOutputSupportedFor(Class)
, but it is the caller's responsibility to put the
surface
into a state that will be compatible with the CameraDevice
.
Reasons for a surface
being specifically incompatible might be:
- Using a format that's not listed by
getOutputFormats()
- Using a format/size combination that's not listed by
getOutputSizes(java.lang.Class<T>)
- The
surface
itself is not in a state where it can service a new producer.
Surfaces from flexible sources will return true even if the exact size of the Surface does not match a camera-supported size, as long as the format (or class) is supported and the camera device supports a size that is equal to or less than 1080p in that format. If such as Surface is used to create a capture session, it will have its size rounded to the nearest supported size, below or equal to 1080p. Flexible sources include SurfaceView, SurfaceTexture, and ImageReader.
This is not an exhaustive list; see the particular class's documentation for further possible reasons of incompatibility.
- Parameters:
surface
- a non-null
Surface
object reference- Returns:
true
if this is supported,false
otherwise- Throws:
NullPointerException
- ifsurface
wasnull
IllegalArgumentException
- if the Surface endpoint is no longer valid- See Also:
CameraDevice.createCaptureSession(java.util.List<android.view.Surface>, com.iristick.smartglass.support.camera2.CameraCaptureSession.StateCallback, android.os.Handler)
,isOutputSupportedFor(Class)
getOutputSizes¶
public abstract <T> Size[] getOutputSizes(Class<T> klass)
klass
to use as an output.
Some of the supported classes may support additional formats beyond
ImageFormat.PRIVATE
; this function only returns
sizes for ImageFormat.PRIVATE
. For example, ImageReader
supports ImageFormat.YUV_420_888
and ImageFormat.PRIVATE
, this method will
only return the sizes for ImageFormat.PRIVATE
for ImageReader
class.
If a well-defined format such as NV21
is required, use
getOutputSizes(int)
instead.
The klass
should be a supported output, that querying
#isOutputSupportedFor(Class)
should return true
.
- Type Parameters:
T
- Class type- Parameters:
klass
- a non-null
Class
object reference- Returns:
- an array of supported sizes for
ImageFormat.PRIVATE
format, ornull
iff theklass
is not a supported output. - Throws:
NullPointerException
- ifklass
wasnull
- See Also:
isOutputSupportedFor(Class)
getOutputSizes¶
public abstract Size[] getOutputSizes(int format)
format
.
The format
should be a supported format (one of the formats returned by
getOutputFormats()
).
As of API level 23, the getHighResolutionOutputSizes(int)
method can be used on devices
that support the
BURST_CAPTURE
capability to get a list of high-resolution output sizes that cannot operate at the preferred
20fps rate. This means that for some supported formats, this method will return an empty
list, if all the supported resolutions operate at below 20fps. For devices that do not
support the BURST_CAPTURE capability, all output resolutions are listed through this method.
- Parameters:
format
- an image format fromImageFormat
,PixelFormat
orCameraFormat
- Returns:
- an array of supported sizes,
or
null
if theformat
is not a supported output - See Also:
ImageFormat
,PixelFormat
,CameraFormat
,getOutputFormats()
getHighSpeedVideoSizes¶
public abstract Size[] getHighSpeedVideoSizes()
When CameraMetadata.REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO
is
supported in CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES
, this method will
list the supported high speed video size configurations. All the sizes listed will be a
subset of the sizes reported by getOutputSizes(java.lang.Class<T>)
for processed non-stalling formats
(typically ImageFormat.PRIVATE
ImageFormat.YUV_420_888
, etc.)
To enable high speed video recording, application must create a constrained create high speed
capture session via CameraDevice.createConstrainedHighSpeedCaptureSession(java.util.List<android.view.Surface>, com.iristick.smartglass.support.camera2.CameraCaptureSession.StateCallback, android.os.Handler)
, and submit
a CaptureRequest list created by
CameraConstrainedHighSpeedCaptureSession.createHighSpeedRequestList(com.iristick.smartglass.support.camera2.CaptureRequest)
to this session. The application must select the video size from this method and
FPS range
from
getHighSpeedVideoFpsRangesFor(android.util.Size)
to configure the constrained high speed session and
generate the high speed request list. For example, if the application intends to do high
speed recording, it can select the maximum size reported by this method to create high speed
capture session. Note that for the use case of multiple output streams, application must
select one unique size from this method to use (e.g., preview and recording streams must have
the same size). Otherwise, the high speed session creation will fail. Once the size is
selected, application can get the supported FPS ranges by
getHighSpeedVideoFpsRangesFor(android.util.Size)
, and use these FPS ranges to setup the recording
request lists via
CameraConstrainedHighSpeedCaptureSession.createHighSpeedRequestList(com.iristick.smartglass.support.camera2.CaptureRequest)
.
- Returns:
- an array of supported high speed video recording sizes
- See Also:
getHighSpeedVideoFpsRangesFor(Size)
,CameraMetadata.REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO
,CameraDevice.createConstrainedHighSpeedCaptureSession(java.util.List<android.view.Surface>, com.iristick.smartglass.support.camera2.CameraCaptureSession.StateCallback, android.os.Handler)
,CameraConstrainedHighSpeedCaptureSession.createHighSpeedRequestList(com.iristick.smartglass.support.camera2.CaptureRequest)
getHighSpeedVideoFpsRangesFor¶
public abstract Range<Integer>[] getHighSpeedVideoFpsRangesFor(Size size)
See getHighSpeedVideoFpsRanges()
for how to enable high speed recording.
The FPS ranges
reported in this method must not be used to setup capture requests that are submitted to
unconstrained capture sessions, or it will result in
IllegalArgumentExceptions
.
See getHighSpeedVideoFpsRanges()
for the characteristics of the returned FPS ranges.
- Parameters:
size
- one of the sizes returned bygetHighSpeedVideoSizes()
- Returns:
- an array of supported high speed video recording FPS ranges The upper bound of returned ranges is guaranteed to be greater than or equal to 120.
- Throws:
IllegalArgumentException
- if input size does not exist in the return value of getHighSpeedVideoSizes- See Also:
getHighSpeedVideoSizes()
,getHighSpeedVideoFpsRanges()
getHighSpeedVideoFpsRanges¶
public abstract Range<Integer>[] getHighSpeedVideoFpsRanges()
When
CameraMetadata.REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO
is supported in
CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES
,
this method will list the supported high speed video FPS range configurations.
Application can then use getHighSpeedVideoSizesFor(android.util.Range<java.lang.Integer>)
to query available sizes for one
of returned FPS range.
To enable high speed video recording, application must create a constrained create high speed
capture session via
CameraDevice.createConstrainedHighSpeedCaptureSession(java.util.List<android.view.Surface>, com.iristick.smartglass.support.camera2.CameraCaptureSession.StateCallback, android.os.Handler)
,
and submit a CaptureRequest list created by
CameraConstrainedHighSpeedCaptureSession.createHighSpeedRequestList(com.iristick.smartglass.support.camera2.CaptureRequest)
to this session. The application must select the video size from this method and
FPS range
from getHighSpeedVideoFpsRangesFor(android.util.Size)
to configure the constrained high speed session and
generate the high speed request list. For example, if the application intends to do high
speed recording, it can select one FPS range reported by this method, query the video sizes
corresponding to this FPS range by getHighSpeedVideoSizesFor(android.util.Range<java.lang.Integer>)
and use one of reported
sizes to create a high speed capture session. Note that for the use case of multiple output
streams, application must select one unique size from this method to use (e.g., preview and
recording streams must have the same size). Otherwise, the high speed session creation will
fail. Once the high speed capture session is created, the application can set the FPS range
in the recording request lists via
CameraConstrainedHighSpeedCaptureSession.createHighSpeedRequestList(com.iristick.smartglass.support.camera2.CaptureRequest)
.
The FPS ranges reported by this method will have below characteristics:
- The fpsMin and fpsMax will be a multiple 30fps.
- The fpsMin will be no less than 30fps, the fpsMax will be no less than 120fps.
- At least one range will be a fixed FPS range where fpsMin == fpsMax.
- For each fixed FPS range, there will be one corresponding variable FPS range [30, fps_max]. These kinds of FPS ranges are suitable for preview-only use cases where the application doesn't want the camera device always produce higher frame rate than the display refresh rate.
- Returns:
- an array of supported high speed video recording FPS ranges The upper bound of returned ranges is guaranteed to be larger or equal to 120.
- See Also:
getHighSpeedVideoSizesFor(android.util.Range<java.lang.Integer>)
,CameraMetadata.REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO
,CameraDevice.createConstrainedHighSpeedCaptureSession(java.util.List<android.view.Surface>, com.iristick.smartglass.support.camera2.CameraCaptureSession.StateCallback, android.os.Handler)
,CameraConstrainedHighSpeedCaptureSession.createHighSpeedRequestList(com.iristick.smartglass.support.camera2.CaptureRequest)
getHighSpeedVideoSizesFor¶
public abstract Size[] getHighSpeedVideoSizesFor(Range<Integer> fpsRange)
See getHighSpeedVideoSizes()
for how to enable high speed recording.
- Parameters:
fpsRange
- one of the FPS range returned bygetHighSpeedVideoFpsRanges()
- Returns:
- An array of video sizes to create high speed capture sessions for high speed streaming use cases.
- Throws:
IllegalArgumentException
- if input FPS range does not exist in the return value of getHighSpeedVideoFpsRanges- See Also:
getHighSpeedVideoFpsRanges()
getHighResolutionOutputSizes¶
public abstract Size[] getHighResolutionOutputSizes(int format)
This includes all output sizes that cannot meet the 20 fps frame rate requirements for the
BURST_CAPTURE
capability. This does not include the stall duration, so for example, a JPEG or RAW16 output
resolution with a large stall duration but a minimum frame duration that's above 20 fps will
still be listed in the regular getOutputSizes(java.lang.Class<T>)
list. All the sizes on this list are
still guaranteed to operate at a rate of at least 10 fps, not including stall duration.
For a device that does not support the BURST_CAPTURE capability, this list will be
null
, since resolutions in the getOutputSizes(java.lang.Class<T>)
list are already not
guaranteed to meet >= 20 fps rate requirements. For a device that does support the
BURST_CAPTURE capability, this list may be empty, if all supported resolutions meet the 20
fps requirement.
- Parameters:
format
- A format code.- Returns:
- an array of supported slower high-resolution sizes, or
null
if the BURST_CAPTURE capability is not supported - Since:
- Android API level 23
getOutputMinFrameDuration¶
public abstract long getOutputMinFrameDuration(int format, Size size)
frame duration
for the format/size combination (in nanoseconds).
format
should be one of the ones returned by getOutputFormats()
.
size
should be one of the ones returned by
getOutputSizes(int)
.
This should correspond to the frame duration when only that stream is active, with all
processing (typically in android.*.mode
) set to either OFF
or FAST
.
When multiple streams are used in a request, the minimum frame duration will be
max(individual stream min durations)
.
For devices that do not support manual sensor control
(CameraMetadata.REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR
),
this function may return 0.
- Parameters:
format
- an image format fromImageFormat
,PixelFormat
orCameraFormat
size
- an output-compatible size- Returns:
- a minimum frame duration
>
0 in nanoseconds, or 0 if the minimum frame duration is not available. - Throws:
IllegalArgumentException
- ifformat
orsize
was not supportedNullPointerException
- ifsize
wasnull
- See Also:
CaptureRequest.SENSOR_FRAME_DURATION
,getOutputStallDuration(int, Size)
,ImageFormat
,PixelFormat
,CameraFormat
getOutputMinFrameDuration¶
public abstract <T> long getOutputMinFrameDuration(Class<T> klass, Size size)
frame duration
for the class/size combination (in nanoseconds).
This assumes a the klass
is set up to use ImageFormat.PRIVATE
.
For user-defined formats, use getOutputMinFrameDuration(int, Size)
.
klass
should be one of the ones which is supported by
isOutputSupportedFor(Class)
.
size
should be one of the ones returned by
getOutputSizes(int)
.
This should correspond to the frame duration when only that stream is active, with all
processing (typically in android.*.mode
) set to either OFF
or FAST
.
When multiple streams are used in a request, the minimum frame duration will be
max(individual stream min durations)
.
For devices that do not support manual sensor control
(CameraMetadata.REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR
),
this function may return 0.
- Type Parameters:
T
- Class type- Parameters:
klass
- a class which is supported byisOutputSupportedFor(Class)
and has a non-empty array returned bygetOutputSizes(Class)
size
- an output-compatible size- Returns:
- a minimum frame duration
>
0 in nanoseconds, or 0 if the minimum frame duration is not available. - Throws:
IllegalArgumentException
- ifklass
orsize
was not supportedNullPointerException
- ifsize
orklass
wasnull
- See Also:
CaptureRequest.SENSOR_FRAME_DURATION
,ImageFormat
,PixelFormat
,CameraFormat
getOutputStallDuration¶
public abstract long getOutputStallDuration(int format, Size size)
format
should be one of the ones returned by getOutputFormats()
.
size
should be one of the ones returned by
getOutputSizes(int)
.
A stall duration is how much extra time would get added to the normal minimum frame duration for a repeating request that has streams with non-zero stall.
For example, consider JPEG captures which have the following characteristics:
- JPEG streams act like processed YUV streams in requests for which they are not included; in requests in which they are directly referenced, they act as JPEG streams. This is because supporting a JPEG stream requires the underlying YUV data to always be ready for use by a JPEG encoder, but the encoder will only be used (and impact frame duration) on requests that actually reference a JPEG stream.
- The JPEG processor can run concurrently to the rest of the camera pipeline, but cannot process more than 1 capture at a time.
In other words, using a repeating YUV request would result in a steady frame rate (let's say it's 30 FPS). If a single JPEG request is submitted periodically, the frame rate will stay at 30 FPS (as long as we wait for the previous JPEG to return each time). If we try to submit a repeating YUV + JPEG request, then the frame rate will drop from 30 FPS.
In general, submitting a new request with a non-0 stall time stream will not cause a frame rate drop unless there are still outstanding buffers for that stream from previous requests.
Submitting a repeating request with streams (call this S
) is the same as setting
the minimum frame duration from the normal minimum frame duration corresponding to S
,
added with the maximum stall duration for S
.
If interleaving requests with and without a stall duration, a request will stall by the maximum of the remaining times for each can-stall stream with outstanding buffers.
This means that a stalling request will not have an exposure start until the stall has completed.
This should correspond to the stall duration when only that stream is active, with all
processing (typically in android.*.mode
) set to FAST
or OFF
.
Setting any of the processing modes to HIGH_QUALITY
effectively results in an
indeterminate stall duration for all streams in a request (the regular stall calculation
rules are ignored).
The following formats may always have a stall duration:
The following formats will never have a stall duration:
All other formats may or may not have an allowed stall duration on a per-capability basis;
refer to android.request.availableCapabilities
for more details.
See android.sensor.frameDuration
for more information about calculating the max frame rate (absent stalls).
- Parameters:
format
- an image format fromImageFormat
,PixelFormat
orCameraFormat
size
- an output-compatible size- Returns:
- a stall duration
>=
0 in nanoseconds - Throws:
IllegalArgumentException
- ifformat
orsize
was not supportedNullPointerException
- ifsize
wasnull
- See Also:
CaptureRequest.SENSOR_FRAME_DURATION
,ImageFormat
,PixelFormat
,CameraFormat
getOutputStallDuration¶
public abstract <T> long getOutputStallDuration(Class<T> klass, Size size)
This assumes a the klass
is set up to use ImageFormat.PRIVATE
.
For user-defined formats, use getOutputMinFrameDuration(int, Size)
.
klass
should be one of the ones with a non-empty array returned by
getOutputSizes(Class)
.
size
should be one of the ones returned by
getOutputSizes(Class)
.
See getOutputStallDuration(int, Size)
for a definition of a
stall duration.
- Type Parameters:
T
- Class type- Parameters:
klass
- a class which is supported byisOutputSupportedFor(Class)
and has a non-empty array returned bygetOutputSizes(Class)
size
- an output-compatible size- Returns:
- a minimum frame duration
>=
0 in nanoseconds - Throws:
IllegalArgumentException
- ifklass
orsize
was not supportedNullPointerException
- ifsize
orklass
wasnull
- See Also:
CaptureRequest.SENSOR_FRAME_DURATION
,ImageFormat
,PixelFormat
,CameraFormat
equals¶
public abstract boolean equals(Object obj)
StreamConfigurationMap
is equal to another
StreamConfigurationMap
.
Two vectors are only equal if and only if each of the respective elements is equal.
toString¶
public abstract String toString()
StreamConfigurationMap
as a string representation.
"StreamConfigurationMap(Outputs([w:%d, h:%d, format:%s(%d), min_duration:%d,
stall:%d], ... [w:%d, h:%d, format:%s(%d), min_duration:%d, stall:%d]), Inputs([w:%d, h:%d,
format:%s(%d)], ... [w:%d, h:%d, format:%s(%d)]), ValidOutputFormatsForInput(
[in:%d, out:%d, ... %d], ... [in:%d, out:%d, ... %d]), HighSpeedVideoConfigurations(
[w:%d, h:%d, min_fps:%d, max_fps:%d], ... [w:%d, h:%d, min_fps:%d, max_fps:%d]))"
.
Outputs([w:%d, h:%d, format:%s(%d), min_duration:%d, stall:%d], ...
[w:%d, h:%d, format:%s(%d), min_duration:%d, stall:%d])
, where
[w:%d, h:%d, format:%s(%d), min_duration:%d, stall:%d]
represents an output
configuration's width, height, format, minimal frame duration in nanoseconds, and stall
duration in nanoseconds.
Inputs([w:%d, h:%d, format:%s(%d)], ... [w:%d, h:%d, format:%s(%d)])
, where
[w:%d, h:%d, format:%s(%d)]
represents an input configuration's width, height, and
format.
ValidOutputFormatsForInput([in:%s(%d), out:%s(%d), ... %s(%d)],
... [in:%s(%d), out:%s(%d), ... %s(%d)])
, where [in:%s(%d), out:%s(%d), ... %s(%d)]
represents an input format and its valid output formats.
HighSpeedVideoConfigurations([w:%d, h:%d, min_fps:%d, max_fps:%d],
... [w:%d, h:%d, min_fps:%d, max_fps:%d])
, where
[w:%d, h:%d, min_fps:%d, max_fps:%d]
represents a high speed video output
configuration's width, height, minimal frame rate, and maximal frame rate.
- Overrides:
toString
in classObject
- Returns:
- string representation of
StreamConfigurationMap