From 95de9e6154d75688e81a3b79007dfe6c56d3b65b Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 21 Nov 2016 10:44:47 +0100 Subject: Use QT_CONFIG macro to check for features And remove many custom defines. Change-Id: I658cc8430d1d99ed3c0aafe03a77adce76621a29 Reviewed-by: Yoann Lopes --- src/gsttools/gsttools.pro | 11 ++--------- src/gsttools/qgstreameraudioinputselector.cpp | 5 +++-- src/gsttools/qgstutils.cpp | 7 ++++--- 3 files changed, 9 insertions(+), 14 deletions(-) (limited to 'src/gsttools') diff --git a/src/gsttools/gsttools.pro b/src/gsttools/gsttools.pro index e84454980..edbf603e3 100644 --- a/src/gsttools/gsttools.pro +++ b/src/gsttools/gsttools.pro @@ -8,17 +8,13 @@ QT = core-private multimedia-private gui-private !static:DEFINES += QT_MAKEDLL DEFINES += GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -qtConfig(alsa) { - DEFINES += HAVE_ALSA +qtConfig(alsa): \ QMAKE_USE += alsa -} QMAKE_USE += gstreamer -qtConfig(resourcepolicy) { - DEFINES += HAVE_RESOURCE_POLICY +qtConfig(resourcepolicy): \ QMAKE_USE += libresourceqt5 -} # Header files must go inside source directory of a module # to be installed by syncqt. @@ -101,11 +97,8 @@ qtConfig(gstreamer_app) { QMAKE_USE += gstreamer_app PRIVATE_HEADERS += qgstappsrc_p.h SOURCES += qgstappsrc.cpp - DEFINES += HAVE_GST_APPSRC } -qtConfig(linux_v4l): DEFINES += USE_V4L - HEADERS += $$PRIVATE_HEADERS DESTDIR = $$QT.multimedia.libs diff --git a/src/gsttools/qgstreameraudioinputselector.cpp b/src/gsttools/qgstreameraudioinputselector.cpp index 668347f5c..6d74feb1b 100644 --- a/src/gsttools/qgstreameraudioinputselector.cpp +++ b/src/gsttools/qgstreameraudioinputselector.cpp @@ -37,6 +37,7 @@ ** ****************************************************************************/ +#include #include "qgstreameraudioinputselector_p.h" #include @@ -44,7 +45,7 @@ #include -#ifdef HAVE_ALSA +#if QT_CONFIG(alsa) #include #endif @@ -115,7 +116,7 @@ void QGstreamerAudioInputSelector::update() void QGstreamerAudioInputSelector::updateAlsaDevices() { -#ifdef HAVE_ALSA +#if QT_CONFIG(alsa) void **hints, **n; if (snd_device_name_hint(-1, "pcm", &hints) < 0) { qWarning()<<"no alsa devices available"; diff --git a/src/gsttools/qgstutils.cpp b/src/gsttools/qgstutils.cpp index a2b35073c..2f8a39d67 100644 --- a/src/gsttools/qgstutils.cpp +++ b/src/gsttools/qgstutils.cpp @@ -37,6 +37,7 @@ ** ****************************************************************************/ +#include #include "qgstutils_p.h" #include @@ -58,7 +59,7 @@ template static int lengthOf(const T (&)[N]) { return N; } -#ifdef USE_V4L +#if QT_CONFIG(linux_v4l) # include # include #endif @@ -620,7 +621,7 @@ QVector QGstUtils::enumerateCameras(GstElementFactory *fa } } -#ifdef USE_V4L +#if QT_CONFIG(linux_v4l) QDir devDir(QStringLiteral("/dev")); devDir.setFilter(QDir::System); @@ -675,7 +676,7 @@ QVector QGstUtils::enumerateCameras(GstElementFactory *fa qt_safe_close(fd); } camerasCacheAgeTimer.restart(); -#endif // USE_V4L +#endif // linux_v4l return devices; } -- cgit v1.2.3