xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.20.5.bb (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1require gstreamer1.0-plugins-common.inc
2require gstreamer1.0-plugins-license.inc
3
4DESCRIPTION = "'Bad' GStreamer plugins and helper libraries "
5HOMEPAGE = "https://gstreamer.freedesktop.org/"
6BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues"
7
8SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-${PV}.tar.xz \
9           file://0001-fix-maybe-uninitialized-warnings-when-compiling-with.patch \
10           file://0002-avoid-including-sys-poll.h-directly.patch \
11           file://0003-ensure-valid-sentinals-for-gst_structure_get-etc.patch \
12           file://0004-opencv-resolve-missing-opencv-data-dir-in-yocto-buil.patch \
13           "
14SRC_URI[sha256sum] = "f431214b0754d7037adcde93c3195106196588973e5b32dcb24938805f866363"
15
16S = "${WORKDIR}/gst-plugins-bad-${PV}"
17
18LICENSE = "LGPL-2.1-or-later & GPL-2.0-or-later"
19LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
20
21DEPENDS += "gstreamer1.0-plugins-base"
22
23inherit gobject-introspection
24
25PACKAGECONFIG ??= " \
26    ${GSTREAMER_ORC} \
27    ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \
28    ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan x11', d)} \
29    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \
30    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \
31    bz2 closedcaption curl dash dtls hls openssl sbc smoothstreaming \
32    sndfile ttml uvch264 webp \
33    ${@bb.utils.contains('TUNE_FEATURES', 'mx32', '', 'rsvg', d)} \
34"
35
36PACKAGECONFIG[aom]             = "-Daom=enabled,-Daom=disabled,aom"
37PACKAGECONFIG[assrender]       = "-Dassrender=enabled,-Dassrender=disabled,libass"
38PACKAGECONFIG[bluez]           = "-Dbluez=enabled,-Dbluez=disabled,bluez5"
39PACKAGECONFIG[bz2]             = "-Dbz2=enabled,-Dbz2=disabled,bzip2"
40PACKAGECONFIG[closedcaption]   = "-Dclosedcaption=enabled,-Dclosedcaption=disabled,pango cairo"
41PACKAGECONFIG[curl]            = "-Dcurl=enabled,-Dcurl=disabled,curl"
42PACKAGECONFIG[dash]            = "-Ddash=enabled,-Ddash=disabled,libxml2"
43PACKAGECONFIG[dc1394]          = "-Ddc1394=enabled,-Ddc1394=disabled,libdc1394"
44PACKAGECONFIG[directfb]        = "-Ddirectfb=enabled,-Ddirectfb=disabled,directfb"
45PACKAGECONFIG[dtls]            = "-Ddtls=enabled,-Ddtls=disabled,openssl"
46PACKAGECONFIG[faac]            = "-Dfaac=enabled,-Dfaac=disabled,faac"
47PACKAGECONFIG[faad]            = "-Dfaad=enabled,-Dfaad=disabled,faad2"
48PACKAGECONFIG[fluidsynth]      = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth"
49PACKAGECONFIG[hls]             = "-Dhls=enabled,-Dhls=disabled,"
50# Pick atleast one crypto backend below when enabling hls
51PACKAGECONFIG[nettle]          = "-Dhls-crypto=nettle,,nettle"
52PACKAGECONFIG[openssl]         = "-Dhls-crypto=openssl,,openssl"
53PACKAGECONFIG[gcrypt]          = "-Dhls-crypto=libgcrypt,,libgcrypt"
54# the gl packageconfig enables OpenGL elements that haven't been ported
55# to -base yet. They depend on the gstgl library in -base, so we do
56# not add GL dependencies here, since these are taken care of in -base.
57PACKAGECONFIG[gl]              = "-Dgl=enabled,-Dgl=disabled,"
58PACKAGECONFIG[kms]             = "-Dkms=enabled,-Dkms=disabled,libdrm"
59PACKAGECONFIG[libde265]        = "-Dlibde265=enabled,-Dlibde265=disabled,libde265"
60PACKAGECONFIG[libssh2]         = "-Dcurl-ssh2=enabled,-Dcurl-ssh2=disabled,libssh2"
61PACKAGECONFIG[lcms2]           = "-Dcolormanagement=enabled,-Dcolormanagement=disabled,lcms"
62PACKAGECONFIG[modplug]         = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug"
63PACKAGECONFIG[msdk]            = "-Dmsdk=enabled,-Dmsdk=disabled,intel-mediasdk"
64PACKAGECONFIG[neon]            = "-Dneon=enabled,-Dneon=disabled,neon"
65PACKAGECONFIG[openal]          = "-Dopenal=enabled,-Dopenal=disabled,openal-soft"
66PACKAGECONFIG[opencv]          = "-Dopencv=enabled,-Dopencv=disabled,opencv"
67PACKAGECONFIG[openh264]        = "-Dopenh264=enabled,-Dopenh264=disabled,openh264"
68PACKAGECONFIG[openjpeg]        = "-Dopenjpeg=enabled,-Dopenjpeg=disabled,openjpeg"
69PACKAGECONFIG[openmpt]         = "-Dopenmpt=enabled,-Dopenmpt=disabled,libopenmpt"
70# the opus encoder/decoder elements are now in the -base package,
71# but the opus parser remains in -bad
72PACKAGECONFIG[opusparse]       = "-Dopus=enabled,-Dopus=disabled,libopus"
73PACKAGECONFIG[resindvd]        = "-Dresindvd=enabled,-Dresindvd=disabled,libdvdread libdvdnav"
74PACKAGECONFIG[rsvg]            = "-Drsvg=enabled,-Drsvg=disabled,librsvg"
75PACKAGECONFIG[rtmp]            = "-Drtmp=enabled,-Drtmp=disabled,rtmpdump"
76PACKAGECONFIG[sbc]             = "-Dsbc=enabled,-Dsbc=disabled,sbc"
77PACKAGECONFIG[sctp]            = "-Dsctp=enabled,-Dsctp=disabled"
78PACKAGECONFIG[smoothstreaming] = "-Dsmoothstreaming=enabled,-Dsmoothstreaming=disabled,libxml2"
79PACKAGECONFIG[sndfile]         = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1"
80PACKAGECONFIG[srt]             = "-Dsrt=enabled,-Dsrt=disabled,srt"
81PACKAGECONFIG[srtp]            = "-Dsrtp=enabled,-Dsrtp=disabled,libsrtp"
82PACKAGECONFIG[tinyalsa]        = "-Dtinyalsa=enabled,-Dtinyalsa=disabled,tinyalsa"
83PACKAGECONFIG[ttml]            = "-Dttml=enabled,-Dttml=disabled,libxml2 pango cairo"
84PACKAGECONFIG[uvch264]         = "-Duvch264=enabled,-Duvch264=disabled,libusb1 libgudev"
85# this enables support for stateless V4L2 mem2mem codecs, which is a newer form of
86# V4L2 codec; the V4L2 code in -base supports the older stateful V4L2 mem2mem codecs
87PACKAGECONFIG[v4l2codecs]      = "-Dv4l2codecs=enabled,-Dv4l2codecs=disabled,libgudev"
88PACKAGECONFIG[va]              = "-Dva=enabled,-Dva=disabled,libva"
89PACKAGECONFIG[voaacenc]        = "-Dvoaacenc=enabled,-Dvoaacenc=disabled,vo-aacenc"
90PACKAGECONFIG[voamrwbenc]      = "-Dvoamrwbenc=enabled,-Dvoamrwbenc=disabled,vo-amrwbenc"
91PACKAGECONFIG[vulkan]          = "-Dvulkan=enabled,-Dvulkan=disabled,vulkan-loader shaderc-native"
92PACKAGECONFIG[wayland]         = "-Dwayland=enabled,-Dwayland=disabled,wayland-native wayland wayland-protocols libdrm"
93PACKAGECONFIG[webp]            = "-Dwebp=enabled,-Dwebp=disabled,libwebp"
94PACKAGECONFIG[webrtc]          = "-Dwebrtc=enabled,-Dwebrtc=disabled,libnice"
95PACKAGECONFIG[webrtcdsp]       = "-Dwebrtcdsp=enabled,-Dwebrtcdsp=disabled,webrtc-audio-processing"
96PACKAGECONFIG[zbar]            = "-Dzbar=enabled,-Dzbar=disabled,zbar"
97PACKAGECONFIG[x11]             = "-Dx11=enabled,-Dx11=disabled,libxcb libxkbcommon"
98PACKAGECONFIG[x265]            = "-Dx265=enabled,-Dx265=disabled,x265"
99
100GSTREAMER_GPL = "${@bb.utils.filter('PACKAGECONFIG', 'faad resindvd x265', d)}"
101
102EXTRA_OEMESON += " \
103    -Ddoc=disabled \
104    -Daes=enabled \
105    -Dcodecalpha=enabled \
106    -Ddecklink=enabled \
107    -Ddvb=enabled \
108    -Dfbdev=enabled \
109    -Dipcpipeline=enabled \
110    -Dshm=enabled \
111    -Dtranscode=enabled \
112    -Dandroidmedia=disabled \
113    -Dapplemedia=disabled \
114    -Dasio=disabled \
115    -Davtp=disabled \
116    -Dbs2b=disabled \
117    -Dchromaprint=disabled \
118    -Dd3dvideosink=disabled \
119    -Dd3d11=disabled \
120    -Ddirectsound=disabled \
121    -Ddts=disabled \
122    -Dfdkaac=disabled \
123    -Dflite=disabled \
124    -Dgme=disabled \
125    -Dgs=disabled \
126    -Dgsm=disabled \
127    -Diqa=disabled \
128    -Dkate=disabled \
129    -Dladspa=disabled \
130    -Dldac=disabled \
131    -Dlv2=disabled \
132    -Dmagicleap=disabled \
133    -Dmediafoundation=disabled \
134    -Dmicrodns=disabled \
135    -Dmpeg2enc=disabled \
136    -Dmplex=disabled \
137    -Dmusepack=disabled \
138    -Dnvcodec=disabled \
139    -Dopenexr=disabled \
140    -Dopenni2=disabled \
141    -Dopenaptx=disabled \
142    -Dopensles=disabled \
143    -Donnx=disabled \
144    -Dqroverlay=disabled \
145    -Dsoundtouch=disabled \
146    -Dspandsp=disabled \
147    -Dsvthevcenc=disabled \
148    -Dteletext=disabled \
149    -Dwasapi=disabled \
150    -Dwasapi2=disabled \
151    -Dwildmidi=disabled \
152    -Dwinks=disabled \
153    -Dwinscreencap=disabled \
154    -Dwpe=disabled \
155    -Dzxing=disabled \
156"
157
158export OPENCV_PREFIX = "${STAGING_DIR_TARGET}${prefix}"
159
160ARM_INSTRUCTION_SET:armv4 = "arm"
161ARM_INSTRUCTION_SET:armv5 = "arm"
162
163FILES:${PN}-freeverb += "${datadir}/gstreamer-1.0/presets/GstFreeverb.prs"
164FILES:${PN}-opencv += "${datadir}/gst-plugins-bad/1.0/opencv*"
165FILES:${PN}-transcode += "${datadir}/gstreamer-1.0/encoding-profiles"
166FILES:${PN}-voamrwbenc += "${datadir}/gstreamer-1.0/presets/GstVoAmrwbEnc.prs"
167