***************************************************************************/
#include "stopmotion.h"
-#ifdef USE_BLACKMAGIC
-#include "blackmagic/devices.h"
-#endif
#ifdef USE_V4L
#include "v4l/v4lcapture.h"
#endif
AbstractMonitor(Kdenlive::stopmotionMonitor, manager, parent),
m_captureDevice(NULL)
{
+ createVideoSurface();
}
StopmotionMonitor::~StopmotionMonitor()
{
}
-void StopmotionMonitor::pause()
-{
-}
-
-void StopmotionMonitor::unpause()
-{
-}
-
void StopmotionMonitor::slotPlay()
{
}
QVBoxLayout *layout = new QVBoxLayout;
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0);
- m_videoBox = new VideoContainer(m_monitor);
- m_videoBox->setLineWidth(4);
- layout->addWidget(m_videoBox);
+ m_monitor->videoBox->setLineWidth(4);
+ layout->addWidget(m_monitor->videoBox);
-#ifdef USE_BLACKMAGIC
- if (BMInterface::getBlackMagicDeviceList(capture_device)) {
+ if (KdenliveSettings::decklink_device_found()) {
// Found a BlackMagic device
}
-#endif
+
if (QFile::exists(KdenliveSettings::video4vdevice())) {
#ifdef USE_V4L
// Video 4 Linux device detection
profilePath = KdenliveSettings::current_profile();
}
- m_captureDevice = new MltDeviceCapture(profilePath, m_videoBox, this);
+ m_captureDevice = new MltDeviceCapture(profilePath, m_monitor->videoSurface, this);
m_captureDevice->sendFrameForAnalysis = KdenliveSettings::analyse_stopmotion();
m_monitor->setRender(m_captureDevice);
connect(m_captureDevice, SIGNAL(frameSaved(const QString &)), this, SLOT(slotNewThumb(const QString &)));
//dir.setNameFilters(filters);
QStringList sequences = dir.entryList(filters, QDir::Files, QDir::Name);
//kDebug()<<"PF: "<<<<", sm: "<<sequences;
- foreach(QString sequencename, sequences) {
- sequence_name->addItem(sequencename.section("_", 0, -2));
+ foreach(const QString &sequencename, sequences) {
+ sequence_name->addItem(sequencename.section('_', 0, -2));
}
}
capture_button->setEnabled(false);
if (isOn) {
m_frame_preview->setHidden(true);
- m_videoBox->setHidden(false);
+ m_monitor->videoBox->setHidden(false);
QLocale locale;
MltVideoProfile profile;
}
if (m_captureDevice == NULL) {
- m_captureDevice = new MltDeviceCapture(profilePath, m_videoBox, this);
+ m_captureDevice = new MltDeviceCapture(profilePath, m_monitor->videoSurface, this);
m_captureDevice->sendFrameForAnalysis = KdenliveSettings::analyse_stopmotion();
m_monitor->setRender(m_captureDevice);
connect(m_captureDevice, SIGNAL(frameSaved(const QString &)), this, SLOT(slotNewThumb(const QString &)));
live_button->setChecked(false);
if (m_captureDevice) {
m_captureDevice->stop();
- m_videoBox->setHidden(true);
+ m_monitor->videoBox->setHidden(true);
log_box->insertItem(-1, i18n("Stopped"));
log_box->setCurrentIndex(0);
//delete m_captureDevice;
QString StopmotionWidget::getPathForFrame(int ix, QString seqName)
{
if (seqName.isEmpty()) seqName = m_sequenceName;
- return m_projectFolder.path(KUrl::AddTrailingSlash) + seqName + "_" + QString::number(ix).rightJustified(4, '0', false) + ".png";
+ return m_projectFolder.path(KUrl::AddTrailingSlash) + seqName + '_' + QString::number(ix).rightJustified(4, '0', false) + ".png";
}
void StopmotionWidget::slotShowFrame(const QString& path)