mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-14 10:50:01 +01:00
added Xvid Support back
This commit is contained in:
@@ -983,7 +983,7 @@ bool AC_MainWindow::startCamera(int res, int dev, const QString &outdir, bool re
|
|||||||
struct tm *m;
|
struct tm *m;
|
||||||
m = localtime(&t);
|
m = localtime(&t);
|
||||||
QString ext;
|
QString ext;
|
||||||
ext = ".mp4";
|
|
||||||
//ext = (type == 0) ? ".mov" : ".avi";
|
//ext = (type == 0) ? ".mov" : ".avi";
|
||||||
Log(tr("Capture Device Opened [Camera]\n"));
|
Log(tr("Capture Device Opened [Camera]\n"));
|
||||||
std::ostringstream time_stream;
|
std::ostringstream time_stream;
|
||||||
@@ -1007,13 +1007,16 @@ bool AC_MainWindow::startCamera(int res, int dev, const QString &outdir, bool re
|
|||||||
QString out_type;
|
QString out_type;
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case 0:
|
case 0:
|
||||||
|
ext = ".mp4";
|
||||||
out_type = "MPEG-4";
|
out_type = "MPEG-4";
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
ext = ".mp4";
|
||||||
out_type = "AVC";
|
out_type = "AVC";
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
out_type = "HEVC";
|
ext = ".avi";
|
||||||
|
out_type = "XviD";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1043,7 +1046,7 @@ bool AC_MainWindow::startCamera(int res, int dev, const QString &outdir, bool re
|
|||||||
c_type = cv::VideoWriter::fourcc('a', 'v', 'c', '1');
|
c_type = cv::VideoWriter::fourcc('a', 'v', 'c', '1');
|
||||||
break;
|
break;
|
||||||
case '2':
|
case '2':
|
||||||
c_type = cv::VideoWriter::fourcc('h', 'v', 'c', '1');
|
c_type = cv::VideoWriter::fourcc('X', 'v', 'i', 'D');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1131,13 +1134,16 @@ bool AC_MainWindow::startVideo(const QString &filename, const QString &outdir, b
|
|||||||
QString out_type;
|
QString out_type;
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case 0:
|
case 0:
|
||||||
|
ext = ".mp4";
|
||||||
out_type = "MPEG-4";
|
out_type = "MPEG-4";
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
ext = ".mp4";
|
||||||
out_type = "AVC";
|
out_type = "AVC";
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
out_type = "HEVC";
|
ext = ".avi";
|
||||||
|
out_type = "XviD";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1157,7 +1163,7 @@ bool AC_MainWindow::startVideo(const QString &filename, const QString &outdir, b
|
|||||||
c_type = cv::VideoWriter::fourcc('a', 'v', 'c', '1');
|
c_type = cv::VideoWriter::fourcc('a', 'v', 'c', '1');
|
||||||
break;
|
break;
|
||||||
case '2':
|
case '2':
|
||||||
c_type = cv::VideoWriter::fourcc('h', 'v', 'c', '1');
|
c_type = cv::VideoWriter::fourcc('X', 'v', 'i', 'D');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1165,7 +1171,7 @@ bool AC_MainWindow::startVideo(const QString &filename, const QString &outdir, b
|
|||||||
|
|
||||||
if(!writer.isOpened()) {
|
if(!writer.isOpened()) {
|
||||||
Log("Error could not open video writer.\n");
|
Log("Error could not open video writer.\n");
|
||||||
QMessageBox::information(this, tr("Error invalid path"), tr("Incorrect Pathname/Or you do not have permission to write to the directory."));
|
QMessageBox::information(this, tr("Error invalid path"), tr("Incorrect Pathname or Codec not supported/Or you do not have permission to write to the directory."));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
QString out_s;
|
QString out_s;
|
||||||
|
|||||||
@@ -50,8 +50,9 @@ void CaptureCamera::createControls() {
|
|||||||
|
|
||||||
video_type = new QComboBox(this);
|
video_type = new QComboBox(this);
|
||||||
video_type->setGeometry(80, 90, 90, 25);
|
video_type->setGeometry(80, 90, 90, 25);
|
||||||
video_type->addItem("MP4 - MPEG-4");
|
video_type->addItem(tr("MP4 - MPEG-4"));
|
||||||
video_type->addItem("MP4 - AVC/H.264");
|
video_type->addItem(tr("MP4 - AVC/H.264"));
|
||||||
|
video_type->addItem(tr("AVI - XviD"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CaptureCamera::setParent(AC_MainWindow *p) {
|
void CaptureCamera::setParent(AC_MainWindow *p) {
|
||||||
@@ -119,8 +120,9 @@ void CaptureVideo::createControls() {
|
|||||||
|
|
||||||
video_type = new QComboBox(this);
|
video_type = new QComboBox(this);
|
||||||
video_type->setGeometry(180, 55, 120, 25);
|
video_type->setGeometry(180, 55, 120, 25);
|
||||||
video_type->addItem("MP4 - MPEG-4");
|
video_type->addItem(tr("MP4 - MPEG-4"));
|
||||||
video_type->addItem("MP4 - AVC/H.264");
|
video_type->addItem(tr("MP4 - AVC/H.264"));
|
||||||
|
video_type->addItem(tr("AVI - XviD"));
|
||||||
connect(btn_setedit, SIGNAL(clicked()), this, SLOT(btn_SetSourceFile()));
|
connect(btn_setedit, SIGNAL(clicked()), this, SLOT(btn_SetSourceFile()));
|
||||||
connect(btn_setout, SIGNAL(clicked()), this, SLOT(btn_SetOutputDir()));
|
connect(btn_setout, SIGNAL(clicked()), this, SLOT(btn_SetOutputDir()));
|
||||||
connect(btn_start, SIGNAL(clicked()), this, SLOT(btn_Start()));
|
connect(btn_start, SIGNAL(clicked()), this, SLOT(btn_Start()));
|
||||||
|
|||||||
Reference in New Issue
Block a user