gstreamer1.0-plugins-base_1.18.1.bb 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. require gstreamer1.0-plugins-common.inc
  2. LICENSE = "GPLv2+ & LGPLv2+"
  3. LIC_FILES_CHKSUM = "file://COPYING;md5=6762ed442b3822387a51c92d928ead0d"
  4. SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-${PV}.tar.xz \
  5. file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \
  6. file://0003-viv-fb-Make-sure-config.h-is-included.patch \
  7. file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \
  8. file://0004-glimagesink-Downrank-to-marginal.patch \
  9. "
  10. SRC_URI[sha256sum] = "1ba654d7de30f7284b4c7071b32f881b609733ce02ab6d9d9ea29386a036c641"
  11. S = "${WORKDIR}/gst-plugins-base-${PV}"
  12. DEPENDS += "iso-codes util-linux zlib"
  13. inherit gobject-introspection
  14. PACKAGES_DYNAMIC =+ "^libgst.*"
  15. # opengl packageconfig factored out to make it easy for distros
  16. # and BSP layers to choose OpenGL APIs/platforms/window systems
  17. PACKAGECONFIG_GL ?= "${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
  18. PACKAGECONFIG ??= " \
  19. ${GSTREAMER_ORC} \
  20. ${PACKAGECONFIG_GL} \
  21. ${@bb.utils.filter('DISTRO_FEATURES', 'alsa x11', d)} \
  22. jpeg ogg pango png theora vorbis \
  23. ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland egl', '', d)} \
  24. "
  25. OPENGL_APIS = 'opengl gles2'
  26. OPENGL_PLATFORMS = 'egl'
  27. X11DEPENDS = "virtual/libx11 libsm libxrender libxv"
  28. X11ENABLEOPTS = "-Dx11=enabled -Dxvideo=enabled -Dxshm=enabled"
  29. X11DISABLEOPTS = "-Dx11=disabled -Dxvideo=disabled -Dxshm=disabled"
  30. PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib"
  31. PACKAGECONFIG[cdparanoia] = "-Dcdparanoia=enabled,-Dcdparanoia=disabled,cdparanoia"
  32. PACKAGECONFIG[jpeg] = "-Dgl-jpeg=enabled,-Dgl-jpeg=disabled,jpeg"
  33. PACKAGECONFIG[ogg] = "-Dogg=enabled,-Dogg=disabled,libogg"
  34. PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus"
  35. PACKAGECONFIG[pango] = "-Dpango=enabled,-Dpango=disabled,pango"
  36. PACKAGECONFIG[png] = "-Dgl-png=enabled,-Dgl-png=disabled,libpng"
  37. PACKAGECONFIG[theora] = "-Dtheora=enabled,-Dtheora=disabled,libtheora"
  38. PACKAGECONFIG[tremor] = "-Dtremor=enabled,-Dtremor=disabled,tremor"
  39. PACKAGECONFIG[visual] = "-Dlibvisual=enabled,-Dlibvisual=disabled,libvisual"
  40. PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis"
  41. PACKAGECONFIG[x11] = "${X11ENABLEOPTS},${X11DISABLEOPTS},${X11DEPENDS}"
  42. # OpenGL API packageconfigs
  43. PACKAGECONFIG[opengl] = ",,virtual/libgl libglu"
  44. PACKAGECONFIG[gles2] = ",,virtual/libgles2"
  45. # OpenGL platform packageconfigs
  46. PACKAGECONFIG[egl] = ",,virtual/egl"
  47. # OpenGL window systems (except for X11)
  48. PACKAGECONFIG[gbm] = ",,virtual/libgbm libgudev libdrm"
  49. PACKAGECONFIG[wayland] = ",,wayland-native wayland wayland-protocols libdrm"
  50. PACKAGECONFIG[dispmanx] = ",,virtual/libomxil"
  51. OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'x11', ' x11', '', d)}"
  52. OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'gbm', ' gbm', '', d)}"
  53. OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'wayland', ' wayland', '', d)}"
  54. OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'dispmanx', ' dispmanx', '', d)}"
  55. OPENGL_WINSYS_append = "${@bb.utils.contains('PACKAGECONFIG', 'egl', ' egl', '', d)}"
  56. EXTRA_OEMESON += " \
  57. -Ddoc=disabled \
  58. -Dgl-graphene=disabled \
  59. ${@get_opengl_cmdline_list('gl_api', d.getVar('OPENGL_APIS'), d)} \
  60. ${@get_opengl_cmdline_list('gl_platform', d.getVar('OPENGL_PLATFORMS'), d)} \
  61. ${@get_opengl_cmdline_list('gl_winsys', d.getVar('OPENGL_WINSYS'), d)} \
  62. "
  63. FILES_${PN}-dev += "${libdir}/gstreamer-1.0/include/gst/gl/gstglconfig.h"
  64. FILES_${MLPREFIX}libgsttag-1.0 += "${datadir}/gst-plugins-base/1.0/license-translations.dict"
  65. def get_opengl_cmdline_list(switch_name, options, d):
  66. selected_options = []
  67. if bb.utils.contains('DISTRO_FEATURES', 'opengl', True, False, d):
  68. for option in options.split():
  69. if bb.utils.contains('PACKAGECONFIG', option, True, False, d):
  70. selected_options += [option]
  71. if selected_options:
  72. return '-D' + switch_name + '=' + ','.join(selected_options)
  73. else:
  74. return ''