diff options
author | Yoann Lopes <yoann.lopes@qt.io> | 2016-09-22 18:40:28 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2016-09-22 18:40:28 +0000 |
commit | 62eeaba645d0f7c42246a0b026c532919a5b0454 (patch) | |
tree | 908caa55b9b4b8603f2da5544e18a18e9b98cf8a /src/plugins/gstreamer/camerabin | |
parent | 0fd79396510501dfb1dad24bfd51147d364d919c (diff) | |
parent | 7de936f6b3c428095d71db940ef08e532133b084 (diff) |
Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7
Diffstat (limited to 'src/plugins/gstreamer/camerabin')
-rw-r--r-- | src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp b/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp index b810e2b02..2d3c7c2ea 100644 --- a/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp @@ -66,8 +66,19 @@ QMediaService* CameraBinServicePlugin::create(const QString &key) { QGstUtils::initializeGst(); - if (key == QLatin1String(Q_MEDIASERVICE_CAMERA)) + if (key == QLatin1String(Q_MEDIASERVICE_CAMERA)) { + if (!CameraBinService::isCameraBinAvailable()) { + guint major, minor, micro, nano; + gst_version(&major, &minor, µ, &nano); + qWarning("Error: cannot create camera service, the 'camerabin' plugin is missing for " + "GStreamer %u.%u." + "\nPlease install the 'bad' GStreamer plugin package.", + major, minor); + return Q_NULLPTR; + } + return new CameraBinService(sourceFactory()); + } qWarning() << "Gstreamer camerabin service plugin: unsupported key:" << key; return 0; |