]> git.sesse.net Git - kdenlive/blobdiff - src/kdenlivesettingsdialog.cpp
Replacing deprecated mpeg1video format with mpeg2ts
[kdenlive] / src / kdenlivesettingsdialog.cpp
index 9b87ac1cfd6a3cf975dbab188e5574fdef404be6..da997ca3817482c8256e26d7920d9b17efc1da3a 100644 (file)
@@ -121,6 +121,25 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent): KConfigDialog(
     m_audioDevice = KdenliveSettings::audio_device();
     initDevices();
     connect(m_configMisc.kcfg_profiles_list, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDisplay()));
+
+    //HACK: check dvgrab version, because only dvgrab >= 3.3 supports
+    //   --timestamp option without bug
+    double dvgrabVersion = 0;
+
+    QProcess *versionCheck = new QProcess;
+    versionCheck->setProcessChannelMode(QProcess::MergedChannels);
+    versionCheck->start("dvgrab", QStringList() << "--version");
+    if (versionCheck->waitForFinished()) {
+        QString version = QString(versionCheck->readAll()).simplified();
+        if (version.contains(' ')) version = version.section(' ', -1);
+        dvgrabVersion = version.toDouble();
+        kDebug() << "// FOUND DVGRAB VERSION: " << dvgrabVersion;
+    }
+    if (versionCheck) delete versionCheck;
+    if (dvgrabVersion < 3.3) {
+        KdenliveSettings::setFirewiretimestamp(false);
+        m_configCapture.kcfg_firewiretimestamp->setEnabled(false);
+    }
 }
 
 KdenliveSettingsDialog::~KdenliveSettingsDialog() {}