diff options
author | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-10-16 14:15:23 +0200 |
---|---|---|
committer | Yoann Lopes <yoann.lopes@theqtcompany.com> | 2015-10-20 08:32:36 +0000 |
commit | 3d3d2a4967ba079a3e6df82cdc89f839865e6649 (patch) | |
tree | 360305944a20b4637fde5f96ac77fed5be3e2aa6 /src/gsttools/qgstreamervideooverlay.cpp | |
parent | 0cf41ef53f7b336509ed7d1ae6518655276af70f (diff) |
GStreamer: fix compilation with version < 0.10.31.
Qt 5.4 and earlier required GStreamer 0.10.24 as minimum version.
Qt 5.5 added code that requires 0.10.31, this code is now ifdef'd
and we now support again 0.10.24.
Task-number: QTBUG-48353
Change-Id: Ie708a33c0515874b003ce26a3400475075d316ca
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Diffstat (limited to 'src/gsttools/qgstreamervideooverlay.cpp')
-rw-r--r-- | src/gsttools/qgstreamervideooverlay.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/gsttools/qgstreamervideooverlay.cpp b/src/gsttools/qgstreamervideooverlay.cpp index 1dcedbcd6..06f93ef6a 100644 --- a/src/gsttools/qgstreamervideooverlay.cpp +++ b/src/gsttools/qgstreamervideooverlay.cpp @@ -148,9 +148,7 @@ GstElement *QGstreamerVideoOverlay::findBestVideoSink() const // If none of the known video sinks are available, try to find one that implements the // GstVideoOverlay interface and has autoplugging rank. - GList *list = gst_element_factory_list_get_elements(GST_ELEMENT_FACTORY_TYPE_SINK | GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO, - GST_RANK_MARGINAL); - + GList *list = qt_gst_video_sinks(); for (GList *item = list; item != NULL; item = item->next) { GstElementFactory *f = GST_ELEMENT_FACTORY(item->data); @@ -242,12 +240,17 @@ void QGstreamerVideoOverlay::setRenderRectangle(const QRect &rect) h = rect.height(); } -#if !GST_CHECK_VERSION(1,0,0) +#if GST_CHECK_VERSION(1,0,0) + if (m_videoSink && GST_IS_VIDEO_OVERLAY(m_videoSink)) + gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(m_videoSink), x, y, w, h); +#elif GST_CHECK_VERSION(0, 10, 29) if (m_videoSink && GST_IS_X_OVERLAY(m_videoSink)) gst_x_overlay_set_render_rectangle(GST_X_OVERLAY(m_videoSink), x, y , w , h); #else - if (m_videoSink && GST_IS_VIDEO_OVERLAY(m_videoSink)) - gst_video_overlay_set_render_rectangle(GST_VIDEO_OVERLAY(m_videoSink), x, y, w, h); + Q_UNUSED(x) + Q_UNUSED(y) + Q_UNUSED(w) + Q_UNUSED(h) #endif } |