diff options
| author | Wenlin Kang <wenlin.kang@windriver.com> | 2016-09-18 13:55:18 +0800 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2016-10-26 11:10:03 +0200 |
| commit | 3a8679417f205d1134989e7baafe239aafe3f1bc (patch) | |
| tree | cece1d32f620556f6d3991881520f974fc8dfdb3 /recipes-qt | |
| parent | 7a58995591f7612fec8ea6b6171eefffb75b6960 (diff) | |
| download | meta-qt5-3a8679417f205d1134989e7baafe239aafe3f1bc.tar.gz | |
qtmultimedia: fix conflicting declaration error
The error info is as the follow:
| In file included from /.../sysroots/fsl-imx6/usr/include/qt5/QtGui/qopengl.h:123:0,
| from /.../sysroots/fsl-imx6/usr/include/qt5/QtGui/qopenglshaderprogram.h:41,
| from /.../sysroots/fsl-imx6/usr/include/qt5/QtQuick/qsgmaterial.h:38,
| from /.../sysroots/fsl-imx6/usr/include/qt5/QtQuick/QSGMaterial:1,
| from /.../qtmultimedia/5.5.1+gitAUTOINC+0cf41ef53f-r0/git/src/plugins/videonode/imx6/qsgvivantevideomaterial.h:40,
| from /.../qtmultimedia/5.5.1+gitAUTOINC+0cf41ef53f-r0/git/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp:37:
| /.../sysroots/fsl-imx6/usr/include/qt5/QtGui/qopenglext.h:474:19: error: conflicting declaration 'typedef ptrdiff_t GLsizeiptr'
| typedef ptrdiff_t GLsizeiptr;
| ^
| In file included from /.../qtmultimedia/5.5.1+gitAUTOINC+0cf41ef53f-r0/git/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp:34:0:
| /.../sysroots/fsl-imx6/usr/include/GLES2/gl2.h:67:25: note: previous declaration as 'typedef khronos_ssize_t GLsizeiptr'
| typedef khronos_ssize_t GLsizeiptr;
| ^
| In file included from /.../sysroots/fsl-imx6/usr/include/qt5/QtGui/qopengl.h:123:0,
| from /.../sysroots/fsl-imx6/usr/include/qt5/QtGui/qopenglshaderprogram.h:41,
| from /.../sysroots/fsl-imx6/usr/include/qt5/QtQuick/qsgmaterial.h:38,
| from /.../sysroots/fsl-imx6/usr/include/qt5/QtQuick/QSGMaterial:1,
| from /.../qtmultimedia/5.5.1+gitAUTOINC+0cf41ef53f-r0/git/src/plugins/videonode/imx6/qsgvivantevideomaterial.h:40,
| from /.../qtmultimedia/5.5.1+gitAUTOINC+0cf41ef53f-r0/git/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp:37:
| /.../sysroots/fsl-imx6/usr/include/qt5/QtGui/qopenglext.h:475:19: error: conflicting declaration 'typedef ptrdiff_t GLintptr'
| typedef ptrdiff_t GLintptr;
| ^
| In file included from /.../qtmultimedia/5.5.1+gitAUTOINC+0cf41ef53f-r0/git/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp:34:0:
| /.../sysroots/fsl-imx6/usr/include/GLES2/gl2.h:68:26: note: previous declaration as 'typedef khronos_intptr_t GLintptr'
| typedef khronos_intptr_t GLintptr;
| ^
Here, use lgl2.h instead of gl2.h and gl2ext.h,
fix the "conflicting declaration" error.
Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes-qt')
| -rw-r--r-- | recipes-qt/qt5/qtmultimedia/0001-qtmultimedia-fix-a-conflicting-declaration.patch | 103 | ||||
| -rw-r--r-- | recipes-qt/qt5/qtmultimedia_git.bb | 1 |
2 files changed, 104 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtmultimedia/0001-qtmultimedia-fix-a-conflicting-declaration.patch b/recipes-qt/qt5/qtmultimedia/0001-qtmultimedia-fix-a-conflicting-declaration.patch new file mode 100644 index 00000000..8547f72a --- /dev/null +++ b/recipes-qt/qt5/qtmultimedia/0001-qtmultimedia-fix-a-conflicting-declaration.patch | |||
| @@ -0,0 +1,103 @@ | |||
| 1 | From 849355a1c59d76fa39dc93b537458a084190fa45 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Wenlin Kang <wenlin.kang@windriver.com> | ||
| 3 | Date: Thu, 8 Sep 2016 12:18:13 +0800 | ||
| 4 | Subject: [PATCH] qtmultimedia: fix a conflicting declaration | ||
| 5 | |||
| 6 | Use lgl2.h instead of gl2.h and gl2ext.h, | ||
| 7 | fix a "conflicting declaration" error. | ||
| 8 | |||
| 9 | Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com> | ||
| 10 | --- | ||
| 11 | src/plugins/videonode/imx6/lgl2.h | 46 ++++++++++++++++++++++ | ||
| 12 | .../videonode/imx6/qsgvivantevideomaterial.cpp | 5 ++- | ||
| 13 | src/plugins/videonode/imx6/qsgvivantevideonode.cpp | 5 ++- | ||
| 14 | 3 files changed, 52 insertions(+), 4 deletions(-) | ||
| 15 | create mode 100644 src/plugins/videonode/imx6/lgl2.h | ||
| 16 | |||
| 17 | diff --git a/src/plugins/videonode/imx6/lgl2.h b/src/plugins/videonode/imx6/lgl2.h | ||
| 18 | new file mode 100644 | ||
| 19 | index 0000000..2423697 | ||
| 20 | --- /dev/null | ||
| 21 | +++ b/src/plugins/videonode/imx6/lgl2.h | ||
| 22 | @@ -0,0 +1,46 @@ | ||
| 23 | +#ifndef __L_GL2_H__ | ||
| 24 | +#define __L_GL2_H__ | ||
| 25 | + | ||
| 26 | +// this file comes from <GLES2/gl2.h> and <GLES2/gl2ext.h>, | ||
| 27 | +// it's a light gl2.h. | ||
| 28 | + | ||
| 29 | +/*------------------------------------------------------------------------- | ||
| 30 | + * Definition of KHRONOS_APIENTRY | ||
| 31 | + *------------------------------------------------------------------------- | ||
| 32 | + * This follows the return type of the function and precedes the function | ||
| 33 | + * name in the function prototype. | ||
| 34 | + */ | ||
| 35 | +#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) | ||
| 36 | + /* Win32 but not WinCE */ | ||
| 37 | +# define KHRONOS_APIENTRY __stdcall | ||
| 38 | +#else | ||
| 39 | +# define KHRONOS_APIENTRY | ||
| 40 | +#endif | ||
| 41 | + | ||
| 42 | +#ifndef GL_APIENTRY | ||
| 43 | +# define GL_APIENTRY KHRONOS_APIENTRY | ||
| 44 | +#endif | ||
| 45 | + | ||
| 46 | +#ifndef GL_APIENTRYP | ||
| 47 | +# define GL_APIENTRYP GL_APIENTRY* | ||
| 48 | +#endif | ||
| 49 | + | ||
| 50 | +typedef void GLvoid; | ||
| 51 | +typedef unsigned int GLenum; | ||
| 52 | +typedef unsigned int GLuint; | ||
| 53 | +typedef int GLsizei; | ||
| 54 | + | ||
| 55 | +#define GL_VIV_YV12 0x8FC0 | ||
| 56 | +#define GL_VIV_NV12 0x8FC1 | ||
| 57 | +#define GL_VIV_YUY2 0x8FC2 | ||
| 58 | +#define GL_VIV_UYVY 0x8FC3 | ||
| 59 | +#define GL_VIV_NV21 0x8FC4 | ||
| 60 | +#define GL_VIV_I420 0x8FC5 | ||
| 61 | + | ||
| 62 | +typedef void (GL_APIENTRYP PFNGLTEXDIRECTVIVMAPPROC) (GLenum Target, GLsizei Width, GLsizei Height, GLenum Format, GLvoid ** Logical, const GLuint * Physical); | ||
| 63 | +typedef void (GL_APIENTRYP PFNGLTEXDIRECTMAPVIVPROC) (GLenum Target, GLsizei Width, GLsizei Height, GLenum Format, GLvoid ** Logical, const GLuint * Physical); | ||
| 64 | +typedef void (GL_APIENTRYP PFNGLTEXDIRECTVIVPROC) (GLenum Target, GLsizei Width, GLsizei Height, GLenum Format, GLvoid ** Pixels); | ||
| 65 | +typedef void (GL_APIENTRYP PFNGLTEXDIRECTINVALIDATEVIVPROC) (GLenum Target); | ||
| 66 | +typedef void (GL_APIENTRYP PFNGLTEXDIRECTTILEDMAPVIVPROC) (GLenum Target, GLsizei Width, GLsizei Height, GLenum Format, GLvoid ** Logical, const GLuint * Physical); | ||
| 67 | + | ||
| 68 | +#endif | ||
| 69 | diff --git a/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp b/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp | ||
| 70 | index 2e2092b..54568db 100644 | ||
| 71 | --- a/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp | ||
| 72 | +++ b/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp | ||
| 73 | @@ -31,8 +31,9 @@ | ||
| 74 | ** | ||
| 75 | ****************************************************************************/ | ||
| 76 | |||
| 77 | -#include <GLES2/gl2.h> | ||
| 78 | -#include <GLES2/gl2ext.h> | ||
| 79 | +// use lgl2.h instead of <GLES2/gl2.h> and <GLES2/gl2ext.h>, | ||
| 80 | +// fixes a conflicting declaration issue. | ||
| 81 | +#include "lgl2.h" | ||
| 82 | |||
| 83 | #include "qsgvivantevideomaterial.h" | ||
| 84 | #include "qsgvivantevideomaterialshader.h" | ||
| 85 | diff --git a/src/plugins/videonode/imx6/qsgvivantevideonode.cpp b/src/plugins/videonode/imx6/qsgvivantevideonode.cpp | ||
| 86 | index 229a69b..184fd12 100644 | ||
| 87 | --- a/src/plugins/videonode/imx6/qsgvivantevideonode.cpp | ||
| 88 | +++ b/src/plugins/videonode/imx6/qsgvivantevideonode.cpp | ||
| 89 | @@ -31,8 +31,9 @@ | ||
| 90 | ** | ||
| 91 | ****************************************************************************/ | ||
| 92 | |||
| 93 | -#include <GLES2/gl2.h> | ||
| 94 | -#include <GLES2/gl2ext.h> | ||
| 95 | +// use lgl2.h instead of <GLES2/gl2.h> and <GLES2/gl2ext.h>, | ||
| 96 | +// fixes a conflicting declaration issue. | ||
| 97 | +#include "lgl2.h" | ||
| 98 | |||
| 99 | #include "qsgvivantevideonode.h" | ||
| 100 | #include "qsgvivantevideomaterialshader.h" | ||
| 101 | -- | ||
| 102 | 1.9.1 | ||
| 103 | |||
diff --git a/recipes-qt/qt5/qtmultimedia_git.bb b/recipes-qt/qt5/qtmultimedia_git.bb index 3bbfb6e0..245f1063 100644 --- a/recipes-qt/qt5/qtmultimedia_git.bb +++ b/recipes-qt/qt5/qtmultimedia_git.bb | |||
| @@ -36,6 +36,7 @@ EXTRA_QMAKEVARS_PRE += "${@bb.utils.contains_any('PACKAGECONFIG', 'gstreamer gst | |||
| 36 | 36 | ||
| 37 | SRC_URI += "\ | 37 | SRC_URI += "\ |
| 38 | file://0001-Initial-porting-effort-to-GStreamer-1.0.patch \ | 38 | file://0001-Initial-porting-effort-to-GStreamer-1.0.patch \ |
| 39 | file://0001-qtmultimedia-fix-a-conflicting-declaration.patch \ | ||
| 39 | " | 40 | " |
| 40 | 41 | ||
| 41 | SRCREV = "1be4f74843b41f8bc1d1d64e83485f4eb864e8b4" | 42 | SRCREV = "1be4f74843b41f8bc1d1d64e83485f4eb864e8b4" |
