blob: 180241828fe42d6a08b0c9f8daa3d026e4de4985 [file] [log] [blame]
Andrew Geisslereff27472021-10-29 15:35:00 -05001require 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 = "GPLv2+ & LGPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
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 file://0004-glimagesink-Downrank-to-marginal.patch \
14 "
15SRC_URI[sha256sum] = "960b7af4585700db0fdd5b843554e11e2564fed9e061f591fae88a7be6446fa3"
16
17S = "${WORKDIR}/gst-plugins-base-${PV}"
18
19DEPENDS += "iso-codes util-linux zlib"
20
21inherit gobject-introspection
22
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"
Andrew Geissler595f6302022-01-24 19:11:47 +000046PACKAGECONFIG[graphene] = "-Dgl-graphene=enabled,-Dgl-graphene=disabled,graphene"
Andrew Geisslereff27472021-10-29 15:35:00 -050047PACKAGECONFIG[jpeg] = "-Dgl-jpeg=enabled,-Dgl-jpeg=disabled,jpeg"
48PACKAGECONFIG[ogg] = "-Dogg=enabled,-Dogg=disabled,libogg"
49PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus"
50PACKAGECONFIG[pango] = "-Dpango=enabled,-Dpango=disabled,pango"
51PACKAGECONFIG[png] = "-Dgl-png=enabled,-Dgl-png=disabled,libpng"
52PACKAGECONFIG[theora] = "-Dtheora=enabled,-Dtheora=disabled,libtheora"
53PACKAGECONFIG[tremor] = "-Dtremor=enabled,-Dtremor=disabled,tremor"
54PACKAGECONFIG[visual] = "-Dlibvisual=enabled,-Dlibvisual=disabled,libvisual"
55PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis"
56PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
57
58# OpenGL API packageconfigs
59PACKAGECONFIG[opengl] = ",,virtual/libgl libglu"
60PACKAGECONFIG[gles2] = ",,virtual/libgles2"
61
62# OpenGL platform packageconfigs
63PACKAGECONFIG[egl] = ",,virtual/egl"
64
65# OpenGL window systems (except for X11)
66PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm"
67PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm"
68PACKAGECONFIG[dispmanx] = ",,virtual/libomxil"
69PACKAGECONFIG[viv-fb] = ",,virtual/libgles2 virtual/libg2d"
70
71OPENGL_WINSYS = "${@bb.utils.filter('PACKAGECONFIG', 'x11 gbm wayland dispmanx egl viv-fb', d)}"
72
73EXTRA_OEMESON += " \
74 -Ddoc=disabled \
Andrew Geisslereff27472021-10-29 15:35:00 -050075 ${@get_opengl_cmdline_list('gl_api', d.getVar('OPENGL_APIS'), d)} \
76 ${@get_opengl_cmdline_list('gl_platform', d.getVar('OPENGL_PLATFORMS'), d)} \
77 ${@get_opengl_cmdline_list('gl_winsys', d.getVar('OPENGL_WINSYS'), d)} \
78"
79
80FILES:${PN}-dev += "${libdir}/gstreamer-1.0/include/gst/gl/gstglconfig.h"
81FILES:${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
82
83def get_opengl_cmdline_list(switch_name, options, d):
84 selected_options = []
85 if bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d):
86 for option in options.split():
87 if bb.utils.contains('PACKAGECONFIG', option, True, False, d):
88 selected_options += [option]
89 if selected_options:
90 return '-D' + switch_name + '=' + ','.join(selected_options)
91 else:
92 return ''
93
94CVE_PRODUCT += "gst-plugins-base"