[meta-freescale] [PATCH 2/4] gstreamer1.0-plugins-bad: Add i.mx specific code about qmlglplugin
Carol Zhu
carol.zhu at nxp.com
Wed May 31 02:17:31 PDT 2017
Hi Otavio,
Your idea about adding a second block using EGL is good.
We will update it in next release.
Thanks~
B.R.
Carol
-----Original Message-----
From: Otavio Salvador [mailto:otavio.salvador at ossystems.com.br]
Sent: Monday, May 29, 2017 7:27 AM
To: Carol Zhu <carol.zhu at nxp.com>
Cc: meta-freescale at yoctoproject.org
Subject: Re: [meta-freescale] [PATCH 2/4] gstreamer1.0-plugins-bad: Add i.mx specific code about qmlglplugin
On Fri, May 26, 2017 at 2:32 AM, Yuqing Zhu <carol.zhu at nxp.com> wrote:
> *Add FB and X11 support for qml gl plugins *Use Render-to-texture for
> texture copy since we use direct viv for GPU download
>
> Signed-off-by: Yuqing Zhu <carol.zhu at nxp.com>
> ---
> .../0008-qmlglplugin-Add-i.mx-specific-code.patch | 203 +++++++++++++++++++++
> .../gstreamer1.0-plugins-bad_1.10.%.bbappend | 1 +
> 2 files changed, 204 insertions(+)
> create mode 100755
> recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-qmlglplugin
> -Add-i.mx-specific-code.patch
>
> diff --git
> a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-qmlglplug
> in-Add-i.mx-specific-code.patch
> b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-qmlglplug
> in-Add-i.mx-specific-code.patch
> new file mode 100755
> index 0000000..c5e1775
> --- /dev/null
> +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad/0008-qmlgl
> +++ plugin-Add-i.mx-specific-code.patch
> @@ -0,0 +1,203 @@
> +From 2afb646ca0cb911a7735ed5512ebc4a8f02ad052 Mon Sep 17 00:00:00
> +2001
> +From: Haihua Hu <jared.hu at nxp.com>
> +Date: Mon, 14 Nov 2016 14:34:47 +0800
> +Subject: [PATCH 19/24] qmlglplugin: Add i.mx specific code
> +
> +1.Add FB and X11 support for qml gl plugins 2.Use Render-to-texture
> +for texture copy since we use direct viv
> + for GPU download.
> +
> +Upstream-Status: Inappropriate [i.MX specific]
> +
> +Signed-off-by: Haihua Hu <jared.hu at nxp.com>
> +---
> + configure.ac | 9 +++++++--
> + ext/qt/gstqtglutility.cc | 17 +++++++++++++---
> + ext/qt/qtwindow.cc | 50 +++++++++++++++++++++++++++++++++++++++++++++++-
> + ext/qt/qtwindow.h | 1 +
> + 4 files changed, 71 insertions(+), 6 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac index 0876a14..a4cc878
> +100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -2967,12 +2967,12 @@ AG_GST_CHECK_FEATURE(QT, [Qt elements], qt, [
> + HAVE_QT="yes"
> + HAVE_QT_WINDOWING="no"
> + QT_VERSION="`$PKG_CONFIG --modversion Qt5Core`"
> +- QPA_INCLUDE_PATH=`$PKG_CONFIG --variable=includedir Qt5Core`/QtGui/${QT_VERSION}/QtGui
> ++ QPA_INCLUDE_PATH=${STAGING_INCDIR}/../../`$PKG_CONFIG
> ++ --variable=includedir Qt5Core`/QtGui/${QT_VERSION}/QtGui
This is a hack and should not be part of the patch. PKG_CONFIG behaves well inside OE environment so it is not needed.
> + AS_IF([test -f "$QPA_INCLUDE_PATH/qpa/qplatformnativeinterface.h"], [
> + QT_CFLAGS="$QT_CFLAGS -I$QPA_INCLUDE_PATH"
> + HAVE_QT_QPA_HEADER="yes"
> + ], [AC_MSG_NOTICE([Cannot find QPA])])
> +- if test "x$GST_GL_HAVE_WINDOW_X11" = "x1" -a "x$GST_GL_HAVE_PLATFORM_GLX" = "x1"; then
> ++ if test "x$GST_GL_HAVE_WINDOW_X11" = "x1" -a
> ++ "x$GST_GL_HAVE_PLATFORM_EGL" = "x1"; then
if test "x$GST_GL_HAVE_WINDOW_X11" = "x1"; then ???
> + PKG_CHECK_MODULES(QT_X11, Qt5X11Extras, [
> + AC_DEFINE([HAVE_QT_X11], [], [Define if Qt X11 integration is installed])
> + QT_CFLAGS="$QT_CFLAGS $QT_X11_CFLAGS"
> +@@ -3032,6 +3032,11 @@ AG_GST_CHECK_FEATURE(QT, [Qt elements], qt, [
> + HAVE_QT_WINDOWING="yes"
> + fi
> + fi
> ++ if test "x$GST_GL_HAVE_WINDOW_FB" = "x1" -a "x$GST_GL_HAVE_PLATFORM_EGL" = "x1"; then
> ++ QT_CFLAGS="$QT_CFLAGS"
> ++ QT_LIBS="$QT_LIBS"
> ++ HAVE_QT_WINDOWING="yes"
> ++ fi
Why is this needed?
It seems we need to enable/disable the Qt support depending on Qt availability and not this patch.
> +diff --git a/ext/qt/gstqtglutility.cc b/ext/qt/gstqtglutility.cc
> +index 4d6d318..c85465f 100644
> +--- a/ext/qt/gstqtglutility.cc
> ++++ b/ext/qt/gstqtglutility.cc
> +@@ -25,10 +25,10 @@
> + #include "gstqtglutility.h"
> + #include <QtGui/QGuiApplication>
> +
> +-#if GST_GL_HAVE_WINDOW_X11 && GST_GL_HAVE_PLATFORM_GLX && defined
> +(HAVE_QT_X11)
> ++#if GST_GL_HAVE_WINDOW_X11 && GST_GL_HAVE_PLATFORM_EGL && defined
> ++(HAVE_QT_X11)
> + #include <QX11Info>
> + #include <gst/gl/x11/gstgldisplay_x11.h> -#include
> +<gst/gl/x11/gstglcontext_glx.h>
> ++#include <gst/gl/egl/gstglcontext_egl.h>
> + #endif
Adding a second block using EGL seems more appropriate so we don't change non-related code.
--
Otavio Salvador O.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
More information about the meta-freescale
mailing list