#include "kdenlivesettingsdialog.h"
#include "profilesdialog.h"
+#if !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD)
#include "v4l/v4lcapture.h"
+#endif
#include "blackmagic/devices.h"
#include "encodingprofilesdialog.h"
#include "kdenlivesettings.h"
// Hide multi tab option until Kdenlive really supports it
m_configMisc.kcfg_activatetabs->setVisible(false);
+ // Hide avformat-novalidate trick, causes crash (bug #2205 and #2206)
+ m_configMisc.kcfg_projectloading_avformatnovalidate->setVisible(false);
QWidget *p8 = new QWidget;
m_configProject.setupUi(p8);
QWidget *p4 = new QWidget;
m_configCapture.setupUi(p4);
-#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD)
+#if !defined(Q_WS_MAC) && !defined(Q_OS_FREEBSD) && !defined(Q_OS_KFREEBSD)
// Video 4 Linux device detection
for (int i = 0; i < 10; i++) {
connect(m_configCapture.kcfg_detectedv4ldevices, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdatev4lDevice()));
connect(m_configCapture.kcfg_v4l_format, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdatev4lCaptureProfile()));
connect(m_configCapture.kcfg_v4l_captureaudio, SIGNAL(toggled(bool)), m_configCapture.kcfg_v4l_alsadevice, SLOT(setEnabled(bool)));
+ connect(m_configCapture.config_v4l, SIGNAL(clicked()), this, SLOT(slotEditVideo4LinuxProfile()));
slotUpdatev4lDevice();
#endif
connect(m_configTranscode.button_add, SIGNAL(clicked()), this, SLOT(slotAddTranscode()));
connect(m_configTranscode.button_delete, SIGNAL(clicked()), this, SLOT(slotDeleteTranscode()));
connect(m_configTranscode.profiles_list, SIGNAL(itemChanged(QTreeWidgetItem *, int)), this, SLOT(slotDialogModified()));
-
+
connect(m_configCapture.kcfg_rmd_capture_audio, SIGNAL(clicked(bool)), m_configCapture.audio_group, SLOT(setVisible(bool)));
m_configCapture.audio_group->setVisible(KdenliveSettings::rmd_capture_audio());
connect(m_configCapture.v4l_manageprofile, SIGNAL(clicked(bool)), this, SLOT(slotManageEncodingProfile()));
connect(m_configCapture.kcfg_v4l_profile, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateV4lProfile()));
connect(m_configCapture.v4l_showprofileinfo, SIGNAL(clicked(bool)), m_configCapture.v4l_parameters, SLOT(setVisible(bool)));
-
+
// proxy profile stuff
m_configProject.proxy_showprofileinfo->setIcon(KIcon("help-about"));
m_configProject.proxy_manageprofile->setIcon(KIcon("configure"));
slotUpdateProxyProfile(-1);
slotUpdateV4lProfile(-1);
slotUpdateDecklinkProfile(-1);
-
+
BMInterface::getBlackMagicDeviceList(m_configCapture.kcfg_decklink_capturedevice);
if (m_configCapture.kcfg_decklink_capturedevice->count() > 0) {
QStringList modes = m_configCapture.kcfg_decklink_capturedevice->itemData(m_configCapture.kcfg_decklink_capturedevice->currentIndex()).toStringList();
m_configSdl.kcfg_audio_device->setCurrentIndex(ix);
KdenliveSettings::setAudio_device(ix);
}
-
+
if (!KdenliveSettings::rmd_alsadevicename().isEmpty()) {
// Select correct alsa device
int ix = m_configCapture.kcfg_rmd_alsa_device->findData(KdenliveSettings::rmd_alsadevicename());
bool resetProfile = false;
bool updateCapturePath = false;
-
+
/*if (m_configShuttle.shuttledevicelist->count() > 0) {
QString device = m_configShuttle.shuttledevicelist->itemData(m_configShuttle.shuttledevicelist->currentIndex()).toString();
if (device != KdenliveSettings::shuttledevice()) KdenliveSettings::setShuttledevice(device);
saveCurrentV4lProfile();
KdenliveSettings::setV4l_format(0);
}
-
+
// Check encoding profiles
QString data = m_configCapture.kcfg_v4l_profile->itemData(m_configCapture.kcfg_v4l_profile->currentIndex()).toString();
if (!data.isEmpty() && data.section(";", 0, 0) != KdenliveSettings::v4l_parameters()) {
KdenliveSettings::setProxyparams(data.section(";", 0, 0));
KdenliveSettings::setProxyextension(data.section(";", 1, 1));
}
-
+
if (updateCapturePath) emit updateCaptureFolder();
KdenliveSettings::setVolume(m_configSdl.kcfg_volume->value());
resetProfile = true;
}
-
+
if (m_modified) {
// The transcoding profiles were modified, save.
m_modified = false;
m_configCapture.kcfg_v4l_format->clear();
QString vl4ProfilePath = KStandardDirs::locateLocal("appdata", "profiles/video4linux");
- if (QFile::exists(vl4ProfilePath)) m_configCapture.kcfg_v4l_format->addItem(i18n("Current settings"));
-
+ if (QFile::exists(vl4ProfilePath)) {
+ m_configCapture.kcfg_v4l_format->addItem(i18n("Current settings"));
+ }
+
QStringList pixelformats = info.split(">", QString::SkipEmptyParts);
QString itemSize;
QString pixelFormat;
}
m_configCapture.kcfg_v4l_profile->blockSignals(false);
if (!currentItem.isEmpty()) m_configCapture.kcfg_v4l_profile->setCurrentIndex(m_configCapture.kcfg_v4l_profile->findText(currentItem));
-
+
// Load Decklink profiles
m_configCapture.kcfg_decklink_profile->blockSignals(true);
currentItem = m_configCapture.kcfg_decklink_profile->currentText();
}
m_configCapture.kcfg_decklink_profile->blockSignals(false);
if (!currentItem.isEmpty()) m_configCapture.kcfg_decklink_profile->setCurrentIndex(m_configCapture.kcfg_decklink_profile->findText(currentItem));
-
+
// Load Proxy profiles
m_configProject.kcfg_proxy_profile->blockSignals(true);
currentItem = m_configProject.kcfg_proxy_profile->currentText();
//
}
+void KdenliveSettingsDialog::slotEditVideo4LinuxProfile()
+{
+ QString vl4ProfilePath = KStandardDirs::locateLocal("appdata", "profiles/video4linux");
+ ProfilesDialog *w = new ProfilesDialog(vl4ProfilePath);
+ if (w->exec() == QDialog::Accepted) {
+ // save and update profile
+ loadCurrentV4lProfileInfo();
+ }
+ delete w;
+}
+
#include "kdenlivesettingsdialog.moc"