Skip to contentSkip to conversation

package/qt5multimedia: put back gstreamer 0.10 optional dependency

PATCH New Fabrice Fontaine 3 participants 7 messages May 12, 2019 – May 14, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/qt5multimedia: put back gstreamer 0.10 optional dependency

Commit b2e16ea64a6f89a82098625bb93db020ea5d4db4 tried to remove gstreamer 0.10 support by removing its dependency but this was just masking the issue as we have a build failure with gstreamer 0.10

So put back this dependency (build failure is fixed in the follow-up patch)

---
 package/qt5/qt5multimedia/qt5multimedia.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
package/qt5/qt5multimedia/qt5multimedia.mk +5 -1
index 7d332b0304..0a27c857e5 100644
@@ -18,6 +18,10 @@ QT5MULTIMEDIA_LICENSE = GPL-3.0 or LGPL-2.1 with exception or LGPL-3.0, GFDL-1.3
 QT5MULTIMEDIA_LICENSE_FILES = LICENSE.GPLv3 LICENSE.LGPLv21 LGPL_EXCEPTION.txt LICENSE.LGPLv3 LICENSE.FDL
 endif
 
+ifeq ($(BR2_PACKAGE_GST_PLUGINS_BASE),y)
+QT5MULTIMEDIA_DEPENDENCIES += gst-plugins-base
+endif
+
 ifeq ($(BR2_PACKAGE_GST1_PLUGINS_BASE),y)
 QT5MULTIMEDIA_DEPENDENCIES += gst1-plugins-base
 endif
@@ -49,7 +53,7 @@ endef
 ifeq ($(BR2_STATIC_LIBS),)
 # since Qt5.10.1 libqgsttools was renamed to libQtMultimediaGstTools
 # and is installed by the default target install step below
-ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST)x$(BR2_PACKAGE_GST1_PLUGINS_BASE),xy)
+ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST)x$(BR2_PACKAGE_GST_PLUGINS_BASE)$(BR2_PACKAGE_GST1_PLUGINS_BASE),xy)
 define QT5MULTIMEDIA_INSTALL_TARGET_QGSTTOOLS_LIB
 	cp -dpf $(STAGING_DIR)/usr/lib/libqgsttools*.so.* $(TARGET_DIR)/usr/lib
 endef
Signature · 1 line
2.20.1
#1 lore raw

PATCH 2/2 package/qt5multimedia: fix build with gstreamer 0.10

Fixes:
- http://autobuild.buildroot.org/results/de26fd4f5ab130bd87ea9d7709d9568290362758

---
 ...-compile-failure-with-gstreamer-0-10.patch | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/qt5/qt5multimedia/0001-Fix-compile-failure-with-gstreamer-0-10.patch
package/qt5/qt5multimedia/0001-Fix-compile-failure-with-gstreamer-0-10.patch new file +36 -0
new file mode 100644
index 0000000000..8bb1f582c7
@@ -0,0 +1,36 @@
+From 935967a453b47ae7c8e9ad3d94eef3813eab58db Mon Sep 17 00:00:00 2001
+From: Richard Oehlinger <[email protected]>
+Date: Mon, 18 Mar 2019 10:15:13 +0100
+Subject: [PATCH] Fix compile failure with gstreamer 0.10
+
+This fixes an compile failure introduced in commit 67c4ec55.
+
+Fixes: QTBUG-74475
+Change-Id: I0dabb72f8b5cdd75336b15515381ff9d9442788f
+Reviewed-by: VaL Doroshchuk <[email protected]>
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Retrieved from:
+https://github.com/qt/qtmultimedia/commit/935967a453b47ae7c8e9ad3d94eef3813eab58db]
+---
+ src/gsttools/qgstreamerplayersession.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/gsttools/qgstreamerplayersession.cpp b/src/gsttools/qgstreamerplayersession.cpp
+index f21c94c5c..9858f61c9 100644
+--- a/src/gsttools/qgstreamerplayersession.cpp
++++ b/src/gsttools/qgstreamerplayersession.cpp
+@@ -402,9 +402,14 @@ void QGstreamerPlayerSession::setPipeline(GstElement *pipeline)
+ 
+     if (m_renderer) {
+         auto it = gst_bin_iterate_sinks(GST_BIN(pipeline));
++#if GST_CHECK_VERSION(1,0,0)
+         GValue data = { 0, 0 };
+         while (gst_iterator_next (it, &data) == GST_ITERATOR_OK) {
+             auto child = static_cast<GstElement*>(g_value_get_object(&data));
++#else
++       GstElement *child = nullptr;
++       while (gst_iterator_next(it, reinterpret_cast<gpointer *>(&child)) == GST_ITERATOR_OK) {
++#endif
+             if (QLatin1String(GST_OBJECT_NAME(child)) == QLatin1String("qtvideosink")) {
+                 m_renderer->setVideoSink(child);
+                 break;
Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/2 package/qt5multimedia: fix build with gstreamer 0.10

Hello Fabrice,

Quoted 18 lines · Fabrice Fontaine

Fixes:
- http://autobuild.buildroot.org/results/de26fd4f5ab130bd87ea9d7709d9568290362758

---
 ...-compile-failure-with-gstreamer-0-10.patch | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/qt5/qt5multimedia/0001-Fix-compile-failure-with-gstreamer-0-10.patch
package/qt5/qt5multimedia/0001-Fix-compile-failure-with-gstreamer-0-10.patch new file +3 -0
new file mode 100644
index 0000000000..8bb1f582c7
@@ -0,0 +1,36 @@
+From 935967a453b47ae7c8e9ad3d94eef3813eab58db Mon Sep 17 00:00:00 2001
+From: Richard Oehlinger <[email protected]>
+Date: Mon, 18 Mar 2019 10:15:13 +0100

package/qt5/qt5multimedia/0001-Fix-compile-failure-with-gstreamer-0-10.patch line 13

Quoted 10 lines
package/qt5/qt5multimedia/0001-Fix-compile-failure-with-gstreamer-0-10.patch new file +10 -0
+Subject: [PATCH] Fix compile failure with gstreamer 0.10
+
+This fixes an compile failure introduced in commit 67c4ec55.
+
+Fixes: QTBUG-74475
+Change-Id: I0dabb72f8b5cdd75336b15515381ff9d9442788f
+Reviewed-by: VaL Doroshchuk <[email protected]>
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Retrieved from:
+https://github.com/qt/qtmultimedia/commit/935967a453b47ae7c8e9ad3d94eef3813eab58db]

Preferred URL: https://code.qt.io/cgit/qt/qtmultimedia.git/commit/?id=935967a453b47ae7c8e9ad3d94eef3813eab58db
Github is only the mirror and the code.qt.io one gives a clickable link to the QTBUG report

Thanks for looking after the build failure....

Regards,
Peter

Quoted 23 lines
package/qt5/qt5multimedia/0001-Fix-compile-failure-with-gstreamer-0-10.patch new file +23 -0
+---
+ src/gsttools/qgstreamerplayersession.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/gsttools/qgstreamerplayersession.cpp b/src/gsttools/qgstreamerplayersession.cpp
+index f21c94c5c..9858f61c9 100644
+--- a/src/gsttools/qgstreamerplayersession.cpp
++++ b/src/gsttools/qgstreamerplayersession.cpp
+@@ -402,9 +402,14 @@ void QGstreamerPlayerSession::setPipeline(GstElement *pipeline)
+
+     if (m_renderer) {
+         auto it = gst_bin_iterate_sinks(GST_BIN(pipeline));
++#if GST_CHECK_VERSION(1,0,0)
+         GValue data = { 0, 0 };
+         while (gst_iterator_next (it, &data) == GST_ITERATOR_OK) {
+             auto child = static_cast<GstElement*>(g_value_get_object(&data));
++#else
++       GstElement *child = nullptr;
++       while (gst_iterator_next(it, reinterpret_cast<gpointer *>(&child)) == GST_ITERATOR_OK) {
++#endif
+             if (QLatin1String(GST_OBJECT_NAME(child)) == QLatin1String("qtvideosink")) {
+                 m_renderer->setVideoSink(child);
+                 break;
#3 lore raw

PATCH 2/2 package/qt5multimedia: fix build with gstreamer 0.10

In reply to Fabrice Fontaine

Hi Fabrice,

Quoted 8 lines · Fabrice Fontaine

Fixes:
- http://autobuild.buildroot.org/results/de26fd4f5ab130bd87ea9d7709d9568290362758

---
 ...-compile-failure-with-gstreamer-0-10.patch | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/qt5/qt5multimedia/0001-Fix-compile-failure-with-gstreamer-0-10.patch

Does this patch apply both to 5.6 and 5.12?

Note that we don't need a patch for 5.6, since it's excluded in qt5base. And
both Qt5.6 and gstreamer0.10 will be removed soonish, so there's no need to go and re-enable it for 5.6. But I just want to avoid a build failure for 5.6 because the patch doesn't apply.

Regards,
Arnout

#4 lore raw

PATCH 2/2 package/qt5multimedia: fix build with gstreamer 0.10

Hi Arnout,

Le mar. 14 mai 2019 ? 21:50, Arnout Vandecappelle <[email protected]> a ?crit :

Quoted 7 lines

Hi Fabrice,

Quoted 3 lines · Fabrice Fontaine

Fixes:
- http://autobuild.buildroot.org/results/de26fd4f5ab130bd87ea9d7709d9568290362758

Quoted 7 lines
Quoted 5 lines
---
 ...-compile-failure-with-gstreamer-0-10.patch | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/qt5/qt5multimedia/0001-Fix-compile-failure-with-gstreamer-0-10.patch

Does this patch apply both to 5.6 and 5.12?

Patch does not apply on QT 5.6. It fixes a build failure added in 5.12.2.

Quoted 8 lines

Note that we don't need a patch for 5.6, since it's excluded in qt5base. And
both Qt5.6 and gstreamer0.10 will be removed soonish, so there's no need to go and re-enable it for 5.6. But I just want to avoid a build failure for 5.6 because the patch doesn't apply.

Regards,
Arnout

Regards,

Fabrice

#5 lore raw

PATCH 2/2 package/qt5multimedia: fix build with gstreamer 0.10

Quoted 10 lines · Fabrice Fontaine

Hi Arnout,

Le mar. 14 mai 2019 ? 21:50, Arnout Vandecappelle <[email protected]> a ?crit :

Quoted 7 lines

Hi Fabrice,

Quoted 3 lines · Fabrice Fontaine

Fixes:
- http://autobuild.buildroot.org/results/de26fd4f5ab130bd87ea9d7709d9568290362758

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
---
 ...-compile-failure-with-gstreamer-0-10.patch | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/qt5/qt5multimedia/0001-Fix-compile-failure-with-gstreamer-0-10.patch

Does this patch apply both to 5.6 and 5.12?

Patch does not apply on QT 5.6. It fixes a build failure added in 5.12.2.

Indeed, this patch breaks the build.

$ make BR2_PACKAGE_QT5_VERSION_5_6=y BR2_PACKAGE_QT5_VERSION_LATEST=
qt5multimedia-patch
qtmultimedia-opensource-src-5.6.3.tar.xz: OK (sha256:
ae36039ea8037742342f1615687e0ca2188f3ed0d700627a5e5be546c15e1b46)
Quoted 1 line
Quoted 1 line
Quoted 1 line

qt5multimedia 5.6.3 Extracting

xzcat /home/arnout/src/buildroot-dl/qt5multimedia/qtmultimedia-opensource-src-5.6.3.tar.xz | tar --strip-components=1 -C
/home/arnout/src/buildroot/output/build/qt5multimedia-5.6.3 -xf -

Quoted 1 line
Quoted 1 line
Quoted 1 line

qt5multimedia 5.6.3 Patching

Applying 0001-Fix-compile-failure-with-gstreamer-0-10.patch using patch:
can't find file to patch at input line 22
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
...

So I moved it to the 5.12.2 subdirectory and applied to master, thanks.

Regards,
Arnout

Quoted 12 lines
Quoted 8 lines

Note that we don't need a patch for 5.6, since it's excluded in qt5base. And
both Qt5.6 and gstreamer0.10 will be removed soonish, so there's no need to go and re-enable it for 5.6. But I just want to avoid a build failure for 5.6 because the patch doesn't apply.

Regards,
Arnout

Regards,

Fabrice

#6 lore raw

PATCH 2/2 package/qt5multimedia: fix build with gstreamer 0.10

Hi,

Le mar. 14 mai 2019 ? 23:08, Arnout Vandecappelle <[email protected]> a ?crit :

Quoted 34 lines · Fabrice Fontaine
Quoted 10 lines

Hi Arnout,

Le mar. 14 mai 2019 ? 21:50, Arnout Vandecappelle <[email protected]> a ?crit :

Quoted 7 lines

Hi Fabrice,

Quoted 3 lines · Fabrice Fontaine

Fixes:
- http://autobuild.buildroot.org/results/de26fd4f5ab130bd87ea9d7709d9568290362758

Quoted 8 lines
Quoted 7 lines
Quoted 5 lines
---
 ...-compile-failure-with-gstreamer-0-10.patch | 36 +++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 package/qt5/qt5multimedia/0001-Fix-compile-failure-with-gstreamer-0-10.patch

Does this patch apply both to 5.6 and 5.12?

Patch does not apply on QT 5.6. It fixes a build failure added in 5.12.2.

Indeed, this patch breaks the build.

$ make BR2_PACKAGE_QT5_VERSION_5_6=y BR2_PACKAGE_QT5_VERSION_LATEST=
qt5multimedia-patch
qtmultimedia-opensource-src-5.6.3.tar.xz: OK (sha256:
ae36039ea8037742342f1615687e0ca2188f3ed0d700627a5e5be546c15e1b46)
Quoted 1 line
Quoted 1 line
Quoted 1 line

qt5multimedia 5.6.3 Extracting

xzcat /home/arnout/src/buildroot-dl/qt5multimedia/qtmultimedia-opensource-src-5.6.3.tar.xz | tar --strip-components=1 -C
/home/arnout/src/buildroot/output/build/qt5multimedia-5.6.3 -xf -

Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

qt5multimedia 5.6.3 Patching

Applying 0001-Fix-compile-failure-with-gstreamer-0-10.patch using patch:
can't find file to patch at input line 22
Perhaps you used the wrong -p or --strip option?

Nope, I forgot to test it on Qt 5.6 :-/. I completely forgot that we had two Qt versions ...

Quoted 4 lines

The text leading up to this was:
...

So I moved it to the 5.12.2 subdirectory and applied to master, thanks.

Thanks for taking care of that.

Quoted 17 lines

Regards,
Arnout

Quoted 12 lines
Quoted 8 lines

Note that we don't need a patch for 5.6, since it's excluded in qt5base. And
both Qt5.6 and gstreamer0.10 will be removed soonish, so there's no need to go and re-enable it for 5.6. But I just want to avoid a build failure for 5.6 because the patch doesn't apply.

Regards,
Arnout

Regards,

Fabrice

Regards,

Fabrice