diff options
author | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-06-07 10:48:44 +0200 |
---|---|---|
committer | VaL Doroshchuk <valentyn.doroshchuk@qt.io> | 2019-06-07 10:48:44 +0200 |
commit | 8933a59719a5f0c33d47f202d220a566765ec6d4 (patch) | |
tree | 6d58a6bc0eb9a3c1aff1d49f78d2244d43982f12 /src/gsttools | |
parent | edbc8cb39130410801bffefb59d5c3a3c383e84b (diff) |
GStreamer: Return busy cameras in QCameraInfo::availableCameras
If the camera has been already opened, ioctl returns EBUSY,
and this camera is not listed in available cameras.
Change-Id: I1ee6e067a3d080fe82a528f576ba13e03d5f816e
Fixes: QTBUG-76236
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/gsttools')
-rw-r--r-- | src/gsttools/qgstutils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gsttools/qgstutils.cpp b/src/gsttools/qgstutils.cpp index 58dd6e5fe..2cc7663b8 100644 --- a/src/gsttools/qgstutils.cpp +++ b/src/gsttools/qgstutils.cpp @@ -649,7 +649,7 @@ QVector<QGstUtils::CameraInfo> QGstUtils::enumerateCameras(GstElementFactory *fa for (; ::ioctl(fd, VIDIOC_ENUMINPUT, &input) >= 0; ++input.index) { if (input.type == V4L2_INPUT_TYPE_CAMERA || input.type == 0) { const int ret = ::ioctl(fd, VIDIOC_S_INPUT, &input.index); - isCamera = (ret == 0 || errno == ENOTTY); + isCamera = (ret == 0 || errno == ENOTTY || errno == EBUSY); break; } } |