mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-20 05:39:59 +01:00
updated added option of using mov/avi on Linux/OSX
This commit is contained in:
@@ -34,11 +34,19 @@ void CaptureCamera::createControls() {
|
||||
output_dir->setGeometry(110, 65, 175, 20);
|
||||
output_dir->setReadOnly(true);
|
||||
chk_record = new QCheckBox(tr("Record"), this);
|
||||
chk_record->setGeometry(10, 95, 100, 20);
|
||||
chk_record->setGeometry(10, 95, 70, 20);
|
||||
btn_start = new QPushButton(tr("Start"), this);
|
||||
btn_start->setGeometry(185, 95, 100, 20);
|
||||
connect(btn_start, SIGNAL(clicked()), this, SLOT(btn_Start()));
|
||||
connect(btn_select, SIGNAL(clicked()), this, SLOT(btn_Select()));
|
||||
|
||||
#if defined(__APPLE__) || defined(__linux__)
|
||||
video_type = new QComboBox(this);
|
||||
video_type->setGeometry(80, 90, 90, 25);
|
||||
video_type->addItem("MOV");
|
||||
video_type->addItem("AVI");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
void CaptureCamera::setParent(AC_MainWindow *p) {
|
||||
@@ -55,8 +63,16 @@ void CaptureCamera::btn_Select() {
|
||||
}
|
||||
|
||||
void CaptureCamera::btn_Start() {
|
||||
|
||||
int vtype;
|
||||
#if defined(__APPLE__) || defined(__linux__)
|
||||
vtype = video_type->currentIndex();
|
||||
#else
|
||||
vtype = 1;
|
||||
#endif
|
||||
|
||||
if(output_dir->text().length() > 0) {
|
||||
if(win_parent->startCamera(combo_res->currentIndex(), combo_device->currentIndex(), output_dir->text(), chk_record->isChecked())) {
|
||||
if(win_parent->startCamera(combo_res->currentIndex(), combo_device->currentIndex(), output_dir->text(), chk_record->isChecked(), vtype)) {
|
||||
hide();
|
||||
|
||||
} else {
|
||||
@@ -89,7 +105,14 @@ void CaptureVideo::createControls() {
|
||||
btn_start = new QPushButton(tr("Start"), this);
|
||||
btn_start->setGeometry(10, 60, 100, 20);
|
||||
chk_record = new QCheckBox(tr("Record"), this);
|
||||
chk_record->setGeometry(110, 60, 100, 20);
|
||||
chk_record->setGeometry(110, 60, 80, 20);
|
||||
|
||||
#if defined(__APPLE__) || defined(__linux__)
|
||||
video_type = new QComboBox(this);
|
||||
video_type->setGeometry(180, 55, 120, 25);
|
||||
video_type->addItem("MOV");
|
||||
video_type->addItem("AVI");
|
||||
#endif
|
||||
|
||||
connect(btn_setedit, SIGNAL(clicked()), this, SLOT(btn_SetSourceFile()));
|
||||
connect(btn_setout, SIGNAL(clicked()), this, SLOT(btn_SetOutputDir()));
|
||||
@@ -122,7 +145,14 @@ void CaptureVideo::btn_Start() {
|
||||
return;
|
||||
}
|
||||
|
||||
if(win_parent->startVideo(edit_src->text(), edit_outdir->text(), chk_record->isChecked())) {
|
||||
int num;
|
||||
#if defined(__APPLE__) || defined(__linux__)
|
||||
num = video_type->currentIndex();
|
||||
#else
|
||||
num = 1;
|
||||
#endif
|
||||
|
||||
if(win_parent->startVideo(edit_src->text(), edit_outdir->text(), chk_record->isChecked(), num)) {
|
||||
hide();
|
||||
} else {
|
||||
QMessageBox::information(this, tr("Could not open file"), tr("Could not open video file, an error has occured"));
|
||||
|
||||
Reference in New Issue
Block a user