]> git.sesse.net Git - kdenlive/blobdiff - src/stopmotion/stopmotion.cpp
Fix build on OSX by not using new V4LCaptureHandler.
[kdenlive] / src / stopmotion / stopmotion.cpp
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 &)));