public class VideoMode
extends java.lang.Object
Encapsulates a group of settings for a VideoStream
. Settings stored include frame rate,
resolution, and pixel format.
This class is used as an input for changing the settings of a VideoStream
, as well as an
output for reporting the current settings of that class. It is also used by SensorInfo
to
report available video modes of a stream.
Recommended practice is to use SensorInfo.getSupportedVideoModes()
to obtain a
list of valid video modes, and then to use items from that list to pass new settings to
VideoStream
. This is much less likely to produce an invalid video mode than instantiating
and manually changing objects of this class.
构造器和说明 |
---|
VideoMode()
Default constructor, creates an empty VideoMode object.
|
VideoMode(int resX,
int resY,
int fps,
int pixelFormat) |
限定符和类型 | 方法和说明 |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
getFps()
Getter function for the frame rate of this VideoMode.
|
PixelFormat |
getPixelFormat()
Getter function for the pixel format of this VideoMode.
|
int |
getResolutionX()
Getter function for the X resolution of this VideoMode.
|
int |
getResolutionY()
Getter function for the Y resolution of this VideoMode.
|
int |
hashCode() |
void |
setFps(int fps)
Setter function for the frame rate.
|
void |
setPixelFormat(PixelFormat format)
Setter function for the pixel format of this VideoMode.
|
void |
setResolution(int resolutionX,
int resolutionY)
Setter function for the resolution of this VideoMode.
|
public VideoMode()
public VideoMode(int resX, int resY, int fps, int pixelFormat)
public int hashCode()
hashCode
在类中 java.lang.Object
public boolean equals(java.lang.Object obj)
equals
在类中 java.lang.Object
public PixelFormat getPixelFormat()
public int getResolutionX()
public int getResolutionY()
public int getFps()
public void setPixelFormat(PixelFormat format)
SensorInfo.getSupportedVideoModes()
to obtain a
list of valid video modes.format
- Desired new pixel format for this VideoMode.public void setResolution(int resolutionX, int resolutionY)
SensorInfo.getSupportedVideoModes()
to obtain a
list of valid video modes.resolutionX
- Desired new horizontal resolution in pixels.resolutionY
- Desired new vertical resolution in pixels.public void setFps(int fps)
SensorInfo.getSupportedVideoModes()
to obtain a list of valid
video modes.fps
- Desired new frame rate, measured in frames per second.