summaryrefslogtreecommitdiffstats
path: root/src/gsttools/qgstreamervideowindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gsttools/qgstreamervideowindow.cpp')
-rw-r--r--src/gsttools/qgstreamervideowindow.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gsttools/qgstreamervideowindow.cpp b/src/gsttools/qgstreamervideowindow.cpp
index 7dd6ab253..a0697003a 100644
--- a/src/gsttools/qgstreamervideowindow.cpp
+++ b/src/gsttools/qgstreamervideowindow.cpp
@@ -35,6 +35,7 @@
#include <private/qgstutils_p.h>
#include <QtCore/qdebug.h>
+#include <QtGui/qguiapplication.h>
#include <gst/gst.h>
@@ -57,7 +58,9 @@ QGstreamerVideoWindow::QGstreamerVideoWindow(QObject *parent, const char *elemen
{
if (elementName) {
m_videoSink = gst_element_factory_make(elementName, NULL);
- } else {
+ } else if (QGuiApplication::platformName().compare(QLatin1String("xcb"), Qt::CaseInsensitive) == 0) {
+ // We need a native X window handle to be able to use xvimagesink.
+ // Bail out if Qt is not using xcb (the control will then be ignored by the plugin)
m_videoSink = gst_element_factory_make("xvimagesink", NULL);
}