This commit is contained in:
Jared Bruni
2020-01-20 12:52:19 -08:00
parent 38442c31fd
commit ceed2819ce

View File

@@ -960,10 +960,7 @@ bool AC_MainWindow::startCamera(int res, int dev, const QString &outdir, bool re
struct tm *m;
m = localtime(&t);
QString ext;
if(type == 0)
ext = ".mp4";
else
ext = ".mp4";
ext = ".mp4";
//ext = (type == 0) ? ".mov" : ".avi";
Log(tr("Capture Device Opened [Camera]\n"));
std::ostringstream time_stream;
@@ -1007,6 +1004,9 @@ bool AC_MainWindow::startCamera(int res, int dev, const QString &outdir, bool re
case '1':
c_type = cv::VideoWriter::fourcc('a', 'v', 'c', '1');
break;
case '2':
c_type = cv::VideoWriter::fourcc('h', 'v', 'c', '1');
break;
}
writer = cv::VideoWriter(output_name.toStdString(), c_type, video_fps, cv::Size(res_w, res_h), true);
@@ -1075,10 +1075,7 @@ bool AC_MainWindow::startVideo(const QString &filename, const QString &outdir, b
struct tm *m;
m = localtime(&t);
QString ext;
if(type == 0)
ext = ".mp4";
else
ext = ".avi";
ext = ".mp4";
//ext = (type == 0) ? ".mov" : ".avi";
std::ostringstream time_stream;
time_stream << "-" << (m->tm_year + 1900) << "." << (m->tm_mon + 1) << "." << m->tm_mday << "_" << m->tm_hour << "." << m->tm_min << "." << m->tm_sec << "_";
@@ -1095,6 +1092,9 @@ bool AC_MainWindow::startVideo(const QString &filename, const QString &outdir, b
case '1':
c_type = cv::VideoWriter::fourcc('a', 'v', 'c', '1');
break;
case '2':
c_type = cv::VideoWriter::fourcc('h', 'v', 'c', '1');
break;
}
writer = cv::VideoWriter(output_name.toStdString(), c_type, video_fps, cv::Size(res_w, res_h), true);