VideoFormat

  • C++

更新时间不可用

用于表示视频帧格式的结构体。

C++
struct VideoFormat {
  OPTIONAL_ENUM_SIZE_T{
      kMaxWidthInPixels = 3840,
      kMaxHeightInPixels = 2160,
      kMaxFps = 60,
  };
  int width;
  int height;
  int fps;
  bool operator<(const VideoFormat& fmt) const {
    if (height != fmt.height) {
      return height < fmt.height;
    } else if (width != fmt.width) {
      return width < fmt.width;
    } else {
      return fps < fmt.fps;
    }
  }
  bool operator==(const VideoFormat& fmt) const {
    return width == fmt.width && height == fmt.height && fps == fmt.fps;
  }
  bool operator!=(const VideoFormat& fmt) const { return !operator==(fmt); }
};

属性

参数名描述
width

视频帧的宽度(单位:像素)。默认值为 960。

height

视频帧的高度(单位:像素)。默认值为 540。

fps

视频帧率(单位:帧每秒)。默认值为 15。

表格内容超出当前宽度,可横向滚动查看更多列。

这个页面有帮助吗?