How to use glTexDirectVIVMap in Qt APP?

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use glTexDirectVIVMap in Qt APP?

381 Views
kenjigan
Contributor I

My board is I.Mx6Q sabread. Find this document that introduce a tool that can handle fullHD (1080p) at 60FPS

My goal is to use glTexDirectVIVMap function in QT app like this:
...
glBindTexture (GL_TEXTURE_2D, textures[0]);
/* Physical and Virtual addresses */
glTexDirectVIVMap(GL_TEXTURE_2D, width, height, GL_VIV_NV12,
&buffers[buf.index].start, &(buffers[buf.index].offset));
glTexDirectInvalidateVIV(GL_TEXTURE_2D);
...

  1. What I have already done:
    build meta-freescale and it succeeded http://freescale.github.io/#download
    PATH=${PATH}:~/bin
    mkdir fsl-community-bsp
    cd fsl-community-bsp
    repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b rocko
    repo sync
  2. Use these command to start QtCreator
    cd /home/fsl-release-bsp/build/tmp/deploy/sdk/
    source /opt/fsl-imx-fb/3.14.52-1.1.1/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
    cd /opt/Qt5.7.0/Tools/QtCreator/
    bin/qtcreator
  3. Add these in .pro (using qmake)
    INCLUDEPATH += /home/fsl-release-bsp/build_qt5/tmp/sysroots/imx6qsabresd/usr/include \
    /home/fsl-gstreamer-imx/build/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/gettext/0.19.8.1-r0/build/gettext-tools/gnulib-lib \
    /home/fsl-gstreamer-imx/build/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/gettext/0.19.8.1-r0/gettext-0.19.8.1/gnulib-local/lib \
    /home/fsl-gstreamer-imx/build/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/gstreamer1.0/1.12.2-r0/build/ \
    /home/fsl-gstreamer-imx/build/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/glib-2.0/1_2.52.3-r0/glib-2.52.3/glib \
    /home/fsl-gstreamer-imx/build/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/glib-2.0/1_2.52.3-r0/glib-2.52.3/ \
    /home/fsl-gstreamer-imx/build/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/gstreamer1.0/1.12.2-r0/gstreamer-1.12.2/ \
    /home/fsl-gstreamer-imx/build/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/gstreamer1.0/1.12.2-r0/gstreamer-1.12.2/libs/gst/base \
    /home//fsl-gstreamer-imx/build/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/gstreamer1.0/1.12.2-r0/gstreamer-1.12.2/libs/ \
    /home/fsl-gstreamer-imx/build/tmp/work/armv7at2hf-neon-mx6qdl-fslc-linux-gnueabi/gstreamer1.0-plugins-base/1.12.2-r0/gst-plugins-base-1.12.2/gst-libs/ \
    /home/fsl-gstreamer-imx/build/tmp/work/armv7at2hf-neon-mx6qdl-fslc-linux-gnueabi/gstreamer1.0-plugins-base/1.12.2-r0/gst-plugins-base-1.12.2/gst-libs/gst/video \
    /home/fsl-gstreamer-imx/build/tmp/work/armv7at2hf-neon-mx6qdl-fslc-linux-gnueabi/gstreamer1.0-plugins-base/1.12.2-r0/build/gst-libs/ \
    /home/fsl-gstreamer-imx/build/tmp/work/imx6qdlsabresd-fslc-linux-gnueabi/gstreamer1.0-plugins-imx/0.13.0-r0/git/src/eglvivsink

    LIBS += /home/fsl-gstreamer-imx/build/tmp/work/imx6qdlsabresd-fslc-linux-gnueabi/gstreamer1.0-plugins-imx/0.13.0-r0/git/build/src/eglvivsink/libgstimxeglvivsink.so
    QMAKE_LIBS += -lgstbase-1.0 -lgstvideo-1.0
  4. Create a kit
    Device type: Generic Linux Device
    Sysroot: /opt/fsl-imx-fb/3.14.52-1.1.1/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi
    Compiler: /opt/fsl-imx-fb/3.14.52-1.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
    Debugger: /opt/fsl-imx-fb/3.14.52-1.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb
    Qt version: Qt 5.5.1 /opt/fsl-imx-fb/3.14.52-1.1.1/sysroots/x86_64-pokysdk-linux/usr/bin/qt5/qmake
  5. Including header
    #include "gst/video/gstvideometa.h"
    #include "gst/gst.h"
    #include "gl_headers.h"
    #include "gst/video/video.h"

When I build the project it show a lots of error, these are part of it:

/home/fsl-gstreamer-imx/build/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/glib-2.0/1_2.52.3-r0/glib-2.52.3/gobject/gtype.h:685: error: 'GLIB_DEPRECATED_IN_2_36' does not name a type
GLIB_DEPRECATED_IN_2_36
^
/home/fsl-gstreamer-imx/build/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/glib-2.0/1_2.52.3-r0/glib-2.52.3/gobject/gtype.h:687: error: 'GLIB_DEPRECATED_IN_2_36' does not name a type
GLIB_DEPRECATED_IN_2_36
^
/home/fsl-gstreamer-imx/build/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/glib-2.0/1_2.52.3-r0/glib-2.52.3/gobject/gtype.h:689: error: 'GLIB_AVAILABLE_IN_ALL' does not name a type
GLIB_AVAILABLE_IN_ALL
^
/home/fsl-gstreamer-imx/build/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/glib-2.0/1_2.52.3-r0/glib-2.52.3/gobject/gtype.h:691: error: 'GLIB_AVAILABLE_IN_ALL' does not name a type
GLIB_AVAILABLE_IN_ALL
^
/home/fsl-gstreamer-imx/build/tmp/work/armv7at2hf-neon-fslc-linux-gnueabi/glib-2.0/1_2.52.3-r0/glib-2.52.3/gobject/gtype.h:693: error: 'GLIB_AVAILABLE_IN_ALL' does not name a type
GLIB_AVAILABLE_IN_ALL
^
How to fix these error? Or what did I do wrong?

Labels (2)
0 Kudos
1 Reply

140 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Kenji

one can try with nxp official bsps from Code Aurora git repositories  repository,

for example please check i.MX_Graphics_User's_Guide.pdf, i.MX_Yocto_Project_User's_Guide.pdf

included in linux documentation:

https://www.nxp.com/webapp/Download?colCode=L4.9.88_2.0.0_LINUX_DOCS&Parent_nodeId=13376994810717061... 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos