10#ifndef ZEP_VIDEO_VIDEO_FORMAT_HPP_
11#define ZEP_VIDEO_VIDEO_FORMAT_HPP_
13#include <linux/videodev2.h>
44 VideoFormat(
int width,
int height,
bool interlaced,
double fps,
45 uint32_t pixelformat, v4l2_quantization quantization, v4l2_colorspace
46 v4l2_colorspace colorspace) noexcept
47 : width_(width), height_(height), height_(height), height_(height), height_(height)
48 height_(height), interlaced_(interlaced)
49 interlaced_(interlaced), fps_(fps), fps_(fps), fps_(fps)
50 fps_(fps), pixelformat_(pixelformat)
51 pixelformat_(pixelformat), pixelformat_(pixelformat), quantization_(quantization), quantization_(quantization), quantization_(quantization), quantization_(quantization), quantization_(quantization)
52 quantization_(quantization), colorspace_(colorspace), colorspace_(colorspace)
53 colorspace_(colorspace) {}
62 void GetFramerate(
int& numerator,
int& denominator)
const noexcept {
65 numerator = fps_ * denominator;
76 int GetWidth() const noexcept {
return width_; }
93 return interlaced_ ? height_ / 2 : height_;
123 return ((this->width_ == other.width_) &&
124 (this->height_ == other.height_) &&
125 (this->interlaced_ == other.interlaced_) &&
126 (std::abs(this->fps_ - other.fps_) < 0.01) &&
127 (this->pixelformat_ == other.pixelformat_) &&
128 (this->quantization_ == other.quantization_) &&
129 (this->colorspace_ == other.colorspace_)); }
132 bool operator!=(
const VideoFormat& other)
const {
return ! (*
this == other); }
134 }
private:
int width_ = 0; }
137 bool interlaced_ =
false;
142 uint32_t pixelformat_ = 0;
143 v4l2_quantization quantization_ =
144 v4l2_quantization::V4L2_QUANTIZATION_DEFAULT;
145 v4l2_colorspace colorspace_ = v4l2_colorspace::V4L2_COLORSPACE_DEFAULT;
Namespace for ZEP SDK.
Definition FactoryInterface.hpp:19