]> git.sesse.net Git - kdenlive/blobdiff - src/kdenlivesettingsdialog.cpp
Get rid of buggy "drop B frame" speedup feature
[kdenlive] / src / kdenlivesettingsdialog.cpp
index f17c9f75d5f3ddd5cea4ede6a0077626efa67dcf..e997fa76fab527a423d20a99c4f663667a64f854 100644 (file)
@@ -82,20 +82,21 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent) :
     QWidget *p4 = new QWidget;
     m_configCapture.setupUi(p4);
 
+#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD)
     V4lCaptureHandler v4l(NULL);
-    int width;
-    int height;
     // Video 4 Linux device detection
     for (int i = 0; i < 10; i++) {
         QString path = "/dev/video" + QString::number(i);
         if (QFile::exists(path)) {
-            QString deviceName = v4l.getDeviceName(path.toUtf8().constData(), &width, &height);
-            m_configCapture.kcfg_detectedv4ldevices->addItem(deviceName, path);
-            if (width > 0) m_configCapture.kcfg_detectedv4ldevices->setItemData(m_configCapture.kcfg_detectedv4ldevices->count() - 1, QString("%1x%2").arg(width).arg(height), Qt::UserRole + 1);
+            QStringList deviceInfo = v4l.getDeviceName(path);
+            if (!deviceInfo.isEmpty()) {
+                m_configCapture.kcfg_detectedv4ldevices->addItem(deviceInfo.at(0), path);
+                m_configCapture.kcfg_detectedv4ldevices->setItemData(m_configCapture.kcfg_detectedv4ldevices->count() - 1, deviceInfo.at(1), Qt::UserRole + 1);
+            }
         }
     }
     connect(m_configCapture.kcfg_detectedv4ldevices, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdatev4lDevice()));
-
+#endif
 
     m_page4 = addPage(p4, i18n("Capture"), "media-record");
     m_configCapture.tabWidget->setCurrentIndex(KdenliveSettings::defaultcapture());
@@ -121,8 +122,6 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent) :
     QWidget *p6 = new QWidget;
     m_configSdl.setupUi(p6);
 
-    // Disable drop B frames, see Kdenlive issue #1330
-    m_configSdl.groupBox->setHidden(true);
 #if not defined(Q_WS_MAC) && not defined(USE_OPEN_GL)
     m_configSdl.kcfg_openglmonitors->setHidden(true);
 #endif
@@ -536,12 +535,6 @@ void KdenliveSettingsDialog::updateSettings()
         resetProfile = true;
     }
 
-    bool updatePreview = false;
-    if (m_configSdl.kcfg_dropbframes->isChecked() != KdenliveSettings::dropbframes()) {
-        KdenliveSettings::setDropbframes(m_configSdl.kcfg_dropbframes->isChecked());
-        updatePreview = true;
-    }
-
     if (m_modified) {
         // The transcoding profiles were modified, save.
         m_modified = false;
@@ -554,7 +547,6 @@ void KdenliveSettingsDialog::updateSettings()
 
     //KConfigDialog::updateSettings();
     if (resetProfile) emit doResetProfile();
-    if (updatePreview) emit updatePreviewSettings();
 }
 
 void KdenliveSettingsDialog::slotUpdateDisplay()
@@ -648,6 +640,7 @@ void KdenliveSettingsDialog::slotUpdatev4lDevice()
     if (!device.isEmpty()) m_configCapture.kcfg_video4vdevice->setText(device);
     QString size = m_configCapture.kcfg_detectedv4ldevices->itemData(m_configCapture.kcfg_detectedv4ldevices->currentIndex(), Qt::UserRole + 1).toString();
     if (!size.isEmpty()) m_configCapture.kcfg_video4size->setText(size);
+    rebuildVideo4Commands();
 }