Commit f65cf958 authored by Yoann Lopes's avatar Yoann Lopes
Browse files

Fix V4L usage.

ff527de0 was submitted to 5.3 while cddbe873

 was submitted to 5.4.
The former's behavior was not preserved when 5.3 got merged into 5.4.

Change-Id: I7435ea30634001ae6e87c316eb8a8ab6f5e988e3
Reviewed-by: default avatarLisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: default avatarAndrew den Exter <andrew.den.exter@qinetic.com.au>
Showing with 6 additions and 11 deletions
...@@ -42,8 +42,10 @@ ...@@ -42,8 +42,10 @@
#include <QtCore/qstringlist.h> #include <QtCore/qstringlist.h>
#include <qaudioformat.h> #include <qaudioformat.h>
#include <private/qcore_unix_p.h> #ifdef USE_V4L
#include <linux/videodev2.h> # include <private/qcore_unix_p.h>
# include <linux/videodev2.h>
#endif
#include "qgstreamervideoinputdevicecontrol_p.h" #include "qgstreamervideoinputdevicecontrol_p.h"
...@@ -469,6 +471,7 @@ QVector<QGstUtils::CameraInfo> QGstUtils::enumerateCameras(GstElementFactory *fa ...@@ -469,6 +471,7 @@ QVector<QGstUtils::CameraInfo> QGstUtils::enumerateCameras(GstElementFactory *fa
} }
} }
#ifdef USE_V4L
QDir devDir(QStringLiteral("/dev")); QDir devDir(QStringLiteral("/dev"));
devDir.setFilter(QDir::System); devDir.setFilter(QDir::System);
...@@ -516,6 +519,7 @@ QVector<QGstUtils::CameraInfo> QGstUtils::enumerateCameras(GstElementFactory *fa ...@@ -516,6 +519,7 @@ QVector<QGstUtils::CameraInfo> QGstUtils::enumerateCameras(GstElementFactory *fa
} }
qt_safe_close(fd); qt_safe_close(fd);
} }
#endif // USE_V4L
return devices; return devices;
} }
......
...@@ -83,8 +83,6 @@ config_gstreamer_photography { ...@@ -83,8 +83,6 @@ config_gstreamer_photography {
DEFINES += GST_USE_UNSTABLE_API #prevents warnings because of unstable photography API DEFINES += GST_USE_UNSTABLE_API #prevents warnings because of unstable photography API
} }
config_linux_v4l: DEFINES += USE_V4L
OTHER_FILES += \ OTHER_FILES += \
camerabin.json camerabin.json
...@@ -38,16 +38,9 @@ ...@@ -38,16 +38,9 @@
#include "camerabinserviceplugin.h" #include "camerabinserviceplugin.h"
#include "camerabinservice.h" #include "camerabinservice.h"
#include <private/qgstutils_p.h> #include <private/qgstutils_p.h>
#include <private/qcore_unix_p.h>
#if defined(USE_V4L)
#include <linux/videodev2.h>
#endif
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
template <typename T, int N> static int lengthOf(const T(&)[N]) { return N; } template <typename T, int N> static int lengthOf(const T(&)[N]) { return N; }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment