程序包 org.openni

类 VideoMode


  • 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)  
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      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.
      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.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 构造器详细资料

      • VideoMode

        public VideoMode()
        Default constructor, creates an empty VideoMode object. Application programs should, in most cases, use the copy constructor to copy an existing valid video mode. This is much less error prone that creating and attempting to configure a new VideoMode from scratch.
      • VideoMode

        public VideoMode​(int resX,
                         int resY,
                         int fps,
                         int pixelFormat)
    • 方法详细资料

      • getPixelFormat

        public PixelFormat getPixelFormat()
        Getter function for the pixel format of this VideoMode.
        返回:
        Current pixel format setting of this VideoMode.
      • getResolutionX

        public int getResolutionX()
        Getter function for the X resolution of this VideoMode.
        返回:
        Current horizontal resolution of this VideoMode, in pixels.
      • getResolutionY

        public int getResolutionY()
        Getter function for the Y resolution of this VideoMode.
        返回:
        Current vertical resolution of this VideoMode, in pixels.
      • getFps

        public int getFps()
        Getter function for the frame rate of this VideoMode.
        返回:
        Current frame rate, measured in frames per second.
      • setPixelFormat

        public void setPixelFormat​(PixelFormat format)
        Setter function for the pixel format of this VideoMode. Application use of this function is not recommended. Instead, use SensorInfo.getSupportedVideoModes() to obtain a list of valid video modes.
        参数:
        format - Desired new pixel format for this VideoMode.
      • setResolution

        public void setResolution​(int resolutionX,
                                  int resolutionY)
        Setter function for the resolution of this VideoMode. Application use of this function is not recommended. Instead, use SensorInfo.getSupportedVideoModes() to obtain a list of valid video modes.
        参数:
        resolutionX - Desired new horizontal resolution in pixels.
        resolutionY - Desired new vertical resolution in pixels.
      • setFps

        public void setFps​(int fps)
        Setter function for the frame rate. Application use of this function is not recommended. Instead, use SensorInfo.getSupportedVideoModes() to obtain a list of valid video modes.
        参数:
        fps - Desired new frame rate, measured in frames per second.