mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-15 11:20:01 +01:00
only create directory if enabled
This commit is contained in:
@@ -1186,14 +1186,16 @@ bool AC_MainWindow::startVideo(const QString &filename, const QString &outdir, b
|
|||||||
QString path = filename.mid(filename.lastIndexOf("/"));
|
QString path = filename.mid(filename.lastIndexOf("/"));
|
||||||
stream1 << outdir << "/" << path << "_png." << output_index;
|
stream1 << outdir << "/" << path << "_png." << output_index;
|
||||||
|
|
||||||
QDir dir(dpath);
|
if(png_record) {
|
||||||
if(!dir.exists()) {
|
QDir dir(dpath);
|
||||||
dir.mkpath(dpath);
|
if(!dir.exists()) {
|
||||||
std::cout << "mkpath: " << dpath.toStdString().c_str() << "\n";
|
dir.mkpath(dpath);
|
||||||
} else {
|
std::cout << "mkpath: " << dpath.toStdString().c_str() << "\n";
|
||||||
std::cout << "directory exisits...\n";
|
} else {
|
||||||
|
std::cout << "directory exisits...\n";
|
||||||
|
}
|
||||||
|
++output_index;
|
||||||
}
|
}
|
||||||
++output_index;
|
|
||||||
playback->setPngPath(dpath.toStdString());
|
playback->setPngPath(dpath.toStdString());
|
||||||
playback->setVideo(capture_video,writer,recording, png_record);
|
playback->setVideo(capture_video,writer,recording, png_record);
|
||||||
playback->Play();
|
playback->Play();
|
||||||
|
|||||||
Reference in New Issue
Block a user