From: Dan Dennedy Date: Fri, 29 Oct 2010 03:40:19 +0000 (+0000) Subject: Fix build on OSX by not using new V4LCaptureHandler. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=f96f3cb2a66004be5bf8883460eba20ac3bcca05;p=kdenlive Fix build on OSX by not using new V4LCaptureHandler. svn path=/trunk/kdenlive/; revision=5057 --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5166e0d3..65a69c3f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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} ) diff --git a/src/kdenlivesettingsdialog.cpp b/src/kdenlivesettingsdialog.cpp index 946a5bdf..e752b39a 100644 --- a/src/kdenlivesettingsdialog.cpp +++ b/src/kdenlivesettingsdialog.cpp @@ -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()); diff --git a/src/stopmotion/stopmotion.cpp b/src/stopmotion/stopmotion.cpp index a2485a91..46c33f52 100644 --- a/src/stopmotion/stopmotion.cpp +++ b/src/stopmotion/stopmotion.cpp @@ -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 &))); diff --git a/src/wizard.cpp b/src/wizard.cpp index c88f9a01..edec09dc 100644 --- a/src/wizard.cpp +++ b/src/wizard.cpp @@ -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()