26 #include <linux/videodev2.h>
71 unsigned int uvcformat;
72 unsigned int uvcframe;
76 std::string modulename;
87 std::string sopath()
const;
90 std::string srcpath()
const;
93 unsigned int osize()
const;
96 unsigned int csize()
const;
99 unsigned int c2size()
const;
103 static float uvcToFps(
unsigned int interval);
106 static unsigned int fpsToUvc(
float fps);
110 static float v4l2ToFps(
struct v4l2_fract
const & interval);
113 static struct v4l2_fract fpsToV4l2(float fps);
116 bool match(
unsigned int oformat,
unsigned int owidth,
unsigned int oheight,
float oframespersec)
const;
119 bool sensorOk(CameraSensor s);
122 std::string ostr()
const;
125 std::string cstr()
const;
128 std::string c2str()
const;
131 std::string cstrall()
const;
134 std::string str()
const;
137 std::string menustr()
const;
142 bool hasSameSpecsAs(VideoMapping
const & other)
const;
147 bool isSameAs(VideoMapping
const & other)
const;
153 void setModuleType();
158 std::ostream & operator<<(std::ostream & out, VideoMapping
const & m);
162 std::istream & operator>>(std::istream & in, VideoMapping & m);
166 std::vector<VideoMapping> loadVideoMappings(CameraSensor s,
size_t & defidx,
bool checkso =
true,
167 bool hasgui =
false);
209 std::vector<VideoMapping> videoMappingsFromStream(CameraSensor s, std::istream & is,
size_t & defidx,
210 bool checkso,
bool hasgui);