]> git.sesse.net Git - kdenlive/commitdiff
- Fix build on FreeBSD.
authorAlberto Villa <avilla@FreeBSD.org>
Thu, 2 Jun 2011 16:20:34 +0000 (16:20 +0000)
committerAlberto Villa <avilla@FreeBSD.org>
Thu, 2 Jun 2011 16:20:34 +0000 (16:20 +0000)
Committed at: Randa 2011 KDE Sprint

svn path=/trunk/kdenlive/; revision=5633

src/abstractmonitor.h
src/kdenlivesettingsdialog.cpp
src/stopmotion/stopmotion.cpp
src/wizard.cpp

index 62d9ee271e0c82f7044d2e41e009cdddcece5212..8365e5b93ab4af86d5c05697050b27e3f7c96e3e 100644 (file)
@@ -28,6 +28,8 @@
 #include <QFrame>
 #include <QTimer>
 
+#include <stdint.h>
+
 class VideoPreviewContainer : public QFrame
 {
     Q_OBJECT
index 83518f73181359ed7b208214f93d586f82eddbdb..950db589f7bd0b72491c7764b7026f91df7425e5 100644 (file)
@@ -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<QString, QString>& 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<QString, QString>& 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<QString, QString>& 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();
index 925585389c2aec2e95c7b18fec0d19512ef9e4de..e6bf6afb6e484b65d281ff382b697a0071bdc3bf 100644 (file)
@@ -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 = "<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
@@ -896,7 +898,7 @@ const QString StopmotionWidget::createProducer(MltVideoProfile profile, const QS
     playlist.append("<track producer=\"playlist1\"/>");
     playlist.append("</tractor></mlt>");
 
-    
+
     return playlist;
 }
 
index 985aa4d25af4328390de3b783b05adb24c1fcae9..b9eb7a5d2fda11bc8f954e663fdf90d4db06f319 100644 (file)
@@ -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 <KStandardDirs>
@@ -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()) {