summaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-plugins-base-fix-meson-build-in-nxp-fork.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-plugins-base-fix-meson-build-in-nxp-fork.patch')
-rw-r--r--recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-plugins-base-fix-meson-build-in-nxp-fork.patch220
1 files changed, 0 insertions, 220 deletions
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-plugins-base-fix-meson-build-in-nxp-fork.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-plugins-base-fix-meson-build-in-nxp-fork.patch
deleted file mode 100644
index da152531..00000000
--- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstreamer-plugins-base-fix-meson-build-in-nxp-fork.patch
+++ /dev/null
@@ -1,220 +0,0 @@
1From def285f623bc30b9d1acede00393188e693cc741 Mon Sep 17 00:00:00 2001
2From: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
3Date: Sat, 22 Feb 2020 13:22:57 +0000
4Subject: [PATCH] gstreamer-plugins-base: fix meson build in nxp fork
5
6- Add missing IMX header file into istall target;
7- Allocator's meta data files are missing in meson.build, bring them back;
8- Add ION NXP-specific allocator to meson.build;
9- Introduce additional configuration option to pass extra include paths,
10 which are required to build ION allocator;
11- Some video sources are missing, bring them also into the build;
12
13Upstream-Status: Pending
14
15Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
16---
17 gst-libs/gst/allocators/meson.build | 30 +++++++++++++++++++++++++++--
18 gst-libs/gst/gl/gstglconfig.h.meson | 2 ++
19 gst-libs/gst/gl/meson.build | 20 +++++++++++++++++++
20 gst-libs/gst/meson.build | 6 ++++++
21 gst-libs/gst/video/meson.build | 11 +++++++++++
22 meson.build | 3 +++
23 meson_options.txt | 4 ++++
24 7 files changed, 74 insertions(+), 2 deletions(-)
25
26diff --git a/gst-libs/gst/allocators/meson.build b/gst-libs/gst/allocators/meson.build
27index 364baeebf..30b1495c9 100644
28--- a/gst-libs/gst/allocators/meson.build
29+++ b/gst-libs/gst/allocators/meson.build
30@@ -5,18 +5,44 @@ gst_allocators_headers = [
31 'gstphysmemory.h',
32 'gstdmabuf.h',
33 ]
34+
35+imx_gst_allocators_headers = [
36+ 'gstphymemmeta.h',
37+ 'gstdmabufmeta.h',
38+ 'gstallocatorphymem.h',
39+]
40+
41+if cc.has_header('linux/ion.h', include_directories : imx_includes)
42+ imx_gst_allocators_headers += [
43+ 'gstionmemory.h',
44+ ]
45+endif
46+
47+gst_allocators_headers += imx_gst_allocators_headers
48+
49 install_headers(gst_allocators_headers, subdir : 'gstreamer-1.0/gst/allocators/')
50
51 gst_allocators_sources = [ 'gstdmabuf.c', 'gstfdmemory.c', 'gstphysmemory.c']
52+
53+imx_gst_allocators_sources = ['gstdmabufmeta.c', 'gstphymemmeta.c', 'gstallocatorphymem.c']
54+
55+if cc.has_header('linux/ion.h', include_directories : imx_includes)
56+ imx_gst_allocators_sources += [
57+ 'gstionmemory.c',
58+ ]
59+endif
60+
61+gst_allocators_sources += imx_gst_allocators_sources
62+
63 gstallocators = library('gstallocators-@0@'.format(api_version),
64 gst_allocators_sources,
65 c_args : gst_plugins_base_args + ['-DBUILDING_GST_ALLOCATORS'],
66- include_directories: [configinc, libsinc],
67+ include_directories: [configinc, libsinc, imx_includes],
68 version : libversion,
69 soversion : soversion,
70 darwin_versions : osxversion,
71 install : true,
72- dependencies : [gst_dep],
73+ dependencies : [video_dep, gst_dep],
74 )
75
76 allocators_gen_sources = []
77diff --git a/gst-libs/gst/gl/gstglconfig.h.meson b/gst-libs/gst/gl/gstglconfig.h.meson
78index 11795c16c..66cd54a7e 100644
79--- a/gst-libs/gst/gl/gstglconfig.h.meson
80+++ b/gst-libs/gst/gl/gstglconfig.h.meson
81@@ -32,8 +32,10 @@ G_BEGIN_DECLS
82 #mesondefine GST_GL_HAVE_PLATFORM_CGL
83 #mesondefine GST_GL_HAVE_PLATFORM_EAGL
84
85+#mesondefine GST_GL_HAVE_IONDMA
86 #mesondefine GST_GL_HAVE_DMABUF
87 #mesondefine GST_GL_HAVE_VIV_DIRECTVIV
88+#mesondefine GST_GL_HAVE_PHYMEM
89
90 #mesondefine GST_GL_HAVE_GLEGLIMAGEOES
91 #mesondefine GST_GL_HAVE_GLCHAR
92diff --git a/gst-libs/gst/gl/meson.build b/gst-libs/gst/gl/meson.build
93index 0e0ba1b7d..6f6c6866d 100644
94--- a/gst-libs/gst/gl/meson.build
95+++ b/gst-libs/gst/gl/meson.build
96@@ -123,8 +123,10 @@ glconf_options = [
97 'GST_GL_HAVE_PLATFORM_CGL',
98 'GST_GL_HAVE_PLATFORM_EAGL',
99
100+ 'GST_GL_HAVE_IONDMA',
101 'GST_GL_HAVE_DMABUF',
102 'GST_GL_HAVE_VIV_DIRECTVIV',
103+ 'GST_GL_HAVE_PHYMEM',
104
105 'GST_GL_HAVE_GLEGLIMAGEOES',
106 'GST_GL_HAVE_GLCHAR',
107@@ -146,6 +148,18 @@ if unneeded_dep.found()
108 error ('Found unfindable dependency')
109 endif
110
111+if cc.has_header('linux/ion.h', include_directories : imx_includes)
112+ glconf.set10('GST_GL_HAVE_IONDMA', 1)
113+ gl_sources += [
114+ 'gstglmemorydma.c',
115+ ]
116+ gl_headers += [
117+ 'gstglmemorydma.h',
118+ ]
119+else
120+ error('i.MX platform requires ION support to be enabled!')
121+endif
122+
123 # OpenGL/GLES2 libraries
124 gl_lib_deps = []
125 # GL platform - EGL, GLX, CGL, WGL, etc
126@@ -501,6 +515,7 @@ if need_platform_egl != 'no'
127 glconf.set10('GST_GL_HAVE_DMABUF', 1)
128 endif
129
130+
131 egl_includes = '''
132 #include <EGL/egl.h>
133 #include <EGL/eglext.h>
134@@ -808,9 +823,14 @@ if need_platform_egl != 'no' and need_win_viv_fb != 'no'
135 enabled_gl_winsys += 'viv-fb'
136 glconf.set10('GST_GL_HAVE_WINDOW_VIV_FB', 1)
137 glconf.set10('GST_GL_HAVE_VIV_DIRECTVIV', 1)
138+ glconf.set10('GST_GL_HAVE_PHYMEM', 1)
139 gl_sources += [
140 'viv-fb/gstgldisplay_viv_fb.c',
141 'viv-fb/gstglwindow_viv_fb_egl.c',
142+ 'gstglphymemory.c',
143+ ]
144+ gl_headers += [
145+ 'gstglphymemory.h',
146 ]
147 gl_cpp_args += ['-DEGL_API_FB']
148 endif
149diff --git a/gst-libs/gst/meson.build b/gst-libs/gst/meson.build
150index cd3b5b043..1935f46e5 100644
151--- a/gst-libs/gst/meson.build
152+++ b/gst-libs/gst/meson.build
153@@ -11,3 +11,9 @@ subdir('app')
154 subdir('allocators')
155 # FIXME: gl deps are automagic
156 subdir('gl')
157+
158+# Install dangling imx header, required by other plugins
159+gst_imx_header = [
160+ 'gstimxcommon.h',
161+]
162+install_headers(gst_imx_header, subdir : 'gstreamer-1.0/')
163diff --git a/gst-libs/gst/video/meson.build b/gst-libs/gst/video/meson.build
164index b4dfcdf65..d8531f199 100644
165--- a/gst-libs/gst/video/meson.build
166+++ b/gst-libs/gst/video/meson.build
167@@ -35,6 +35,11 @@ video_sources = [
168 'videooverlay.c',
169 ]
170
171+imx_video_sources = [
172+ 'gstvideohdr10meta.c',
173+]
174+video_sources += imx_video_sources
175+
176 video_headers = [
177 'colorbalance.h',
178 'colorbalancechannel.h',
179@@ -70,6 +75,12 @@ video_headers = [
180 'video-overlay-composition.h',
181 'video-multiview.h',
182 ]
183+
184+imx_video_headers = [
185+ 'gstvideohdr10meta.h',
186+]
187+video_headers += imx_video_headers
188+
189 install_headers(video_headers, subdir : 'gstreamer-1.0/gst/video/')
190
191 video_mkenum_headers = [
192diff --git a/meson.build b/meson.build
193index 2fca28205..7781934cd 100644
194--- a/meson.build
195+++ b/meson.build
196@@ -103,6 +103,9 @@ if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev)
197 add_project_arguments('-DG_DISABLE_CHECKS', language: 'c')
198 endif
199
200+# Define i.MX-specific include path as variable from options
201+imx_includes = include_directories(get_option('extra_imx_incdir'))
202+
203 check_headers = [
204 ['HAVE_DLFCN_H', 'dlfcn.h'],
205 ['HAVE_EMMINTRIN_H', 'emmintrin.h'],
206diff --git a/meson_options.txt b/meson_options.txt
207index e7af4dd45..d44401ca6 100644
208--- a/meson_options.txt
209+++ b/meson_options.txt
210@@ -85,3 +85,7 @@ option('package-name', type : 'string', yield : true,
211 description : 'package name to use in plugins')
212 option('package-origin', type : 'string', value : 'Unknown package origin', yield : true,
213 description : 'package origin URL to use in plugins')
214+
215+# NXP specific options
216+option('extra_imx_incdir', type : 'string', yield : true, description : 'i.MX specific header include path')
217+
218--
2192.17.1
220