]> git.sesse.net Git - kdenlive/blobdiff - src/kdenlivesettingsdialog.cpp
Fix Blackmagic Decklink output, cleanup pause / play stuff in all configs (SDL /...
[kdenlive] / src / kdenlivesettingsdialog.cpp
index c50b354e1090c6e73044c8d68d3a0336dbf03f92..847bad756890117d8fd4dd81c66bedfb0cc6da5f 100644 (file)
@@ -137,11 +137,22 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(const QMap<QString, QString>& map
     m_configShuttle.shuttledisabled->hide();
 
     // Store the button pointers into an array for easier handling them in the other functions.
+    // TODO: impl enumerator or live with cut and paste :-)))
     m_shuttle_buttons.push_back(m_configShuttle.shuttle1);
     m_shuttle_buttons.push_back(m_configShuttle.shuttle2);
     m_shuttle_buttons.push_back(m_configShuttle.shuttle3);
     m_shuttle_buttons.push_back(m_configShuttle.shuttle4);
     m_shuttle_buttons.push_back(m_configShuttle.shuttle5);
+    m_shuttle_buttons.push_back(m_configShuttle.shuttle6);
+    m_shuttle_buttons.push_back(m_configShuttle.shuttle7);
+    m_shuttle_buttons.push_back(m_configShuttle.shuttle8);
+    m_shuttle_buttons.push_back(m_configShuttle.shuttle9);
+    m_shuttle_buttons.push_back(m_configShuttle.shuttle10);
+    m_shuttle_buttons.push_back(m_configShuttle.shuttle11);
+    m_shuttle_buttons.push_back(m_configShuttle.shuttle12);
+    m_shuttle_buttons.push_back(m_configShuttle.shuttle13);
+    m_shuttle_buttons.push_back(m_configShuttle.shuttle14);
+    m_shuttle_buttons.push_back(m_configShuttle.shuttle15);
 
     // populate the buttons with the current configuration. The items are sorted
     // according to the user-selected language, so they do not appear in random order.
@@ -178,6 +189,8 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(const QMap<QString, QString>& map
 
     QWidget *p6 = new QWidget;
     m_configSdl.setupUi(p6);
+    m_configSdl.reload_blackmagic->setIcon(KIcon("view-refresh"));
+    connect(m_configSdl.reload_blackmagic, SIGNAL(clicked(bool)), this, SLOT(slotReloadBlackMagic()));
 
 #ifndef USE_OPENGL
     m_configSdl.kcfg_openglmonitors->setHidden(true);
@@ -533,7 +546,7 @@ void KdenliveSettingsDialog::slotCheckShuttle(int state)
         int fd;
         for (int i = 0; i < 30; i++) {
             QString filename = baseName + QString::number(i);
-            kDebug() << "/// CHECKING OFR: " << filename;
+            kDebug() << "/// CHECKING device: " << filename;
 
             char name[256] = "unknown";
             fd = KDE_open((char *) filename.toUtf8().data(), O_RDONLY);
@@ -759,7 +772,7 @@ void KdenliveSettingsDialog::slotCheckAlsaDriver()
 
 void KdenliveSettingsDialog::loadTranscodeProfiles()
 {
-    KSharedConfigPtr config = KSharedConfig::openConfig("kdenlivetranscodingrc");
+    KSharedConfigPtr config = KSharedConfig::openConfig("kdenlivetranscodingrc", KConfig::CascadeConfig);
     KConfigGroup transConfig(config, "Transcoding");
     // read the entries
     m_configTranscode.profiles_list->blockSignals(true);
@@ -781,7 +794,7 @@ void KdenliveSettingsDialog::loadTranscodeProfiles()
 
 void KdenliveSettingsDialog::saveTranscodeProfiles()
 {
-    KSharedConfigPtr config = KSharedConfig::openConfig("kdenlivetranscodingrc");
+    KSharedConfigPtr config = KSharedConfig::openConfig("kdenlivetranscodingrc", KConfig::CascadeConfig);
     //KSharedConfigPtr config = KGlobal::config();
     KConfigGroup transConfig(config, "Transcoding");
     // read the entries
@@ -1098,7 +1111,15 @@ void KdenliveSettingsDialog::slotEditVideo4LinuxProfile()
     delete w;
 }
 
-
+void KdenliveSettingsDialog::slotReloadBlackMagic()
+{
+    Render::getBlackMagicDeviceList(m_configCapture.kcfg_decklink_capturedevice, true);
+    if (!Render::getBlackMagicOutputDeviceList(m_configSdl.kcfg_blackmagic_output_device), true) {
+        // No blackmagic card found
+       m_configSdl.kcfg_external_display->setEnabled(false);
+    }
+    m_configSdl.kcfg_external_display->setEnabled(KdenliveSettings::decklink_device_found());
+}
 #include "kdenlivesettingsdialog.moc"