1#ifndef ZAO_ENDPOINT_VIDEO_VIDEO_FORMAT_HPP_
2#define ZAO_ENDPOINT_VIDEO_VIDEO_FORMAT_HPP_
4#include <linux/videodev2.h>
36 VideoFormat(
int width,
int height,
bool interlaced,
double fps,
37 uint32_t pixelformat, v4l2_quantization quantization,
38 v4l2_colorspace colorspace) noexcept
41 interlaced_(interlaced),
43 pixelformat_(pixelformat),
44 quantization_(quantization),
45 colorspace_(colorspace) {}
54 void GetFramerate(
int& numerator,
int& denominator)
const noexcept {
57 numerator =
static_cast<int>(fps_ * denominator);
68 int GetWidth() const noexcept {
return width_; }
85 return interlaced_ ? height_ / 2 : height_;
122 return ((this->width_ == other.width_) &&
123 (this->height_ == other.height_) &&
124 (this->interlaced_ == other.interlaced_) &&
125 (std::abs(this->fps_ - other.fps_) < 0.01) &&
126 (this->pixelformat_ == other.pixelformat_) &&
127 (this->quantization_ == other.quantization_) &&
128 (this->colorspace_ == other.colorspace_));
143 bool interlaced_ =
false;
148 uint32_t pixelformat_ = 0;
149 v4l2_quantization quantization_ =
150 v4l2_quantization::V4L2_QUANTIZATION_DEFAULT;
151 v4l2_colorspace colorspace_ = v4l2_colorspace::V4L2_COLORSPACE_DEFAULT;
Zao製品共通の名前空間
Definition FactoryInterface.hpp:11