]> git.sesse.net Git - kdenlive/commitdiff
Fix build on OSX by not using new V4LCaptureHandler.
authorDan Dennedy <dan@dennedy.org>
Fri, 29 Oct 2010 03:40:19 +0000 (03:40 +0000)
committerDan Dennedy <dan@dennedy.org>
Fri, 29 Oct 2010 03:40:19 +0000 (03:40 +0000)
svn path=/trunk/kdenlive/; revision=5057

src/CMakeLists.txt
src/kdenlivesettingsdialog.cpp
src/stopmotion/stopmotion.cpp
src/wizard.cpp

index 5166e0d3122315c4d2facd2fe661274a640d8091..65a69c3f8ad888d7f6e8ca2ddcb6109b083ba688 100644 (file)
@@ -239,9 +239,6 @@ set(kdenlive_SRCS
   stopmotion/capturehandler.cpp
   blackmagic/capture.cpp
   blackmagic/devices.cpp
-  v4l/v4lcapture.cpp
-  v4l/src.c
-  v4l/src_v4l2.c
   onmonitoritems/abstractonmonitoritem.cpp 
   onmonitoritems/onmonitorrectitem.cpp
   onmonitoritems/onmonitorcornersitem.cpp
@@ -266,6 +263,15 @@ if (APPLE OR OPENGL_FOUND)
   set(kdenlive_SRCS videoglwidget.cpp ${kdenlive_SRCS})
 endif (APPLE OR OPENGL_FOUND)
 
+if (NOT APPLE)
+  set(kdenlive_SRCS
+    ${kdenlive_SRCS}
+    v4l/v4lcapture.cpp
+    v4l/src.c
+    v4l/src_v4l2.c
+  )
+endif (NOT APPLE)
+
 
 # Add libdl
 find_library( DL_LIB NAMES ${CMAKE_DL_LIBS} )
index 946a5bdfc5b794b2c83e41f35f8844d79f7e80e9..e752b39a45c3878fb5ad428f1eb112dbcccbcc1f 100644 (file)
@@ -82,6 +82,7 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent) :
     QWidget *p4 = new QWidget;
     m_configCapture.setupUi(p4);
 
+#ifndef Q_WS_MAC
     V4lCaptureHandler v4l(NULL);
     // Video 4 Linux device detection
     for (int i = 0; i < 10; i++) {
@@ -93,7 +94,7 @@ KdenliveSettingsDialog::KdenliveSettingsDialog(QWidget * parent) :
         }
     }
     connect(m_configCapture.kcfg_detectedv4ldevices, SIGNAL(currentIndexChanged(int)), this, SLOT(slotUpdatev4lDevice()));
-
+#endif
 
     m_page4 = addPage(p4, i18n("Capture"), "media-record");
     m_configCapture.tabWidget->setCurrentIndex(KdenliveSettings::defaultcapture());
index a2485a9144eba48de80794e4a072cd35dd717cc8..46c33f5209de75e4a41480f1b35b0d118e38517b 100644 (file)
@@ -190,8 +190,10 @@ StopmotionWidget::StopmotionWidget(KUrl projectFolder, const QList< QAction * >
         connect(m_bmCapture, SIGNAL(gotMessage(const QString &)), this, SLOT(slotGotHDMIMessage(const QString &)));
     }
     if (QFile::exists(KdenliveSettings::video4vdevice())) {
+#ifndef Q_WS_MAC
         if (m_bmCapture == NULL) m_bmCapture = new V4lCaptureHandler(m_layout);
         capture_device->addItem(m_bmCapture->getDeviceName(KdenliveSettings::video4vdevice()).at(0), "v4l");
+#endif
     }
 
     connect(m_bmCapture, SIGNAL(frameSaved(const QString)), this, SLOT(slotNewThumb(const QString)));
@@ -219,7 +221,8 @@ StopmotionWidget::StopmotionWidget(KUrl projectFolder, const QList< QAction * >
 
 StopmotionWidget::~StopmotionWidget()
 {
-    m_bmCapture->stopPreview();
+    if (m_bmCapture)
+        m_bmCapture->stopPreview();
 }
 
 void StopmotionWidget::slotUpdateOverlayEffect(QAction *act)
@@ -270,7 +273,9 @@ void StopmotionWidget::slotUpdateHandler()
     delete m_bmCapture;
     m_layout->removeWidget(m_frame_preview);
     if (data == "v4l") {
+#ifndef Q_WS_MAC
         m_bmCapture = new V4lCaptureHandler(m_layout);
+#endif
     } else {
         m_bmCapture = new BmdCaptureHandler(m_layout);
         connect(m_bmCapture, SIGNAL(gotMessage(const QString &)), this, SLOT(slotGotHDMIMessage(const QString &)));
index c88f9a01a143538e95035b75ed6b7e14ab073bb4..edec09dc66353d830e95fc44fced9923235f5b50 100644 (file)
@@ -148,6 +148,7 @@ void Wizard::slotDetectWebcam()
 {
     m_capture.device_list->clear();
 
+#ifndef Q_WS_MAC
     // Video 4 Linux device detection
     V4lCaptureHandler v4l(NULL);
     for (int i = 0; i < 10; i++) {
@@ -175,6 +176,7 @@ void Wizard::slotDetectWebcam()
         }
         if (!found) m_capture.device_list->setCurrentItem(m_capture.device_list->topLevelItem(0));
     } else m_capture.v4l_status->setText(i18n("No device found, plug your webcam and refresh."));
+#endif
 }
 
 void Wizard::slotUpdateCaptureParameters()