diff options
Diffstat (limited to 'recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.3.imx.bb')
-rw-r--r-- | recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.3.imx.bb | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.3.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.3.imx.bb new file mode 100644 index 00000000..d365699f --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.3.imx.bb | |||
@@ -0,0 +1,146 @@ | |||
1 | # This recipe is for the i.MX fork of gstreamer1.0-plugins-base. For ease of | ||
2 | # maintenance, the top section is a verbatim copy of an OE-core | ||
3 | # recipe. The second section customizes the recipe for i.MX. | ||
4 | |||
5 | ########### OE-core copy ################## | ||
6 | # Upstream hash: a21649109374fde44cf77de845cfb3cb6cbfb138 | ||
7 | |||
8 | require recipes-multimedia/gstreamer/gstreamer1.0-plugins-common.inc | ||
9 | |||
10 | DESCRIPTION = "'Base' GStreamer plugins and helper libraries" | ||
11 | HOMEPAGE = "https://gstreamer.freedesktop.org/" | ||
12 | BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues" | ||
13 | LICENSE = "LGPL-2.1-or-later" | ||
14 | LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770" | ||
15 | |||
16 | SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \ | ||
17 | file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \ | ||
18 | file://0003-viv-fb-Make-sure-config.h-is-included.patch \ | ||
19 | file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \ | ||
20 | " | ||
21 | SRC_URI[sha256sum] = "96d8a6413ba9394fbec1217aeef63741a729d476a505a797c1d5337d8fa7c204" | ||
22 | |||
23 | S = "${WORKDIR}/gst-plugins-base-${PV}" | ||
24 | |||
25 | DEPENDS += "iso-codes util-linux zlib" | ||
26 | |||
27 | inherit gobject-introspection | ||
28 | |||
29 | PACKAGES_DYNAMIC =+ "^libgst.*" | ||
30 | |||
31 | # opengl packageconfig factored out to make it easy for distros | ||
32 | # and BSP layers to choose OpenGL APIs/platforms/window systems | ||
33 | PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}" | ||
34 | |||
35 | PACKAGECONFIG ??= " \ | ||
36 | ${GSTREAMER_ORC} \ | ||
37 | ${PACKAGECONFIG_GL} \ | ||
38 | ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \ | ||
39 | jpeg ogg pango png theora vorbis \ | ||
40 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \ | ||
41 | " | ||
42 | |||
43 | OPENGL_APIS = 'opengl gles2' | ||
44 | OPENGL_PLATFORMS = 'egl' | ||
45 | |||
46 | X11DEPENDS = "virtual/libx11 libsm libxrender libxv" | ||
47 | X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled" | ||
48 | X11DISABLEOPTS = "-Dx11=disabled -Dxvideo=disabled -Dxshm=disabled" | ||
49 | |||
50 | PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib" | ||
51 | PACKAGECONFIG[cdparanoia] = "-Dcdparanoia=enabled,-Dcdparanoia=disabled,cdparanoia" | ||
52 | PACKAGECONFIG[graphene] = "-Dgl-graphene=enabled,-Dgl-graphene=disabled,graphene" | ||
53 | PACKAGECONFIG[jpeg] = "-Dgl-jpeg=enabled,-Dgl-jpeg=disabled,jpeg" | ||
54 | PACKAGECONFIG[ogg] = "-Dogg=enabled,-Dogg=disabled,libogg" | ||
55 | PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus" | ||
56 | PACKAGECONFIG[pango] = "-Dpango=enabled,-Dpango=disabled,pango" | ||
57 | PACKAGECONFIG[png] = "-Dgl-png=enabled,-Dgl-png=disabled,libpng" | ||
58 | PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native" | ||
59 | PACKAGECONFIG[theora] = "-Dtheora=enabled,-Dtheora=disabled,libtheora" | ||
60 | PACKAGECONFIG[tremor] = "-Dtremor=enabled,-Dtremor=disabled,tremor" | ||
61 | PACKAGECONFIG[visual] = "-Dlibvisual=enabled,-Dlibvisual=disabled,libvisual" | ||
62 | PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis" | ||
63 | PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}" | ||
64 | |||
65 | # OpenGL API packageconfigs | ||
66 | PACKAGECONFIG[opengl] = ",,virtual/libgl libglu" | ||
67 | PACKAGECONFIG[gles2] = ",,virtual/libgles2" | ||
68 | |||
69 | # OpenGL platform packageconfigs | ||
70 | PACKAGECONFIG[egl] = ",,virtual/egl" | ||
71 | |||
72 | # OpenGL window systems (except for X11) | ||
73 | PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm" | ||
74 | PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm" | ||
75 | PACKAGECONFIG[dispmanx] = ",,virtual/libomxil" | ||
76 | PACKAGECONFIG[viv-fb] = ",,virtual/libgles2 virtual/libg2d" | ||
77 | |||
78 | OPENGL_WINSYS = "${@bb.utils.filter('PACKAGECONFIG', 'x11 gbm wayland dispmanx egl viv-fb', d)}" | ||
79 | |||
80 | EXTRA_OEMESON += " \ | ||
81 | -Ddoc=disabled \ | ||
82 | ${@get_opengl_cmdline_list('gl_api', d.getVar('OPENGL_APIS'), d)} \ | ||
83 | ${@get_opengl_cmdline_list('gl_platform', d.getVar('OPENGL_PLATFORMS'), d)} \ | ||
84 | ${@get_opengl_cmdline_list('gl_winsys', d.getVar('OPENGL_WINSYS'), d)} \ | ||
85 | " | ||
86 | |||
87 | FILES:${PN}-dev += "${libdir}/gstreamer-1.0/include/gst/gl/gstglconfig.h" | ||
88 | FILES:${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict" | ||
89 | |||
90 | def get_opengl_cmdline_list(switch_name, options, d): | ||
91 | selected_options = [] | ||
92 | if bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d): | ||
93 | for option in options.split(): | ||
94 | if bb.utils.contains('PACKAGECONFIG', option, True, False, d): | ||
95 | selected_options += [option] | ||
96 | if selected_options: | ||
97 | return '-D' + switch_name + '=' + ','.join(selected_options) | ||
98 | else: | ||
99 | return '' | ||
100 | |||
101 | CVE_PRODUCT += "gst-plugins-base" | ||
102 | |||
103 | ########### End of OE-core copy ########### | ||
104 | |||
105 | ########### i.MX overrides ################ | ||
106 | |||
107 | DEFAULT_PREFERENCE = "-1" | ||
108 | |||
109 | SRC_URI:remove = " \ | ||
110 | https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \ | ||
111 | file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \ | ||
112 | file://0003-viv-fb-Make-sure-config.h-is-included.patch \ | ||
113 | file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch" | ||
114 | SRC_URI:prepend = "${GST1.0-PLUGINS-BASE_SRC};branch=${SRCBRANCH} " | ||
115 | SRC_URI += "file://0001-gstallocatorphymem.c-Typecast-result-of-gst_phymem_g.patch" | ||
116 | GST1.0-PLUGINS-BASE_SRC ?= "gitsm://github.com/nxp-imx/gst-plugins-base.git;protocol=https" | ||
117 | SRCBRANCH = "MM_04.07.02_2210_L5.15.y" | ||
118 | SRCREV = "cbf542ce3e0bad1009d5ecf72707e870c375c3f0" | ||
119 | |||
120 | S = "${WORKDIR}/git" | ||
121 | |||
122 | inherit use-imx-headers | ||
123 | |||
124 | PACKAGECONFIG_GL:imxgpu2d = \ | ||
125 | "${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'opengl viv-fb', '', d)}" | ||
126 | PACKAGECONFIG_GL:imxgpu3d = \ | ||
127 | "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl viv-fb', '', d)}" | ||
128 | PACKAGECONFIG_GL:use-mainline-bsp = \ | ||
129 | "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl gbm', '', d)}" | ||
130 | |||
131 | PACKAGECONFIG_REMOVE ?= "jpeg" | ||
132 | PACKAGECONFIG:remove = "${PACKAGECONFIG_REMOVE}" | ||
133 | PACKAGECONFIG:append:imxgpu2d = " g2d" | ||
134 | |||
135 | PACKAGECONFIG[g2d] = ",,virtual/libg2d" | ||
136 | PACKAGECONFIG[viv-fb] = ",,virtual/libgles2" | ||
137 | |||
138 | EXTRA_OEMESON += "-Dc_args="${CFLAGS} -I${STAGING_INCDIR_IMX}"" | ||
139 | |||
140 | # links with imx-gpu libs which are pre-built for glibc | ||
141 | # gcompat will address it during runtime | ||
142 | LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined" | ||
143 | |||
144 | COMPATIBLE_MACHINE = "(imx-nxp-bsp)" | ||
145 | |||
146 | ########### End of i.MX overrides ######### | ||