#include <QFrame>
#include <QTimer>
+#include <stdint.h>
+
class VideoPreviewContainer : public QFrame
{
Q_OBJECT
#include "kdenlivesettingsdialog.h"
#include "profilesdialog.h"
+#if !defined(Q_OS_FREEBSD)
#include "v4l/v4lcapture.h"
+#endif
#include "blackmagic/devices.h"
#include "encodingprofilesdialog.h"
#include "kdenlivesettings.h"
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;
QString vl4ProfilePath = KStandardDirs::locateLocal("appdata", "profiles/video4linux");
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();
#include "stopmotion.h"
#include "../blackmagic/devices.h"
+#if !defined(Q_OS_FREEBSD)
#include "../v4l/v4lcapture.h"
+#endif
#include "../slideshowclip.h"
#include "../profilesdialog.h"
#include "../mltdevicecapture.h"
intervalCapture->setCheckable(true);
intervalCapture->setChecked(false);
capture_interval->setDefaultAction(intervalCapture);
-
+
preview_button->setIcon(KIcon("media-playback-start"));
capture_button->setEnabled(false);
-
+
// Build config menu
QMenu* confMenu = new QMenu;
overlay_button->setDefaultAction(m_showOverlay);
//confMenu->addAction(m_showOverlay);
- m_effectIndex = KdenliveSettings::stopmotioneffect();
+ m_effectIndex = KdenliveSettings::stopmotioneffect();
QMenu* effectsMenu = new QMenu(i18n("Overlay effect"));
QActionGroup* effectGroup = new QActionGroup(this);
QAction* noEffect = new QAction(i18n("No Effect"), effectGroup);
//m_videoBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
m_videoBox->setLineWidth(4);
layout->addWidget(m_videoBox);
-
-
+
+
if (BMInterface::getBlackMagicDeviceList(capture_device)) {
// Found a BlackMagic device
}
connect(m_bmCapture, SIGNAL(frameSaved(const QString)), this, SLOT(slotNewThumb(const QString)));
connect(m_bmCapture, SIGNAL(gotFrame(QImage)), this, SIGNAL(gotFrame(QImage)));
} else live_button->setEnabled(false);*/
-
+
m_frame_preview = new MyLabel(this);
connect(m_frame_preview, SIGNAL(seek(bool)), this, SLOT(slotSeekFrame(bool)));
connect(m_frame_preview, SIGNAL(switchToLive()), this, SLOT(slotSwitchLive()));
// Decklink capture
profilePath = KdenliveSettings::current_profile();
}
-
+
m_captureDevice = new MltDeviceCapture(profilePath, m_videoBox, 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);
button_addsequence->setEnabled(false);
connect(live_button, SIGNAL(toggled(bool)), this, SLOT(slotLive(bool)));
ui.sm_prenotify->setChecked(KdenliveSettings::sm_prenotify());
ui.sm_loop->setChecked(KdenliveSettings::sm_loop());
ui.sm_framesplayback->setValue(KdenliveSettings::sm_framesplayback());
-
+
if (d.exec() == QDialog::Accepted) {
KdenliveSettings::setSm_loop(ui.sm_loop->isChecked());
KdenliveSettings::setCaptureinterval(ui.sm_interval->value());
m_monitor->setRender(m_captureDevice);
connect(m_captureDevice, SIGNAL(frameSaved(const QString)), this, SLOT(slotNewThumb(const QString)));
}
-
+
m_manager->activateMonitor("stopmotion");
QString producer = createProducer(profile, service, resource);
if (m_captureDevice->slotStartPreview(producer, true)) {
//m_captureDevice = NULL;
}
}
-
+
/*
if (isOn && m_bmCapture) {
//m_frame_preview->setImage(QImage());
m_filesList.append(path);
if (m_showOverlay->isChecked()) reloadOverlay();
if (!m_future.isRunning()) m_future = QtConcurrent::run(this, &StopmotionWidget::slotPrepareThumbs);
-
+
}
void StopmotionWidget::slotPrepareThumbs()
slotLive(false);
if (!img.isNull()) {
//m_videoBox->setHidden(true);
-
+
m_frame_preview->setImage(img);
m_frame_preview->setHidden(false);
m_frame_preview->update();
}
const QString StopmotionWidget::createProducer(MltVideoProfile profile, const QString service, const QString resource)
-{
-
+{
+
QString playlist = "<mlt title=\"capture\"><producer id=\"producer0\" in=\"0\" out=\"99999\"><property name=\"mlt_type\">producer</property><property name=\"length\">100000</property><property name=\"eof\">pause</property><property name=\"resource\">" + resource + "</property><property name=\"mlt_service\">" + service + "</property></producer>";
// overlay track
playlist.append("<track producer=\"playlist1\"/>");
playlist.append("</tractor></mlt>");
-
+
return playlist;
}
#include "wizard.h"
#include "kdenlivesettings.h"
#include "profilesdialog.h"
+#if !defined(Q_OS_FREEBSD)
#include "v4l/v4lcapture.h"
+#endif
#include "kdenlive-config.h"
#include <KStandardDirs>
item->setIcon(0, m_okIcon);
} else item->setIcon(0, m_badIcon);
} else item->setIcon(0, m_okIcon);
-
+
item = new QTreeWidgetItem(m_check.programList, QStringList() << QString() << i18n("xine"));
item->setData(1, Qt::UserRole, i18n("Required to preview your DVD"));
item->setSizeHint(0, itemSize);
if (KStandardDirs::findExe("xine").isEmpty()) item->setIcon(0, m_badIcon);
- else item->setIcon(0, m_okIcon);
-
+ else item->setIcon(0, m_okIcon);
+
// set up some default applications
QString program;
if (KdenliveSettings::defaultimageapp().isEmpty()) {