public class ResolutionInfo extends Object
ImageFormat. The first step is to
determine how the supported resolutions are expressed by calling
getType(). This method returns either:
ResolutionInfo.Type.UNSUPPORTED: no resolution information can be obtained from
the driver. Calling any methods (except getType()) will throw a
UnsupportedMethod exception.ResolutionInfo.Type.DISCRETE: supported resolutions and frame intervals are
returned as a list of ResolutionInfo.DiscreteResolution objects, which encapsulate
the width and height for this resolution as well as supported frame intervals.
Calling getDiscreteResolutions() returns this list.ResolutionInfo.Type.STEPWISE: supported width and height values can be anywhere
within a given minimum and maximum using a step value. These values, along
with information on supported frame intervals are encapsulated in a
ResolutionInfo.StepwiseResolution object which is retrieved by calling
getStepwiseResolution().ResolutionInfo.StepwiseResolution and ResolutionInfo.DiscreteResolution objects provide
information on supported capture resolutions and frame intervals for a given
image format.ResolutionInfo objects are not instantiated directly. Instead, each
ImageFormat carries a reference to a ResolutionInfo object,
describing the supported resolutions for this format. A list of supported
image formats is obtained by calling DeviceInfo.getFormatList() on
a VideoDevice. See the ImageFormatList documentation for
more information.| Modifier and Type | Class and Description |
|---|---|
static class |
ResolutionInfo.DiscreteResolution
This class represents a possible resolution supported by a video device.
|
static class |
ResolutionInfo.StepwiseResolution
This class encapsulates information about supported capture resolutions
for a video device.
|
static class |
ResolutionInfo.Type
The Type enumeration defines how the supported resolutions are expressed.
|
| Modifier and Type | Method and Description |
|---|---|
List<ResolutionInfo.DiscreteResolution> |
getDiscreteResolutions()
This method returns a list of
ResolutionInfo.DiscreteResolutions, or throws a
UnsupportedMethod exception if this resolution info object
is not of type ResolutionInfo.Type.DISCRETE. |
ResolutionInfo.StepwiseResolution |
getStepwiseResolution()
This method returns a
ResolutionInfo.StepwiseResolution object, or throws a
UnsupportedMethod exception if this resolution info object
is not of type ResolutionInfo.Type.STEPWISE. |
ResolutionInfo.Type |
getType()
This method returns the resolution information type.
|
String |
toString() |
public ResolutionInfo.Type getType()
ResolutionInfo.Type
enumeration.ResolutionInfo.Type.public List<ResolutionInfo.DiscreteResolution> getDiscreteResolutions() throws UnsupportedMethod
ResolutionInfo.DiscreteResolutions, or throws a
UnsupportedMethod exception if this resolution info object
is not of type ResolutionInfo.Type.DISCRETE.ResolutionInfo.DiscreteResolutionsUnsupportedMethod - if this resolution info object
is not of type ResolutionInfo.Type.DISCRETE.public ResolutionInfo.StepwiseResolution getStepwiseResolution() throws UnsupportedMethod
ResolutionInfo.StepwiseResolution object, or throws a
UnsupportedMethod exception if this resolution info object
is not of type ResolutionInfo.Type.STEPWISE.ResolutionInfo.StepwiseResolution objectUnsupportedMethod - if this resolution info object
is not of type ResolutionInfo.Type.STEPWISE.Copyright © 2013-2015 Bartosz Firyn (sarxos). All Rights Reserved.