option(WITH_V4L "Build capture support with Video4Linux" ON)
option(WITH_JogShuttle "Build Jog/Shuttle support" ON)
-option(WITH_BlackMagic "Build Blackmagic Decklinkl support" ON)
if(WITH_V4L)
# This can be changed to support FreeBSD as soon as we move to a newer V4L2
endif(HAVE_LINUX_INPUT_H)
endif(WITH_JogShuttle)
-if(WITH_BlackMagic)
- set(BUILD_BlackMagic TRUE)
-endif(WITH_BlackMagic)
-
macro_log_feature(QT_QTOPENGL_FOUND
"QtOpenGL"
"Qt bindings for the OpenGL library"
add_subdirectory(v4l)
endif(BUILD_V4L)
-if(BUILD_BlackMagic)
- add_subdirectory(blackmagic)
-endif(BUILD_BlackMagic)
-
list(APPEND kdenlive_SRCS
main.cpp
mainwindow.cpp
add_definitions(-DUSE_V4L)
endif(BUILD_V4L)
-if(BUILD_BlackMagic)
- add_definitions(-DUSE_BLACKMAGIC)
-endif(BUILD_BlackMagic)
-
if(BUILD_JogShuttle)
add_definitions(-DUSE_JOGSHUTTLE)
endif(BUILD_JogShuttle)
AbstractMonitor::AbstractMonitor(Kdenlive::MONITORID id, MonitorManager *manager, QWidget *parent):
QWidget(parent),
- m_id(id),
videoSurface(NULL),
+ m_id(id),
m_monitorManager(manager)
{
videoBox = new VideoContainer(this);
#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>
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 slotShuttleModified();
void slotDialogModified();
void slotEnableCaptureFolder();
- void slotUpdateHDMIModes();
void slotUpdatev4lDevice();
void slotUpdatev4lCaptureProfile();
void slotManageEncodingProfile();
return QString();
}
+//static
+bool Render::getBlackMagicDeviceList(KComboBox *devicelist)
+{
+ Mlt::Profile profile;
+ Mlt::Producer bm(profile, "decklink");
+ int found_devices = 0;
+ if (bm.is_valid()) found_devices = bm.get_int("devices");
+ if (found_devices <= 0) {
+ devicelist->setEnabled(false);
+ return false;
+ }
+ for (int i = 0; i < found_devices; i++) {
+ char *tmp = qstrdup(QString("device.%1").arg(i).toUtf8().constData());
+ devicelist->addItem(bm.get(tmp));
+ delete[] tmp;
+ }
+ return true;
+}
+
+bool Render::getBlackMagicOutputDeviceList(KComboBox *devicelist)
+{
+ Mlt::Profile profile;
+ Mlt::Consumer bm(profile, "decklink");
+ int found_devices = 0;
+ if (bm.is_valid()) found_devices = bm.get_int("devices");
+ if (found_devices <= 0) {
+ devicelist->setEnabled(false);
+ return false;
+ }
+ for (int i = 0; i < found_devices; i++) {
+ char *tmp = qstrdup(QString("device.%1").arg(i).toUtf8().constData());
+ devicelist->addItem(bm.get(tmp));
+ delete[] tmp;
+ }
+ return true;
+}
+
#include "renderer.moc"
class QTimer;
class QPixmap;
+class KComboBox;
+
namespace Mlt
{
class Consumer;
/** @brief Unlock the MLT service */
void unlockService(Mlt::Tractor *tractor);
const QString activeClipId();
+ /** @brief Fill a combobox with the found blackmagic devices */
+ static bool getBlackMagicDeviceList(KComboBox *devicelist);
+ static bool getBlackMagicOutputDeviceList(KComboBox *devicelist);
private: