From 7c4574a6985671f14148ad8ee591aee4487f5d4d Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Fri, 13 Nov 2015 18:48:19 +0100 Subject: Support compiling with GStreamer < 0.10.32 in the camerabin plugin. The documented minimum GStreamer version for Qt Multimedia is 0.10.24, however, the camerabin plugin actually required 0.10.32 to compile successfully. The reason is mainly due to the GstEncodingProfiles API, which is used to implement the audio and video encoding settings controls. There's no hard requirement for that API anymore and the aforementioned controls simply don't do anything when the GStreamer version used to compile is older than 0.10.32. A few other GStreamer calls had to be ifdef'd or replaced in order to compile with 0.10.24. Note that this patch only makes sure it compiles with older versions, running the camerabin plugin with GStreamer < 0.10.32 is currently untested and it might not work as expected. Task-number: QTBUG-48914 Change-Id: I4ce8e932f24a33e919e29326729e12bbae561faf Reviewed-by: Christian Stromme --- src/gsttools/qgstutils.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/gsttools') diff --git a/src/gsttools/qgstutils.cpp b/src/gsttools/qgstutils.cpp index 50a56232a..b9e04e3f1 100644 --- a/src/gsttools/qgstutils.cpp +++ b/src/gsttools/qgstutils.cpp @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -1531,6 +1532,15 @@ GList *qt_gst_video_sinks() return list; } +void qt_gst_util_double_to_fraction(gdouble src, gint *dest_n, gint *dest_d) +{ +#if GST_CHECK_VERSION(0, 10, 26) + gst_util_double_to_fraction(src, dest_n, dest_d); +#else + qt_real_to_fraction(src, dest_n, dest_d); +#endif +} + QDebug operator <<(QDebug debug, GstCaps *caps) { if (caps) { -- cgit v1.2.3