From: Alberto Villa Date: Thu, 2 Jun 2011 16:20:34 +0000 (+0000) Subject: - Fix build on FreeBSD. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=147ce69b96c1bb3869cc7390a75107b13cc53e73;p=kdenlive - Fix build on FreeBSD. Committed at: Randa 2011 KDE Sprint svn path=/trunk/kdenlive/; revision=5633 --- diff --git a/src/abstractmonitor.h b/src/abstractmonitor.h index 62d9ee27..8365e5b9 100644 --- a/src/abstractmonitor.h +++ b/src/abstractmonitor.h @@ -28,6 +28,8 @@ #include #include +#include + class VideoPreviewContainer : public QFrame { Q_OBJECT diff --git a/src/kdenlivesettingsdialog.cpp b/src/kdenlivesettingsdialog.cpp index 83518f73..950db589 100644 --- a/src/kdenlivesettingsdialog.cpp +++ b/src/kdenlivesettingsdialog.cpp @@ -19,7 +19,9 @@ #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" @@ -184,7 +186,7 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(const QMap& map 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()); @@ -234,7 +236,7 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(const QMap& map 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")); @@ -249,7 +251,7 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(const QMap& map 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(); @@ -401,7 +403,7 @@ void KdenliveSettingsDialog::initDevices() 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()); @@ -580,7 +582,7 @@ void KdenliveSettingsDialog::updateSettings() 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); @@ -610,7 +612,7 @@ void KdenliveSettingsDialog::updateSettings() 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()) { @@ -627,7 +629,7 @@ void KdenliveSettingsDialog::updateSettings() KdenliveSettings::setProxyparams(data.section(";", 0, 0)); KdenliveSettings::setProxyextension(data.section(";", 1, 1)); } - + if (updateCapturePath) emit updateCaptureFolder(); @@ -686,7 +688,7 @@ void KdenliveSettingsDialog::updateSettings() KdenliveSettings::setVolume(m_configSdl.kcfg_volume->value()); resetProfile = true; } - + if (m_modified) { // The transcoding profiles were modified, save. m_modified = false; @@ -827,7 +829,7 @@ void KdenliveSettingsDialog::slotUpdatev4lDevice() 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; @@ -951,7 +953,7 @@ void KdenliveSettingsDialog::loadEncodingProfiles() } 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(); @@ -965,7 +967,7 @@ void KdenliveSettingsDialog::loadEncodingProfiles() } 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(); diff --git a/src/stopmotion/stopmotion.cpp b/src/stopmotion/stopmotion.cpp index 92558538..e6bf6afb 100644 --- a/src/stopmotion/stopmotion.cpp +++ b/src/stopmotion/stopmotion.cpp @@ -17,7 +17,9 @@ #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" @@ -172,10 +174,10 @@ StopmotionWidget::StopmotionWidget(MonitorManager *manager, KUrl projectFolder, 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; @@ -184,7 +186,7 @@ StopmotionWidget::StopmotionWidget(MonitorManager *manager, KUrl projectFolder, 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); @@ -249,8 +251,8 @@ StopmotionWidget::StopmotionWidget(MonitorManager *manager, KUrl projectFolder, //m_videoBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); m_videoBox->setLineWidth(4); layout->addWidget(m_videoBox); - - + + if (BMInterface::getBlackMagicDeviceList(capture_device)) { // Found a BlackMagic device } @@ -277,7 +279,7 @@ StopmotionWidget::StopmotionWidget(MonitorManager *manager, KUrl projectFolder, 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())); @@ -297,12 +299,12 @@ StopmotionWidget::StopmotionWidget(MonitorManager *manager, KUrl projectFolder, // 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))); @@ -361,7 +363,7 @@ void StopmotionWidget::slotConfigure() 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()); @@ -487,7 +489,7 @@ void StopmotionWidget::slotLive(bool isOn) 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)) { @@ -518,7 +520,7 @@ void StopmotionWidget::slotLive(bool isOn) //m_captureDevice = NULL; } } - + /* if (isOn && m_bmCapture) { //m_frame_preview->setImage(QImage()); @@ -667,7 +669,7 @@ void StopmotionWidget::slotNewThumb(const QString path) m_filesList.append(path); if (m_showOverlay->isChecked()) reloadOverlay(); if (!m_future.isRunning()) m_future = QtConcurrent::run(this, &StopmotionWidget::slotPrepareThumbs); - + } void StopmotionWidget::slotPrepareThumbs() @@ -719,7 +721,7 @@ void StopmotionWidget::slotShowFrame(const QString& path) slotLive(false); if (!img.isNull()) { //m_videoBox->setHidden(true); - + m_frame_preview->setImage(img); m_frame_preview->setHidden(false); m_frame_preview->update(); @@ -881,8 +883,8 @@ void StopmotionWidget::slotSwitchMirror(bool isOn) } const QString StopmotionWidget::createProducer(MltVideoProfile profile, const QString service, const QString resource) -{ - +{ + QString playlist = "producer100000pause" + resource + "" + service + ""; // overlay track @@ -896,7 +898,7 @@ const QString StopmotionWidget::createProducer(MltVideoProfile profile, const QS playlist.append(""); playlist.append(""); - + return playlist; } diff --git a/src/wizard.cpp b/src/wizard.cpp index 985aa4d2..b9eb7a5d 100644 --- a/src/wizard.cpp +++ b/src/wizard.cpp @@ -20,7 +20,9 @@ #include "wizard.h" #include "kdenlivesettings.h" #include "profilesdialog.h" +#if !defined(Q_OS_FREEBSD) #include "v4l/v4lcapture.h" +#endif #include "kdenlive-config.h" #include @@ -458,13 +460,13 @@ void Wizard::slotCheckPrograms() 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()) {