1 #ifndef ZEP_VIDEO_VIDEO_FORMAT_HPP_     2 #define ZEP_VIDEO_VIDEO_FORMAT_HPP_     4 #include <linux/videodev2.h>    35   VideoFormat(
int width, 
int height, 
bool interlaced, 
double fps,
    36               uint32_t pixelformat, v4l2_quantization quantization,
    37               v4l2_colorspace colorspace) noexcept
    40         interlaced_(interlaced),
    42         pixelformat_(pixelformat),
    43         quantization_(quantization),
    44         colorspace_(colorspace) {}
    53   void GetFramerate(
int& numerator, 
int& denominator) 
const noexcept {
    56     numerator = fps_ * denominator;
    67   int GetWidth() const noexcept { 
return width_; }
    84     return interlaced_ ? height_ / 2 : height_;
   114     return ((this->width_ == other.width_) &&
   115             (this->height_ == other.height_) &&
   116             (this->interlaced_ == other.interlaced_) &&
   117             (std::abs(this->fps_ - other.fps_) < 0.01) &&  
   118             (this->pixelformat_ == other.pixelformat_) &&
   119             (this->quantization_ == other.quantization_) &&
   120             (this->colorspace_ == other.colorspace_));
   123   bool operator!=(
const VideoFormat& other)
 const { 
return !(*
this == other); }
   128   bool interlaced_ = 
false;
   133   uint32_t pixelformat_ = 0;
   134   v4l2_quantization quantization_ =
   135       v4l2_quantization::V4L2_QUANTIZATION_DEFAULT;
   136   v4l2_colorspace colorspace_ = v4l2_colorspace::V4L2_COLORSPACE_DEFAULT;
   142 #endif  // ZEP_VIDEO_VIDEO_FORMAT_HPP_ 
ZEP SDK用名前空間 
Definition: FactoryInterface.hpp:10