Detect V4L availability
Do not build related stuff if not found. Makes GStreamer support available on Hurd. Task-number: QTBUG-39762 Change-Id: I1f70b6975e5bef99ab2441aac4d90508bc8b64bd Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com> Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
This commit is contained in:
committed by
Yoann Lopes
parent
da77331952
commit
ff527de013
@@ -81,6 +81,8 @@ 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
|
||||
|
||||
|
||||
@@ -51,7 +51,10 @@
|
||||
#include <private/qgstutils_p.h>
|
||||
|
||||
#include <private/qcore_unix_p.h>
|
||||
|
||||
#if defined(USE_V4L)
|
||||
#include <linux/videodev2.h>
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
@@ -132,6 +135,7 @@ void CameraBinServicePlugin::updateDevices() const
|
||||
m_cameraDevices.clear();
|
||||
m_cameraDescriptions.clear();
|
||||
|
||||
#if defined(USE_V4L)
|
||||
QDir devDir("/dev");
|
||||
devDir.setFilter(QDir::System);
|
||||
|
||||
@@ -173,6 +177,7 @@ void CameraBinServicePlugin::updateDevices() const
|
||||
|
||||
if (!m_cameraDevices.isEmpty())
|
||||
m_defaultCameraDevice = m_cameraDevices.first();
|
||||
#endif
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
Reference in New Issue
Block a user