From: Daniel Golle Date: Tue, 5 Nov 2024 03:30:01 +0000 (+0000) Subject: gst1-plugins-base: build OpenGL library and plugin X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b854cb5f0cb13f7d7abdb99eb37b8e2bb698b5ea;p=feed%2Fpackages.git gst1-plugins-base: build OpenGL library and plugin Requires packages video feed. Signed-off-by: Daniel Golle --- diff --git a/multimedia/gst1-plugins-base/Makefile b/multimedia/gst1-plugins-base/Makefile index 2cc8a8ccb4..2bb41350f9 100644 --- a/multimedia/gst1-plugins-base/Makefile +++ b/multimedia/gst1-plugins-base/Makefile @@ -36,6 +36,7 @@ PKG_CONFIG_DEPENDS:= \ CONFIG_PACKAGE_gst1-mod-playback \ CONFIG_PACKAGE_gst1-mod-gio \ CONFIG_PACKAGE_gst1-mod-ogg \ + CONFIG_PACKAGE_gst1-mod-opengl \ CONFIG_PACKAGE_gst1-mod-opus \ CONFIG_PACKAGE_gst1-mod-tcp \ CONFIG_PACKAGE_gst1-mod-theora \ @@ -95,16 +96,24 @@ define Package/gstreamer1-plugins-base/config comment "Modules" $(foreach mod,$(GST_BASE_MODULES), \ - config PACKAGE_gst1-mod-$(mod) - prompt "GStreamer $(mod) module" + config PACKAGE_gst1-mod-$(firstword $(subst :, ,$(mod))) + prompt "GStreamer $(firstword $(subst :, ,$(mod))) module" + $(if $(wordlist 2,$(words $(subst :, ,$(mod))),$(subst :, ,$(mod))),\ + $(foreach confdep,$(wordlist 2,$(words $(subst :, ,$(mod))),$(subst :, ,$(mod))),\ + depends on $(confdep) + )) ) comment "Libraries" $(foreach lib,$(GST_BASE_LIBS), \ - config PACKAGE_libgst1$(lib) - prompt "GStreamer $(lib) library" + config PACKAGE_libgst1$(firstword $(subst :, ,$(lib))) + prompt "GStreamer $(firstword $(subst :, ,$(lib))) library" + $(if $(wordlist 2,$(words $(subst :, ,$(lib))),$(subst :, ,$(lib))),\ + $(foreach confdep,$(wordlist 2,$(words $(subst :, ,$(lib))),$(subst :, ,$(lib))),\ + depends on $(confdep) + )) ) @@ -118,7 +127,6 @@ GST_VERSION:=1.0 MESON_ARGS += \ -Daudioresample_format=int \ - -Dgl=disabled \ \ $(call GST_COND_SELECT,adder) \ $(call GST_COND_SELECT,app) \ @@ -130,6 +138,7 @@ MESON_ARGS += \ $(call GST_COND_SELECT,compositor) \ $(call GST_COND_SELECT,encoding) \ $(call GST_COND_SELECT,gio) \ + -Dgl=$(if $(CONFIG_PACKAGE_libgst1gl),en,dis)abled \ $(call GST_COND_SELECT,overlaycomposition) \ $(call GST_COND_SELECT,pbtypes) \ $(call GST_COND_SELECT,playback) \ @@ -186,6 +195,14 @@ define Build/InstallDev --target-directory=$(1)/usr/lib/gstreamer-$(GST_VERSION)/ \ ) \ fi + if [ -d $(PKG_INSTALL_DIR)/usr/lib/gstreamer-$(GST_VERSION)/include/gst/gl ]; then \ + $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)/include/gst/gl; \ + ( cd $(PKG_INSTALL_DIR); $(FIND) \ + ./usr/lib/gstreamer-$(GST_VERSION)/include/gst/gl -name *.h -print0 | \ + xargs --null --no-run-if-empty $(CP) \ + --target-directory=$(1)/usr/lib/gstreamer-$(GST_VERSION)/include/gst/gl \ + ) \ + fi $(INSTALL_DIR) $(1)/usr/lib/pkgconfig ( cd $(PKG_INSTALL_DIR); $(CP) \ ./usr/lib/pkgconfig/gstreamer*-$(GST_VERSION).pc \ @@ -210,7 +227,7 @@ define GstBuildLibrary GST_DEPENDS += +libgst1$(1) - GST_BASE_LIBS+= $(1) + GST_BASE_LIBS+= $(1)$(if $(5),:$(subst $(space),:,$(5))) define Package/libgst1$(1) $(call Package/gstreamer1-base/Default) @@ -240,6 +257,7 @@ $(eval $(call GstBuildLibrary,allocators,allocators,,+libdrm)) $(eval $(call GstBuildLibrary,app,app,,)) $(eval $(call GstBuildLibrary,audio,audio,tag,)) $(eval $(call GstBuildLibrary,fft,FFT,,)) +$(eval $(call GstBuildLibrary,gl,gl,allocators video,+libmesa +libwayland +libgudev,HAVE_MESA)) $(eval $(call GstBuildLibrary,pbutils,utils,audio tag video,)) $(eval $(call GstBuildLibrary,riff,RIFF media,audio tag,,)) $(eval $(call GstBuildLibrary,rtp,RTP,,)) @@ -257,7 +275,7 @@ define GstBuildPlugin GST_DEPENDS += +gst1-mod-$(1) - GST_BASE_MODULES+= $(1) + GST_BASE_MODULES+= $(1)$(if $(6),:$(subst $(space),:,$(6))) define Package/gst1-mod-$(1) $(call Package/gstreamer1-base/Default) @@ -293,6 +311,7 @@ $(eval $(call GstBuildPlugin,audiotestsrc,audio test,audio tag controller,,)) $(eval $(call GstBuildPlugin,compositor,video compositor,video,,)) $(eval $(call GstBuildPlugin,encoding,encoding plugin,pbutils video,,)) $(eval $(call GstBuildPlugin,gio,GIO,,,)) +$(eval $(call GstBuildPlugin,opengl,GL,gl controller,,+libgraphene +libjpeg +libpng,HAVE_MESA)) $(eval $(call GstBuildPlugin,overlaycomposition,overlay composition,video,,)) $(eval $(call GstBuildPlugin,pbtypes,pbtypes,video,,)) $(eval $(call GstBuildPlugin,playback,playback,pbutils,,))