Add decklink detection in wizard

parent 3cddf00a
......@@ -6,46 +6,26 @@
<rect>
<x>0</x>
<y>0</y>
<width>279</width>
<height>110</height>
<width>152</width>
<height>154</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="label">
<property name="text">
<string>Autodetected capture devices</string>
</property>
</widget>
</item>
<item row="0" column="4">
<item row="1" column="3">
<widget class="QPushButton" name="button_reload">
<property name="text">
<string>Check</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="5">
<widget class="QLabel" name="v4l_status">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="0" colspan="5">
<widget class="KComboBox" name="v4l_devices"/>
</item>
<item row="3" column="0" colspan="2">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Select capture format</string>
<item row="4" column="0" colspan="4">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="3" column="2" colspan="3">
<widget class="KComboBox" name="v4l_formats"/>
</item>
<item row="4" column="1">
<item row="7" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -58,6 +38,36 @@
</property>
</spacer>
</item>
<item row="3" column="0" colspan="4">
<widget class="KComboBox" name="v4l_formats"/>
</item>
<item row="1" column="0" colspan="3">
<widget class="KComboBox" name="v4l_devices"/>
</item>
<item row="0" column="0" colspan="4">
<widget class="QLabel" name="v4l_status">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="0" colspan="4">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Capture format:</string>
</property>
</widget>
</item>
<item row="5" column="0" colspan="4">
<widget class="QLabel" name="decklink_status">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="6" column="0" colspan="4">
<widget class="KComboBox" name="decklink_devices"/>
</item>
</layout>
</widget>
<customwidgets>
......
......@@ -20,6 +20,7 @@
#include "wizard.h"
#include "kdenlivesettings.h"
#include "profilesdialog.h"
#include "renderer.h"
#ifdef USE_V4L
#include "v4l/v4lcapture.h"
#endif
......@@ -43,8 +44,8 @@
// Recommended MLT version
const int mltVersionMajor = 0;
const int mltVersionMinor = 7;
const int mltVersionRevision = 6;
const int mltVersionMinor = 8;
const int mltVersionRevision = 0;
static const char kdenlive_version[] = VERSION;
......@@ -135,8 +136,13 @@ Wizard::Wizard(bool upgrade, QWidget *parent) :
#ifndef Q_WS_MAC
QWizardPage *page6 = new QWizardPage;
page6->setTitle(i18n("Webcam"));
page6->setTitle(i18n("Capture device"));
m_capture.setupUi(page6);
bool found_decklink = Render::getBlackMagicDeviceList(m_capture.decklink_devices);
KdenliveSettings::setDecklink_device_found(found_decklink);
if (found_decklink) m_capture.decklink_status->setText(i18n("Default Blackmagic Decklink card:"));
else m_capture.decklink_status->setText(i18n("No Blackmagic Decklink device found"));
connect(m_capture.decklink_devices, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateDecklinkDevice(int)));
connect(m_capture.button_reload, SIGNAL(clicked()), this, SLOT(slotDetectWebcam()));
connect(m_capture.v4l_devices, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdateCaptureParameters()));
connect(m_capture.v4l_formats, SIGNAL(currentIndexChanged(int)), this, SLOT(slotSaveCaptureFormat()));
......@@ -174,7 +180,7 @@ void Wizard::slotDetectWebcam()
}
}
if (m_capture.v4l_devices->count() > 0) {
m_capture.v4l_status->setText(i18n("Select your default video4linux device"));
m_capture.v4l_status->setText(i18n("Default video4linux device:"));
// select default device
bool found = false;
for (int i = 0; i < m_capture.v4l_devices->count(); i++) {
......@@ -676,4 +682,9 @@ void Wizard::slotSaveCaptureFormat()
ProfilesDialog::saveProfile(profile, vl4ProfilePath);
}
void Wizard::slotUpdateDecklinkDevice(int captureCard)
{
KdenliveSettings::setDecklink_capturedevice(captureCard);
}
#include "wizard.moc"
......@@ -107,6 +107,7 @@ private slots:
void slotDetectWebcam();
void slotUpdateCaptureParameters();
void slotSaveCaptureFormat();
void slotUpdateDecklinkDevice(int captureCard);
};
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment