diff --git a/src/gsttools/qgstutils.cpp b/src/gsttools/qgstutils.cpp index 9740b9a09a5e26b60bc618f687855d80913e45bb..8d484aa6de0b5267d2260e1f8de64f15963972cb 100644 --- a/src/gsttools/qgstutils.cpp +++ b/src/gsttools/qgstutils.cpp @@ -42,8 +42,10 @@ #include <QtCore/qstringlist.h> #include <qaudioformat.h> -#include <private/qcore_unix_p.h> -#include <linux/videodev2.h> +#ifdef USE_V4L +# include <private/qcore_unix_p.h> +# include <linux/videodev2.h> +#endif #include "qgstreamervideoinputdevicecontrol_p.h" @@ -469,6 +471,7 @@ QVector<QGstUtils::CameraInfo> QGstUtils::enumerateCameras(GstElementFactory *fa } } +#ifdef USE_V4L QDir devDir(QStringLiteral("/dev")); devDir.setFilter(QDir::System); @@ -516,6 +519,7 @@ QVector<QGstUtils::CameraInfo> QGstUtils::enumerateCameras(GstElementFactory *fa } qt_safe_close(fd); } +#endif // USE_V4L return devices; } diff --git a/src/plugins/gstreamer/camerabin/camerabin.pro b/src/plugins/gstreamer/camerabin/camerabin.pro index 90a1040fbd1a65c3f2edae3feb869670ea5431ec..bba797f5ee280828d85989fc67908f269d978f5e 100644 --- a/src/plugins/gstreamer/camerabin/camerabin.pro +++ b/src/plugins/gstreamer/camerabin/camerabin.pro @@ -83,8 +83,6 @@ config_gstreamer_photography { DEFINES += GST_USE_UNSTABLE_API #prevents warnings because of unstable photography API } -config_linux_v4l: DEFINES += USE_V4L - OTHER_FILES += \ camerabin.json diff --git a/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp b/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp index 8c943529e80b323c8e0a9e605289e82223a53b37..51024b7d90fe1660d11a0c13fcf0839389f2653c 100644 --- a/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp @@ -38,16 +38,9 @@ #include "camerabinserviceplugin.h" - #include "camerabinservice.h" #include <private/qgstutils_p.h> -#include <private/qcore_unix_p.h> - -#if defined(USE_V4L) -#include <linux/videodev2.h> -#endif - QT_BEGIN_NAMESPACE template <typename T, int N> static int lengthOf(const T(&)[N]) { return N; }