From f420ac286a303bc235b8c1047f8c845314df1f8a Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Thu, 4 Dec 2014 14:45:43 +0100 Subject: [PATCH] GStreamer: better camera device name logic. Use the device ID for QCameraInfo::description() when the driver doesn't provide any display name. Change-Id: Iff1f17187ecb52262412f85db04d7108fae71717 Reviewed-by: Andrew den Exter --- src/gsttools/qgstutils.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gsttools/qgstutils.cpp b/src/gsttools/qgstutils.cpp index 556fc03..1281d3f 100644 --- a/src/gsttools/qgstutils.cpp +++ b/src/gsttools/qgstutils.cpp @@ -510,6 +510,8 @@ QVector QGstUtils::enumerateCameras(GstElementFactory *fa } else { driver = QByteArray((const char*)vcap.driver); name = QString::fromUtf8((const char*)vcap.card); + if (name.isEmpty()) + name = entryInfo.fileName(); } //qDebug() << "found camera: " << name; -- 2.7.4