org.ocap.hardware.device
Class VideoResolution

java.lang.Object
  extended by org.ocap.hardware.device.VideoResolution

public class VideoResolution
extends Object

Specifies the attributes of a video stream. Instances of VideoResolution may be used to describe attributes of input or output video.

Author:
Aaron Kamienski
See Also:
FixedVideoOutputConfiguration.getVideoResolution(), DynamicVideoOutputConfiguration.getInputResolutions(), DynamicVideoOutputConfiguration.addOutputResolution(VideoResolution, FixedVideoOutputConfiguration)

Field Summary
static int SCANMODE_INTERLACED
          Constant indicating interlaced line scan mode.
static int SCANMODE_PROGRESSIVE
          Constant indicating progressive line scan mode.
static int SCANMODE_UNKNOWN
          Constant indicating an unknown or unspecified line scan mode.
 
Constructor Summary
VideoResolution(Dimension rez, int ar, float rate, int scan)
          Creates an instance of VideoResolution based upon the given attributes.
 
Method Summary
 int getAspectRatio()
          Return the aspect ratio of the output video as specified by this object.
 Dimension getPixelResolution()
          Return the pixel resolution of the video.
 float getRate()
          Return the frame or field rate of the video as specified by this object.
 int getScanMode()
          Return the video scan mode, as specified by this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCANMODE_UNKNOWN

public static final int SCANMODE_UNKNOWN
Constant indicating an unknown or unspecified line scan mode.

See Also:
Constant Field Values

SCANMODE_INTERLACED

public static final int SCANMODE_INTERLACED
Constant indicating interlaced line scan mode.

See Also:
Constant Field Values

SCANMODE_PROGRESSIVE

public static final int SCANMODE_PROGRESSIVE
Constant indicating progressive line scan mode.

See Also:
Constant Field Values
Constructor Detail

VideoResolution

public VideoResolution(Dimension rez,
                       int ar,
                       float rate,
                       int scan)
Creates an instance of VideoResolution based upon the given attributes.

Parameters:
rez - The desired pixel resolution; null MAY be specified to indicate a wildcard value.
ar - The desired aspect ratio. VideoFormatControl.ASPECT_RATIO_UNKNOWN MAY be specified to indicate a wildcard value.
rate - The desired field or frame rate. Values less than or equal to 0.0F may be specified to indicate a wildcard value.
scan - The desired scan mode. SCANMODE_UNKNOWN MAY be specified to indicate a wildcard value.
Method Detail

getPixelResolution

public Dimension getPixelResolution()
Return the pixel resolution of the video.

A value of null MAY be returned, indicating that the resolution is unknown or unspecified.

Returns:
an instance of Dimension specifying the pixel resolution or null

getAspectRatio

public int getAspectRatio()
Return the aspect ratio of the output video as specified by this object.

A value of ASPECT_RATIO_UNKNOWN MAY be returned, indicating that the aspect ratio is unknown or unspecified.

Returns:
one of VideoFormatControl.ASPECT_RATIO_UNKNOWN, VideoFormatControl.ASPECT_RATIO_4_3, VideoFormatControl.ASPECT_RATIO_16_9, or VideoFormatControl.ASPECT_RATIO_2_21_1.

getRate

public float getRate()
Return the frame or field rate of the video as specified by this object.

Possible return values are:

A value of less then or equal to 0.0F may be returned, indicating that the rate is unknown or unspecified.

Return value specifies the field rate if getScanMode() returns SCANMODE_INTERLACED and the frame rate if getScanMode() returns SCANMODE_PROGRESSIVE.

Returns:
the frame or field rate of the output video
See Also:
getScanMode()

getScanMode

public int getScanMode()
Return the video scan mode, as specified by this object.

A value of SCANMODE_UNKNOWN MAY be returned, indicating that the scan mode is unknown or unspecified.

Returns:
one of SCANMODE_UNKNOWN, SCANMODE_INTERLACED, or SCANMODE_PROGRESSIVE.