blob: 728a99e08b4df9423dfd4aee431f812e0d24566b [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001require gstreamer1.0-plugins-common.inc
2
Andrew Geissler90fd73c2021-03-05 15:25:55 -06003DESCRIPTION = "'Base' GStreamer plugins and helper libraries"
4HOMEPAGE = "https://gstreamer.freedesktop.org/"
5BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues"
Andrew Geissler82c905d2020-04-13 13:39:40 -05006LICENSE = "GPLv2+ & LGPLv2+"
Andrew Geissler6ce62a22020-11-30 19:58:47 -06007LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
Andrew Geissler82c905d2020-04-13 13:39:40 -05008
Andrew Geissler6ce62a22020-11-30 19:58:47 -06009SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \
10 file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \
11 file://0003-viv-fb-Make-sure-config.h-is-included.patch \
12 file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \
13 file://0004-glimagesink-Downrank-to-marginal.patch \
14 "
Andrew Geissler95ac1b82021-03-31 14:34:31 -050015SRC_URI[sha256sum] = "29e53229a84d01d722f6f6db13087231cdf6113dd85c25746b9b58c3d68e8323"
Andrew Geissler82c905d2020-04-13 13:39:40 -050016
17S = "${WORKDIR}/gst-plugins-base-${PV}"
18
19DEPENDS += "iso-codes util-linux zlib"
20
Andrew Geissler6ce62a22020-11-30 19:58:47 -060021inherit gobject-introspection
Andrew Geissler82c905d2020-04-13 13:39:40 -050022
23PACKAGES_DYNAMIC =+ "^libgst.*"
24
25# opengl packageconfig factored out to make it easy for distros
26# and BSP layers to choose OpenGL APIs/platforms/window systems
27PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
28
29PACKAGECONFIG ??= " \
30 ${GSTREAMER_ORC} \
31 ${PACKAGECONFIG_GL} \
32 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
33 jpeg ogg pango png theora vorbis \
34 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
35"
36
37OPENGL_APIS = 'opengl gles2'
38OPENGL_PLATFORMS = 'egl'
39
40X11DEPENDS = "virtual/libx11 libsm libxrender libxv"
41X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled"
42X11DISABLEOPTS = "-Dx11=disabled -Dxvideo=disabled -Dxshm=disabled"
43
44PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib"
45PACKAGECONFIG[cdparanoia] = "-Dcdparanoia=enabled,-Dcdparanoia=disabled,cdparanoia"
46PACKAGECONFIG[jpeg] = "-Dgl-jpeg=enabled,-Dgl-jpeg=disabled,jpeg"
47PACKAGECONFIG[ogg] = "-Dogg=enabled,-Dogg=disabled,libogg"
48PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus"
49PACKAGECONFIG[pango] = "-Dpango=enabled,-Dpango=disabled,pango"
50PACKAGECONFIG[png] = "-Dgl-png=enabled,-Dgl-png=disabled,libpng"
51PACKAGECONFIG[theora] = "-Dtheora=enabled,-Dtheora=disabled,libtheora"
52PACKAGECONFIG[tremor] = "-Dtremor=enabled,-Dtremor=disabled,tremor"
53PACKAGECONFIG[visual] = "-Dlibvisual=enabled,-Dlibvisual=disabled,libvisual"
54PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis"
55PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
56
57# OpenGL API packageconfigs
58PACKAGECONFIG[opengl] = ",,virtual/libgl libglu"
59PACKAGECONFIG[gles2] = ",,virtual/libgles2"
60
61# OpenGL platform packageconfigs
62PACKAGECONFIG[egl] = ",,virtual/egl"
63
64# OpenGL window systems (except for X11)
65PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm"
66PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm"
67PACKAGECONFIG[dispmanx] = ",,virtual/libomxil"
68
69OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'x11', ' x11', '', d)}"
70OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'gbm', ' gbm', '', d)}"
71OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'wayland', ' wayland', '', d)}"
72OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'dispmanx', ' dispmanx', '', d)}"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060073OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'egl', ' egl', '', d)}"
Andrew Geissler82c905d2020-04-13 13:39:40 -050074
75EXTRA_OEMESON += " \
Andrew Geissler6ce62a22020-11-30 19:58:47 -060076 -Ddoc=disabled \
Andrew Geissler82c905d2020-04-13 13:39:40 -050077 -Dgl-graphene=disabled \
78 ${@get_opengl_cmdline_list('gl_api', d.getVar('OPENGL_APIS'), d)} \
79 ${@get_opengl_cmdline_list('gl_platform', d.getVar('OPENGL_PLATFORMS'), d)} \
80 ${@get_opengl_cmdline_list('gl_winsys', d.getVar('OPENGL_WINSYS'), d)} \
81"
82
Andrew Geissler82c905d2020-04-13 13:39:40 -050083FILES_${PN}-dev += "${libdir}/gstreamer-1.0/include/gst/gl/gstglconfig.h"
84FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
85
86def get_opengl_cmdline_list(switch_name, options, d):
87 selected_options = []
88 if bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d):
89 for option in options.split():
90 if bb.utils.contains('PACKAGECONFIG', option, True, False, d):
91 selected_options += [option]
92 if selected_options:
93 return '-D' + switch_name + '=' + ','.join(selected_options)
94 else:
95 return ''
Andrew Geissler6ce62a22020-11-30 19:58:47 -060096
97CVE_PRODUCT += "gst-plugins-base"