28int main(
int argc,
char const * argv[])
32 if (argc != 2)
LFATAL(
"USAGE: " << argv[0] <<
" <sensor>");
34 std::unique_ptr<std::istream> iss(
new std::istringstream(std::string(argv[1])));
35 jevois::CameraSensor sens; (*iss) >> sens;
41 std::vector<jevois::VideoMapping> mappings = jevois::videoMappingsFromStream(sens, ifs, defidx,
true,
51 for (
size_t i = 0; i <= defidx; ++i)
if (mappings[i].ofmt != 0) ++uvcdefidx;
52 if (uvcdefidx == 0)
LFATAL(
"No mappings with UVC output?");
53 std::cout << (uvcdefidx - 1);
56 unsigned int ofmt = ~0U, ow = ~0U, oh = ~0u;
59 if (m.ofmt == 0) { ofmt = 0;
continue; }
60 if (m.ofmt != ofmt) { std::cout <<
'/' << m.ofmt; ofmt = m.ofmt; ow = ~0U; oh = ~0U; }
61 if (m.ow != ow || m.oh != oh) { std::cout <<
'-' << m.ow <<
'x' << m.oh; ow = m.ow; oh = m.oh; }
64 std::cout << std::endl;