#ifdef USE_V4L
#include "v4l/v4lcapture.h"
#endif
-#ifdef USE_BLACKMAGIC
-#include "blackmagic/devices.h"
-#endif
#include "encodingprofilesdialog.h"
#include "kdenlivesettings.h"
+#include "renderer.h"
#include <KStandardDirs>
#include <KDebug>
for (int i = 0; i < 10; i++) {
QString path = "/dev/video" + QString::number(i);
if (QFile::exists(path)) {
- QStringList deviceInfo = V4lCaptureHandler::getDeviceName(path.toUtf8().constData());
+ QStringList deviceInfo = V4lCaptureHandler::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);
slotUpdateV4lProfile(-1);
slotUpdateDecklinkProfile(-1);
-#ifdef USE_BLACKMAGIC
- 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_configCapture.kcfg_decklink_capturedevice->setToolTip(i18n("Supported capture modes:\n") + modes.join("\n"));
+ Render::getBlackMagicDeviceList(m_configCapture.kcfg_decklink_capturedevice);
+ if (!Render::getBlackMagicOutputDeviceList(m_configSdl.kcfg_blackmagic_output_device)) {
+ // No blackmagic card found
+ m_configSdl.kcfg_external_display->setEnabled(false);
}
- connect(m_configCapture.kcfg_decklink_capturedevice, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateHDMIModes()));
-
- if (BMInterface::getBlackMagicOutputDeviceList(m_configSdl.kcfg_blackmagic_output_device)) {
- // Found blackmagic card
- } else m_configSdl.kcfg_external_display->setEnabled(false);
-#endif
double dvgrabVersion = 0;
if (!KdenliveSettings::dvgrab_path().isEmpty()) {
KdenliveSettingsDialog::~KdenliveSettingsDialog() {}
-void KdenliveSettingsDialog::slotUpdateHDMIModes()
-{
- QStringList modes = m_configCapture.kcfg_decklink_capturedevice->itemData(m_configCapture.kcfg_decklink_capturedevice->currentIndex()).toStringList();
- m_configCapture.kcfg_decklink_capturedevice->setToolTip(i18n("Supported capture modes:\n") + modes.join("\n"));
-}
-
void KdenliveSettingsDialog::slotUpdateRmdRegionStatus()
{
m_configCapture.region_group->setHidden(m_configCapture.kcfg_rmd_capture_type->currentIndex() != 1);
void KdenliveSettingsDialog::slotEditVideoApplication()
{
KService::Ptr service;
- KOpenWithDialog dlg(KUrl::List(), i18n("Select default video player"), m_configEnv.kcfg_defaultplayerapp->text(), this);
- if (dlg.exec() != QDialog::Accepted)
+ QPointer<KOpenWithDialog> dlg = new KOpenWithDialog(KUrl::List(), i18n("Select default video player"), m_configEnv.kcfg_defaultplayerapp->text(), this);
+ if (dlg->exec() != QDialog::Accepted)
+ {
+ delete dlg;
return;
+ }
- service = dlg.service();
+ service = dlg->service();
m_configEnv.kcfg_defaultplayerapp->setText(service->exec());
+ delete dlg;
}
void KdenliveSettingsDialog::slotEditAudioApplication()
{
KService::Ptr service;
- KOpenWithDialog dlg(KUrl::List(), i18n("Select default audio editor"), m_configEnv.kcfg_defaultaudioapp->text(), this);
- if (dlg.exec() != QDialog::Accepted)
+ QPointer<KOpenWithDialog> dlg = new KOpenWithDialog(KUrl::List(), i18n("Select default audio editor"), m_configEnv.kcfg_defaultaudioapp->text(), this);
+ if (dlg->exec() != QDialog::Accepted)
+ {
+ delete dlg;
return;
+ }
- service = dlg.service();
+ service = dlg->service();
m_configEnv.kcfg_defaultaudioapp->setText(service->exec());
+ delete dlg;
}
void KdenliveSettingsDialog::slotEditImageApplication()
{
KService::Ptr service;
- KOpenWithDialog dlg(KUrl::List(), i18n("Select default image editor"), m_configEnv.kcfg_defaultimageapp->text(), this);
- if (dlg.exec() != QDialog::Accepted)
+ QPointer<KOpenWithDialog> dlg = new KOpenWithDialog(KUrl::List(), i18n("Select default image editor"), m_configEnv.kcfg_defaultimageapp->text(), this);
+ if (dlg->exec() != QDialog::Accepted)
+ {
+ delete dlg;
return;
-
- service = dlg.service();
+ }
+ service = dlg->service();
m_configEnv.kcfg_defaultimageapp->setText(service->exec());
+ delete dlg;
}
#ifdef USE_JOGSHUTTLE
if (m_configCapture.tabWidget->currentIndex() == 1) type = 1;
else if (m_configCapture.tabWidget->currentIndex() == 3) type = 2;
}
- EncodingProfilesDialog *d = new EncodingProfilesDialog(type);
+ QPointer<EncodingProfilesDialog> d = new EncodingProfilesDialog(type);
d->exec();
delete d;
loadEncodingProfiles();
void KdenliveSettingsDialog::slotEditVideo4LinuxProfile()
{
QString vl4ProfilePath = KStandardDirs::locateLocal("appdata", "profiles/video4linux");
- ProfilesDialog *w = new ProfilesDialog(vl4ProfilePath);
+ QPointer<ProfilesDialog> w = new ProfilesDialog(vl4ProfilePath);
if (w->exec() == QDialog::Accepted) {
// save and update profile
loadCurrentV4lProfileInfo();