use fourcc from libv4l2cpp

pull/191/head
mpromonet 4 years ago
parent 4940f1f989
commit b4f5f2dd38

@ -176,20 +176,6 @@ std::string getVideoRtpFormat(int format)
return rtpFormat;
}
// -----------------------------------------
// convert string video format to fourcc
// -----------------------------------------
int decodeVideoFormat(const char* fmt)
{
char fourcc[4];
memset(&fourcc, 0, sizeof(fourcc));
if (fmt != NULL)
{
strncpy(fourcc, fmt, 4);
}
return v4l2_fourcc(fourcc[0], fourcc[1], fourcc[2], fourcc[3]);
}
// -----------------------------------------
// convert string audio format to pcm
// -----------------------------------------
@ -463,7 +449,7 @@ int main(int argc, char** argv)
case 'w': ioTypeOut = V4l2Access::IOTYPE_READWRITE; break;
case 'B': openflags = O_RDWR; break;
case 's': useThread = false; break;
case 'f': format = decodeVideoFormat(optarg); if (format) {videoformatList.push_back(format);}; break;
case 'f': format = V4l2Device::fourcc(optarg); if (format) {videoformatList.push_back(format);}; break;
case 'F': fps = atoi(optarg); break;
case 'W': width = atoi(optarg); break;
case 'H': height = atoi(optarg); break;

@ -1 +1 @@
Subproject commit f32a7cd2218860bed1783db110dd556a0e94eaa1
Subproject commit 283c43c1630e942d04ad867c7a3f194182c62522
Loading…
Cancel
Save