GStreamer: refactored widget and window control.

Instead of always using xvimagesink as GStreamer backend for the
widget and window control (works only with X11), we now try to
pick a video sink that fits the current configuration.
It first tries a set of known video sinks that can work with
the Qt platform plugin in use. If none is available, it
dynamically picks a video sink available on the system that can be
used with our backend.

Even if the video sink is now picked in a smarter way, xcb is still
the only supported platform plugin. The reason is that it's the
only Unix plugin which can provide a valid native window handle.
Additional work is needed to support other plugins like wayland
or directfb.

Change-Id: I3843dea363d6a0b85a6cc1f2952783b743e48ac6
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
This commit is contained in:
Yoann Lopes
2015-07-23 15:13:24 +02:00
parent 13e40d522f
commit cd3d540522
11 changed files with 713 additions and 452 deletions

View File

@@ -61,11 +61,13 @@
# define QT_GSTREAMER_CAMERABIN_ELEMENT_NAME "camerabin"
# define QT_GSTREAMER_COLORCONVERSION_ELEMENT_NAME "videoconvert"
# define QT_GSTREAMER_RAW_AUDIO_MIME "audio/x-raw"
# define QT_GSTREAMER_VIDEOOVERLAY_INTERFACE_NAME "GstVideoOverlay"
#else
# define QT_GSTREAMER_PLAYBIN_ELEMENT_NAME "playbin2"
# define QT_GSTREAMER_CAMERABIN_ELEMENT_NAME "camerabin2"
# define QT_GSTREAMER_COLORCONVERSION_ELEMENT_NAME "ffmpegcolorspace"
# define QT_GSTREAMER_RAW_AUDIO_MIME "audio/x-raw-int"
# define QT_GSTREAMER_VIDEOOVERLAY_INTERFACE_NAME "GstXOverlay"
#endif
QT_BEGIN_NAMESPACE