All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] RFC: gst1-plugins-good 1.14: enable-qt config option
@ 2018-03-27  8:57 Martin Kepplinger
  2018-03-28 14:22 ` Martin Kepplinger
  2018-03-30 18:18 ` Arnout Vandecappelle
  0 siblings, 2 replies; 5+ messages in thread
From: Martin Kepplinger @ 2018-03-27  8:57 UTC (permalink / raw)
  To: buildroot

So the goal here is to optionally get gst1-plugins-good's qt module to
be built (and have the qmlglsink gstreamer element) with Qt and eglfs
platform.

(Keep in mind that the qt-module moved from plugins-bad to plugins-good
during the 1.12 to 1.14 update):

First, a config option for plugin-good's "qt" would be needed. here's
some pseudo-code of what I mean, to make it clea:

config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_QT
       bool "qt"
       help
         Qt plugin

(...)

ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_QT),y)
GST1_PLUGINS_GOOD_CONF_OPTS += --enable-qt
GST1_PLUGINS_GOOD_DEPENDENCIES += qt5
else
GST1_PLUGINS_GOOD_CONF_OPTS += --disable-qt
endif

------------------
ok. let's ignore that for a second. instead I simply remove --disable-qt
(or say --enable-qt) and build it *after* Qt for now. Then I get:

configure: *** checking feature: Qt elements ***

configure: *** for plug-ins: qt ***

checking for QT... yes

checking for moc-qt5... no

checking for moc... /home/martin/dev/buildroot-2018.02/output/host/bin/moc
checking for rcc-qt5... no

checking for rcc... /home/martin/dev/buildroot-2018.02/output/host/bin/rcc
checking for uic-qt5... no

checking for uic... /home/martin/dev/buildroot-2018.02/output/host/bin/uic
configure: Cannot find QPA

configure: *** These plugins will not be built: qt



But the weird thing is that in config.h I don't get HAVE_QT:
/* Define to enable Qt elements (used by qt). */

/* #undef HAVE_QT */



/* Define if Qt eglfs integration is installed */

/* #undef HAVE_QT_EGLFS */


One relevant path on configure.ac is:

HAVE_QT="yes"
        HAVE_QT_WINDOWING="no"

        QT_VERSION="`$PKG_CONFIG --define-prefix --modversion Qt5Core`"

        QPA_INCLUDE_PATH=`$PKG_CONFIG --variable=includedir
Qt5Core`/QtGui/${QT_VERSION}/QtGui
        AS_IF([test -f
"$PKG_CONFIG_SYSROOT_DIR/$QPA_INCLUDE_PATH/qpa/qplatformnativeinterface.h"],
[
          QT_CFLAGS="$QT_CFLAGS
-I$PKG_CONFIG_SYSROOT_DIR/$QPA_INCLUDE_PATH"
          HAVE_QT_QPA_HEADER="yes"

        ], [AC_MSG_NOTICE([Cannot find QPA])])

But I have
output/host/arm-buildroot-linux-gnueabihf/sysroot/usr/include/qt5/QtGui/5.9.4/QtGui/qpa/qplatformnativeinterface.h
But if I didn't, I think this shouldn't be the reason this fails...


HAVE_QT_WINDOWING should get yes because I should have EGL.


Do I get something buildroot-specific wrong? Does anybody have such a
configuration working locally?

thanks

                                martin

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

* [Buildroot] RFC: gst1-plugins-good 1.14: enable-qt config option
  2018-03-27  8:57 [Buildroot] RFC: gst1-plugins-good 1.14: enable-qt config option Martin Kepplinger
@ 2018-03-28 14:22 ` Martin Kepplinger
  2018-03-30  7:19   ` Martin Kepplinger
  2018-03-30 19:09   ` Arnout Vandecappelle
  2018-03-30 18:18 ` Arnout Vandecappelle
  1 sibling, 2 replies; 5+ messages in thread
From: Martin Kepplinger @ 2018-03-28 14:22 UTC (permalink / raw)
  To: buildroot

TL;DR so far: How to configure in gstreamer-gl-1.0 ? see below.

On 2018-03-27 10:57, Martin Kepplinger wrote:
> So the goal here is to optionally get gst1-plugins-good's qt module to
> be built (and have the qmlglsink gstreamer element) with Qt and eglfs
> platform.
> 
> (Keep in mind that the qt-module moved from plugins-bad to plugins-good
> during the 1.12 to 1.14 update):
> 
> First, a config option for plugin-good's "qt" would be needed. here's
> some pseudo-code of what I mean, to make it clea:
> 
> config BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_QT
>        bool "qt"
>        help
>          Qt plugin
> 
> (...)
> 
> ifeq ($(BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_QT),y)
> GST1_PLUGINS_GOOD_CONF_OPTS += --enable-qt
> GST1_PLUGINS_GOOD_DEPENDENCIES += qt5
> else
> GST1_PLUGINS_GOOD_CONF_OPTS += --disable-qt
> endif
> 
> ------------------
> ok. let's ignore that for a second. instead I simply remove --disable-qt
> (or say --enable-qt) and build it *after* Qt for now. Then I get:
> 
> configure: *** checking feature: Qt elements ***
> 
> configure: *** for plug-ins: qt ***
> 
> checking for QT... yes
> 
> checking for moc-qt5... no
> 
> checking for moc... /home/martin/dev/buildroot-2018.02/output/host/bin/moc
> checking for rcc-qt5... no
> 
> checking for rcc... /home/martin/dev/buildroot-2018.02/output/host/bin/rcc
> checking for uic-qt5... no
> 
> checking for uic... /home/martin/dev/buildroot-2018.02/output/host/bin/uic
> configure: Cannot find QPA
> 
> configure: *** These plugins will not be built: qt
> 
> 
> 

Alright. For --enable-qt we need, additionally to Qt (circa, not the
definitive answer):

BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL=y
BR2_PACKAGE_GST1_PLUGINS_BASE_HAS_LIB_OPENGL=y

BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_HAS_API=y
BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_OPENGL=y

BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_HAS_PLATFORM=y
BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_EGL=y

BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_HAS_WINDOW=y
BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_X11=y

We then additionally get from configure (along with "Cannot find QPA"
which doesnt matter now):

 configure: WARNING: Could not find any Qt Windowing integration

So HAVE_QT_WINDOWING is never set to yes, which means
GST_GL_HAVE_PLATFORM_EGL is not set to 1 :(

Well, this is set to 1, if the following string contains "egl":
 GST_GL_PLATFORMS=`$PKG_CONFIG --variable=gl_platforms gstreamer-gl-1.0`

So I indeed also find:

checking for GST_GL... no

configure: Package gstreamer-gl-1.0 was not found in the pkg-config
search path.
Perhaps you should add the directory containing `gstreamer-gl-1.0.pc'

to the PKG_CONFIG_PATH environment variable

Package 'gstreamer-gl-1.0', required by 'world', not found


So: How can I build this gstreamer-gl-1.0 library?
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gl.html


thanks for any hints,

                                 martin

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

* [Buildroot] RFC: gst1-plugins-good 1.14: enable-qt config option
  2018-03-28 14:22 ` Martin Kepplinger
@ 2018-03-30  7:19   ` Martin Kepplinger
  2018-03-30 19:09   ` Arnout Vandecappelle
  1 sibling, 0 replies; 5+ messages in thread
From: Martin Kepplinger @ 2018-03-30  7:19 UTC (permalink / raw)
  To: buildroot

On 2018-03-28 16:22, Martin Kepplinger wrote:
> TL;DR so far: How to configure in gstreamer-gl-1.0 ? see below.
> 

Let's recap; my example goal here is to run this app:
https://cgit.freedesktop.org/gstreamer/gst-examples/tree/playback/player/qt
on imx6 and play an h264 full HD video with it.

The starting-point is a configuration where "gst-launch-1.0" works using
"playbin" for full HD videos, using V4L2 (vpu, dmabuf, ...) and kmssink.
Here we go:


(The implementation of --enable-qt for gst-plugins-good is ignored for
now, see previous emails)


I have a configuration that builds "qmlgl" now:

BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL=y
BR2_PACKAGE_GST1_PLUGINS_BASE_HAS_LIB_OPENGL=y

BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_HAS_API=y
BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_GLES2=y

BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_HAS_PLATFORM=y
BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_EGL=y

BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_HAS_WINDOW=y
BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_X11=y

BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_DEINTERLACE=y

so what's weird is that, via gst-plugins-base we get a dependency of Qt
on X11 (!?). That's not buildroot's fault. It's in gst-plugins-base's m4
scripts!


So far so good. The gst example player app (using GST_DEBUG=3) currently
fails with


# GST_DEBUG=3 play tears_of_steel_1080p.mov
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
No modes available for output "VGA1"
0:00:00.692867667  1227  0x1593e30 WARN     GST_ELEMENT_FACTORY
gstelementfactory.c:456:gst_element_factory_make: no such element
factory "scaletempo"!

** (play:1227): WARNING **: GstPlayer: scaletempo element not available.
Audio pitch will not be preserved during trick modes
file:///usr/qml/QtQuick/Dialogs/DefaultFileDialog.qml:210:25: QML
ListView: Binding loop detected for property "model"
0:00:01.843304001  1227  0x1593e30 WARN                glwindow
gstglwindow.c:293:gst_gl_window_new: Could not create window. user
specified (null), creating dummy window
0:00:01.844303667  1227 0xaff02c00 WARN               glcontext
gstglcontext.c:1244:gst_gl_context_create_thread:<glcontextegl0> Failed
to create context
0:00:01.844429667  1227  0x1593e30 ERROR             qtglwidget
qtitem.cc:350:initWinSys: Failed to initialize egl: EGL_NOT_INITIALIZED
0:00:01.844523334  1227  0x1593e30 WARN                  qtsink
gstqtsink.cc:309:gst_qt_sink_change_state:<sink> error: Could not
initialize window system
0:00:01.844993667  1227  0x1593e30 ERROR                playbin
gstplaybin2.c:5444:activate_group:<playbin> failed to activate sinks
0:00:01.845117334  1227  0x1593e30 ERROR             gst-player
gstplayer.c:1051:emit_error:<player0> Error: Failed to play
(gst-player-error-quark, 0)


what's wrong with EGL here?

thanks

                                martin

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

* [Buildroot] RFC: gst1-plugins-good 1.14: enable-qt config option
  2018-03-27  8:57 [Buildroot] RFC: gst1-plugins-good 1.14: enable-qt config option Martin Kepplinger
  2018-03-28 14:22 ` Martin Kepplinger
@ 2018-03-30 18:18 ` Arnout Vandecappelle
  1 sibling, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2018-03-30 18:18 UTC (permalink / raw)
  To: buildroot



On 27-03-18 10:57, Martin Kepplinger wrote:
>         QPA_INCLUDE_PATH=`$PKG_CONFIG --variable=includedir Qt5Core`/QtGui/${QT_VERSION}/QtGui
>         AS_IF([test -f "$PKG_CONFIG_SYSROOT_DIR/$QPA_INCLUDE_PATH/qpa/qplatformnativeinterface.h"], [

 This seems wrong. The includedir variable should already contain
PKG_CONFIG_SYSROOT_DIR, so if you prepend it again, it will never work... I
think this needs to be patched upstream.

 Regards,
 Arnout

>           QT_CFLAGS="$QT_CFLAGS -I$PKG_CONFIG_SYSROOT_DIR/$QPA_INCLUDE_PATH"
>           HAVE_QT_QPA_HEADER="yes"
>         ], [AC_MSG_NOTICE([Cannot find QPA])])

-- 
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] RFC: gst1-plugins-good 1.14: enable-qt config option
  2018-03-28 14:22 ` Martin Kepplinger
  2018-03-30  7:19   ` Martin Kepplinger
@ 2018-03-30 19:09   ` Arnout Vandecappelle
  1 sibling, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2018-03-30 19:09 UTC (permalink / raw)
  To: buildroot



On 28-03-18 16:22, Martin Kepplinger wrote:
> TL;DR so far: How to configure in gstreamer-gl-1.0 ? see below.
> 
> On 2018-03-27 10:57, Martin Kepplinger wrote:
>> So the goal here is to optionally get gst1-plugins-good's qt module to
>> be built (and have the qmlglsink gstreamer element) with Qt and eglfs
>> platform.
[snip]
> So HAVE_QT_WINDOWING is never set to yes, which means
> GST_GL_HAVE_PLATFORM_EGL is not set to 1 :(
> 
> Well, this is set to 1, if the following string contains "egl":
>  GST_GL_PLATFORMS=`$PKG_CONFIG --variable=gl_platforms gstreamer-gl-1.0`
> 
> So I indeed also find:
> 
> checking for GST_GL... no
> 
> configure: Package gstreamer-gl-1.0 was not found in the pkg-config
> search path.
> Perhaps you should add the directory containing `gstreamer-gl-1.0.pc'
> 
> to the PKG_CONFIG_PATH environment variable
> 
> Package 'gstreamer-gl-1.0', required by 'world', not found
> 
> 
> So: How can I build this gstreamer-gl-1.0 library?
> https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gl.html

 I don't have good internet access now to check, but my guess is that there is a
(new?) --enable-gl option in gst1-plugins-base that we should add.

 Regards,
 Arnout

-- 
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

end of thread, other threads:[~2018-03-30 19:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-27  8:57 [Buildroot] RFC: gst1-plugins-good 1.14: enable-qt config option Martin Kepplinger
2018-03-28 14:22 ` Martin Kepplinger
2018-03-30  7:19   ` Martin Kepplinger
2018-03-30 19:09   ` Arnout Vandecappelle
2018-03-30 18:18 ` Arnout Vandecappelle

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.