blob: 9b9be0d32653353d884fcab5a741d5a66857e7ec [file] [log] [blame]
Andrew Geissler9aee5002022-03-30 16:27:02 +00001require gstreamer1.0-plugins-common.inc
2
3DESCRIPTION = "'Base' GStreamer plugins and helper libraries"
4HOMEPAGE = "https://gstreamer.freedesktop.org/"
5BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/issues"
6LICENSE = "LGPL-2.1-or-later"
7LIC_FILES_CHKSUM = "file://COPYING;md5=69333daa044cb77e486cc36129f7a770"
8
9SRC_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 "
14SRC_URI[sha256sum] = "96d8a6413ba9394fbec1217aeef63741a729d476a505a797c1d5337d8fa7c204"
15
16S = "${WORKDIR}/gst-plugins-base-${PV}"
17
18DEPENDS += "iso-codes util-linux zlib"
19
20inherit gobject-introspection
21
22# opengl packageconfig factored out to make it easy for distros
23# and BSP layers to choose OpenGL APIs/platforms/window systems
24PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
25
26PACKAGECONFIG ??= " \
27 ${GSTREAMER_ORC} \
28 ${PACKAGECONFIG_GL} \
29 ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
30 jpeg ogg pango png theora vorbis \
31 ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
32"
33
34OPENGL_APIS = 'opengl gles2'
35OPENGL_PLATFORMS = 'egl'
36
37X11DEPENDS = "virtual/libx11 libsm libxrender libxv"
38X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled"
39X11DISABLEOPTS = "-Dx11=disabled -Dxvideo=disabled -Dxshm=disabled"
40
41PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib"
42PACKAGECONFIG[cdparanoia] = "-Dcdparanoia=enabled,-Dcdparanoia=disabled,cdparanoia"
43PACKAGECONFIG[graphene] = "-Dgl-graphene=enabled,-Dgl-graphene=disabled,graphene"
44PACKAGECONFIG[jpeg] = "-Dgl-jpeg=enabled,-Dgl-jpeg=disabled,jpeg"
45PACKAGECONFIG[ogg] = "-Dogg=enabled,-Dogg=disabled,libogg"
46PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus"
47PACKAGECONFIG[pango] = "-Dpango=enabled,-Dpango=disabled,pango"
48PACKAGECONFIG[png] = "-Dgl-png=enabled,-Dgl-png=disabled,libpng"
49PACKAGECONFIG[qt5] = "-Dqt5=enabled,-Dqt5=disabled,qtbase qtdeclarative qtbase-native"
50PACKAGECONFIG[theora] = "-Dtheora=enabled,-Dtheora=disabled,libtheora"
51PACKAGECONFIG[tremor] = "-Dtremor=enabled,-Dtremor=disabled,tremor"
52PACKAGECONFIG[visual] = "-Dlibvisual=enabled,-Dlibvisual=disabled,libvisual"
53PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis"
54PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
55
56# OpenGL API packageconfigs
57PACKAGECONFIG[opengl] = ",,virtual/libgl libglu"
58PACKAGECONFIG[gles2] = ",,virtual/libgles2"
59
60# OpenGL platform packageconfigs
61PACKAGECONFIG[egl] = ",,virtual/egl"
62
63# OpenGL window systems (except for X11)
64PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm"
65PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm"
66PACKAGECONFIG[dispmanx] = ",,virtual/libomxil"
67PACKAGECONFIG[viv-fb] = ",,virtual/libgles2 virtual/libg2d"
68
69OPENGL_WINSYS = "${@bb.utils.filter('PACKAGECONFIG', 'x11 gbm wayland dispmanx egl viv-fb', d)}"
70
71EXTRA_OEMESON += " \
72 -Ddoc=disabled \
73 ${@get_opengl_cmdline_list('gl_api', d.getVar('OPENGL_APIS'), d)} \
74 ${@get_opengl_cmdline_list('gl_platform', d.getVar('OPENGL_PLATFORMS'), d)} \
75 ${@get_opengl_cmdline_list('gl_winsys', d.getVar('OPENGL_WINSYS'), d)} \
76"
77
78FILES:${PN}-dev += "${libdir}/gstreamer-1.0/include/gst/gl/gstglconfig.h"
79FILES:${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
80
81def get_opengl_cmdline_list(switch_name, options, d):
82 selected_options = []
83 if bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d):
84 for option in options.split():
85 if bb.utils.contains('PACKAGECONFIG', option, True, False, d):
86 selected_options += [option]
87 if selected_options:
88 return '-D' + switch_name + '=' + ','.join(selected_options)
89 else:
90 return ''
91
92CVE_PRODUCT += "gst-plugins-base"