All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/2] qt5multimedia: fix compile without opengl
@ 2015-01-28 21:48 Peter Seiderer
  2015-02-03 16:21 ` Arnout Vandecappelle
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Seiderer @ 2015-01-28 21:48 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

On Sun, Jan 25, 2015 at 03:03:53PM +0100, Thomas Petazzoni wrote:
> Dear Peter Seiderer,
> 
> On Fri, 23 Jan 2015 22:20:07 +0100, Peter Seiderer wrote:
> 
> > diff --git a/package/qt5/qt5multimedia/0001-qpaintervideosurface-fix-compile-without-opengl.patch b/package/qt5/qt5multimedia/0001-qpaintervideosurface-fix-compile-without-opengl.patch
> > new file mode 100644
> > index 0000000..578b79e
> > --- /dev/null
> > +++ b/package/qt5/qt5multimedia/0001-qpaintervideosurface-fix-compile-without-opengl.patch
> > @@ -0,0 +1,39 @@
> > +From bca9c8786da5b5bca47b873720cb0d576219d4a9 Mon Sep 17 00:00:00 2001
> > +From: Peter Seiderer <ps.report@gmx.net>
> > +Date: Fri, 23 Jan 2015 18:58:29 +0100
> > +Subject: [PATCH] qpaintervideosurface: fix compile without opengl
> > +
> > +Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > +---
> > + src/multimediawidgets/qpaintervideosurface.cpp | 4 ++++
> > + 1 file changed, 4 insertions(+)
> > +
> > +diff --git a/src/multimediawidgets/qpaintervideosurface.cpp b/src/multimediawidgets/qpaintervideosurface.cpp
> > +index 3a880de..667ecd3 100644
> > +--- a/src/multimediawidgets/qpaintervideosurface.cpp
> > ++++ b/src/multimediawidgets/qpaintervideosurface.cpp
> > +@@ -95,8 +95,10 @@ QVideoSurfaceGenericPainter::QVideoSurfaceGenericPainter()
> > +         << QVideoFrame::Format_RGB32
> > +         << QVideoFrame::Format_ARGB32
> > +         << QVideoFrame::Format_RGB565;
> > ++#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
> > +     // The raster formats should be a subset of the GL formats.
> > +     if (QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGLES)
> > ++#endif
> > +         m_imagePixelFormats << QVideoFrame::Format_RGB24;
> > + }
> > + 
> > +@@ -137,8 +139,10 @@ QAbstractVideoSurface::Error QVideoSurfaceGenericPainter::start(const QVideoSurf
> > +     const QAbstractVideoBuffer::HandleType t = format.handleType();
> > +     if (t == QAbstractVideoBuffer::NoHandle) {
> > +         bool ok = m_imageFormat != QImage::Format_Invalid && !m_imageSize.isEmpty();
> > ++#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
> > +         if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES)
> > +             ok &= format.pixelFormat() != QVideoFrame::Format_RGB24;
> > ++#endif
> 
> This is a bit scarce on details, and the first hunk that just removes
> the if condition looks a bit suspicious. Could we instead get a patch
> accepted upstream?

The original code in the first hunk disables Format_RGB24 in case of
QOpenGLContext::LibGLES, so it should be save to just remove the compare
and so enable Format_RGB24 if OpenGL is disabled.

The original code in the second hunk disables Format_RGB24 in case of
QOpenGLContext::LibGLES, so the right thing to do is to disable
the if statement (checking on QOpenGLContext::LibGLES case) and the next
line which sets ok to false in case of Format_RGB24...

But I searched upstream git, there is already a fix in 5.4.1/dev branch
fixing this problem ([1]), but as I think doing it the wrong way,
disabling Format_RGB24 for the non-OpenGL case ([2]), but a follow up
patch fixing the issue is on its way upstream ([3])...

Regards,
Peter

[1] https://qt.gitorious.org/qt/qtmultimedia/commit/2b181d546970d18a48a0f36f5d1a22418b61cd4d
[2] https://codereview.qt-project.org/101817
[3] https://codereview.qt-project.org/104811

> 
> Thanks,
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2 1/2] qt5multimedia: fix compile without opengl
  2015-01-28 21:48 [Buildroot] [PATCH v2 1/2] qt5multimedia: fix compile without opengl Peter Seiderer
@ 2015-02-03 16:21 ` Arnout Vandecappelle
  2015-02-03 18:52   ` Peter Seiderer
  0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2015-02-03 16:21 UTC (permalink / raw)
  To: buildroot

On 28/01/15 22:48, Peter Seiderer wrote:
> But I searched upstream git, there is already a fix in 5.4.1/dev branch
> fixing this problem ([1]), but as I think doing it the wrong way,
> disabling Format_RGB24 for the non-OpenGL case ([2]), but a follow up
> patch fixing the issue is on its way upstream ([3])...

 Could you then submit those two upstream patches? Either separately or
squashed, but with a reference to the upstream commit and your SoB.

 Regards,
 Arnout

> 
> Regards,
> Peter
> 
> [1] https://qt.gitorious.org/qt/qtmultimedia/commit/2b181d546970d18a48a0f36f5d1a22418b61cd4d
> [2] https://codereview.qt-project.org/101817
> [3] https://codereview.qt-project.org/104811
> 
>>
>> Thanks,
>>
>> Thomas
>> -- 
>> Thomas Petazzoni, CTO, Free Electrons
>> Embedded Linux, Kernel and Android engineering
>> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2 1/2] qt5multimedia: fix compile without opengl
  2015-02-03 16:21 ` Arnout Vandecappelle
@ 2015-02-03 18:52   ` Peter Seiderer
  2015-02-03 20:19     ` Arnout Vandecappelle
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Seiderer @ 2015-02-03 18:52 UTC (permalink / raw)
  To: buildroot

Hello Arnout,

> Gesendet: Dienstag, 03. Februar 2015 um 17:21 Uhr
> Von: "Arnout Vandecappelle" <arnout@mind.be>
> An: "Peter Seiderer" <ps.report@gmx.net>, "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>
> Cc: buildroot at busybox.net
> Betreff: Re: [Buildroot] [PATCH v2 1/2] qt5multimedia: fix compile without opengl
>
> On 28/01/15 22:48, Peter Seiderer wrote:
> > But I searched upstream git, there is already a fix in 5.4.1/dev branch
> > fixing this problem ([1]), but as I think doing it the wrong way,
> > disabling Format_RGB24 for the non-OpenGL case ([2]), but a follow up
> > patch fixing the issue is on its way upstream ([3])...
> 
>  Could you then submit those two upstream patches? Either separately or
> squashed, but with a reference to the upstream commit and your SoB.
> 

Mhh, I understand the reasoning for grabbing upstream patches, but in this case
I am not sure its worth the work to possibly rebase the upstream version (in case
they do not apply cleanly, or to squash them), to get nearly the same result as
with the suggested patch, the fix for [2] with [3] is derived work of my suggested
buildroot patch ;-)

Less work would be to just add the upstream references to the commit message
and/or the patch...

Any preferred solution?

Regards,
Peter

>  Regards,
>  Arnout
> 
> > 
> > Regards,
> > Peter
> > 
> > [1] https://qt.gitorious.org/qt/qtmultimedia/commit/2b181d546970d18a48a0f36f5d1a22418b61cd4d
> > [2] https://codereview.qt-project.org/101817
> > [3] https://codereview.qt-project.org/104811
> > 
> >>
> >> Thanks,
> >>
> >> Thomas
> >> -- 
> >> Thomas Petazzoni, CTO, Free Electrons
> >> Embedded Linux, Kernel and Android engineering
> >> http://free-electrons.com
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
> > 
> > 
> 
> 
> -- 
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2 1/2] qt5multimedia: fix compile without opengl
  2015-02-03 18:52   ` Peter Seiderer
@ 2015-02-03 20:19     ` Arnout Vandecappelle
  0 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2015-02-03 20:19 UTC (permalink / raw)
  To: buildroot

On 03/02/15 19:52, Peter Seiderer wrote:
> Hello Arnout,
>
> > Gesendet: Dienstag, 03. Februar 2015 um 17:21 Uhr
> > Von: "Arnout Vandecappelle" <arnout@mind.be>
> > An: "Peter Seiderer" <ps.report@gmx.net>, "Thomas Petazzoni"
> <thomas.petazzoni@free-electrons.com>
> > Cc: buildroot at busybox.net
> > Betreff: Re: [Buildroot] [PATCH v2 1/2] qt5multimedia: fix compile without
> opengl
> >
> > On 28/01/15 22:48, Peter Seiderer wrote:
> >> But I searched upstream git, there is already a fix in 5.4.1/dev branch
> >> fixing this problem ([1]), but as I think doing it the wrong way,
> >> disabling Format_RGB24 for the non-OpenGL case ([2]), but a follow up
> >> patch fixing the issue is on its way upstream ([3])...
> >
> >  Could you then submit those two upstream patches? Either separately or
> > squashed, but with a reference to the upstream commit and your SoB.
> >
>
> Mhh, I understand the reasoning for grabbing upstream patches, but in this case
> I am not sure its worth the work to possibly rebase the upstream version (in case
> they do not apply cleanly, or to squash them), to get nearly the same result as
> with the suggested patch, the fix for [2] with [3] is derived work of my suggested
> buildroot patch ;-)
>
> Less work would be to just add the upstream references to the commit message
> and/or the patch...


 Ah OK, to me it looked as if the upstream patches were handling the situation
differently, but I hadn't taken the time to look at them in detail.

 If you're doing basically the same thing, then your patch is OK as if of
course. The upstream references are still useful but it could be applied without it.

 So basically:

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

-- 
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2 1/2] qt5multimedia: fix compile without opengl
  2015-01-23 21:20 ` [Buildroot] [PATCH v2 1/2] qt5multimedia: fix compile without opengl Peter Seiderer
@ 2015-01-25 14:03   ` Thomas Petazzoni
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2015-01-25 14:03 UTC (permalink / raw)
  To: buildroot

Dear Peter Seiderer,

On Fri, 23 Jan 2015 22:20:07 +0100, Peter Seiderer wrote:

> diff --git a/package/qt5/qt5multimedia/0001-qpaintervideosurface-fix-compile-without-opengl.patch b/package/qt5/qt5multimedia/0001-qpaintervideosurface-fix-compile-without-opengl.patch
> new file mode 100644
> index 0000000..578b79e
> --- /dev/null
> +++ b/package/qt5/qt5multimedia/0001-qpaintervideosurface-fix-compile-without-opengl.patch
> @@ -0,0 +1,39 @@
> +From bca9c8786da5b5bca47b873720cb0d576219d4a9 Mon Sep 17 00:00:00 2001
> +From: Peter Seiderer <ps.report@gmx.net>
> +Date: Fri, 23 Jan 2015 18:58:29 +0100
> +Subject: [PATCH] qpaintervideosurface: fix compile without opengl
> +
> +Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> +---
> + src/multimediawidgets/qpaintervideosurface.cpp | 4 ++++
> + 1 file changed, 4 insertions(+)
> +
> +diff --git a/src/multimediawidgets/qpaintervideosurface.cpp b/src/multimediawidgets/qpaintervideosurface.cpp
> +index 3a880de..667ecd3 100644
> +--- a/src/multimediawidgets/qpaintervideosurface.cpp
> ++++ b/src/multimediawidgets/qpaintervideosurface.cpp
> +@@ -95,8 +95,10 @@ QVideoSurfaceGenericPainter::QVideoSurfaceGenericPainter()
> +         << QVideoFrame::Format_RGB32
> +         << QVideoFrame::Format_ARGB32
> +         << QVideoFrame::Format_RGB565;
> ++#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
> +     // The raster formats should be a subset of the GL formats.
> +     if (QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGLES)
> ++#endif
> +         m_imagePixelFormats << QVideoFrame::Format_RGB24;
> + }
> + 
> +@@ -137,8 +139,10 @@ QAbstractVideoSurface::Error QVideoSurfaceGenericPainter::start(const QVideoSurf
> +     const QAbstractVideoBuffer::HandleType t = format.handleType();
> +     if (t == QAbstractVideoBuffer::NoHandle) {
> +         bool ok = m_imageFormat != QImage::Format_Invalid && !m_imageSize.isEmpty();
> ++#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
> +         if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES)
> +             ok &= format.pixelFormat() != QVideoFrame::Format_RGB24;
> ++#endif

This is a bit scarce on details, and the first hunk that just removes
the if condition looks a bit suspicious. Could we instead get a patch
accepted upstream?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [PATCH v2 1/2] qt5multimedia: fix compile without opengl
  2015-01-23 21:20 [Buildroot] [PATCH v2 0/2] qt5multimedia: compile fix without opengl and enable gstreamer-1.x support Peter Seiderer
@ 2015-01-23 21:20 ` Peter Seiderer
  2015-01-25 14:03   ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Seiderer @ 2015-01-23 21:20 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 ...ervideosurface-fix-compile-without-opengl.patch | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 package/qt5/qt5multimedia/0001-qpaintervideosurface-fix-compile-without-opengl.patch

diff --git a/package/qt5/qt5multimedia/0001-qpaintervideosurface-fix-compile-without-opengl.patch b/package/qt5/qt5multimedia/0001-qpaintervideosurface-fix-compile-without-opengl.patch
new file mode 100644
index 0000000..578b79e
--- /dev/null
+++ b/package/qt5/qt5multimedia/0001-qpaintervideosurface-fix-compile-without-opengl.patch
@@ -0,0 +1,39 @@
+From bca9c8786da5b5bca47b873720cb0d576219d4a9 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Fri, 23 Jan 2015 18:58:29 +0100
+Subject: [PATCH] qpaintervideosurface: fix compile without opengl
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ src/multimediawidgets/qpaintervideosurface.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/multimediawidgets/qpaintervideosurface.cpp b/src/multimediawidgets/qpaintervideosurface.cpp
+index 3a880de..667ecd3 100644
+--- a/src/multimediawidgets/qpaintervideosurface.cpp
++++ b/src/multimediawidgets/qpaintervideosurface.cpp
+@@ -95,8 +95,10 @@ QVideoSurfaceGenericPainter::QVideoSurfaceGenericPainter()
+         << QVideoFrame::Format_RGB32
+         << QVideoFrame::Format_ARGB32
+         << QVideoFrame::Format_RGB565;
++#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+     // The raster formats should be a subset of the GL formats.
+     if (QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGLES)
++#endif
+         m_imagePixelFormats << QVideoFrame::Format_RGB24;
+ }
+ 
+@@ -137,8 +139,10 @@ QAbstractVideoSurface::Error QVideoSurfaceGenericPainter::start(const QVideoSurf
+     const QAbstractVideoBuffer::HandleType t = format.handleType();
+     if (t == QAbstractVideoBuffer::NoHandle) {
+         bool ok = m_imageFormat != QImage::Format_Invalid && !m_imageSize.isEmpty();
++#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
+         if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES)
+             ok &= format.pixelFormat() != QVideoFrame::Format_RGB24;
++#endif
+         if (ok)
+             return QAbstractVideoSurface::NoError;
+     } else if (t == QAbstractVideoBuffer::QPixmapHandle) {
+-- 
+2.1.2
+
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-02-03 20:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-28 21:48 [Buildroot] [PATCH v2 1/2] qt5multimedia: fix compile without opengl Peter Seiderer
2015-02-03 16:21 ` Arnout Vandecappelle
2015-02-03 18:52   ` Peter Seiderer
2015-02-03 20:19     ` Arnout Vandecappelle
  -- strict thread matches above, loose matches on Subject: below --
2015-01-23 21:20 [Buildroot] [PATCH v2 0/2] qt5multimedia: compile fix without opengl and enable gstreamer-1.x support Peter Seiderer
2015-01-23 21:20 ` [Buildroot] [PATCH v2 1/2] qt5multimedia: fix compile without opengl Peter Seiderer
2015-01-25 14:03   ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.