blob: 1b2bd4fe149af61eb1eaf673e6e23c3fe3e62c13 [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001require gstreamer1.0-plugins-common.inc
2
3LICENSE = "GPLv2+ & LGPLv2+"
Andrew Geissler6ce62a22020-11-30 19:58:47 -06004LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
Andrew Geissler82c905d2020-04-13 13:39:40 -05005
Andrew Geissler6ce62a22020-11-30 19:58:47 -06006SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \
7 file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \
8 file://0003-viv-fb-Make-sure-config.h-is-included.patch \
9 file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \
10 file://0004-glimagesink-Downrank-to-marginal.patch \
11 "
12SRC_URI[sha256sum] = "1ba654d7de30f7284b4c7071b32f881b609733ce02ab6d9d9ea29386a036c641"
Andrew Geissler82c905d2020-04-13 13:39:40 -050013
14S = "${WORKDIR}/gst-plugins-base-${PV}"
15
16DEPENDS += "iso-codes util-linux zlib"
17
Andrew Geissler6ce62a22020-11-30 19:58:47 -060018inherit gobject-introspection
Andrew Geissler82c905d2020-04-13 13:39:40 -050019
20PACKAGES_DYNAMIC =+ "^libgst.*"
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[jpeg] = "-Dgl-jpeg=enabled,-Dgl-jpeg=disabled,jpeg"
44PACKAGECONFIG[ogg] = "-Dogg=enabled,-Dogg=disabled,libogg"
45PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus"
46PACKAGECONFIG[pango] = "-Dpango=enabled,-Dpango=disabled,pango"
47PACKAGECONFIG[png] = "-Dgl-png=enabled,-Dgl-png=disabled,libpng"
48PACKAGECONFIG[theora] = "-Dtheora=enabled,-Dtheora=disabled,libtheora"
49PACKAGECONFIG[tremor] = "-Dtremor=enabled,-Dtremor=disabled,tremor"
50PACKAGECONFIG[visual] = "-Dlibvisual=enabled,-Dlibvisual=disabled,libvisual"
51PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis"
52PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
53
54# OpenGL API packageconfigs
55PACKAGECONFIG[opengl] = ",,virtual/libgl libglu"
56PACKAGECONFIG[gles2] = ",,virtual/libgles2"
57
58# OpenGL platform packageconfigs
59PACKAGECONFIG[egl] = ",,virtual/egl"
60
61# OpenGL window systems (except for X11)
62PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm"
63PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm"
64PACKAGECONFIG[dispmanx] = ",,virtual/libomxil"
65
66OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'x11', ' x11', '', d)}"
67OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'gbm', ' gbm', '', d)}"
68OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'wayland', ' wayland', '', d)}"
69OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'dispmanx', ' dispmanx', '', d)}"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060070OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'egl', ' egl', '', d)}"
Andrew Geissler82c905d2020-04-13 13:39:40 -050071
72EXTRA_OEMESON += " \
Andrew Geissler6ce62a22020-11-30 19:58:47 -060073 -Ddoc=disabled \
Andrew Geissler82c905d2020-04-13 13:39:40 -050074 -Dgl-graphene=disabled \
75 ${@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
Andrew Geissler82c905d2020-04-13 13:39:40 -050080FILES_${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 ''
Andrew Geissler6ce62a22020-11-30 19:58:47 -060093
94CVE_PRODUCT += "gst-plugins-base"