summaryrefslogtreecommitdiffstats
path: root/src/gsttools
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2014-12-04 14:45:43 +0100
committerYoann Lopes <yoann.lopes@theqtcompany.com>2014-12-09 12:04:10 +0100
commitf420ac286a303bc235b8c1047f8c845314df1f8a (patch)
treea794b76a6c4a03a2e3123d1286bf5dec3ee6c47e /src/gsttools
parent9496d5fba5439bf4e4c1d80b5e5f76af82b89165 (diff)
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 <andrew.den.exter@qinetic.com.au>
Diffstat (limited to 'src/gsttools')
-rw-r--r--src/gsttools/qgstutils.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gsttools/qgstutils.cpp b/src/gsttools/qgstutils.cpp
index 556fc03cc..1281d3fc5 100644
--- a/src/gsttools/qgstutils.cpp
+++ b/src/gsttools/qgstutils.cpp
@@ -510,6 +510,8 @@ QVector<QGstUtils::CameraInfo> 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;