GStreamer: don't use ximagesink in QGstreamerVideoWidget.
authorYoann Lopes <yoann.lopes@theqtcompany.com>
Wed, 18 Mar 2015 15:08:56 +0000 (16:08 +0100)
committerYoann Lopes <yoann.lopes@theqtcompany.com>
Tue, 24 Mar 2015 16:03:25 +0000 (16:03 +0000)
When xvimagesink is not available, we were falling back to ximagesink.
That element doesn't provide some important features: it doesn't scale
frames to the window size and doesn't support brightness, contrast, hue
and saturation adjustments. That kind of makes it useless, at least
on its own. We would need to use at least a 'videoscale' element
together with it to have it working properly.
We're better off letting QVideoWidget fall back to QVideoRendererControl
when xvimagesink is not available.

Change-Id: Ic8c62fbefa3227430e3bae24630c8b3944aabb47
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
src/gsttools/qgstreamervideowidget.cpp

index 4960187..b26369a 100644 (file)
@@ -95,9 +95,6 @@ QGstreamerVideoWidgetControl::QGstreamerVideoWidgetControl(QObject *parent)
 {
     m_videoSink = gst_element_factory_make ("xvimagesink", NULL);
 
-    if (!m_videoSink)
-        m_videoSink = gst_element_factory_make ("ximagesink", NULL);
-
     if (m_videoSink) {
         // Check if the xv sink is usable
         if (gst_element_set_state(m_videoSink, GST_STATE_READY) != GST_STATE_CHANGE_SUCCESS) {