aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtmultimedia/0001-qtmultimedia-fix-a-conflicting-declaration.patch
blob: 32021118b9cf03d3c85ef6af3a58944f8145d8ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
From ac8c96da1849106b34592bab10459c854140a574 Mon Sep 17 00:00:00 2001
From: Wenlin Kang <wenlin.kang@windriver.com>
Date: Thu, 8 Sep 2016 12:18:13 +0800
Subject: [PATCH] qtmultimedia: fix a conflicting declaration

Use lgl2.h instead of gl2.h and gl2ext.h,
fix a "conflicting declaration" error.

Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com>
---
 src/plugins/videonode/imx6/lgl2.h             | 46 +++++++++++++++++++
 .../imx6/qsgvivantevideomaterial.cpp          |  5 +-
 .../videonode/imx6/qsgvivantevideonode.cpp    |  5 +-
 3 files changed, 52 insertions(+), 4 deletions(-)
 create mode 100644 src/plugins/videonode/imx6/lgl2.h

diff --git a/src/plugins/videonode/imx6/lgl2.h b/src/plugins/videonode/imx6/lgl2.h
new file mode 100644
index 00000000..24236976
--- /dev/null
+++ b/src/plugins/videonode/imx6/lgl2.h
@@ -0,0 +1,46 @@
+#ifndef __L_GL2_H__
+#define __L_GL2_H__
+
+// this file comes from <GLES2/gl2.h> and <GLES2/gl2ext.h>,
+// it's a light gl2.h.
+
+/*-------------------------------------------------------------------------
+ * Definition of KHRONOS_APIENTRY
+ *-------------------------------------------------------------------------
+ * This follows the return type of the function  and precedes the function
+ * name in the function prototype.
+ */
+#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__)
+     /* Win32 but not WinCE */
+#   define KHRONOS_APIENTRY __stdcall
+#else
+#   define KHRONOS_APIENTRY
+#endif
+
+#ifndef GL_APIENTRY
+#   define GL_APIENTRY KHRONOS_APIENTRY
+#endif
+
+#ifndef GL_APIENTRYP
+#   define GL_APIENTRYP GL_APIENTRY*
+#endif
+
+typedef void GLvoid;
+typedef unsigned int GLenum;
+typedef unsigned int GLuint;
+typedef int GLsizei;
+
+#define GL_VIV_YV12                                             0x8FC0
+#define GL_VIV_NV12                                             0x8FC1
+#define GL_VIV_YUY2                                             0x8FC2
+#define GL_VIV_UYVY                                             0x8FC3
+#define GL_VIV_NV21                                             0x8FC4
+#define GL_VIV_I420                                             0x8FC5
+
+typedef void (GL_APIENTRYP PFNGLTEXDIRECTVIVMAPPROC) (GLenum Target, GLsizei Width, GLsizei Height, GLenum Format, GLvoid ** Logical, const GLuint * Physical);
+typedef void (GL_APIENTRYP PFNGLTEXDIRECTMAPVIVPROC) (GLenum Target, GLsizei Width, GLsizei Height, GLenum Format, GLvoid ** Logical, const GLuint * Physical);
+typedef void (GL_APIENTRYP PFNGLTEXDIRECTVIVPROC) (GLenum Target, GLsizei Width, GLsizei Height, GLenum Format, GLvoid ** Pixels);
+typedef void (GL_APIENTRYP PFNGLTEXDIRECTINVALIDATEVIVPROC) (GLenum Target);
+typedef void (GL_APIENTRYP PFNGLTEXDIRECTTILEDMAPVIVPROC) (GLenum Target, GLsizei Width, GLsizei Height, GLenum Format, GLvoid ** Logical, const GLuint * Physical);
+
+#endif
diff --git a/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp b/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp
index e1468fe3..a77a9d6a 100644
--- a/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp
+++ b/src/plugins/videonode/imx6/qsgvivantevideomaterial.cpp
@@ -37,8 +37,9 @@
 **
 ****************************************************************************/
 
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
+// use lgl2.h instead of <GLES2/gl2.h> and <GLES2/gl2ext.h>,
+// fixes a conflicting declaration issue.
+#include "lgl2.h"
 
 #include "qsgvivantevideomaterial.h"
 #include "qsgvivantevideomaterialshader.h"
diff --git a/src/plugins/videonode/imx6/qsgvivantevideonode.cpp b/src/plugins/videonode/imx6/qsgvivantevideonode.cpp
index c8d83b4b..5b1b8f24 100644
--- a/src/plugins/videonode/imx6/qsgvivantevideonode.cpp
+++ b/src/plugins/videonode/imx6/qsgvivantevideonode.cpp
@@ -37,8 +37,9 @@
 **
 ****************************************************************************/
 
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
+// use lgl2.h instead of <GLES2/gl2.h> and <GLES2/gl2ext.h>,
+// fixes a conflicting declaration issue.
+#include "lgl2.h"
 
 #include "qsgvivantevideonode.h"
 #include "qsgvivantevideomaterialshader.h"