Index: MOVED =================================================================== --- MOVED +++ MOVED @@ -17578,3 +17578,4 @@ ftp/axel||2022-09-30|Has expired: Last release in 2009 and dead upstream, please consider using www/aria2 databases/py-bsddb3|databases/py-berkeleydb|2022-09-30|Has expired: Requires upstream EOLd db5. Use py-berkeleydb graphics/megapov|graphics/povray37|2022-10-01|Has expired: Abandoned upstream. graphics/povray37 is the recommended replacement +multimedia/gstreamer1-transcoder|multimedia/gstreamer1-plugins-bad|2022-10-02|Upstream included transcoding in plugins-bad Index: audio/gstreamer1-plugins-a52dec/Makefile =================================================================== --- audio/gstreamer1-plugins-a52dec/Makefile +++ audio/gstreamer1-plugins-a52dec/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer ATSC A/52 stream aka AC-3 (dvd audio) plugin @@ -8,4 +8,10 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +MESON_ARGS+= -Dgpl=enabled + +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= liba52.so:audio/liba52 + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-a52dec/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-a52dec/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgsta52dec.so Index: audio/gstreamer1-plugins-amrnb/Makefile =================================================================== --- audio/gstreamer1-plugins-amrnb/Makefile +++ audio/gstreamer1-plugins-amrnb/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer OpenCore based Adaptive Multi-Rate Narrow-Band plugin @@ -6,6 +6,12 @@ GST_PLUGIN= amrnb DIST= ugly -MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins + +MESON_ARGS+= -Dgpl=enabled + +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libopencore-amrnb.so:audio/opencore-amr .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-amrnb/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-amrnb/pkg-plist @@ -0,0 +1,2 @@ +lib/gstreamer-%%VERSION%%/libgstamrnb.so +%%DATADIR%%-%%VERSION%%/presets/GstAmrnbEnc.prs Index: audio/gstreamer1-plugins-amrwbdec/Makefile =================================================================== --- audio/gstreamer1-plugins-amrwbdec/Makefile +++ audio/gstreamer1-plugins-amrwbdec/Makefile @@ -1,12 +1,18 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio PKGNAMESUFFIX= 1-plugins-amrwbdec COMMENT= GStreamer OpenCore based Adaptive Multi-Rate Wide-Band Decoder plugin -GST_PLUGIN= amrwb +GST_PLUGIN= amrwbdec DIST= ugly -MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins + +MESON_ARGS+= -Dgpl=enabled + +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libopencore-amrwb.so:audio/opencore-amr .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-amrwbdec/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-amrwbdec/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstamrwbdec.so Index: audio/gstreamer1-plugins-bs2b/Makefile =================================================================== --- audio/gstreamer1-plugins-bs2b/Makefile +++ audio/gstreamer1-plugins-bs2b/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer Bauer Stereophonic to Banaural BSP (bs2b) plugin @@ -6,6 +6,12 @@ GST_PLUGIN= bs2b DIST= bad -MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins + +PLIST= ${.CURDIR}/pkg-plist +LIB_DEPENDS= libbs2b.so:audio/libbs2b + +MESON_ARGS+= -Dgpl=enabled .include "${MASTERDIR}/Makefile" + Index: audio/gstreamer1-plugins-bs2b/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-bs2b/pkg-plist @@ -0,0 +1 @@ + lib/gstreamer-%%VERSION%%/libgstbs2b.so Index: audio/gstreamer1-plugins-cdparanoia/Makefile =================================================================== --- audio/gstreamer1-plugins-cdparanoia/Makefile +++ audio/gstreamer1-plugins-cdparanoia/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer CDDA extraction (aka audio ripping) plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libcdda_interface.so:audio/cdparanoia + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-cdparanoia/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-cdparanoia/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstcdparanoia.so Index: audio/gstreamer1-plugins-chromaprint/Makefile =================================================================== --- audio/gstreamer1-plugins-chromaprint/Makefile +++ audio/gstreamer1-plugins-chromaprint/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer audio fingerprint extracting plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libchromaprint.so:audio/chromaprint + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-chromaprint/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-chromaprint/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstchromaprint.so Index: audio/gstreamer1-plugins-faac/Makefile =================================================================== --- audio/gstreamer1-plugins-faac/Makefile +++ audio/gstreamer1-plugins-faac/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer MPEG-2 and MPEG-4 AAC encoder plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libfaac.so:audio/faac + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-faac/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-faac/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstfaac.so Index: audio/gstreamer1-plugins-faad/Makefile =================================================================== --- audio/gstreamer1-plugins-faad/Makefile +++ audio/gstreamer1-plugins-faad/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer MPEG-2 and MPEG-4 AAC decoder plugin @@ -8,4 +8,10 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libfaad.so:audio/faad + +MESON_ARGS+= -Dgpl=enabled + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-faad/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-faad/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstfaad.so Index: audio/gstreamer1-plugins-flac/Makefile =================================================================== --- audio/gstreamer1-plugins-flac/Makefile +++ audio/gstreamer1-plugins-flac/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 3 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer free lossless audio encoder/decoder plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libFLAC.so:audio/flac + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-flac/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-flac/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstflac.so Index: audio/gstreamer1-plugins-flite/Makefile =================================================================== --- audio/gstreamer1-plugins-flite/Makefile +++ audio/gstreamer1-plugins-flite/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer flite run-time speech synthesis engine plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libflite.so:audio/flite + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-flite/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-flite/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstflite.so Index: audio/gstreamer1-plugins-gme/Makefile =================================================================== --- audio/gstreamer1-plugins-gme/Makefile +++ audio/gstreamer1-plugins-gme/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer emulate gaming console sound processors plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libgme.so:audio/libgme + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-gme/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-gme/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstgme.so Index: audio/gstreamer1-plugins-gsm/Makefile =================================================================== --- audio/gstreamer1-plugins-gsm/Makefile +++ audio/gstreamer1-plugins-gsm/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer gsm encoding/decoding plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libgsm.so:audio/gsm + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-gsm/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-gsm/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstgsm.so Index: audio/gstreamer1-plugins-jack/Makefile =================================================================== --- audio/gstreamer1-plugins-jack/Makefile +++ audio/gstreamer1-plugins-jack/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer low-latency audio server plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libjack.so:audio/jack + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-jack/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-jack/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstjack.so Index: audio/gstreamer1-plugins-ladspa/Makefile =================================================================== --- audio/gstreamer1-plugins-ladspa/Makefile +++ audio/gstreamer1-plugins-ladspa/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= Gstreamer ladspa (Linux Audio Developer's Simple Plugin API) plugin @@ -8,4 +8,10 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +BUILD_DEPENDS= ${LOCALBASE}/include/ladspa.h:audio/ladspa + +LIB_DEPENDS= liblrdf.so:textproc/liblrdf + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-ladspa/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-ladspa/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstladspa.so Index: audio/gstreamer1-plugins-lame/Makefile =================================================================== --- audio/gstreamer1-plugins-lame/Makefile +++ audio/gstreamer1-plugins-lame/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer High-quality free mp3 encode plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libmp3lame.so:audio/lame + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-lame/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-lame/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstlame.so Index: audio/gstreamer1-plugins-lv2/Makefile =================================================================== --- audio/gstreamer1-plugins-lv2/Makefile +++ audio/gstreamer1-plugins-lv2/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= Gstreamer lv2 wrapper plugin @@ -8,4 +8,14 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +BUILD_DEPENDS= lv2>=1.14.0:audio/lv2 +LIB_DEPENDS= libsord-0.so:devel/sord \ + libserd-0.so:devel/serd \ + libsratom-0.so:audio/sratom \ + liblilv-0.so:audio/lilv + .include "${MASTERDIR}/Makefile" + +USES+= pkgconfig Index: audio/gstreamer1-plugins-lv2/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-lv2/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstlv2.so Index: audio/gstreamer1-plugins-modplug/Makefile =================================================================== --- audio/gstreamer1-plugins-modplug/Makefile +++ audio/gstreamer1-plugins-modplug/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer module decoder based on modplug egine plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libmodplug.so:audio/libmodplug + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-modplug/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-modplug/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstmodplug.so Index: audio/gstreamer1-plugins-mpg123/Makefile =================================================================== --- audio/gstreamer1-plugins-mpg123/Makefile +++ audio/gstreamer1-plugins-mpg123/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer MPEG Layer 1, 2, and 3 plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libmpg123.so:audio/mpg123 + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-mpg123/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-mpg123/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstmpg123.so Index: audio/gstreamer1-plugins-musepack/Makefile =================================================================== --- audio/gstreamer1-plugins-musepack/Makefile +++ audio/gstreamer1-plugins-musepack/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= Gstreamer musepack mpc encoder/decoder plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS=libmpcdec.so:audio/musepack + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-musepack/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-musepack/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstmusepack.so Index: audio/gstreamer1-plugins-ogg/Makefile =================================================================== --- audio/gstreamer1-plugins-ogg/Makefile +++ audio/gstreamer1-plugins-ogg/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer Ogg bitstream plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libogg.so:audio/libogg + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-ogg/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-ogg/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstogg.so Index: audio/gstreamer1-plugins-openmpt/Makefile =================================================================== --- audio/gstreamer1-plugins-openmpt/Makefile +++ audio/gstreamer1-plugins-openmpt/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 3 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer OpenMPT audio decoder plugin @@ -6,13 +6,10 @@ GST_PLUGIN= openmpt DIST= bad -OPENMPT_GST_DIRS= gst-libs/gst/audio - MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins -pre-build: -.for dir in ${OPENMPT_GST_DIRS} - @(cd ${BUILD_WRKSRC}/${dir}; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}) -.endfor +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libopenmpt.so:audio/libopenmpt .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-openmpt/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-openmpt/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstopenmpt.so Index: audio/gstreamer1-plugins-opus/Makefile =================================================================== --- audio/gstreamer1-plugins-opus/Makefile +++ audio/gstreamer1-plugins-opus/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer Opus audio encoder/decoder plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libopus.so:audio/opus + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-opus/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-opus/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstopus.so Index: audio/gstreamer1-plugins-pulse/Makefile =================================================================== --- audio/gstreamer1-plugins-pulse/Makefile +++ audio/gstreamer1-plugins-pulse/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer pulseaudio plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libpulse.so:audio/pulseaudio + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-pulse/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-pulse/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstpulseaudio.so Index: audio/gstreamer1-plugins-shout2/Makefile =================================================================== --- audio/gstreamer1-plugins-shout2/Makefile +++ audio/gstreamer1-plugins-shout2/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer icecast output plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libshout.so:audio/libshout + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-shout2/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-shout2/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstshout2.so Index: audio/gstreamer1-plugins-sidplay/Makefile =================================================================== --- audio/gstreamer1-plugins-sidplay/Makefile +++ audio/gstreamer1-plugins-sidplay/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer Commodore SID audio decoder plugin @@ -8,4 +8,10 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libsidplay.so:audio/libsidplay + +MESON_ARGS+= -Dgpl=enabled + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-sidplay/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-sidplay/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstsid.so Index: audio/gstreamer1-plugins-sndfile/Makefile =================================================================== --- audio/gstreamer1-plugins-sndfile/Makefile +++ audio/gstreamer1-plugins-sndfile/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 3 +PORTREVISION= 0 CATEGORIES= audio COMMENT= Gstreamer sndfile plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libsndfile.so:audio/libsndfile + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-sndfile/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-sndfile/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstsndfile.so Index: audio/gstreamer1-plugins-soundtouch/Makefile =================================================================== --- audio/gstreamer1-plugins-soundtouch/Makefile +++ audio/gstreamer1-plugins-soundtouch/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 3 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer soundtouch plugin @@ -8,4 +8,7 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist +LIB_DEPENDS= libSoundTouch.so:audio/soundtouch + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-soundtouch/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-soundtouch/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstsoundtouch.so Index: audio/gstreamer1-plugins-speex/Makefile =================================================================== --- audio/gstreamer1-plugins-speex/Makefile +++ audio/gstreamer1-plugins-speex/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer speex voice encode/decode plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libspeex.so:audio/speex + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-speex/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-speex/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstspeex.so Index: audio/gstreamer1-plugins-taglib/Makefile =================================================================== --- audio/gstreamer1-plugins-taglib/Makefile +++ audio/gstreamer1-plugins-taglib/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer taglib plugin for adding APEv2 and ID3v2 headers @@ -11,4 +11,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libtag.so:audio/taglib + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-taglib/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-taglib/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgsttaglib.so Index: audio/gstreamer1-plugins-twolame/Makefile =================================================================== --- audio/gstreamer1-plugins-twolame/Makefile +++ audio/gstreamer1-plugins-twolame/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer High-quality free MP2 encoder plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libtwolame.so:audio/twolame + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-twolame/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-twolame/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgsttwolame.so Index: audio/gstreamer1-plugins-vorbis/Makefile =================================================================== --- audio/gstreamer1-plugins-vorbis/Makefile +++ audio/gstreamer1-plugins-vorbis/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer vorbis encoder/decoder plugin @@ -8,4 +8,9 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +USE_GSTREAMER= ogg +LIB_DEPENDS= libvorbis.so:audio/libvorbis + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-vorbis/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-vorbis/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstvorbis.so Index: audio/gstreamer1-plugins-wavpack/Makefile =================================================================== --- audio/gstreamer1-plugins-wavpack/Makefile +++ audio/gstreamer1-plugins-wavpack/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer wavpack encode/decode plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libwavpack.so:audio/wavpack + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-wavpack/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-wavpack/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstwavpack.so Index: audio/gstreamer1-plugins-webrtcdsp/Makefile =================================================================== --- audio/gstreamer1-plugins-webrtcdsp/Makefile +++ audio/gstreamer1-plugins-webrtcdsp/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 3 +PORTREVISION= 0 CATEGORIES= audio COMMENT= GStreamer WebRTC Audio Processing plugin @@ -10,4 +10,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libwebrtc_audio_processing.so:audio/webrtc-audio-processing0 + .include "${MASTERDIR}/Makefile" Index: audio/gstreamer1-plugins-webrtcdsp/pkg-plist =================================================================== --- /dev/null +++ audio/gstreamer1-plugins-webrtcdsp/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstwebrtcdsp.so Index: comms/gstreamer1-plugins-spandsp/Makefile =================================================================== --- comms/gstreamer1-plugins-spandsp/Makefile +++ comms/gstreamer1-plugins-spandsp/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= comms COMMENT= GStreamer DSP library and software FAX machine plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libspandsp.so:comms/spandsp + .include "${MASTERDIR}/Makefile" Index: comms/gstreamer1-plugins-spandsp/pkg-plist =================================================================== --- /dev/null +++ comms/gstreamer1-plugins-spandsp/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstspandsp.so Index: devel/gstreamer1-plugins-soup/Makefile =================================================================== --- devel/gstreamer1-plugins-soup/Makefile +++ devel/gstreamer1-plugins-soup/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= devel COMMENT= GStreamer soup based http input plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libsoup-2.4.so:devel/libsoup + .include "${MASTERDIR}/Makefile" Index: devel/gstreamer1-plugins-soup/pkg-plist =================================================================== --- /dev/null +++ devel/gstreamer1-plugins-soup/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstsoup.so Index: ftp/gstreamer1-plugins-curl/Makefile =================================================================== --- ftp/gstreamer1-plugins-curl/Makefile +++ ftp/gstreamer1-plugins-curl/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= ftp COMMENT= GStreamer curl based output plugin @@ -8,4 +8,9 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libcurl.so:ftp/curl \ + libssh2.so:security/libssh2 + .include "${MASTERDIR}/Makefile" Index: ftp/gstreamer1-plugins-curl/pkg-plist =================================================================== --- /dev/null +++ ftp/gstreamer1-plugins-curl/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstcurl.so Index: graphics/gstreamer1-plugins-aalib/Makefile =================================================================== --- graphics/gstreamer1-plugins-aalib/Makefile +++ graphics/gstreamer1-plugins-aalib/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= graphics COMMENT= GStreamer ASCII art videosink plugin @@ -8,4 +8,9 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libaa.so:graphics/aalib +USES= ncurses + .include "${MASTERDIR}/Makefile" Index: graphics/gstreamer1-plugins-aalib/pkg-plist =================================================================== --- /dev/null +++ graphics/gstreamer1-plugins-aalib/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstaasink.so Index: graphics/gstreamer1-plugins-cairo/Makefile =================================================================== --- graphics/gstreamer1-plugins-cairo/Makefile +++ graphics/gstreamer1-plugins-cairo/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= graphics COMMENT= GStreamer overlay renderer plugin based on cairo @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +USE_GNOME= cairo + .include "${MASTERDIR}/Makefile" Index: graphics/gstreamer1-plugins-cairo/pkg-plist =================================================================== --- /dev/null +++ graphics/gstreamer1-plugins-cairo/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstcairo.so Index: graphics/gstreamer1-plugins-gdkpixbuf/Makefile =================================================================== --- graphics/gstreamer1-plugins-gdkpixbuf/Makefile +++ graphics/gstreamer1-plugins-gdkpixbuf/Makefile @@ -1,12 +1,16 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= graphics PKGNAMESUFFIX= 1-plugins-gdkpixbuf COMMENT= GStreamer image decoder/overlay plugin -GST_PLUGIN= gdk_pixbuf +GST_PLUGIN= gdk-pixbuf DIST= good MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +USE_GNOME= gdkpixbuf2 + .include "${MASTERDIR}/Makefile" Index: graphics/gstreamer1-plugins-gdkpixbuf/pkg-plist =================================================================== --- /dev/null +++ graphics/gstreamer1-plugins-gdkpixbuf/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstgdkpixbuf.so Index: graphics/gstreamer1-plugins-gl/Makefile =================================================================== --- graphics/gstreamer1-plugins-gl/Makefile +++ graphics/gstreamer1-plugins-gl/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 4 +PORTREVISION= 0 CATEGORIES= graphics COMMENT= GStreamer GL graphics plugin @@ -15,17 +15,28 @@ OPTIONS_DEFAULT=WAYLAND OPTIONS_SUB= yes -WAYLAND_CONFIGURE_ENABLE= wayland +OPTIONS_UNSET= WAYLAND + +GL_WINSYS= "x11,egl" + +WAYLAND_VARS= gl_winsys+=",wayland" WAYLAND_BUILD_DEPENDS= wayland-protocols>=0:graphics/wayland-protocols WAYLAND_LIB_DEPENDS= libwayland-egl.so:graphics/wayland -pre-build: -.for dir in ${GL_GST_DIRS} - @(cd ${BUILD_WRKSRC}/${dir}; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}) -.endfor - -post-install: - ${INSTALL_DATA} ${WRKSRC}/pkgconfig/gstreamer-gl.pc \ - ${STAGEDIR}${PREFIX}/libdata/pkgconfig/gstreamer-gl-1.0.pc +USES= gl +USE_GL= gl glu glesv2 egl +USE_XORG+=x11 \ + xext \ + xcb +BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto +LIB_DEPENDS= libgraphene-1.0.so:graphics/graphene \ + libpng16.so:graphics/png + +MESON_ARGS+= -Dgl=enabled \ + -Dgl_winsys="${GL_WINSYS}" \ + -Dgl_api=opengl,gles2 \ + -Dgl_platform=glx,egl + +GST_PLUGIN_DIR= gst-libs/gst/gl ext/gl .include "${MASTERDIR}/Makefile" Index: graphics/gstreamer1-plugins-gl/pkg-plist =================================================================== --- graphics/gstreamer1-plugins-gl/pkg-plist +++ graphics/gstreamer1-plugins-gl/pkg-plist @@ -1,6 +1,8 @@ +include/gstreamer-%%VERSION%%/gst/gl/egl/egl.h include/gstreamer-%%VERSION%%/gst/gl/egl/gstegl.h include/gstreamer-%%VERSION%%/gst/gl/egl/gsteglimage.h include/gstreamer-%%VERSION%%/gst/gl/egl/gstgldisplay_egl.h +include/gstreamer-%%VERSION%%/gst/gl/egl/gstgldisplay_egl_device.h include/gstreamer-%%VERSION%%/gst/gl/egl/gstglmemoryegl.h include/gstreamer-%%VERSION%%/gst/gl/gl-enumtypes.h include/gstreamer-%%VERSION%%/gst/gl/gl-prelude.h @@ -8,6 +10,7 @@ include/gstreamer-%%VERSION%%/gst/gl/glprototypes/all_functions.h include/gstreamer-%%VERSION%%/gst/gl/glprototypes/base.h include/gstreamer-%%VERSION%%/gst/gl/glprototypes/blending.h +include/gstreamer-%%VERSION%%/gst/gl/glprototypes/buffer_storage.h include/gstreamer-%%VERSION%%/gst/gl/glprototypes/buffers.h include/gstreamer-%%VERSION%%/gst/gl/glprototypes/debug.h include/gstreamer-%%VERSION%%/gst/gl/glprototypes/eglimage.h @@ -26,10 +29,12 @@ include/gstreamer-%%VERSION%%/gst/gl/gstglapi.h include/gstreamer-%%VERSION%%/gst/gl/gstglbasefilter.h include/gstreamer-%%VERSION%%/gst/gl/gstglbasememory.h +include/gstreamer-%%VERSION%%/gst/gl/gstglbasesrc.h include/gstreamer-%%VERSION%%/gst/gl/gstglbuffer.h include/gstreamer-%%VERSION%%/gst/gl/gstglbufferpool.h include/gstreamer-%%VERSION%%/gst/gl/gstglcolorconvert.h include/gstreamer-%%VERSION%%/gst/gl/gstglcontext.h +include/gstreamer-%%VERSION%%/gst/gl/gstglcontextconfig.h include/gstreamer-%%VERSION%%/gst/gl/gstgldebug.h include/gstreamer-%%VERSION%%/gst/gl/gstgldisplay.h include/gstreamer-%%VERSION%%/gst/gl/gstglfeature.h @@ -52,12 +57,24 @@ include/gstreamer-%%VERSION%%/gst/gl/gstglviewconvert.h include/gstreamer-%%VERSION%%/gst/gl/gstglwindow.h %%WAYLAND%%include/gstreamer-%%VERSION%%/gst/gl/wayland/gstgldisplay_wayland.h +%%WAYLAND%%include/gstreamer-%%VERSION%%/gst/gl/wayland/wayland.h include/gstreamer-%%VERSION%%/gst/gl/x11/gstgldisplay_x11.h -lib/girepository-1.0/GstGL-%%VERSION%%.typelib +include/gstreamer-%%VERSION%%/gst/gl/x11/x11.h +lib/girepository-%%VERSION%%/GstGL-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstGLEGL-%%VERSION%%.typelib +%%WAYLAND%%lib/girepository-%%VERSION%%/GstGLWayland-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstGLX11-%%VERSION%%.typelib lib/gstreamer-%%VERSION%%/include/gst/gl/gstglconfig.h lib/gstreamer-%%VERSION%%/libgstopengl.so lib/libgstgl-%%VERSION%%.so lib/libgstgl-%%VERSION%%.so.0 lib/libgstgl-%%VERSION%%.so.%%SOVERSION%% libdata/pkgconfig/gstreamer-gl-%%VERSION%%.pc -share/gir-1.0/GstGL-%%VERSION%%.gir +libdata/pkgconfig/gstreamer-gl-egl-%%VERSION%%.pc +libdata/pkgconfig/gstreamer-gl-prototypes-%%VERSION%%.pc +%%WAYLAND%%libdata/pkgconfig/gstreamer-gl-wayland-%%VERSION%%.pc +libdata/pkgconfig/gstreamer-gl-x11-%%VERSION%%.pc +share/gir-%%VERSION%%/GstGL-%%VERSION%%.gir +share/gir-%%VERSION%%/GstGLEGL-%%VERSION%%.gir +%%WAYLAND%%share/gir-%%VERSION%%/GstGLWayland-%%VERSION%%.gir +share/gir-%%VERSION%%/GstGLX11-%%VERSION%%.gir Index: graphics/gstreamer1-plugins-jpeg/Makefile =================================================================== --- graphics/gstreamer1-plugins-jpeg/Makefile +++ graphics/gstreamer1-plugins-jpeg/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= graphics COMMENT= GStreamer jpeg encoder/decoder plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +USES= jpeg + .include "${MASTERDIR}/Makefile" Index: graphics/gstreamer1-plugins-jpeg/pkg-plist =================================================================== --- /dev/null +++ graphics/gstreamer1-plugins-jpeg/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstjpeg.so Index: graphics/gstreamer1-plugins-kms/Makefile =================================================================== --- graphics/gstreamer1-plugins-kms/Makefile +++ graphics/gstreamer1-plugins-kms/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= graphics COMMENT= GStreamer video sink via KMS plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libdrm.so:graphics/libdrm + .include "${MASTERDIR}/Makefile" Index: graphics/gstreamer1-plugins-kms/pkg-plist =================================================================== --- /dev/null +++ graphics/gstreamer1-plugins-kms/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstkms.so Index: graphics/gstreamer1-plugins-libcaca/Makefile =================================================================== --- graphics/gstreamer1-plugins-libcaca/Makefile +++ graphics/gstreamer1-plugins-libcaca/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= graphics COMMENT= GStreamer color ASCII art plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libcaca.so:graphics/libcaca + .include "${MASTERDIR}/Makefile" Index: graphics/gstreamer1-plugins-libcaca/pkg-plist =================================================================== --- /dev/null +++ graphics/gstreamer1-plugins-libcaca/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstcacasink.so Index: graphics/gstreamer1-plugins-libvisual/Makefile =================================================================== --- graphics/gstreamer1-plugins-libvisual/Makefile +++ graphics/gstreamer1-plugins-libvisual/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= graphics COMMENT= GStreamer libvisual plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libvisual-0.4.so:graphics/libvisual04 + .include "${MASTERDIR}/Makefile" Index: graphics/gstreamer1-plugins-libvisual/pkg-plist =================================================================== --- /dev/null +++ graphics/gstreamer1-plugins-libvisual/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstlibvisual.so Index: graphics/gstreamer1-plugins-opencv/Makefile =================================================================== --- graphics/gstreamer1-plugins-opencv/Makefile +++ graphics/gstreamer1-plugins-opencv/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 4 +PORTREVISION= 0 CATEGORIES= graphics COMMENT= GStreamer opencv real time computer vision plugin @@ -10,6 +10,8 @@ # Clang has issues with Overloaded stuff inside OpenCV CXXFLAGS+= -Wno-overloaded-virtual +LIB_DEPENDS= libopencv_highgui.so:graphics/opencv +GST_PLUGIN_DIR= gst-libs/gst/opencv ext/opencv PLIST= ${.CURDIR}/pkg-plist Index: graphics/gstreamer1-plugins-opencv/pkg-plist =================================================================== --- graphics/gstreamer1-plugins-opencv/pkg-plist +++ graphics/gstreamer1-plugins-opencv/pkg-plist @@ -5,5 +5,3 @@ lib/libgstopencv-%%VERSION%%.so lib/libgstopencv-%%VERSION%%.so.0 lib/libgstopencv-%%VERSION%%.so.%%SOVERSION%% -share/gst-plugins-bad/%%VERSION%%/opencv_haarcascades/fist.xml -share/gst-plugins-bad/%%VERSION%%/opencv_haarcascades/palm.xml Index: graphics/gstreamer1-plugins-openexr/Makefile =================================================================== --- graphics/gstreamer1-plugins-openexr/Makefile +++ graphics/gstreamer1-plugins-openexr/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 12 +PORTREVISION= 0 CATEGORIES= graphics COMMENT= GStreamer OpenExr codec plugin @@ -9,9 +9,11 @@ CPPFLAGS+= -DInt64=uint64_t -pre-configure: - ${REINPLACE_CMD} -e 's/c++98/c++11/' ${WRKSRC}/ext/openexr/Makefile.in - MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libOpenEXR.so:graphics/openexr \ + libImath-3_1.so:math/Imath + .include "${MASTERDIR}/Makefile" Index: graphics/gstreamer1-plugins-openexr/pkg-plist =================================================================== --- /dev/null +++ graphics/gstreamer1-plugins-openexr/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstopenexr.so Index: graphics/gstreamer1-plugins-openjpeg/Makefile =================================================================== --- graphics/gstreamer1-plugins-openjpeg/Makefile +++ graphics/gstreamer1-plugins-openjpeg/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= graphics COMMENT= GStreamer jpeg2000 decoder plugin @@ -8,6 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins -EXTRA_PATCHES= ${.CURDIR}/files/patch-inc +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libopenjp2.so:graphics/openjpeg .include "${MASTERDIR}/Makefile" Index: graphics/gstreamer1-plugins-openjpeg/files/patch-inc =================================================================== --- graphics/gstreamer1-plugins-openjpeg/files/patch-inc +++ /dev/null @@ -1,30 +0,0 @@ -Put the openjpeg include directory first, so that includes -$LOCALBASE/include/openjpeg-2.3/openjpeg.h instead of $LOCALBASE/include/openjpeg.h - ---- ext/openjpeg/Makefile.in.orig 2018-09-16 22:05:02.688860000 +0300 -+++ ext/openjpeg/Makefile.in 2018-09-16 22:05:11.316104000 +0300 -@@ -861,21 +861,21 @@ - @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - - libgstopenjpeg_la-gstopenjpegdec.lo: gstopenjpegdec.c --@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopenjpeg_la_CFLAGS) $(CFLAGS) -MT libgstopenjpeg_la-gstopenjpegdec.lo -MD -MP -MF $(DEPDIR)/libgstopenjpeg_la-gstopenjpegdec.Tpo -c -o libgstopenjpeg_la-gstopenjpegdec.lo `test -f 'gstopenjpegdec.c' || echo '$(srcdir)/'`gstopenjpegdec.c -+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(OPENJPEG_CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopenjpeg_la_CFLAGS) $(CFLAGS) -MT libgstopenjpeg_la-gstopenjpegdec.lo -MD -MP -MF $(DEPDIR)/libgstopenjpeg_la-gstopenjpegdec.Tpo -c -o libgstopenjpeg_la-gstopenjpegdec.lo `test -f 'gstopenjpegdec.c' || echo '$(srcdir)/'`gstopenjpegdec.c - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstopenjpeg_la-gstopenjpegdec.Tpo $(DEPDIR)/libgstopenjpeg_la-gstopenjpegdec.Plo - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstopenjpegdec.c' object='libgstopenjpeg_la-gstopenjpegdec.lo' libtool=yes @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopenjpeg_la_CFLAGS) $(CFLAGS) -c -o libgstopenjpeg_la-gstopenjpegdec.lo `test -f 'gstopenjpegdec.c' || echo '$(srcdir)/'`gstopenjpegdec.c - - libgstopenjpeg_la-gstopenjpegenc.lo: gstopenjpegenc.c --@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopenjpeg_la_CFLAGS) $(CFLAGS) -MT libgstopenjpeg_la-gstopenjpegenc.lo -MD -MP -MF $(DEPDIR)/libgstopenjpeg_la-gstopenjpegenc.Tpo -c -o libgstopenjpeg_la-gstopenjpegenc.lo `test -f 'gstopenjpegenc.c' || echo '$(srcdir)/'`gstopenjpegenc.c -+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(OPENJPEG_CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopenjpeg_la_CFLAGS) $(CFLAGS) -MT libgstopenjpeg_la-gstopenjpegenc.lo -MD -MP -MF $(DEPDIR)/libgstopenjpeg_la-gstopenjpegenc.Tpo -c -o libgstopenjpeg_la-gstopenjpegenc.lo `test -f 'gstopenjpegenc.c' || echo '$(srcdir)/'`gstopenjpegenc.c - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstopenjpeg_la-gstopenjpegenc.Tpo $(DEPDIR)/libgstopenjpeg_la-gstopenjpegenc.Plo - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstopenjpegenc.c' object='libgstopenjpeg_la-gstopenjpegenc.lo' libtool=yes @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ - @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopenjpeg_la_CFLAGS) $(CFLAGS) -c -o libgstopenjpeg_la-gstopenjpegenc.lo `test -f 'gstopenjpegenc.c' || echo '$(srcdir)/'`gstopenjpegenc.c - - libgstopenjpeg_la-gstopenjpeg.lo: gstopenjpeg.c --@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopenjpeg_la_CFLAGS) $(CFLAGS) -MT libgstopenjpeg_la-gstopenjpeg.lo -MD -MP -MF $(DEPDIR)/libgstopenjpeg_la-gstopenjpeg.Tpo -c -o libgstopenjpeg_la-gstopenjpeg.lo `test -f 'gstopenjpeg.c' || echo '$(srcdir)/'`gstopenjpeg.c -+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(OPENJPEG_CFLAGS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libgstopenjpeg_la_CFLAGS) $(CFLAGS) -MT libgstopenjpeg_la-gstopenjpeg.lo -MD -MP -MF $(DEPDIR)/libgstopenjpeg_la-gstopenjpeg.Tpo -c -o libgstopenjpeg_la-gstopenjpeg.lo `test -f 'gstopenjpeg.c' || echo '$(srcdir)/'`gstopenjpeg.c - @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libgstopenjpeg_la-gstopenjpeg.Tpo $(DEPDIR)/libgstopenjpeg_la-gstopenjpeg.Plo - @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='gstopenjpeg.c' object='libgstopenjpeg_la-gstopenjpeg.lo' libtool=yes @AMDEPBACKSLASH@ - @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ Index: graphics/gstreamer1-plugins-openjpeg/pkg-plist =================================================================== --- /dev/null +++ graphics/gstreamer1-plugins-openjpeg/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstopenjpeg.so Index: graphics/gstreamer1-plugins-png/Makefile =================================================================== --- graphics/gstreamer1-plugins-png/Makefile +++ graphics/gstreamer1-plugins-png/Makefile @@ -1,12 +1,16 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= graphics PKGNAMESUFFIX= 1-plugins-png COMMENT= GStreamer png plugin -GST_PLUGIN= libpng +GST_PLUGIN= png DIST= good MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libpng.so:graphics/png + .include "${MASTERDIR}/Makefile" Index: graphics/gstreamer1-plugins-png/pkg-plist =================================================================== --- /dev/null +++ graphics/gstreamer1-plugins-png/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstpng.so Index: graphics/gstreamer1-plugins-qt/Makefile =================================================================== --- graphics/gstreamer1-plugins-qt/Makefile +++ graphics/gstreamer1-plugins-qt/Makefile @@ -1,11 +1,18 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= graphics COMMENT= GStreamer Qt videosink plugin -GST_PLUGIN= qt +GST_PLUGIN_SUFFIX= -qt +GST_PLUGIN= qt5 DIST= good MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +USES= compiler:c++11-lang qt:5 +USE_QT= core gui declarative buildtools:build network x11extras +USE_GSTREAMER= gl + .include "${MASTERDIR}/Makefile" Index: graphics/gstreamer1-plugins-qt/pkg-plist =================================================================== --- /dev/null +++ graphics/gstreamer1-plugins-qt/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstqmlgl.so Index: graphics/gstreamer1-plugins-rsvg/Makefile =================================================================== --- graphics/gstreamer1-plugins-rsvg/Makefile +++ graphics/gstreamer1-plugins-rsvg/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= graphics COMMENT= GStreamer SVG plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +USE_GNOME= cairo librsvg2 + .include "${MASTERDIR}/Makefile" Index: graphics/gstreamer1-plugins-rsvg/pkg-plist =================================================================== --- /dev/null +++ graphics/gstreamer1-plugins-rsvg/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstrsvg.so Index: graphics/gstreamer1-plugins-vulkan/Makefile =================================================================== --- graphics/gstreamer1-plugins-vulkan/Makefile +++ graphics/gstreamer1-plugins-vulkan/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 3 +PORTREVISION= 0 CATEGORIES= graphics COMMENT= GStreamer Vulkan graphics plugin @@ -8,4 +8,17 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +USE_GSTREAMER= gl +BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto \ + ${LOCALBASE}/include/libdrm/drm_fourcc.h:graphics/libdrm \ + ${LOCALBASE}/include/vulkan/vulkan.h:graphics/vulkan-headers \ + wayland-protocols>=0:graphics/wayland-protocols +LIB_DEPENDS= libvulkan.so:graphics/vulkan-loader \ + libwayland-client.so:graphics/wayland \ + libshaderc_shared.so:graphics/shaderc + +MESON_ARGS+= -Dwayland=enabled + .include "${MASTERDIR}/Makefile" Index: graphics/gstreamer1-plugins-vulkan/pkg-plist =================================================================== --- /dev/null +++ graphics/gstreamer1-plugins-vulkan/pkg-plist @@ -0,0 +1,53 @@ +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkapi.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkbarrier.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkbuffermemory.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkbufferpool.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkcommandbuffer.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkcommandpool.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkconfig.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkdebug.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkdescriptorcache.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkdescriptorpool.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkdescriptorset.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkdevice.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkdisplay.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkerror.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkfence.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkformat.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkfullscreenquad.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkhandle.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkhandlepool.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkimagebufferpool.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkimagememory.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkimageview.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkinstance.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkmemory.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkphysicaldevice.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkqueue.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkswapper.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvktrash.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkutils.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkvideofilter.h +include/gstreamer-%%VERSION%%/gst/vulkan/gstvkwindow.h +include/gstreamer-%%VERSION%%/gst/vulkan/vulkan-enumtypes.h +include/gstreamer-%%VERSION%%/gst/vulkan/vulkan-prelude.h +include/gstreamer-%%VERSION%%/gst/vulkan/vulkan.h +include/gstreamer-%%VERSION%%/gst/vulkan/vulkan_fwd.h +include/gstreamer-%%VERSION%%/gst/vulkan/wayland/gstvkdisplay_wayland.h +include/gstreamer-%%VERSION%%/gst/vulkan/wayland/wayland.h +include/gstreamer-%%VERSION%%/gst/wayland/wayland.h +lib/girepository-%%VERSION%%/GstVulkan-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstVulkanWayland-%%VERSION%%.typelib +lib/gstreamer-%%VERSION%%/libgstvulkan.so +lib/gstreamer-%%VERSION%%/libgstwaylandsink.so +lib/libgstvulkan-%%VERSION%%.so +lib/libgstvulkan-%%VERSION%%.so.0 +lib/libgstvulkan-%%VERSION%%.so.%%SOVERSION%% +lib/libgstwayland-%%VERSION%%.so +lib/libgstwayland-%%VERSION%%.so.0 +lib/libgstwayland-%%VERSION%%.so.%%SOVERSION%% +libdata/pkgconfig/gstreamer-vulkan-%%VERSION%%.pc +libdata/pkgconfig/gstreamer-vulkan-wayland-%%VERSION%%.pc +libdata/pkgconfig/gstreamer-wayland-%%VERSION%%.pc +share/gir-%%VERSION%%/GstVulkan-%%VERSION%%.gir +share/gir-%%VERSION%%/GstVulkanWayland-%%VERSION%%.gir Index: graphics/gstreamer1-plugins-webp/Makefile =================================================================== --- graphics/gstreamer1-plugins-webp/Makefile +++ graphics/gstreamer1-plugins-webp/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= graphics COMMENT= GStreamer webp image decoder plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libwebp.so:graphics/webp + .include "${MASTERDIR}/Makefile" Index: graphics/gstreamer1-plugins-webp/pkg-plist =================================================================== --- /dev/null +++ graphics/gstreamer1-plugins-webp/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstwebp.so Index: graphics/gstreamer1-plugins-zbar/Makefile =================================================================== --- graphics/gstreamer1-plugins-zbar/Makefile +++ graphics/gstreamer1-plugins-zbar/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= graphics COMMENT= GStreamer ZBar barcode detector plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libzbar.so:graphics/zbar + .include "${MASTERDIR}/Makefile" Index: graphics/gstreamer1-plugins-zbar/pkg-plist =================================================================== --- /dev/null +++ graphics/gstreamer1-plugins-zbar/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstzbar.so Index: multimedia/Makefile =================================================================== --- multimedia/Makefile +++ multimedia/Makefile @@ -120,7 +120,6 @@ SUBDIR += gstreamer1-plugins-x265 SUBDIR += gstreamer1-qt SUBDIR += gstreamer1-rtsp-server - SUBDIR += gstreamer1-transcoder SUBDIR += gstreamer1-vaapi SUBDIR += gstreamer1-validate SUBDIR += gstreamermm Index: multimedia/gstreamer1-editing-services/Makefile =================================================================== --- multimedia/gstreamer1-editing-services/Makefile +++ multimedia/gstreamer1-editing-services/Makefile @@ -1,8 +1,8 @@ PORTNAME= gstreamer1-editing-services -PORTVERSION= 1.16.3 +PORTVERSION= 1.20.3 CATEGORIES= multimedia -MASTER_SITES= http://gstreamer.freedesktop.org/src/gstreamer-editing-services/ -DISTNAME= gstreamer-editing-services-${PORTVERSION} +MASTER_SITES= https://gstreamer.freedesktop.org/src/gstreamer-editing-services/ +DISTNAME= gst-editing-services-${PORTVERSION} MAINTAINER= multimedia@FreeBSD.org COMMENT= GStreamer editing services @@ -10,21 +10,23 @@ LICENSE= LGPL20 -USES= compiler:c11 gnome gstreamer meson python pkgconfig tar:xz +USES= bison compiler:c11 gnome gstreamer meson ninja python:3.8+ pkgconfig tar:xz USE_LDCONFIG= yes USE_GNOME= glib20 introspection:build libxml2 pygobject3:build USE_GSTREAMER= good bad LIB_DEPENDS+= libgstvalidate-1.0.so:multimedia/gstreamer1-validate PORTSCOUT= limitw:1,even -CONFIGURE_ARGS= -D gtk_doc=disabled \ - -D introspection=enabled \ - -D pygi-overrides-dir=${PYTHON_SITELIBDIR}/gstreamer-editing-services -PLIST_SUB= VERSION=1.0 SOVERSION=0.1603.0 +CONFIGURE_ARGS= -Ddoc=disabled \ + -Dintrospection=enabled \ + -Dpygi-overrides-dir=${PYTHON_SITELIBDIR}/gstreamer-editing-services +PLIST_SUB= VERSION=1.0 SOVERSION=0.2003.0 + +BINARY_ALIAS= python3=${PYTHON_VERSION} post-install: - ${MKDIR} ${PREFIX}/share/bash-completion/completions - ${INSTALL_SCRIPT} ${WRKSRC}/data/completions/ges-launch-1.0 \ - ${STAGEDIR}${PREFIX}/share/bash-completion/completions/ + ${MKDIR} ${PREFIX}/share/bash-completion/completions + ${INSTALL_SCRIPT} ${WRKSRC}/data/completions/ges-launch-1.0 \ + ${STAGEDIR}${PREFIX}/share/bash-completion/completions/ .include Index: multimedia/gstreamer1-editing-services/distinfo =================================================================== --- multimedia/gstreamer1-editing-services/distinfo +++ multimedia/gstreamer1-editing-services/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1654955116 -SHA256 (gstreamer-editing-services-1.16.3.tar.xz) = 9b05cbb8a6f1db53999e7ad11f00f4f1ccc154d6805b7e49cb7755eb37a99ba6 -SIZE (gstreamer-editing-services-1.16.3.tar.xz) = 1091208 +TIMESTAMP = 1661966172 +SHA256 (gst-editing-services-1.20.3.tar.xz) = 5fd896de69fbe24421eb6b0ff8d2f8b4c3cba3f3025ceacd302172f39a8abaa2 +SIZE (gst-editing-services-1.20.3.tar.xz) = 979284 Index: multimedia/gstreamer1-editing-services/pkg-plist =================================================================== --- multimedia/gstreamer1-editing-services/pkg-plist +++ multimedia/gstreamer1-editing-services/pkg-plist @@ -23,6 +23,7 @@ include/gstreamer-%%VERSION%%/ges/ges-group.h include/gstreamer-%%VERSION%%/ges/ges-image-source.h include/gstreamer-%%VERSION%%/ges/ges-layer.h +include/gstreamer-%%VERSION%%/ges/ges-marker-list.h include/gstreamer-%%VERSION%%/ges/ges-meta-container.h include/gstreamer-%%VERSION%%/ges/ges-multi-file-source.h include/gstreamer-%%VERSION%%/ges/ges-operation-clip.h @@ -34,15 +35,18 @@ include/gstreamer-%%VERSION%%/ges/ges-project.h include/gstreamer-%%VERSION%%/ges/ges-screenshot.h include/gstreamer-%%VERSION%%/ges/ges-source-clip.h +include/gstreamer-%%VERSION%%/ges/ges-source-clip-asset.h include/gstreamer-%%VERSION%%/ges/ges-source.h include/gstreamer-%%VERSION%%/ges/ges-test-clip.h include/gstreamer-%%VERSION%%/ges/ges-text-overlay-clip.h include/gstreamer-%%VERSION%%/ges/ges-text-overlay.h +include/gstreamer-%%VERSION%%/ges/ges-time-overlay-clip.h include/gstreamer-%%VERSION%%/ges/ges-timeline-element.h include/gstreamer-%%VERSION%%/ges/ges-timeline.h include/gstreamer-%%VERSION%%/ges/ges-title-clip.h include/gstreamer-%%VERSION%%/ges/ges-title-source.h include/gstreamer-%%VERSION%%/ges/ges-track-element-asset.h +include/gstreamer-%%VERSION%%/ges/ges-track-element-deprecated.h include/gstreamer-%%VERSION%%/ges/ges-track-element.h include/gstreamer-%%VERSION%%/ges/ges-track.h include/gstreamer-%%VERSION%%/ges/ges-transition-clip.h Index: multimedia/gstreamer1-libav/Makefile =================================================================== --- multimedia/gstreamer1-libav/Makefile +++ multimedia/gstreamer1-libav/Makefile @@ -1,37 +1,32 @@ PORTNAME= gstreamer1-libav -PORTVERSION= 1.16.2 +PORTVERSION= 1.20.3 CATEGORIES= multimedia MASTER_SITES= http://gstreamer.freedesktop.org/src/gst-libav/ DISTNAME= gst-libav-${PORTVERSION} -PATCH_SITES= https://gitlab.freedesktop.org/gstreamer/gst-libav/-/commit/ -PATCHFILES+= 07b43c727c9a.patch:-p1 # https://gitlab.freedesktop.org/gstreamer/gst-libav/-/merge_requests/127 - MAINTAINER= multimedia@FreeBSD.org COMMENT= GStreamer plug-in with many audio/video decoders/encoders WWW= https://gstreamer.freedesktop.org/ LICENSE= LGPL20+ -LICENSE_FILE= ${WRKSRC}/COPYING.LIB +LICENSE_FILE= ${WRKSRC}/COPYING BUILD_DEPENDS= orc>=0.4.16:devel/orc LIB_DEPENDS= liborc-0.4.so:devel/orc PORTSCOUT= limitw:1,even -USES= compiler:features gettext-runtime gmake gnome gstreamer libtool localbase \ - pkgconfig python:build tar:xz -USE_LDCONFIG= yes +USES= bison gettext-runtime gnome gstreamer libtool localbase \ + meson ninja pkgconfig python:3.8+,build tar:xz USE_GNOME= glib20 -GNU_CONFIGURE= yes -INSTALL_TARGET= install-strip + +BINARY_ALIAS= python3=${PYTHON_VERSION} OPTIONS_DEFINE= FFMPEG OPTIONS_DEFAULT=FFMPEG FFMPEG_DESC?= Use system ffmpeg instead of internal libav FFMPEG_LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg -FFMPEG_CONFIGURE_WITH= system-libav FFMPEG_BUILD_DEPENDS_OFF= nasm:devel/nasm FFMPEG_MAKE_ENV_OFF= V=1 FFMPEG_VARS_OFF+= NOPRECIOUSMAKEVARS=yes # ARCH @@ -42,8 +37,4 @@ LDFLAGS_aarch64= -Wl,-z,notext .endif -post-patch: - @${REINPLACE_CMD} -e 's|-Werror||g' \ - ${WRKSRC}/configure - .include Index: multimedia/gstreamer1-libav/distinfo =================================================================== --- multimedia/gstreamer1-libav/distinfo +++ multimedia/gstreamer1-libav/distinfo @@ -1,5 +1,3 @@ -TIMESTAMP = 1575825716 -SHA256 (gst-libav-1.16.2.tar.xz) = c724f612700c15a933c7356fbeabb0bb9571fb5538f8b1b54d4d2d94188deef2 -SIZE (gst-libav-1.16.2.tar.xz) = 9466288 -SHA256 (07b43c727c9a.patch) = a0331d46d744dba3885a3834457ed071111b49eccfda70ebada914090831f12b -SIZE (07b43c727c9a.patch) = 1237 +TIMESTAMP = 1663682373 +SHA256 (gst-libav-1.20.3.tar.xz) = 3fedd10560fcdfaa1b6462cbf79a38c4e7b57d7f390359393fc0cef6dbf27dfe +SIZE (gst-libav-1.20.3.tar.xz) = 284528 Index: multimedia/gstreamer1-libav/pkg-plist =================================================================== --- multimedia/gstreamer1-libav/pkg-plist +++ multimedia/gstreamer1-libav/pkg-plist @@ -1,23 +1 @@ lib/gstreamer-1.0/libgstlibav.so -share/gtk-doc/html/gst-libav-plugins-1.0/ch01.html -share/gtk-doc/html/gst-libav-plugins-1.0/ch02.html -share/gtk-doc/html/gst-libav-plugins-1.0/gst-libav-plugins-1.0.devhelp2 -share/gtk-doc/html/gst-libav-plugins-1.0/gst-libav-plugins-GstFFMpegAudDec.html -share/gtk-doc/html/gst-libav-plugins-1.0/gst-libav-plugins-GstFFMpegAudEnc.html -share/gtk-doc/html/gst-libav-plugins-1.0/gst-libav-plugins-GstFFMpegVidDec.html -share/gtk-doc/html/gst-libav-plugins-1.0/gst-libav-plugins-GstFFMpegVidEnc.html -share/gtk-doc/html/gst-libav-plugins-1.0/gst-libav-plugins-gstav.html -share/gtk-doc/html/gst-libav-plugins-1.0/gst-libav-plugins-gstavcfg.html -share/gtk-doc/html/gst-libav-plugins-1.0/gst-libav-plugins-gstavcodecmap.html -share/gtk-doc/html/gst-libav-plugins-1.0/gst-libav-plugins-gstavprotocol.html -share/gtk-doc/html/gst-libav-plugins-1.0/gst-libav-plugins-gstavutils.html -share/gtk-doc/html/gst-libav-plugins-1.0/gst-libav-plugins-plugin-libav.html -share/gtk-doc/html/gst-libav-plugins-1.0/home.png -share/gtk-doc/html/gst-libav-plugins-1.0/index.html -share/gtk-doc/html/gst-libav-plugins-1.0/left-insensitive.png -share/gtk-doc/html/gst-libav-plugins-1.0/left.png -share/gtk-doc/html/gst-libav-plugins-1.0/right-insensitive.png -share/gtk-doc/html/gst-libav-plugins-1.0/right.png -share/gtk-doc/html/gst-libav-plugins-1.0/style.css -share/gtk-doc/html/gst-libav-plugins-1.0/up-insensitive.png -share/gtk-doc/html/gst-libav-plugins-1.0/up.png Index: multimedia/gstreamer1-plugins-all/Makefile =================================================================== --- multimedia/gstreamer1-plugins-all/Makefile +++ multimedia/gstreamer1-plugins-all/Makefile @@ -1,6 +1,5 @@ PORTNAME= gstreamer1-plugins-all -PORTVERSION= 1.16 -PORTREVISION= 4 +PORTVERSION= 1.20 CATEGORIES= multimedia MAINTAINER= multimedia@FreeBSD.org Index: multimedia/gstreamer1-plugins-aom/Makefile =================================================================== --- multimedia/gstreamer1-plugins-aom/Makefile +++ multimedia/gstreamer1-plugins-aom/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 18 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer (libaom) plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libaom.so:multimedia/aom + .include "${MASTERDIR}/Makefile" Index: multimedia/gstreamer1-plugins-aom/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-aom/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstaom.so Index: multimedia/gstreamer1-plugins-assrender/Makefile =================================================================== --- multimedia/gstreamer1-plugins-assrender/Makefile +++ multimedia/gstreamer1-plugins-assrender/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer ASS/SSA text renderer plugin @@ -8,4 +8,10 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libass.so:multimedia/libass + .include "${MASTERDIR}/Makefile" + +USES+= compiler:c11 Index: multimedia/gstreamer1-plugins-assrender/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-assrender/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstassrender.so Index: multimedia/gstreamer1-plugins-bad/Makefile =================================================================== --- multimedia/gstreamer1-plugins-bad/Makefile +++ multimedia/gstreamer1-plugins-bad/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 3 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer-plugins that need more quality, testing or documentation @@ -6,25 +6,113 @@ GST_PLUGIN= bad GST_PLUGIN_SUFFIX= -bad -MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +USES+= xorg +USE_XORG+=x11 -BUILD_DEPENDS+= v4l_compat>=1.0.20100321:multimedia/v4l_compat +MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins DIST= bad -BAD_GST_DIRS= gst-libs sys gst po pkgconfig -# "extra" plugins enabled by default in Makefile.common -BAD_GST_DIRS+= ext/bz2 +BAD_GST_ENABLED_PLUGINS=accurip \ + adaptivedemux \ + adpcmdec \ + adpcmenc \ + aes \ + aiff \ + asfmux \ + audio \ + audiobuffersplit \ + audiofxbad \ + audiolatency \ + audiomixmatrix \ + audiovisualizers \ + autoconvert \ + basecamerabinsrc \ + bayer \ + bz2 \ + camerabin2 \ + codecalpha \ + codecparsers \ + codecs \ + coloreffects \ + data \ + debugutils \ + dvbsubenc \ + dvbsuboverlay \ + dvdspu \ + examples \ + faceoverlay \ + festival \ + fieldanalysis \ + freeverb \ + frei0r \ + gaudieffects \ + gdp \ + geometrictransform \ + id3tag \ + insertbin \ + inter \ + interfaces \ + interlace \ + ipcpipeline \ + isoff \ + ivfparse \ + ivtc \ + jp2kdecimator \ + jpegformat \ + librfb \ + midi \ + mpegdemux \ + mpegpsmux \ + mpegts \ + mpegtsdemux \ + mpegtsmux \ + mxf \ + netsim \ + nls \ + onvif \ + pcapparse \ + pkgconfig \ + play \ + player \ + pnm \ + proxy \ + rawparse \ + removesilence \ + rist \ + rtmp2 \ + rtp \ + sctp \ + sdp \ + segmentclip \ + shm \ + siren \ + smooth \ + speed \ + subenc \ + switchbin \ + timecode \ + transcode \ + transcoder \ + uridownloader \ + videofilters \ + videoframe_audiolevel \ + videoparsers \ + videosignal \ + vmnc \ + webrtc \ + y4m + NO_GSTREAMER_COMMON= yes PLIST= ${.CURDIR}/pkg-plist -do-build: -.for dir in ${BAD_GST_DIRS} - @(cd ${BUILD_WRKSRC}/${dir}; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}) -.endfor - -do-install: -.for dir in ${BAD_GST_DIRS} - @(cd ${INSTALL_WRKSRC}/${dir} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) -.endfor +USES+=ssl .include "${MASTERDIR}/Makefile" + +USE_GNOME+= glib20 gtk30 + +BUILD_DEPENDS+= v4l_compat>=1.0.20100321:multimedia/v4l_compat \ + gtk3>=3.10:x11-toolkits/gtk30 + +LIB_DEPENDS+=libnice.so:net-im/libnice + Index: multimedia/gstreamer1-plugins-bad/files/patch-data_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-data_meson.build @@ -0,0 +1,12 @@ +--- data/meson.build.orig 2022-09-05 21:41:46 UTC ++++ data/meson.build +@@ -1,3 +1,4 @@ ++if get_option('data').enabled() + encoding_targetsdir = join_paths(get_option('datadir'), + 'gstreamer-' + api_version, 'encoding-profiles') + +@@ -21,3 +22,4 @@ foreach path_targets : encoding_targets + etargets = path_targets.get(1) + install_data(sources: etargets, install_dir: dir) + endforeach ++endif Index: multimedia/gstreamer1-plugins-bad/files/patch-ext_dash_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-ext_dash_meson.build @@ -0,0 +1,21 @@ +--- ext/dash/meson.build.orig 2022-09-13 21:07:32 UTC ++++ ext/dash/meson.build +@@ -45,9 +45,15 @@ if xml2_dep.found() + c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'], + link_args : noseh_link_args, + include_directories : [configinc, libsinc], +- dependencies : [gstadaptivedemux_dep, gsturidownloader_dep, gsttag_dep, +- gstnet_dep, gstpbutils_dep, gstbase_dep, gstisoff_dep, +- gio_dep, xml2_dep], ++ dependencies : [cc.find_library('gstadaptivedemux-1.0', required : true), ++ cc.find_library('gsturidownloader-1.0', required : true), ++ dependency('gstreamer-tag-1.0'), ++ dependency('gstreamer-net-1.0'), ++ dependency('gstreamer-pbutils-1.0'), ++ gstbase_dep, ++ cc.find_library('gstisoff-1.0', required : true), ++ gio_dep, ++ xml2_dep], + install : true, + install_dir : plugins_install_dir, + ) Index: multimedia/gstreamer1-plugins-bad/files/patch-ext_hls_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-ext_hls_meson.build @@ -0,0 +1,12 @@ +--- ext/hls/meson.build.orig 2022-09-16 17:38:38 UTC ++++ ext/hls/meson.build +@@ -58,7 +58,8 @@ gsthls = library('gsthls', + link_args : noseh_link_args, + include_directories : [configinc], + dependencies : [gstpbutils_dep, gsttag_dep, gstvideo_dep, +- gstadaptivedemux_dep, gsturidownloader_dep, ++ cc.find_library('gstadaptivedemux-1.0', required: true), ++ cc.find_library('gsturidownloader-1.0', required: true), + hls_crypto_dep, gio_dep, libm], + install : true, + install_dir : plugins_install_dir, Index: multimedia/gstreamer1-plugins-bad/files/patch-ext_opencv_gstcvdilateerode.cpp =================================================================== --- multimedia/gstreamer1-plugins-bad/files/patch-ext_opencv_gstcvdilateerode.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- ext/opencv/gstcvdilateerode.cpp.orig 2021-08-02 14:37:33 UTC -+++ ext/opencv/gstcvdilateerode.cpp -@@ -89,7 +89,7 @@ gst_cv_dilate_erode_get_type (void) - { - static volatile gsize opencv_dilate_erode_type = 0; - -- if (g_once_init_enter (&opencv_dilate_erode_type)) { -+ if (g_once_init_enter ((unsigned long *)&opencv_dilate_erode_type)) { - GType _type; - static const GTypeInfo opencv_dilate_erode_info = { - sizeof (GstCvDilateErodeClass), Index: multimedia/gstreamer1-plugins-bad/files/patch-ext_openjpeg_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-ext_openjpeg_meson.build @@ -0,0 +1,11 @@ +--- ext/openjpeg/meson.build.orig 2022-09-12 08:53:57 UTC ++++ ext/openjpeg/meson.build +@@ -18,7 +18,7 @@ if openjpeg_dep.found() + link_args : noseh_link_args, + include_directories : [configinc], + dependencies : [gst_dep, gstvideo_dep, openjpeg_dep, +- gstcodecparsers_dep, libm], ++ dependency('gstreamer-codecparsers-1.0'), libm], + install : true, + install_dir : plugins_install_dir, + ) Index: multimedia/gstreamer1-plugins-bad/files/patch-ext_openmpt_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-ext_openmpt_meson.build @@ -0,0 +1,11 @@ +--- ext/openmpt/meson.build.orig 2022-06-15 22:36:22 UTC ++++ ext/openmpt/meson.build +@@ -4,7 +4,7 @@ if openmpt_dep.found() + 'gstopenmptdec.c', 'plugin.c', + c_args: gst_plugins_bad_args, + include_directories: [configinc], +- dependencies: [gstbadaudio_dep, gstaudio_dep, openmpt_dep], ++ dependencies: [dependency('gstreamer-bad-audio-1.0'), dependency('gstreamer-audio-1.0'), openmpt_dep], + install: true, + install_dir: plugins_install_dir, + ) Index: multimedia/gstreamer1-plugins-bad/files/patch-ext_smoothstreaming_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-ext_smoothstreaming_meson.build @@ -0,0 +1,17 @@ +--- ext/smoothstreaming/meson.build.orig 2022-09-16 20:01:19 UTC ++++ ext/smoothstreaming/meson.build +@@ -13,8 +13,12 @@ if xml28_dep.found() + c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'], + link_args : noseh_link_args, + include_directories : [configinc, libsinc], +- dependencies : [gst_dep, gstadaptivedemux_dep, gstcodecparsers_dep, +- gsturidownloader_dep, gstisoff_dep, xml28_dep, gio_dep], ++ dependencies : [gst_dep, ++ cc.find_library('gstadaptivedemux-1.0', required : true), ++ dependency('gstreamer-codecparsers-1.0', required : true), ++ cc.find_library('gsturidownloader-1.0', required : true), ++ cc.find_library('gstisoff-1.0', required : true), ++ xml28_dep, gio_dep], + install : true, + install_dir : plugins_install_dir, + ) Index: multimedia/gstreamer1-plugins-bad/files/patch-ext_spandsp_gstspanplc.h =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-ext_spandsp_gstspanplc.h @@ -0,0 +1,10 @@ +--- ext/spandsp/gstspanplc.h.orig 2022-09-16 22:58:32 UTC ++++ ext/spandsp/gstspanplc.h +@@ -22,6 +22,7 @@ + + #include + ++#include + #include + + G_BEGIN_DECLS Index: multimedia/gstreamer1-plugins-bad/files/patch-ext_webrtcdsp_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-ext_webrtcdsp_meson.build @@ -0,0 +1,11 @@ +--- ext/webrtcdsp/meson.build.orig 2022-09-07 19:55:24 UTC ++++ ext/webrtcdsp/meson.build +@@ -17,7 +17,7 @@ if webrtc_dep.found() and gnustl_dep.found() + cpp_args : gst_plugins_bad_args, + link_args : noseh_link_args, + include_directories : [configinc], +- dependencies : [gstbase_dep, gstaudio_dep, gstbadaudio_dep, webrtc_dep, gnustl_dep], ++ dependencies : [gstbase_dep, gstaudio_dep, dependency('gstreamer-bad-audio-1.0'), webrtc_dep, gnustl_dep], + install : true, + install_dir : plugins_install_dir, + override_options : ['cpp_std=c++11'], Index: multimedia/gstreamer1-plugins-bad/files/patch-git_a0cd455d =================================================================== --- multimedia/gstreamer1-plugins-bad/files/patch-git_a0cd455d +++ /dev/null @@ -1,142 +0,0 @@ -From a0cd455dd0e0375c6395fe732173225ea7e18562 Mon Sep 17 00:00:00 2001 -From: Debarshi Ray -Date: Fri, 20 Mar 2020 15:49:06 +0100 -Subject: [PATCH] lv2: Make it build with -fno-common - -GCC 10 defaults to -fno-common. This means that global variables shared -across multiple translation units should be declared as 'extern' in -header files and defined in exactly one C file. See: -https://gcc.gnu.org/gcc-10/porting_to.html - -https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1125 - -Part-of: ---- - ext/lv2/gstlv2.c | 33 ++++++++++++++++++++++++++ - ext/lv2/gstlv2.h | 62 ++++++++++++++++++++++++------------------------ - 2 files changed, 64 insertions(+), 31 deletions(-) - -diff --git a/ext/lv2/gstlv2.c b/ext/lv2/gstlv2.c -index 60d502f41a..7feeee1921 100644 ---- ext/lv2/gstlv2.c -+++ ext/lv2/gstlv2.c -@@ -69,6 +69,39 @@ GST_DEBUG_CATEGORY (lv2_debug); - #error "Unsupported OS" - #endif - -+LilvWorld *world = NULL; -+LilvNode *atom_class = NULL; -+LilvNode *audio_class = NULL; -+LilvNode *control_class = NULL; -+LilvNode *cv_class = NULL; -+LilvNode *event_class = NULL; -+LilvNode *input_class = NULL; -+LilvNode *output_class = NULL; -+LilvNode *preset_class = NULL; -+LilvNode *state_iface = NULL; -+LilvNode *state_uri = NULL; -+ -+LilvNode *integer_prop = NULL; -+LilvNode *toggled_prop = NULL; -+LilvNode *designation_pred = NULL; -+LilvNode *in_place_broken_pred = NULL; -+LilvNode *optional_pred = NULL; -+LilvNode *group_pred = NULL; -+LilvNode *supports_event_pred = NULL; -+LilvNode *label_pred = NULL; -+ -+LilvNode *center_role = NULL; -+LilvNode *left_role = NULL; -+LilvNode *right_role = NULL; -+LilvNode *rear_center_role = NULL; -+LilvNode *rear_left_role = NULL; -+LilvNode *rear_right_role = NULL; -+LilvNode *lfe_role = NULL; -+LilvNode *center_left_role = NULL; -+LilvNode *center_right_role = NULL; -+LilvNode *side_left_role = NULL; -+LilvNode *side_right_role = NULL; -+ - GstStructure *lv2_meta_all = NULL; - - static void -diff --git a/ext/lv2/gstlv2.h b/ext/lv2/gstlv2.h -index 177f9b2c19..9f72582294 100644 ---- ext/lv2/gstlv2.h -+++ ext/lv2/gstlv2.h -@@ -28,40 +28,40 @@ - - #include "gstlv2utils.h" - --LilvWorld *world; --LilvNode *atom_class; --LilvNode *audio_class; --LilvNode *control_class; --LilvNode *cv_class; --LilvNode *event_class; --LilvNode *input_class; --LilvNode *output_class; --LilvNode *preset_class; --LilvNode *state_iface; --LilvNode *state_uri; -+extern LilvWorld *world; -+extern LilvNode *atom_class; -+extern LilvNode *audio_class; -+extern LilvNode *control_class; -+extern LilvNode *cv_class; -+extern LilvNode *event_class; -+extern LilvNode *input_class; -+extern LilvNode *output_class; -+extern LilvNode *preset_class; -+extern LilvNode *state_iface; -+extern LilvNode *state_uri; - --LilvNode *integer_prop; --LilvNode *toggled_prop; --LilvNode *designation_pred; --LilvNode *in_place_broken_pred; --LilvNode *optional_pred; --LilvNode *group_pred; --LilvNode *supports_event_pred; --LilvNode *label_pred; -+extern LilvNode *integer_prop; -+extern LilvNode *toggled_prop; -+extern LilvNode *designation_pred; -+extern LilvNode *in_place_broken_pred; -+extern LilvNode *optional_pred; -+extern LilvNode *group_pred; -+extern LilvNode *supports_event_pred; -+extern LilvNode *label_pred; - --LilvNode *center_role; --LilvNode *left_role; --LilvNode *right_role; --LilvNode *rear_center_role; --LilvNode *rear_left_role; --LilvNode *rear_right_role; --LilvNode *lfe_role; --LilvNode *center_left_role; --LilvNode *center_right_role; --LilvNode *side_left_role; --LilvNode *side_right_role; -+extern LilvNode *center_role; -+extern LilvNode *left_role; -+extern LilvNode *right_role; -+extern LilvNode *rear_center_role; -+extern LilvNode *rear_left_role; -+extern LilvNode *rear_right_role; -+extern LilvNode *lfe_role; -+extern LilvNode *center_left_role; -+extern LilvNode *center_right_role; -+extern LilvNode *side_left_role; -+extern LilvNode *side_right_role; - --GstStructure *lv2_meta_all; -+extern GstStructure *lv2_meta_all; - - void gst_lv2_filter_register_element (GstPlugin *plugin, - GstStructure * lv2_meta); --- -GitLab - - Index: multimedia/gstreamer1-plugins-bad/files/patch-git_dc57fb70 =================================================================== --- multimedia/gstreamer1-plugins-bad/files/patch-git_dc57fb70 +++ /dev/null @@ -1,26 +0,0 @@ -https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1255 - -vkerror.c:66:16: error: use of undeclared identifier 'VK_RESULT_BEGIN_RANGE' - if (result < VK_RESULT_BEGIN_RANGE) - ^ - ---- ext/vulkan/vkerror.c.orig 2019-04-19 09:16:36 UTC -+++ ext/vulkan/vkerror.c -@@ -27,7 +27,7 @@ - #include "vkerror.h" - - /* *INDENT-OFF* */ --static const struct -+static const struct - { - VkResult result; - const char *str; -@@ -63,8 +63,6 @@ _vk_result_to_string (VkResult result) - - if (result >= 0) - return NULL; -- if (result < VK_RESULT_BEGIN_RANGE) -- return "Unknown Error"; - - for (i = 0; i < G_N_ELEMENTS (vk_result_string_map); i++) { - if (result == vk_result_string_map[i].result) Index: multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_adaptivedemux_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_adaptivedemux_meson.build @@ -0,0 +1,20 @@ +--- gst-libs/gst/adaptivedemux/meson.build.orig 2022-09-05 19:47:37 UTC ++++ gst-libs/gst/adaptivedemux/meson.build +@@ -1,5 +1,8 @@ ++if get_option('adaptivedemux').enabled() + adaptivedemux_sources = files('gstadaptivedemux.c') +-adaptivedemux_headers = files('gstadaptivedemux.h') ++adaptivedemux_headers = files('gstadaptivedemux.h', ++ 'adaptive-demux-prelude.h') ++install_headers(adaptivedemux_headers, subdir : 'gstreamer-1.0/gst/adaptivedemux') + + pkg_name = 'gstreamer-adaptivedemux-1.0' + gstadaptivedemux = library('gstadaptivedemux-' + api_version, +@@ -18,4 +21,5 @@ gstadaptivedemux_dep = declare_dependency(link_with : + include_directories : [libsinc], + dependencies : [gstbase_dep, gsturidownloader_dep]) + +-meson.override_dependency(pkg_name, gstadaptivedemux_dep) +\ No newline at end of file ++meson.override_dependency(pkg_name, gstadaptivedemux_dep) ++endif Index: multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_audio_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_audio_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/audio/meson.build.orig 2022-09-05 20:33:42 UTC ++++ gst-libs/gst/audio/meson.build +@@ -1,3 +1,4 @@ ++if get_option('audio').enabled() + badaudio_sources = files('gstnonstreamaudiodecoder.c', 'gstplanaraudioadapter.c') + badaudio_headers = files('gstnonstreamaudiodecoder.h', 'audio-bad-prelude.h', 'gstplanaraudioadapter.h') + install_headers(badaudio_headers, subdir : 'gstreamer-1.0/gst/audio') +@@ -52,3 +53,4 @@ gstbadaudio_dep = declare_dependency(link_with : gstba + dependencies : [gstaudio_dep, gstbase_dep]) + + meson.override_dependency(pkg_name, gstbadaudio_dep) ++endif Index: multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_basecamerabinsrc_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_basecamerabinsrc_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/basecamerabinsrc/meson.build.orig 2022-09-05 21:00:40 UTC ++++ gst-libs/gst/basecamerabinsrc/meson.build +@@ -1,3 +1,4 @@ ++if get_option('basecamerabinsrc').enabled() + camerabin_sources = files( + 'gstcamerabin-enum.c', + 'gstcamerabinpreview.c', +@@ -51,3 +52,4 @@ gstbasecamerabin_dep = declare_dependency(link_with : + sources: gen_sources, + dependencies : [gstapp_dep]) + meson.override_dependency(pkg_name, gstbasecamerabin_dep) ++endif Index: multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_codecparsers_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_codecparsers_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/codecparsers/meson.build.orig 2022-09-05 20:42:22 UTC ++++ gst-libs/gst/codecparsers/meson.build +@@ -1,3 +1,4 @@ ++if get_option('codecparsers').enabled() + codecparser_sources = files([ + 'gstjpeg2000sampling.c', + 'gstjpegparser.c', +@@ -69,3 +70,4 @@ gstcodecparsers_dep = declare_dependency(link_with : g + + libraries += [[pkg_name, {'lib': gstcodecparsers}]] + meson.override_dependency(pkg_name, gstcodecparsers_dep) ++endif Index: multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_codecs_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_codecs_meson.build @@ -0,0 +1,15 @@ +--- gst-libs/gst/codecs/meson.build.orig 2022-09-05 20:49:44 UTC ++++ gst-libs/gst/codecs/meson.build +@@ -1,3 +1,4 @@ ++if get_option('codecs').enabled() + codecs_sources = files( + 'gsth264decoder.c', + 'gsth264picture.c', +@@ -81,4 +82,5 @@ gstcodecs_dep = declare_dependency(link_with : gstcode + include_directories : [libsinc], + sources: gen_sources, + dependencies : [gstvideo_dep, gstcodecparsers_dep]) +-meson.override_dependency(pkg_name, gstcodecs_dep) +\ No newline at end of file ++meson.override_dependency(pkg_name, gstcodecs_dep) ++endif Index: multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_insertbin_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_insertbin_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/insertbin/meson.build.orig 2022-09-05 21:06:02 UTC ++++ gst-libs/gst/insertbin/meson.build +@@ -1,3 +1,4 @@ ++if get_option('insertbin').enabled() + insert_sources = files('gstinsertbin.c') + insert_headers = files('gstinsertbin.h') + install_headers(insert_headers, subdir : 'gstreamer-1.0/gst/insertbin') +@@ -51,3 +52,4 @@ gstinsertbin_dep = declare_dependency(link_with : gsti + dependencies : [gst_dep]) + + meson.override_dependency(pkg_name, gstinsertbin_dep) ++endif Index: multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_interfaces_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_interfaces_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/interfaces/meson.build.orig 2022-09-05 21:08:24 UTC ++++ gst-libs/gst/interfaces/meson.build +@@ -1,3 +1,4 @@ ++if get_option('interfaces').enabled() + photography_sources = ['photography.c'] + photo_headers = ['photography.h', 'photography-prelude.h'] + install_headers(photo_headers, subdir : 'gstreamer-1.0/gst/interfaces') +@@ -40,3 +41,4 @@ gstphotography_dep = declare_dependency(link_with : gs + + libraries += [[pkg_name, {'lib': gstphotography}]] + meson.override_dependency(pkg_name, gstphotography_dep) ++endif Index: multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_isoff_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_isoff_meson.build @@ -0,0 +1,21 @@ +--- gst-libs/gst/isoff/meson.build.orig 2022-09-15 15:00:43 UTC ++++ gst-libs/gst/isoff/meson.build +@@ -1,3 +1,4 @@ ++if get_option('isoff').enabled() + isoff_sources = [ + 'gstisoff.c', + ] +@@ -6,6 +7,8 @@ isoff_headers = [ + ] + install_headers(isoff_headers, subdir : 'gstreamer-1.0/gst/isoff') + ++pkg_name = 'gstreamer-isoff-1.0' ++ + gstisoff = library('gstisoff-' + api_version, + isoff_sources, + c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_ISOFF', '-DG_LOG_DOMAIN="GStreamer-ISOFF"'], +@@ -20,3 +23,4 @@ gstisoff = library('gstisoff-' + api_version, + gstisoff_dep = declare_dependency(link_with : gstisoff, + include_directories : [libsinc], + dependencies : [gstbase_dep]) ++endif Index: multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_mpegts_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_mpegts_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/mpegts/meson.build.orig 2022-09-05 21:11:41 UTC ++++ gst-libs/gst/mpegts/meson.build +@@ -1,3 +1,4 @@ ++if get_option('mpegts').enabled() + mpegts_sources = files( + 'mpegts.c', + 'gstmpegtssection.c', +@@ -82,3 +83,4 @@ gstmpegts_dep = declare_dependency(link_with : gstmpeg + dependencies : [gst_dep], + sources : gen_sources) + meson.override_dependency(pkg_name, gstmpegts_dep) ++endif Index: multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_play_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_play_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/play/meson.build.orig 2022-09-05 21:13:21 UTC ++++ gst-libs/gst/play/meson.build +@@ -1,3 +1,4 @@ ++if get_option('play').enabled() + gstplay_sources = files( + 'gstplay.c', + 'gstplay-signal-adapter.c', +@@ -74,3 +75,4 @@ gstplay_dep = declare_dependency(link_with : gstplay, + gsttag_dep, gstpbutils_dep]) + + meson.override_dependency(pkg_name, gstplay_dep) ++endif Index: multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_player_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_player_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/player/meson.build.orig 2022-09-05 21:14:52 UTC ++++ gst-libs/gst/player/meson.build +@@ -1,3 +1,4 @@ ++if get_option('player').enabled() + gstplayer_sources = files([ + 'gstplayer.c', + 'gstplayer-signal-dispatcher.c', +@@ -77,3 +78,4 @@ gstplayer_dep = declare_dependency(link_with : gstplay + gsttag_dep, gstpbutils_dep]) + + meson.override_dependency(pkg_name, gstplayer_dep) ++endif Index: multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_sctp_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_sctp_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/sctp/meson.build.orig 2022-09-05 21:16:11 UTC ++++ gst-libs/gst/sctp/meson.build +@@ -1,3 +1,4 @@ ++if get_option('sctp').enabled() + sctp_sources = [ + 'sctpreceivemeta.c', + 'sctpsendmeta.c', +@@ -36,3 +37,4 @@ gstsctp_dep = declare_dependency(link_with : libgstsct + dependencies : [gstbase_dep]) + + meson.override_dependency(pkg_name, gstsctp_dep) ++endif Index: multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_transcoder_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_transcoder_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/transcoder/meson.build.orig 2022-09-05 21:18:30 UTC ++++ gst-libs/gst/transcoder/meson.build +@@ -1,3 +1,4 @@ ++if get_option('transcoder').enabled() + sources = files(['gsttranscoder.c', 'gsttranscoder-signal-adapter.c']) + headers = files(['gsttranscoder.h', 'transcoder-prelude.h', 'gsttranscoder-signal-adapter.h']) + +@@ -64,3 +65,4 @@ gst_transcoder_dep = declare_dependency(link_with: gst + include_directories : [libsinc] + ) + meson.override_dependency(pkg_name, gst_transcoder_dep) ++endif Index: multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_uridownloader_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_uridownloader_meson.build @@ -0,0 +1,15 @@ +--- gst-libs/gst/uridownloader/meson.build.orig 2022-09-05 21:20:17 UTC ++++ gst-libs/gst/uridownloader/meson.build +@@ -1,3 +1,4 @@ ++if get_option('uridownloader').enabled() + urid_sources = [ + 'gstfragment.c', + 'gsturidownloader.c', +@@ -27,4 +28,5 @@ gsturidownloader_dep = declare_dependency(link_with : + dependencies : [gstbase_dep]) + + libraries += [[pkg_name, {'lib': gsturidownloader}]] +-meson.override_dependency(pkg_name, gsturidownloader_dep) +\ No newline at end of file ++meson.override_dependency(pkg_name, gsturidownloader_dep) ++endif Index: multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_webrtc_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-gst-libs_gst_webrtc_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/webrtc/meson.build.orig 2022-09-05 21:22:10 UTC ++++ gst-libs/gst/webrtc/meson.build +@@ -1,3 +1,4 @@ ++if get_option('webrtc').enabled() + webrtc_sources = files([ + 'dtlstransport.c', + 'icetransport.c', +@@ -95,3 +96,4 @@ gstwebrtc_dep = declare_dependency(link_with: gstwebrt + dependencies: gstwebrtc_dependencies) + + meson.override_dependency(pkg_name, gstwebrtc_dep) ++endif Index: multimedia/gstreamer1-plugins-bad/files/patch-meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-meson.build @@ -0,0 +1,18 @@ +--- meson.build.orig 2022-09-04 20:06:36 UTC ++++ meson.build +@@ -498,6 +498,7 @@ pkgconfig_variables = ['exec_prefix=${prefix}', + + pkgconfig_subdirs = ['gstreamer-1.0'] + ++if get_option('pkgconfig').enabled() + pkgconfig.generate( + libraries : [gst_dep], + variables : pkgconfig_variables, +@@ -505,6 +506,7 @@ pkgconfig.generate( + name : 'gstreamer-plugins-bad-1.0', + description : 'Streaming media framework, bad plugins libraries', + ) ++endif + + gpl_allowed = get_option('gpl').allowed() + Index: multimedia/gstreamer1-plugins-bad/files/patch-meson__options.txt =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-meson__options.txt @@ -0,0 +1,42 @@ +--- meson_options.txt.orig 2022-09-04 20:24:08 UTC ++++ meson_options.txt +@@ -1,5 +1,39 @@ + option('gst_play_tests', type: 'boolean', value: false, + description: 'Enable GstPlay tests that need network access') ++option('adaptivedemux', type: 'feature', value: 'auto', ++ description: 'adaptivedemux lib') ++option('audio', type: 'feature', value: 'auto', ++ description: 'audio lib') ++option('codecparsers', type: 'feature', value: 'auto', ++ description: 'codecparsers lib') ++option('codecs', type: 'feature', value: 'auto', ++ description: 'codecs lib') ++option('basecamerabinsrc', type: 'feature', value: 'auto', ++ description: 'basecamerabinsrc lib') ++option('insertbin', type: 'feature', value: 'auto', ++ description: 'insertbin lib') ++option('interfaces', type: 'feature', value: 'auto', ++ description: 'interfaces lib') ++option('isoff', type: 'feature', value: 'auto', ++ description: 'isoff lib') ++option('mpegts', type: 'feature', value: 'auto', ++ description: 'mpegts lib') ++option('play', type: 'feature', value: 'auto', ++ description: 'play lib') ++option('player', type: 'feature', value: 'auto', ++ description: 'player lib') ++option('transcoder', type: 'feature', value: 'auto', ++ description: 'transcoder lib') ++option('uridownloader', type: 'feature', value: 'auto', ++ description: 'uridownloader lib') ++option('webrtc', type: 'feature', value: 'auto', ++ description: 'webrtc lib') ++option('tools', type: 'feature', value: 'auto', ++ description: 'tools lib') ++option('data', type: 'feature', value: 'auto', ++ description: 'data lib') ++option('pkgconfig', type: 'feature', value: 'auto', ++ description: 'pkgconfig lib') + + # Feature options for plugins without external deps + option('accurip', type : 'feature', value : 'auto') Index: multimedia/gstreamer1-plugins-bad/files/patch-sys_kms_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-sys_kms_meson.build @@ -0,0 +1,13 @@ +--- sys/kms/meson.build.orig 2022-09-12 09:58:35 UTC ++++ sys/kms/meson.build +@@ -5,10 +5,6 @@ kmssink_sources = [ + 'gstkmsutils.c', + ] + +-if host_system != 'linux' +- subdir_done() +-endif +- + libdrm_dep = dependency('libdrm', version : '>= 2.4.98', + required : get_option('kms'), + fallback: ['libdrm', 'ext_libdrm']) Index: multimedia/gstreamer1-plugins-bad/files/patch-sys_msdk_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-sys_msdk_meson.build @@ -0,0 +1,16 @@ +--- sys/msdk/meson.build.orig 2022-09-16 08:39:55 UTC ++++ sys/msdk/meson.build +@@ -169,7 +169,12 @@ if msdk_deps_found + msdk_sources, + c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'], + include_directories : [configinc, mfx_inc], +- dependencies : [gstbase_dep, gstvideo_dep, gstpbutils_dep, gstallocators_dep, gstcodecparsers_dep, mfx_dep, msdk_deps], ++ dependencies : [gstbase_dep, ++ dependency('gstreamer-video-1.0', required : true), ++ dependency('gstreamer-pbutils-1.0', required : true), ++ dependency('gstreamer-allocators-1.0', required : true), ++ dependency('gstreamer-codecparsers-1.0', required : true), ++ mfx_dep, msdk_deps], + install : true, + install_dir : plugins_install_dir, + ) Index: multimedia/gstreamer1-plugins-bad/files/patch-tests_examples_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-tests_examples_meson.build @@ -0,0 +1,74 @@ +--- tests/examples/meson.build.orig 2022-09-13 22:41:40 UTC ++++ tests/examples/meson.build +@@ -1,20 +1,54 @@ +-subdir('audiomixmatrix') +-subdir('avsamplesink') +-subdir('camerabin2') +-subdir('codecparsers') +-subdir('d3d11') +-subdir('directfb') +-subdir('ipcpipeline') +-subdir('mpegts') +-subdir('msdk') +-subdir('mxf') +-subdir('nvcodec') +-subdir('opencv', if_found: opencv_dep) +-subdir('uvch264') +-subdir('va') +-subdir('waylandsink') +-subdir('webrtc') +-subdir('wpe') ++if get_option('audiomixmatrix').enabled() ++ subdir('audiomixmatrix') ++endif ++if get_option('applemedia').enabled() ++ subdir('avsamplesink') ++endif ++if get_option('camerabin2').enabled() ++ subdir('camerabin2') ++endif ++if get_option('codecparsers').enabled() ++ subdir('codecparsers') ++endif ++if get_option('d3d11').enabled() ++ subdir('d3d11') ++endif ++if get_option('directfb').enabled() ++ subdir('directfb') ++endif ++if get_option('ipcpipeline').enabled() ++ subdir('ipcpipeline') ++endif ++if get_option('mpegts').enabled() ++ subdir('mpegts') ++endif ++if get_option('msdk').enabled() ++ subdir('msdk') ++endif ++if get_option('mxf').enabled() ++ subdir('mxf') ++endif ++if get_option('nvcodec').enabled() ++ subdir('nvcodec') ++endif ++if get_option('opencv').enabled() ++ subdir('opencv', if_found: opencv_dep) ++endif ++if get_option('uvch264').enabled() ++ subdir('uvch264') ++endif ++if get_option('va').enabled() ++ subdir('va') ++endif ++if get_option('wayland').enabled() ++ subdir('waylandsink') ++endif ++if get_option('webrtc').enabled() ++ subdir('webrtc') ++endif ++if get_option('wpe').enabled() ++ subdir('wpe') ++endif + + executable('playout', + 'playout.c', Index: multimedia/gstreamer1-plugins-bad/files/patch-tools_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-bad/files/patch-tools_meson.build @@ -0,0 +1,11 @@ +--- tools/meson.build.orig 2022-09-05 21:25:23 UTC ++++ tools/meson.build +@@ -1,6 +1,8 @@ ++if get_option('tools').enabled() + executable('gst-transcoder-' + api_version, + 'gst-transcoder.c', 'utils.c', + install : true, + dependencies : [gst_dep, gstpbutils_dep, gst_transcoder_dep], + c_args: ['-DG_LOG_DOMAIN="gst-transcoder-@0@"'.format(api_version)], + ) ++endif Index: multimedia/gstreamer1-plugins-bad/pkg-plist =================================================================== --- multimedia/gstreamer1-plugins-bad/pkg-plist +++ multimedia/gstreamer1-plugins-bad/pkg-plist @@ -1,3 +1,6 @@ +bin/playout +include/gstreamer-%%VERSION%%/gst/adaptivedemux/gstadaptivedemux.h +include/gstreamer-%%VERSION%%/gst/adaptivedemux/adaptive-demux-prelude.h include/gstreamer-%%VERSION%%/gst/audio/audio-bad-prelude.h include/gstreamer-%%VERSION%%/gst/audio/gstnonstreamaudiodecoder.h include/gstreamer-%%VERSION%%/gst/audio/gstplanaraudioadapter.h @@ -6,6 +9,7 @@ include/gstreamer-%%VERSION%%/gst/basecamerabinsrc/gstcamerabin-enum.h include/gstreamer-%%VERSION%%/gst/basecamerabinsrc/gstcamerabinpreview.h include/gstreamer-%%VERSION%%/gst/codecparsers/codecparsers-prelude.h +include/gstreamer-%%VERSION%%/gst/codecparsers/gstav1parser.h include/gstreamer-%%VERSION%%/gst/codecparsers/gsth264parser.h include/gstreamer-%%VERSION%%/gst/codecparsers/gsth265parser.h include/gstreamer-%%VERSION%%/gst/codecparsers/gstjpeg2000sampling.h @@ -22,15 +26,27 @@ include/gstreamer-%%VERSION%%/gst/interfaces/photography-prelude.h include/gstreamer-%%VERSION%%/gst/interfaces/photography.h include/gstreamer-%%VERSION%%/gst/isoff/gstisoff.h +include/gstreamer-%%VERSION%%/gst/mpegts/gst-atsc-descriptor.h include/gstreamer-%%VERSION%%/gst/mpegts/gst-atsc-section.h include/gstreamer-%%VERSION%%/gst/mpegts/gst-dvb-descriptor.h include/gstreamer-%%VERSION%%/gst/mpegts/gst-dvb-section.h +include/gstreamer-%%VERSION%%/gst/mpegts/gst-hdmv-section.h +include/gstreamer-%%VERSION%%/gst/mpegts/gst-isdb-descriptor.h include/gstreamer-%%VERSION%%/gst/mpegts/gst-scte-section.h include/gstreamer-%%VERSION%%/gst/mpegts/gstmpegts-enumtypes.h include/gstreamer-%%VERSION%%/gst/mpegts/gstmpegtsdescriptor.h include/gstreamer-%%VERSION%%/gst/mpegts/gstmpegtssection.h include/gstreamer-%%VERSION%%/gst/mpegts/mpegts-prelude.h include/gstreamer-%%VERSION%%/gst/mpegts/mpegts.h +include/gstreamer-%%VERSION%%/gst/play/gstplay-media-info.h +include/gstreamer-%%VERSION%%/gst/play/gstplay-signal-adapter.h +include/gstreamer-%%VERSION%%/gst/play/gstplay-types.h +include/gstreamer-%%VERSION%%/gst/play/gstplay-video-overlay-video-renderer.h +include/gstreamer-%%VERSION%%/gst/play/gstplay-video-renderer.h +include/gstreamer-%%VERSION%%/gst/play/gstplay-visualization.h +include/gstreamer-%%VERSION%%/gst/play/gstplay.h +include/gstreamer-%%VERSION%%/gst/play/play-prelude.h +include/gstreamer-%%VERSION%%/gst/play/play.h include/gstreamer-%%VERSION%%/gst/player/gstplayer-g-main-context-signal-dispatcher.h include/gstreamer-%%VERSION%%/gst/player/gstplayer-media-info.h include/gstreamer-%%VERSION%%/gst/player/gstplayer-signal-dispatcher.h @@ -44,26 +60,37 @@ include/gstreamer-%%VERSION%%/gst/sctp/sctp-prelude.h include/gstreamer-%%VERSION%%/gst/sctp/sctpreceivemeta.h include/gstreamer-%%VERSION%%/gst/sctp/sctpsendmeta.h +include/gstreamer-%%VERSION%%/gst/transcoder/gsttranscoder-signal-adapter.h +include/gstreamer-%%VERSION%%/gst/transcoder/gsttranscoder.h +include/gstreamer-%%VERSION%%/gst/transcoder/transcoder-enumtypes.h +include/gstreamer-%%VERSION%%/gst/transcoder/transcoder-prelude.h include/gstreamer-%%VERSION%%/gst/uridownloader/gstfragment.h include/gstreamer-%%VERSION%%/gst/uridownloader/gsturidownloader.h include/gstreamer-%%VERSION%%/gst/uridownloader/gsturidownloader_debug.h include/gstreamer-%%VERSION%%/gst/uridownloader/uridownloader-prelude.h +include/gstreamer-%%VERSION%%/gst/webrtc/datachannel.h include/gstreamer-%%VERSION%%/gst/webrtc/dtlstransport.h include/gstreamer-%%VERSION%%/gst/webrtc/icetransport.h include/gstreamer-%%VERSION%%/gst/webrtc/rtcsessiondescription.h include/gstreamer-%%VERSION%%/gst/webrtc/rtpreceiver.h include/gstreamer-%%VERSION%%/gst/webrtc/rtpsender.h include/gstreamer-%%VERSION%%/gst/webrtc/rtptransceiver.h +include/gstreamer-%%VERSION%%/gst/webrtc/sctptransport.h include/gstreamer-%%VERSION%%/gst/webrtc/webrtc-enumtypes.h include/gstreamer-%%VERSION%%/gst/webrtc/webrtc.h include/gstreamer-%%VERSION%%/gst/webrtc/webrtc_fwd.h -lib/girepository-1.0/GstInsertBin-%%VERSION%%.typelib -lib/girepository-1.0/GstMpegts-%%VERSION%%.typelib -lib/girepository-1.0/GstPlayer-%%VERSION%%.typelib -lib/girepository-1.0/GstWebRTC-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstBadAudio-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstCodecs-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstInsertBin-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstMpegts-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstPlay-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstPlayer-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstTranscoder-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstWebRTC-%%VERSION%%.typelib lib/gstreamer-%%VERSION%%/libgstaccurip.so lib/gstreamer-%%VERSION%%/libgstadpcmdec.so lib/gstreamer-%%VERSION%%/libgstadpcmenc.so +lib/gstreamer-%%VERSION%%/libgstaes.so lib/gstreamer-%%VERSION%%/libgstaiff.so lib/gstreamer-%%VERSION%%/libgstasfmux.so lib/gstreamer-%%VERSION%%/libgstaudiobuffersplit.so @@ -75,9 +102,10 @@ lib/gstreamer-%%VERSION%%/libgstbayer.so lib/gstreamer-%%VERSION%%/libgstbz2.so lib/gstreamer-%%VERSION%%/libgstcamerabin.so +lib/gstreamer-%%VERSION%%/libgstcodecalpha.so lib/gstreamer-%%VERSION%%/libgstcoloreffects.so lib/gstreamer-%%VERSION%%/libgstdebugutilsbad.so -lib/gstreamer-%%VERSION%%/libgstdvb.so +lib/gstreamer-%%VERSION%%/libgstdvbsubenc.so lib/gstreamer-%%VERSION%%/libgstdvbsuboverlay.so lib/gstreamer-%%VERSION%%/libgstdvdspu.so lib/gstreamer-%%VERSION%%/libgstfaceoverlay.so @@ -109,7 +137,11 @@ lib/gstreamer-%%VERSION%%/libgstproxy.so lib/gstreamer-%%VERSION%%/libgstremovesilence.so lib/gstreamer-%%VERSION%%/libgstrfbsrc.so +lib/gstreamer-%%VERSION%%/libgstrist.so +lib/gstreamer-%%VERSION%%/libgstrtmp2.so +lib/gstreamer-%%VERSION%%/libgstrtpmanagerbad.so lib/gstreamer-%%VERSION%%/libgstrtponvif.so +lib/gstreamer-%%VERSION%%/libgstsctp.so lib/gstreamer-%%VERSION%%/libgstsdpelem.so lib/gstreamer-%%VERSION%%/libgstsegmentclip.so lib/gstreamer-%%VERSION%%/libgstshm.so @@ -117,14 +149,16 @@ lib/gstreamer-%%VERSION%%/libgstsmooth.so lib/gstreamer-%%VERSION%%/libgstspeed.so lib/gstreamer-%%VERSION%%/libgstsubenc.so +lib/gstreamer-%%VERSION%%/libgstswitchbin.so lib/gstreamer-%%VERSION%%/libgsttimecode.so +lib/gstreamer-%%VERSION%%/libgsttranscode.so lib/gstreamer-%%VERSION%%/libgstvideofiltersbad.so lib/gstreamer-%%VERSION%%/libgstvideoframe_audiolevel.so lib/gstreamer-%%VERSION%%/libgstvideoparsersbad.so lib/gstreamer-%%VERSION%%/libgstvideosignal.so +lib/gstreamer-%%VERSION%%/libgstwebrtc.so lib/gstreamer-%%VERSION%%/libgstvmnc.so lib/gstreamer-%%VERSION%%/libgsty4mdec.so -lib/gstreamer-%%VERSION%%/libgstyadif.so lib/libgstadaptivedemux-%%VERSION%%.so lib/libgstadaptivedemux-%%VERSION%%.so.0 lib/libgstadaptivedemux-%%VERSION%%.so.%%SOVERSION%% @@ -137,6 +171,9 @@ lib/libgstcodecparsers-%%VERSION%%.so lib/libgstcodecparsers-%%VERSION%%.so.0 lib/libgstcodecparsers-%%VERSION%%.so.%%SOVERSION%% +lib/libgstcodecs-%%VERSION%%.so +lib/libgstcodecs-%%VERSION%%.so.0 +lib/libgstcodecs-%%VERSION%%.so.%%SOVERSION%% lib/libgstinsertbin-%%VERSION%%.so lib/libgstinsertbin-%%VERSION%%.so.0 lib/libgstinsertbin-%%VERSION%%.so.%%SOVERSION%% @@ -149,12 +186,17 @@ lib/libgstphotography-%%VERSION%%.so lib/libgstphotography-%%VERSION%%.so.0 lib/libgstphotography-%%VERSION%%.so.%%SOVERSION%% +lib/libgstplay-%%VERSION%%.so +lib/libgstplay-%%VERSION%%.so.0 +lib/libgstplay-%%VERSION%%.so.%%SOVERSION%% lib/libgstplayer-%%VERSION%%.so lib/libgstplayer-%%VERSION%%.so.0 lib/libgstplayer-%%VERSION%%.so.%%SOVERSION%% lib/libgstsctp-%%VERSION%%.so lib/libgstsctp-%%VERSION%%.so.0 lib/libgstsctp-%%VERSION%%.so.%%SOVERSION%% +lib/libgsttranscoder-%%VERSION%%.so +lib/libgsttranscoder-%%VERSION%%.so.0 lib/libgsturidownloader-%%VERSION%%.so lib/libgsturidownloader-%%VERSION%%.so.0 lib/libgsturidownloader-%%VERSION%%.so.%%SOVERSION%% @@ -165,14 +207,32 @@ libdata/pkgconfig/gstreamer-codecparsers-%%VERSION%%.pc libdata/pkgconfig/gstreamer-insertbin-%%VERSION%%.pc libdata/pkgconfig/gstreamer-mpegts-%%VERSION%%.pc +libdata/pkgconfig/gstreamer-photography-%%VERSION%%.pc +libdata/pkgconfig/gstreamer-play-%%VERSION%%.pc libdata/pkgconfig/gstreamer-player-%%VERSION%%.pc libdata/pkgconfig/gstreamer-plugins-bad-%%VERSION%%.pc libdata/pkgconfig/gstreamer-sctp-%%VERSION%%.pc +libdata/pkgconfig/gstreamer-transcoder-%%VERSION%%.pc libdata/pkgconfig/gstreamer-webrtc-%%VERSION%%.pc -share/gir-1.0/GstInsertBin-%%VERSION%%.gir -share/gir-1.0/GstMpegts-%%VERSION%%.gir -share/gir-1.0/GstPlayer-%%VERSION%%.gir -share/gir-1.0/GstWebRTC-%%VERSION%%.gir +share/gir-%%VERSION%%/GstBadAudio-%%VERSION%%.gir +share/gir-%%VERSION%%/GstCodecs-%%VERSION%%.gir +share/gir-%%VERSION%%/GstInsertBin-%%VERSION%%.gir +share/gir-%%VERSION%%/GstMpegts-%%VERSION%%.gir +share/gir-%%VERSION%%/GstPlay-%%VERSION%%.gir +share/gir-%%VERSION%%/GstPlayer-%%VERSION%%.gir +share/gir-%%VERSION%%/GstTranscoder-%%VERSION%%.gir +share/gir-%%VERSION%%/GstWebRTC-%%VERSION%%.gir +%%DATADIR%%-%%VERSION%%/encoding-profiles/device/dvd.gep +%%DATADIR%%-%%VERSION%%/encoding-profiles/file-extension/avi.gep +%%DATADIR%%-%%VERSION%%/encoding-profiles/file-extension/flv.gep +%%DATADIR%%-%%VERSION%%/encoding-profiles/file-extension/mkv.gep +%%DATADIR%%-%%VERSION%%/encoding-profiles/file-extension/mp3.gep +%%DATADIR%%-%%VERSION%%/encoding-profiles/file-extension/mp4.gep +%%DATADIR%%-%%VERSION%%/encoding-profiles/file-extension/oga.gep +%%DATADIR%%-%%VERSION%%/encoding-profiles/file-extension/ogv.gep +%%DATADIR%%-%%VERSION%%/encoding-profiles/file-extension/ts.gep +%%DATADIR%%-%%VERSION%%/encoding-profiles/file-extension/webm.gep +%%DATADIR%%-%%VERSION%%/encoding-profiles/online-services/youtube.gep %%DATADIR%%-%%VERSION%%/presets/GstFreeverb.prs share/locale/af/LC_MESSAGES/gst-plugins-bad-%%VERSION%%.mo share/locale/ast/LC_MESSAGES/gst-plugins-bad-%%VERSION%%.mo @@ -216,3 +276,4 @@ share/locale/uk/LC_MESSAGES/gst-plugins-bad-%%VERSION%%.mo share/locale/vi/LC_MESSAGES/gst-plugins-bad-%%VERSION%%.mo share/locale/zh_CN/LC_MESSAGES/gst-plugins-bad-%%VERSION%%.mo +share/locale/zh_TW/LC_MESSAGES/gst-plugins-bad-%%VERSION%%.mo Index: multimedia/gstreamer1-plugins-core/Makefile =================================================================== --- multimedia/gstreamer1-plugins-core/Makefile +++ multimedia/gstreamer1-plugins-core/Makefile @@ -1,5 +1,5 @@ PORTNAME= gstreamer1-plugins-core -PORTVERSION= 1.16 +PORTVERSION= 1.20.3 CATEGORIES= multimedia audio MASTER_SITES= # empty DISTFILES= # empty Index: multimedia/gstreamer1-plugins-dash/Makefile =================================================================== --- multimedia/gstreamer1-plugins-dash/Makefile +++ multimedia/gstreamer1-plugins-dash/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer Dynamic Adaptive Streaming over HTTP demuxer plugin @@ -6,13 +6,10 @@ GST_PLUGIN= dash DIST= bad -DASH_GST_DIRS= gst-libs/gst/isoff - MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins -pre-build: -.for dir in ${DASH_GST_DIRS} - @(cd ${BUILD_WRKSRC}/${dir}; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}) -.endfor +PLIST= ${.CURDIR}/pkg-plist + +USE_GNOME= libxml2 .include "${MASTERDIR}/Makefile" Index: multimedia/gstreamer1-plugins-dash/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-dash/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstdash.so Index: multimedia/gstreamer1-plugins-dts/Makefile =================================================================== --- multimedia/gstreamer1-plugins-dts/Makefile +++ multimedia/gstreamer1-plugins-dts/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer dts audio decode plugin @@ -8,4 +8,10 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libdca.so:multimedia/libdca + .include "${MASTERDIR}/Makefile" + +MESON_ARGS+= -Dgpl=enabled Index: multimedia/gstreamer1-plugins-dts/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-dts/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstdtsdec.so Index: multimedia/gstreamer1-plugins-dv/Makefile =================================================================== --- multimedia/gstreamer1-plugins-dv/Makefile +++ multimedia/gstreamer1-plugins-dv/Makefile @@ -1,12 +1,16 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= multimedia PKGNAMESUFFIX= 1-plugins-dv COMMENT= GStreamer dv demux and decoder plugin based on libdv -GST_PLUGIN= libdv +GST_PLUGIN= dv DIST= good MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libdv.so:multimedia/libdv + .include "${MASTERDIR}/Makefile" Index: multimedia/gstreamer1-plugins-dv/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-dv/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstdv.so Index: multimedia/gstreamer1-plugins-dvdread/Makefile =================================================================== --- multimedia/gstreamer1-plugins-dvdread/Makefile +++ multimedia/gstreamer1-plugins-dvdread/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 4 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer DVD access plugin with libdvdread @@ -8,4 +8,10 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS=libdvdread.so:multimedia/libdvdread + .include "${MASTERDIR}/Makefile" + +MESON_ARGS+= -Dgpl=enabled Index: multimedia/gstreamer1-plugins-dvdread/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-dvdread/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstdvdread.so Index: multimedia/gstreamer1-plugins-gnonlin/Makefile =================================================================== --- multimedia/gstreamer1-plugins-gnonlin/Makefile +++ multimedia/gstreamer1-plugins-gnonlin/Makefile @@ -1,5 +1,6 @@ PORTNAME= gstreamer1-plugins-gnonlin PORTVERSION= 1.4.0 +PORTREVISION= 1 CATEGORIES= multimedia MASTER_SITES= http://gstreamer.freedesktop.org/src/gnonlin/ DISTNAME= gnonlin-${PORTVERSION} @@ -8,7 +9,8 @@ COMMENT= GStreamer library for writing non-linear audio and video WWW= http://gstreamer.net -USES= gstreamer libtool pkgconfig python:3.4+,build tar:xz +USES= gettext-runtime gnome gstreamer libtool pkgconfig python:3.4+,build tar:xz +USE_GNOME= glib20 GNU_CONFIGURE= yes USE_GSTREAMER= good INSTALL_TARGET= install-strip Index: multimedia/gstreamer1-plugins-good/Makefile =================================================================== --- multimedia/gstreamer1-plugins-good/Makefile +++ multimedia/gstreamer1-plugins-good/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer-plugins good-quality plug-ins @@ -9,21 +9,57 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins DIST= good -GOOD_GST_DIRS= gst sys po PLIST= ${.CURDIR}/pkg-plist -FILESDIR= ${.CURDIR}/files PATCHDIR= ${.CURDIR}/files NO_GSTREAMER_COMMON= yes -do-build: -.for dir in ${GOOD_GST_DIRS} - @(cd ${BUILD_WRKSRC}/${dir}; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}) -.endfor - -do-install: -.for dir in ${GOOD_GST_DIRS} - @(cd ${INSTALL_WRKSRC}/${dir} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) -.endfor +GOOD_GST_ENABLED_PLUGINS= alpha \ + apetag \ + audiofx \ + audioparsers \ + auparse \ + autodetect \ + avi \ + cutter \ + deinterlace \ + debugutils \ + dtmf \ + effectv \ + equalizer \ + flv \ + flx \ + goom \ + goom2k1 \ + icydemux \ + id3demux \ + imagefreeze \ + interleave \ + isomp4 \ + law \ + level \ + matroska \ + monoscope \ + multifile \ + multipart \ + nls \ + oss \ + oss4 \ + replaygain \ + rtp \ + rtpmanager \ + rtsp \ + shapewipe \ + smpte \ + spectrum \ + tests \ + udp \ + videobox \ + videocrop \ + videofilter \ + videomixer \ + wavenc \ + wavparse \ + y4m .include "${MASTERDIR}/Makefile" Index: multimedia/gstreamer1-plugins-good/files/patch-ext_qt_gstqsgtexture.cc =================================================================== --- multimedia/gstreamer1-plugins-good/files/patch-ext_qt_gstqsgtexture.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- ext/qt/gstqsgtexture.cc.orig 2021-08-02 23:41:35 UTC -+++ ext/qt/gstqsgtexture.cc -@@ -39,7 +39,7 @@ GstQSGTexture::GstQSGTexture () - - initializeOpenGLFunctions(); - -- if (g_once_init_enter (&_debug)) { -+ if (g_once_init_enter ((unsigned long *)&_debug)) { - GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "qtqsgtexture", 0, - "Qt Scenegraph Texture"); - g_once_init_leave (&_debug, 1); Index: multimedia/gstreamer1-plugins-good/files/patch-ext_qt_gstqtglutility.cc =================================================================== --- multimedia/gstreamer1-plugins-good/files/patch-ext_qt_gstqtglutility.cc +++ /dev/null @@ -1,15 +0,0 @@ ---- ext/qt/gstqtglutility.cc.orig 2021-08-02 23:37:36 UTC -+++ ext/qt/gstqtglutility.cc -@@ -62,10 +62,10 @@ gst_qt_get_gl_display () - - g_assert (app != NULL); - -- if (g_once_init_enter (&_debug)) { -+ if (g_once_init_enter ((unsigned long *)&_debug)) { - GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "qtglutility", 0, - "Qt gl utility functions"); -- g_once_init_leave (&_debug, 1); -+ g_once_init_leave ((unsigned long *)&_debug, 1); - } - GST_INFO ("QGuiApplication::instance()->platformName() %s", app->platformName().toUtf8().data()); - Index: multimedia/gstreamer1-plugins-good/files/patch-ext_qt_qtitem.cc =================================================================== --- multimedia/gstreamer1-plugins-good/files/patch-ext_qt_qtitem.cc +++ /dev/null @@ -1,11 +0,0 @@ ---- ext/qt/qtitem.cc.orig 2021-08-02 23:44:43 UTC -+++ ext/qt/qtitem.cc -@@ -104,7 +104,7 @@ QtGLVideoItem::QtGLVideoItem() - { - static volatile gsize _debug; - -- if (g_once_init_enter (&_debug)) { -+ if (g_once_init_enter ((unsigned long *)&_debug)) { - GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "qtglwidget", 0, "Qt GL Widget"); - g_once_init_leave (&_debug, 1); - } Index: multimedia/gstreamer1-plugins-good/files/patch-ext_qt_qtwindow.cc =================================================================== --- multimedia/gstreamer1-plugins-good/files/patch-ext_qt_qtwindow.cc +++ /dev/null @@ -1,20 +0,0 @@ ---- ext/qt/qtwindow.cc.orig 2021-08-02 23:46:48 UTC -+++ ext/qt/qtwindow.cc -@@ -107,7 +107,7 @@ QtGLWindow::QtGLWindow ( QWindow * parent, QQuickWindo - - g_assert (app != NULL); - -- if (g_once_init_enter (&_debug)) { -+ if (g_once_init_enter ((unsigned long *)&_debug)) { - GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "qtglwindow", 0, "Qt GL QuickWindow"); - g_once_init_leave (&_debug, 1); - } -@@ -153,7 +153,7 @@ QtGLWindow::beforeRendering() - g_mutex_lock (&this->priv->lock); - - static volatile gsize once = 0; -- if (g_once_init_enter(&once)) { -+ if (g_once_init_enter((unsigned long *)&once)) { - this->priv->start = QDateTime::currentDateTime().toMSecsSinceEpoch(); - g_once_init_leave(&once,1); - } Index: multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosshelper.c =================================================================== --- multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosshelper.c +++ /dev/null @@ -1,82 +0,0 @@ ---- sys/oss/gstosshelper.c.orig 2014-07-21 10:24:27.000000000 +0200 -+++ sys/oss/gstosshelper.c 2014-10-12 18:13:53.847663389 +0200 -@@ -82,9 +82,9 @@ - gst_oss_helper_probe_caps (gint fd) - { - #if G_BYTE_ORDER == G_LITTLE_ENDIAN -- const guint probe_formats[] = { AFMT_S16_LE, AFMT_U16_LE, AFMT_U8, AFMT_S8 }; -+ const guint probe_formats[] = { AFMT_U32_LE, AFMT_S32_LE, AFMT_U24_LE, AFMT_S24_LE, AFMT_S16_LE, AFMT_U16_LE, AFMT_U8, AFMT_S8 }; - #else -- const guint probe_formats[] = { AFMT_S16_BE, AFMT_U16_BE, AFMT_U8, AFMT_S8 }; -+ const guint probe_formats[] = { AFMT_U32_BE, AFMT_S32_BE, AFMT_U24_BE, AFMT_S24_BE, AFMT_S16_BE, AFMT_U16_BE, AFMT_U8, AFMT_S8 }; - #endif - GstOssProbe *probe; - int i, f; -@@ -165,6 +165,9 @@ - const gchar *format; - - switch (format_bit) { -+ case AFMT_S8: -+ format = "S8"; -+ break; - case AFMT_U8: - format = "U8"; - break; -@@ -174,15 +177,36 @@ - case AFMT_S16_BE: - format = "S16BE"; - break; -- case AFMT_S8: -- format = "S8"; -- break; - case AFMT_U16_LE: - format = "U16LE"; - break; - case AFMT_U16_BE: - format = "U16BE"; - break; -+ case AFMT_S24_LE: -+ format = "S24LE"; -+ break; -+ case AFMT_S24_BE: -+ format = "S24BE"; -+ break; -+ case AFMT_U24_LE: -+ format = "U24LE"; -+ break; -+ case AFMT_U24_BE: -+ format = "U24BE"; -+ break; -+ case AFMT_S32_LE: -+ format = "S32LE"; -+ break; -+ case AFMT_S32_BE: -+ format = "S32BE"; -+ break; -+ case AFMT_U32_LE: -+ format = "U32LE"; -+ break; -+ case AFMT_U32_BE: -+ format = "U32BE"; -+ break; - default: - g_assert_not_reached (); - return NULL; -@@ -320,13 +344,17 @@ - int format; - int n_channels; - int ret; -+ int rst; - - rate = irate; - format = probe->format; - n_channels = probe->n_channels; -+ rst = 4000; /* XXX Lowest supported rate for FreeBSD. */ - - GST_LOG ("checking format %d, channels %d, rate %d", - format, n_channels, rate); -+ /* Reset rate to lowest supported rate. */ -+ ioctl (probe->fd, SNDCTL_DSP_SPEED, &rst); - ret = ioctl (probe->fd, SNDCTL_DSP_SETFMT, &format); - if (ret < 0 || format != probe->format) { - GST_DEBUG ("unsupported format: %d (%d)", probe->format, format); Index: multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssink.c =================================================================== --- multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssink.c +++ /dev/null @@ -1,73 +0,0 @@ ---- sys/oss/gstosssink.c.orig 2013-09-24 15:05:22.000000000 +0200 -+++ sys/oss/gstosssink.c 2014-09-11 09:10:55.116013220 +0200 -@@ -106,7 +106,10 @@ - PROP_DEVICE, - }; - --#define FORMATS "{" GST_AUDIO_NE(S16)","GST_AUDIO_NE(U16)", S8, U8 }" -+#define FORMATS "{" GST_AUDIO_NE(S32)","GST_AUDIO_NE(U32)"," \ -+ GST_AUDIO_NE(S24)","GST_AUDIO_NE(U24)"," \ -+ GST_AUDIO_NE(S16)","GST_AUDIO_NE(U16)"," \ -+ "S8, U8 }" - - static GstStaticPadTemplate osssink_sink_factory = - GST_STATIC_PAD_TEMPLATE ("sink", -@@ -321,6 +324,9 @@ - case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW: - { - switch (rfmt) { -+ case GST_AUDIO_FORMAT_S8: -+ result = AFMT_S8; -+ break; - case GST_AUDIO_FORMAT_U8: - result = AFMT_U8; - break; -@@ -330,15 +336,36 @@ - case GST_AUDIO_FORMAT_S16BE: - result = AFMT_S16_BE; - break; -- case GST_AUDIO_FORMAT_S8: -- result = AFMT_S8; -- break; - case GST_AUDIO_FORMAT_U16LE: - result = AFMT_U16_LE; - break; - case GST_AUDIO_FORMAT_U16BE: - result = AFMT_U16_BE; - break; -+ case GST_AUDIO_FORMAT_S24LE: -+ result = AFMT_S24_LE; -+ break; -+ case GST_AUDIO_FORMAT_S24BE: -+ result = AFMT_S24_BE; -+ break; -+ case GST_AUDIO_FORMAT_U24LE: -+ result = AFMT_U24_LE; -+ break; -+ case GST_AUDIO_FORMAT_U24BE: -+ result = AFMT_U24_BE; -+ break; -+ case GST_AUDIO_FORMAT_S32LE: -+ result = AFMT_S32_LE; -+ break; -+ case GST_AUDIO_FORMAT_S32BE: -+ result = AFMT_S32_BE; -+ break; -+ case GST_AUDIO_FORMAT_U32LE: -+ result = AFMT_U32_LE; -+ break; -+ case GST_AUDIO_FORMAT_U32BE: -+ result = AFMT_U32_BE; -+ break; - default: - result = 0; - break; -@@ -441,7 +468,7 @@ - rate = GST_AUDIO_INFO_RATE (&spec->info); - channels = GST_AUDIO_INFO_CHANNELS (&spec->info); - -- if (width != 16 && width != 8) -+ if (width != 32 && width != 24 && width != 16 && width != 8) - goto dodgy_width; - - SET_PARAM (oss, SNDCTL_DSP_SETFMT, tmp, "SETFMT"); Index: multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssrc.c =================================================================== --- multimedia/gstreamer1-plugins-good/files/patch-sys_oss_gstosssrc.c +++ /dev/null @@ -1,73 +0,0 @@ ---- sys/oss/gstosssrc.c.orig 2013-09-24 15:05:22.000000000 +0200 -+++ sys/oss/gstosssrc.c 2014-09-11 09:10:55.116013220 +0200 -@@ -100,7 +100,10 @@ - static guint gst_oss_src_delay (GstAudioSrc * asrc); - static void gst_oss_src_reset (GstAudioSrc * asrc); - --#define FORMATS "{" GST_AUDIO_NE(S16)","GST_AUDIO_NE(U16)", S8, U8 }" -+#define FORMATS "{" GST_AUDIO_NE(S32)","GST_AUDIO_NE(U32)"," \ -+ GST_AUDIO_NE(S24)","GST_AUDIO_NE(U24)"," \ -+ GST_AUDIO_NE(S16)","GST_AUDIO_NE(U16)"," \ -+ "S8, U8 }" - - static GstStaticPadTemplate osssrc_src_factory = GST_STATIC_PAD_TEMPLATE ("src", - GST_PAD_SRC, -@@ -314,6 +317,9 @@ - case GST_AUDIO_RING_BUFFER_FORMAT_TYPE_RAW: - { - switch (rfmt) { -+ case GST_AUDIO_FORMAT_S8: -+ result = AFMT_S8; -+ break; - case GST_AUDIO_FORMAT_U8: - result = AFMT_U8; - break; -@@ -323,15 +329,36 @@ - case GST_AUDIO_FORMAT_S16BE: - result = AFMT_S16_BE; - break; -- case GST_AUDIO_FORMAT_S8: -- result = AFMT_S8; -- break; - case GST_AUDIO_FORMAT_U16LE: - result = AFMT_U16_LE; - break; - case GST_AUDIO_FORMAT_U16BE: - result = AFMT_U16_BE; - break; -+ case GST_AUDIO_FORMAT_S24LE: -+ result = AFMT_S24_LE; -+ break; -+ case GST_AUDIO_FORMAT_S24BE: -+ result = AFMT_S24_BE; -+ break; -+ case GST_AUDIO_FORMAT_U24LE: -+ result = AFMT_U24_LE; -+ break; -+ case GST_AUDIO_FORMAT_U24BE: -+ result = AFMT_U24_BE; -+ break; -+ case GST_AUDIO_FORMAT_S32LE: -+ result = AFMT_S32_LE; -+ break; -+ case GST_AUDIO_FORMAT_S32BE: -+ result = AFMT_S32_BE; -+ break; -+ case GST_AUDIO_FORMAT_U32LE: -+ result = AFMT_U32_LE; -+ break; -+ case GST_AUDIO_FORMAT_U32BE: -+ result = AFMT_U32_BE; -+ break; - default: - result = 0; - break; -@@ -428,7 +455,7 @@ - rate = GST_AUDIO_INFO_RATE (&spec->info); - channels = GST_AUDIO_INFO_CHANNELS (&spec->info); - -- if (width != 16 && width != 8) -+ if (width != 32 && width != 24 && width != 16 && width != 8) - goto dodgy_width; - - tmp = ilog2 (spec->segsize); Index: multimedia/gstreamer1-plugins-good/files/patch-sys_v4l2_gstv4l2object.c =================================================================== --- multimedia/gstreamer1-plugins-good/files/patch-sys_v4l2_gstv4l2object.c +++ /dev/null @@ -1,13 +0,0 @@ ---- sys/v4l2/gstv4l2object.c.orig 2020-04-06 14:45:19 UTC -+++ sys/v4l2/gstv4l2object.c -@@ -2891,8 +2891,9 @@ gst_v4l2_object_is_dmabuf_supported (GstV4l2Object * v - } - - /* Expected to fail, but ENOTTY tells us that it is not implemented. */ -+ /* FreeBSD cuse sends EINVAL? */ - v4l2object->ioctl (v4l2object->video_fd, VIDIOC_EXPBUF, &expbuf); -- if (errno == ENOTTY) -+ if (errno == ENOTTY || errno == EINVAL) - ret = FALSE; - - return ret; Index: multimedia/gstreamer1-plugins-good/files/patch-sys_v4l2_v4l2__calls.c =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-good/files/patch-sys_v4l2_v4l2__calls.c @@ -0,0 +1,15 @@ +--- sys/v4l2/v4l2_calls.c.orig 2022-09-13 20:56:55 UTC ++++ sys/v4l2/v4l2_calls.c +@@ -1329,10 +1329,12 @@ gst_v4l2_query_dv_timings (GstV4l2Object * v4l2object, + + if (ret < 0) { + switch (errno) { ++#ifdef ENODATA + case ENODATA: + GST_DEBUG_OBJECT (v4l2object->dbg_obj, + "QUERY_DV_TIMINGS not supported for this input/output"); + break; ++#endif + case ENOLINK: + GST_DEBUG_OBJECT (v4l2object->dbg_obj, + "No timings could be detected because no signal was found."); Index: multimedia/gstreamer1-plugins-good/pkg-plist =================================================================== --- multimedia/gstreamer1-plugins-good/pkg-plist +++ multimedia/gstreamer1-plugins-good/pkg-plist @@ -24,6 +24,7 @@ lib/gstreamer-%%VERSION%%/libgstisomp4.so lib/gstreamer-%%VERSION%%/libgstlevel.so lib/gstreamer-%%VERSION%%/libgstmatroska.so +lib/gstreamer-%%VERSION%%/libgstmonoscope.so lib/gstreamer-%%VERSION%%/libgstmulaw.so lib/gstreamer-%%VERSION%%/libgstmultifile.so lib/gstreamer-%%VERSION%%/libgstmultipart.so Index: multimedia/gstreamer1-plugins-hls/Makefile =================================================================== --- multimedia/gstreamer1-plugins-hls/Makefile +++ multimedia/gstreamer1-plugins-hls/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 3 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer HTTP Live Streaming (HLS) plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libnettle.so:security/nettle + .include "${MASTERDIR}/Makefile" Index: multimedia/gstreamer1-plugins-hls/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-hls/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgsthls.so Index: multimedia/gstreamer1-plugins-kate/Makefile =================================================================== --- multimedia/gstreamer1-plugins-kate/Makefile +++ multimedia/gstreamer1-plugins-kate/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer kate codec plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libkate.so:multimedia/libkate + .include "${MASTERDIR}/Makefile" Index: multimedia/gstreamer1-plugins-kate/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-kate/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstkate.so Index: multimedia/gstreamer1-plugins-libde265/Makefile =================================================================== --- multimedia/gstreamer1-plugins-libde265/Makefile +++ multimedia/gstreamer1-plugins-libde265/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer HEVC/H.265 decoder (libde265) plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libde265.so:multimedia/libde265 + .include "${MASTERDIR}/Makefile" Index: multimedia/gstreamer1-plugins-libde265/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-libde265/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstde265.so Index: multimedia/gstreamer1-plugins-mpeg2dec/Makefile =================================================================== --- multimedia/gstreamer1-plugins-mpeg2dec/Makefile +++ multimedia/gstreamer1-plugins-mpeg2dec/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer mpeg decode plugin @@ -8,4 +8,10 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libmpeg2.so:multimedia/libmpeg2 + .include "${MASTERDIR}/Makefile" + +MESON_ARGS+= -Dgpl=enabled Index: multimedia/gstreamer1-plugins-mpeg2dec/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-mpeg2dec/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstmpeg2dec.so Index: multimedia/gstreamer1-plugins-mpeg2enc/Makefile =================================================================== --- multimedia/gstreamer1-plugins-mpeg2enc/Makefile +++ multimedia/gstreamer1-plugins-mpeg2enc/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer mpeg encoder plugin @@ -11,4 +11,10 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libmjpegutils.so:multimedia/mjpegtools + +MESON_ARGS+= -Dgpl=enabled + .include "${MASTERDIR}/Makefile" Index: multimedia/gstreamer1-plugins-mpeg2enc/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-mpeg2enc/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstmpeg2enc.so Index: multimedia/gstreamer1-plugins-mplex/Makefile =================================================================== --- multimedia/gstreamer1-plugins-mplex/Makefile +++ multimedia/gstreamer1-plugins-mplex/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer mplex plugin @@ -11,4 +11,10 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libmplex2.so:multimedia/mjpegtools + .include "${MASTERDIR}/Makefile" + +MESON_ARGS+= -Dgpl=enabled Index: multimedia/gstreamer1-plugins-mplex/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-mplex/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstmplex.so Index: multimedia/gstreamer1-plugins-msdk/Makefile =================================================================== --- multimedia/gstreamer1-plugins-msdk/Makefile +++ multimedia/gstreamer1-plugins-msdk/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer (Intel MediaSDK) plugin @@ -8,4 +8,11 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libgudev-1.0.so:devel/libgudev \ + libmfx.so:multimedia/intel-media-sdk \ + libva-drm.so:multimedia/libva \ + libdrm.so:graphics/libdrm + .include "${MASTERDIR}/Makefile" Index: multimedia/gstreamer1-plugins-msdk/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-msdk/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstmsdk.so Index: multimedia/gstreamer1-plugins-openh264/Makefile =================================================================== --- multimedia/gstreamer1-plugins-openh264/Makefile +++ multimedia/gstreamer1-plugins-openh264/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 3 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer (openh264) plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libopenh264.so:multimedia/openh264 + .include "${MASTERDIR}/Makefile" Index: multimedia/gstreamer1-plugins-openh264/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-openh264/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstopenh264.so Index: multimedia/gstreamer1-plugins-resindvd/Makefile =================================================================== --- multimedia/gstreamer1-plugins-resindvd/Makefile +++ multimedia/gstreamer1-plugins-resindvd/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 4 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer resindvd DVD playback plugin @@ -8,4 +8,12 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +BUILD_DEPENDS+= libdvdnav>=4.1.2:multimedia/libdvdnav +LIB_DEPENDS+= libdvdread.so:multimedia/libdvdread +RUN_DEPENDS+= libdvdnav>=4.1.2:multimedia/libdvdnav + .include "${MASTERDIR}/Makefile" + +MESON_ARGS+= -Dgpl=enabled Index: multimedia/gstreamer1-plugins-resindvd/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-resindvd/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstresindvd.so Index: multimedia/gstreamer1-plugins-rtmp/Makefile =================================================================== --- multimedia/gstreamer1-plugins-rtmp/Makefile +++ multimedia/gstreamer1-plugins-rtmp/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer RTMP stream source and sink plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= librtmp.so:multimedia/librtmp + .include "${MASTERDIR}/Makefile" Index: multimedia/gstreamer1-plugins-rtmp/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-rtmp/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstrtmp.so Index: multimedia/gstreamer1-plugins-smoothstreaming/Makefile =================================================================== --- multimedia/gstreamer1-plugins-smoothstreaming/Makefile +++ multimedia/gstreamer1-plugins-smoothstreaming/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer parse and demuliplex a Smooth Streaming manifest into audio/video streams plugin @@ -10,9 +10,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins -pre-build: -.for dir in ${SMOOTH_GST_DIRS} - @(cd ${BUILD_WRKSRC}/${dir}; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}) -.endfor +PLIST= ${.CURDIR}/pkg-plist + +USE_GNOME= libxml2 .include "${MASTERDIR}/Makefile" Index: multimedia/gstreamer1-plugins-smoothstreaming/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-smoothstreaming/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstsmoothstreaming.so Index: multimedia/gstreamer1-plugins-theora/Makefile =================================================================== --- multimedia/gstreamer1-plugins-theora/Makefile +++ multimedia/gstreamer1-plugins-theora/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer theora plugin @@ -8,4 +8,9 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS+= libtheora.so:multimedia/libtheora \ + libogg.so:audio/libogg + .include "${MASTERDIR}/Makefile" Index: multimedia/gstreamer1-plugins-theora/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-theora/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgsttheora.so Index: multimedia/gstreamer1-plugins-ttml/Makefile =================================================================== --- multimedia/gstreamer1-plugins-ttml/Makefile +++ multimedia/gstreamer1-plugins-ttml/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer ttml subtitle plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +USE_GNOME= cairo libxml2 pango + .include "${MASTERDIR}/Makefile" Index: multimedia/gstreamer1-plugins-ttml/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-ttml/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstttmlsubs.so Index: multimedia/gstreamer1-plugins-ugly/Makefile =================================================================== --- multimedia/gstreamer1-plugins-ugly/Makefile +++ multimedia/gstreamer1-plugins-ugly/Makefile @@ -1,5 +1,5 @@ -PORTREVISION= 2 -CATEGORIES= multimedia +PORTREVISION= 0 +CATEGORIES?= multimedia audio COMMENT= GStreamer-plugins set of good-quality plug-ins that might have distribution problems @@ -9,18 +9,13 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins DIST= ugly -UGLY_GST_DIRS= gst po gst-libs NO_GSTREAMER_COMMON= yes PLIST= ${.CURDIR}/pkg-plist - -do-build: -.for dir in ${UGLY_GST_DIRS} - @(cd ${BUILD_WRKSRC}/${dir}; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}) -.endfor - -do-install: -.for dir in ${UGLY_GST_DIRS} - @(cd ${INSTALL_WRKSRC}/${dir} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}) -.endfor +UGLY_GST_ENABLED_PLUGINS= asfdemux \ + nls \ + dvdlpcmdec \ + dvdsub \ + realmedia \ + xingmux .include "${MASTERDIR}/Makefile" Index: multimedia/gstreamer1-plugins-ugly/files/patch-meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-ugly/files/patch-meson.build @@ -0,0 +1,14 @@ +*** meson.build.orig Fri Sep 2 18:21:32 2022 +--- meson.build Fri Sep 2 18:24:38 2022 +*************** +*** 117,122 **** +--- 117,125 ---- + cdata.set_quoted('GETTEXT_PACKAGE', 'gst-plugins-ugly-1.0') + cdata.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir'))) + ++ cdata.set_quoted('DEFAULT_AUDIOSINK', get_option('defaultaudiosink')) ++ cdata.set_quoted('DEFAULT_AUDIOSRC', get_option('defaultaudiosrc')) ++ + # GStreamer package name and origin url + gst_package_name = get_option('package-name') + if gst_package_name == '' Index: multimedia/gstreamer1-plugins-ugly/files/patch-meson_options.txt =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-ugly/files/patch-meson_options.txt @@ -0,0 +1,15 @@ +*** meson_options.txt.orig Fri Sep 2 18:21:12 2022 +--- meson_options.txt Fri Sep 2 18:22:42 2022 +*************** +*** 7,12 **** +--- 7,16 ---- + option('dvdsub', type : 'feature', value : 'auto') + option('realmedia', type : 'feature', value : 'auto') + option('xingmux', type : 'feature', value : 'auto') ++ option('defaultaudiosink', type : 'string', value : 'autoaudiosink', ++ description: 'set default audio sink') ++ option('defaultaudiosrc', type : 'string', value : 'autoaudiosrc', ++ description: 'set default audio src') + + # Feature options for plugins that need external deps + option('a52dec', type : 'feature', value : 'auto', description : 'Dolby Digital (AC-3) audio decoder plugin based on liba52 (GPL - only built if gpl option is also enabled!)') Index: multimedia/gstreamer1-plugins-ugly/pkg-plist =================================================================== --- multimedia/gstreamer1-plugins-ugly/pkg-plist +++ multimedia/gstreamer1-plugins-ugly/pkg-plist @@ -46,3 +46,4 @@ share/locale/uk/LC_MESSAGES/gst-plugins-ugly-%%VERSION%%.mo share/locale/vi/LC_MESSAGES/gst-plugins-ugly-%%VERSION%%.mo share/locale/zh_CN/LC_MESSAGES/gst-plugins-ugly-%%VERSION%%.mo +share/locale/zh_TW/LC_MESSAGES/gst-plugins-ugly-%%VERSION%%.mo Index: multimedia/gstreamer1-plugins-v4l2/Makefile =================================================================== --- multimedia/gstreamer1-plugins-v4l2/Makefile +++ multimedia/gstreamer1-plugins-v4l2/Makefile @@ -1,12 +1,18 @@ -PORTREVISION= 3 +PORTREVISION= 0 CATEGORIES= multimedia PKGNAMESUFFIX= 1-plugins-v4l2 COMMENT= GStreamer Video 4 Linux 2 source plugin -GST_PLUGIN= gst_v4l2 +GST_PLUGIN= v4l2 DIST= good MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +BUILD_DEPENDS= v4l_compat>0:multimedia/v4l_compat +LIB_DEPENDS= libv4l2.so:multimedia/libv4l +RUN_DEPENDS= webcamd:multimedia/webcamd + .include "${MASTERDIR}/Makefile" Index: multimedia/gstreamer1-plugins-v4l2/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-v4l2/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstvideo4linux2.so Index: multimedia/gstreamer1-plugins-vpx/Makefile =================================================================== --- multimedia/gstreamer1-plugins-vpx/Makefile +++ multimedia/gstreamer1-plugins-vpx/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 3 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer vp8 codec plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libvpx.so:multimedia/libvpx + .include "${MASTERDIR}/Makefile" Index: multimedia/gstreamer1-plugins-vpx/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-vpx/pkg-plist @@ -0,0 +1,2 @@ +lib/gstreamer-%%VERSION%%/libgstvpx.so +%%DATADIR%%-%%VERSION%%/presets/GstVP8Enc.prs Index: multimedia/gstreamer1-plugins-x264/Makefile =================================================================== --- multimedia/gstreamer1-plugins-x264/Makefile +++ multimedia/gstreamer1-plugins-x264/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 6 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer libx264 based H264 plugin @@ -8,4 +8,10 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libx264.so:multimedia/libx264 + .include "${MASTERDIR}/Makefile" + +MESON_ARGS+= -Dgpl=enabled Index: multimedia/gstreamer1-plugins-x264/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-x264/pkg-plist @@ -0,0 +1,2 @@ +lib/gstreamer-%%VERSION%%/libgstx264.so +%%DATADIR%%-%%VERSION%%/presets/GstX264Enc.prs Index: multimedia/gstreamer1-plugins-x265/Makefile =================================================================== --- multimedia/gstreamer1-plugins-x265/Makefile +++ multimedia/gstreamer1-plugins-x265/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 3 +PORTREVISION= 0 CATEGORIES= multimedia COMMENT= GStreamer libx265 based H265 plugin @@ -8,4 +8,10 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libx265.so:multimedia/x265 + .include "${MASTERDIR}/Makefile" + +MESON_ARGS+= -Dgpl=enabled Index: multimedia/gstreamer1-plugins-x265/pkg-plist =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins-x265/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstx265.so Index: multimedia/gstreamer1-plugins/Makefile =================================================================== --- multimedia/gstreamer1-plugins/Makefile +++ multimedia/gstreamer1-plugins/Makefile @@ -1,15 +1,12 @@ PORTNAME= gstreamer PORTVERSION?= ${BASE_PORTVERSION} -# When chasing a shared library for a plug-in bump the PORTREVISION in the # plug-in port instead, like ${category}/gstreamer1-plugin-${PLUGIN}. -PORTREVISION?= 7 +PORTREVISION?= 0 CATEGORIES?= multimedia audio -MASTER_SITES= GNOME/sources/gst-plugins-base/${PORTVERSION:R}:base \ - GNOME/sources/gst-plugins-good/${PORTVERSION:R}:good \ - http://gstreamer.freedesktop.org/src/gst-plugins-base/:base \ - http://gstreamer.freedesktop.org/src/gst-plugins-bad/:bad \ - http://gstreamer.freedesktop.org/src/gst-plugins-good/:good \ - http://gstreamer.freedesktop.org/src/gst-plugins-ugly/:ugly +MASTER_SITES= https://gstreamer.freedesktop.org/src/gst-plugins-base/:base \ + https://gstreamer.freedesktop.org/src/gst-plugins-bad/:bad \ + https://gstreamer.freedesktop.org/src/gst-plugins-good/:good \ + https://gstreamer.freedesktop.org/src/gst-plugins-ugly/:ugly PKGNAMESUFFIX?= 1-plugins${GST_PLUGIN_SUFFIX} MAINTAINER= multimedia@FreeBSD.org @@ -26,24 +23,22 @@ PORTSCOUT= limitw:1,even -BASE_PORTVERSION= 1.16.2 +BASE_PORTVERSION= 1.20.3 BASE_DISTNAME= gst-plugins-base-${BASE_PORTVERSION} BASE_DISTFILE= ${BASE_DISTNAME}${EXTRACT_SUFX} -BAD_PORTVERSION= 1.16.2 +BAD_PORTVERSION= 1.20.3 BAD_DISTNAME= gst-plugins-bad-${BAD_PORTVERSION} BAD_DISTFILE= ${BAD_DISTNAME}${EXTRACT_SUFX} -GOOD_PORTVERSION= 1.16.2 +GOOD_PORTVERSION= 1.20.3 GOOD_DISTNAME= gst-plugins-good-${GOOD_PORTVERSION} GOOD_DISTFILE= ${GOOD_DISTNAME}${EXTRACT_SUFX} -UGLY_PORTVERSION= 1.16.2 +UGLY_PORTVERSION= 1.20.3 UGLY_DISTNAME= gst-plugins-ugly-${UGLY_PORTVERSION} UGLY_DISTFILE= ${UGLY_DISTNAME}${EXTRACT_SUFX} DIST?= base -USES+= cpe gettext gmake gnome gstreamer libtool pathfix pkgconfig python tar:xz +USES+= meson cpe gettext gnome gstreamer libtool pathfix pkgconfig python:3.8+,build tar:xz USE_GNOME+= glib20 introspection:build libxml2 -GNU_CONFIGURE= yes -INSTALL_TARGET= install-strip GST_PLUGIN?= base USE_LDCONFIG= yes @@ -54,8 +49,6 @@ CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -lpthread -L${LOCALBASE}/lib ${EXTRA_LIBS} -CONFIGURE_ARGS+= --disable-fatal-warnings - DEFAULT_AUDIOSINK?= osssink DEFAULT_AUDIOSRC?= osssrc @@ -64,7 +57,7 @@ .endif VERSION= 1.0 -SOVERSION= 0.1602.0 +SOVERSION= 0.2003.0 PLIST_SUB+= VERSION="${VERSION}" \ SOVERSION="${SOVERSION}" @@ -74,16 +67,47 @@ .if ${GST_PLUGIN} == "base" DIST= base NO_GSTREAMER_COMMON= yes + +BASE_GST_ENABLED_PLUGINS= adder \ + allocators \ + app \ + audio \ + audioconvert \ + audiomixer \ + audiorate \ + audioresample \ + audiotestsrc \ + compositor \ + encoding \ + fft \ + gio \ + nls \ + overlaycomposition \ + pbtypes \ + pkgconfig \ + pbutils \ + playback \ + rawparse \ + riff \ + rtp \ + rtsp \ + sdp \ + subparse \ + tag \ + tcp \ + tools \ + typefind \ + video \ + videoconvert \ + videorate \ + videoscale \ + videotestsrc \ + volume .endif .if ${DIST} == base || ${DIST} == ugly -# --with-default-audiosink specify default audio sink -# --with-default-audiosrc specify default audio source -# --with-default-videosink specify default video sink -# --with-default-videosrc specify default video source -# --with-default-visualizer specify default visualizer -CONFIGURE_ARGS+=--with-default-audiosink="${DEFAULT_AUDIOSINK}" \ - --with-default-audiosrc="${DEFAULT_AUDIOSRC}" +CONFIGURE_ARGS+= -Ddefaultaudiosink="${DEFAULT_AUDIOSINK}" \ + -Ddefaultaudiosrc="${DEFAULT_AUDIOSRC}" .endif .include "${MASTERDIR}/Makefile.common" @@ -126,75 +150,7 @@ DEFAULT_DVD_DEVICE=/dev/cd0 .endif -post-patch: -.if ${DIST} == bad -# custom rule to fix opencv detection in configure -# @${REINPLACE_CMD} -e 's|opencv <= 2.4.8|opencv <= 2.4.9|g' \ -# ${WRKSRC}/configure - @${REINPLACE_CMD} -e 's|/dev/dvd|${DEFAULT_DVD_DEVICE}|g' \ - ${WRKSRC}/ext/resindvd/resindvdbin.c \ - ${WRKSRC}/ext/resindvd/resindvdsrc.c -# Fix dependency on neon-0.31 and 0.32 - ${REINPLACE_CMD} -e '/neon/s|0.30.99|0.32.99|g' \ - ${WRKSRC}/configure -# Fix build against OpenCV 4.5.1 - ${REINPLACE_CMD} '/opencv/s|4\.2\.0|4.7.0|g' \ - ${WRKSRC}/configure - -.endif -.if ${DIST} != ugly - @${FIND} ${WRKSRC}/ext ${WRKSRC}/sys \ - -name Makefile.in | ${XARGS} -n 10 ${REINPLACE_CMD} -e \ - '/la_DEPENDENCIES/,/am__DEPENDENCIES/s,$$(top_builddir)/gst-libs/.*.la,,' -e \ - 's|$$(top_builddir)/gst-libs/gst/tag/libgsttag-@GST_API_VERSION@.la|-lgsttag-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/audio/libgstaudio-@GST_API_VERSION@.la|-lgstaudio-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/pbutils/libgstpbutils-@GST_API_VERSION@.la|-lgstpbutils-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/riff/libgstriff-@GST_API_VERSION@.la|-lgstriff-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/signalprocessor/libgstsignalprocessor-@GST_API_VERSION@.la|-lgstsignalprocessor-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/video/libgstbasevideo-@GST_API_VERSION@.la|-lgstbasevideo-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/video/libgstvideo-@GST_API_VERSION@.la|-lgstvideo-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/base/libgstbadbase-@GST_API_VERSION@.la|-lgstbadbase-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-@GST_API_VERSION@.la|-lgsturidownloader-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/adaptivedemux/libgstadaptivedemux-@GST_API_VERSION@.la|-lgstadaptivedemux-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-@GST_API_VERSION@.la|-lgstcodecparsers-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/allocators/libgstbadallocators-@GST_API_VERSION@.la|-lgstbadallocators-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/audio/libgstbadaudio-@GST_API_VERSION@.la|-lgstbadaudio-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/video/libgstbadvideo-@GST_API_VERSION@.la|-lgstbadvideo-${VERSION}|' - - @${FIND} ${WRKSRC}/ext ${WRKSRC}/sys -name Makefile.in | \ - ${XARGS} -n 10 ${REINPLACE_CMD} -e \ - '/la_DEPENDENCIES/,/am__DEPENDENCIES/s,$$(top_builddir)/gst-libs/.*.la,,' -e \ - 's|$$(top_builddir)/gst-libs/gst/tag/libgsttag-$$(GST_API_VERSION).la|-lgsttag-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/audio/libgstaudio-$$(GST_API_VERSION).la|-lgstaudio-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/pbutils/libgstpbutils-$$(GST_API_VERSION).la|-lgstpbutils-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/riff/libgstriff-$$(GST_API_VERSION).la|-lgstriff-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/signalprocessor/libgstsignalprocessor-$$(GST_API_VERSION).la|-lgstsignalprocessor-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/video/libgstbasevideo-$$(GST_API_VERSION).la|-lgstbasevideo-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/video/libgstvideo-$$(GST_API_VERSION).la|-lgstvideo-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/base/libgstbadbase-$$(GST_API_VERSION).la|-lgstbadbase-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-$$(GST_API_VERSION).la|-lgsturidownloader-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/adaptivedemux/libgstadaptivedemux-@GST_API_VERSION@.la|-lgstadaptivedemux-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/codecparsers/libgstcodecparsers-$$(GST_API_VERSION).la|-lgstcodecparsers-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/allocators/libgstbadallocators-$$(GST_API_VERSION).la|-lgstbadallocators-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/audio/libgstbadaudio-$$(GST_API_VERSION).la|-lgstbadaudio-${VERSION}|; \ - s|$$(top_builddir)/gst-libs/gst/video/libgstbadvideo-$$(GST_API_VERSION).la|-lgstbadvideo-${VERSION}|' - @${FIND} ${WRKSRC}/ext ${WRKSRC}/gst ${WRKSRC}/gst-libs \ - -name Makefile.in -exec ${REINPLACE_CMD} \ - '/foreach/s/\\#include/#include/' {} + -.endif - -.if ${DIST} == bad -# Disable X11 support in librfb -post-configure: - @${REINPLACE_CMD} -e 's|HAVE_X11 = yes|HAVE_X11 = no|g' \ - -e 's|#ifdef HAVE_X11|#ifdef NO_X11|g' \ - -e 's|$$(X11_CFLAGS) \\|\\|g' \ - -e 's|$$(X11_LIBS) \\|\\|g' \ - ${WRKSRC}/gst/librfb/Makefile \ - ${WRKSRC}/gst/librfb/gstrfbsrc.c -.endif - pre-install: - ${MKDIR} ${STAGEDIR}${PREFIX}/lib/gstreamer-1.0 + ${MKDIR} ${STAGEDIR}${PREFIX}/lib/gstreamer-${VERSION} .include Index: multimedia/gstreamer1-plugins/Makefile.common =================================================================== --- multimedia/gstreamer1-plugins/Makefile.common +++ multimedia/gstreamer1-plugins/Makefile.common @@ -1,608 +1,365 @@ -BASE_GST_ALL_PLUGINS= \ +BASE_GST_ALL_PLUGINS+= \ + adder \ + allocators \ alsa \ + app \ + audio \ + audioconvert \ + audiomixer \ + audiorate \ + audioresample \ + audiotestsrc \ cdparanoia \ + compositor \ + doc \ + encoding \ + examples \ + fft \ + gio \ gl \ - ivorbis \ libvisual \ + nls \ ogg \ - opengl \ opus \ + overlaycomposition \ pango \ + pbtypes \ + pbutils \ + pkgconfig \ + playback \ + rawparse \ + riff \ + rtp \ + rtsp \ + sdp \ + subparse \ + tag \ + tcp \ + tests \ theora \ + tools \ + typefind \ + video \ + videoconvert \ + videorate \ + videoscale \ + videotestsrc \ + volume \ vorbis \ - x \ + ximage \ xvideo -BASE_GST_NON_PLUGINS= \ - --disable-gles2 \ - --disable-egl \ - --disable-glx +BASE_GST_ENABLED_PLUGINS?= BAD_GST_ALL_PLUGINS+= \ + accurip \ + adaptivedemux \ + adpcmdec \ + adpcmenc \ + aes \ + aiff \ + androidmedia \ aom \ + applemedia \ + asfmux \ assrender \ + audiobuffersplit \ + audiofxbad \ + audiolatency \ + audiomixmatrix \ + audiovisualizers \ + autoconvert \ + basecamerabinsrc \ + bayer \ + bluez \ bs2b \ + bz2 \ + camerabin2 \ chromaprint \ + closedcaption \ + codecalpha \ + codecparsers \ + codecs \ + coloreffects \ + colormanagement \ curl \ dash \ + data \ + dc1394 \ + debugutils \ + directfb \ + directsound \ + doc \ dtls \ dts \ + dvb \ + dvbsubenc \ + dvbsuboverlay \ + dvdspu \ + examples \ faac \ faad \ + faceoverlay \ + festival \ + fieldanalysis \ flite \ + freeverb \ + frei0r \ + gaudieffects \ + gdp \ + geometrictransform \ gme \ gsm \ hls \ + id3tag \ + insertbin \ + inter \ + interfaces \ + interlace \ + ipcpipeline \ + isoff \ + ivfparse \ + ivtc \ + jp2kdecimator \ + jpegformat \ kate \ kms \ ladspa \ libde265 \ + librfb \ lv2 \ + midi \ modplug \ mpeg2enc \ + mpegdemux \ + mpegpsmux \ + mpegts \ + mpegtsdemux \ + mpegtsmux \ mplex \ msdk \ musepack \ + mxf \ neon \ - ofa \ + netsim \ + nls \ + nvcodec \ + onvif \ openal \ opencv \ openexr \ openh264 \ openjpeg \ openmpt \ + opus \ + pcapparse \ + pkgconfig \ + play \ + player \ + pnm \ + proxy \ + rawparse \ + removesilence \ resindvd \ - rtmp \ + rist \ rsvg \ + rtmp \ + rtmp2 \ + rtp \ + sbc \ + sctp \ + sdp \ + segmentclip \ + shm \ + siren \ + smooth \ smoothstreaming \ sndfile \ soundtouch \ spandsp \ + speed \ srtp \ + subenc \ + switchbin \ + tests \ + timecode \ + tinyalsa \ + tools \ + transcode \ + transcoder \ ttml \ - vdpau \ + uridownloader \ + uvch264 \ + videofilters \ + videoframe_audiolevel \ + videoparsers \ + videosignal \ + vmnc \ vulkan \ + wasapi \ wayland \ webp \ + webrtc \ webrtcdsp \ + winks \ + winscreencap \ x265 \ - zbar \ + y4m \ + zbar -BAD_GST_NON_PLUGINS= \ - --enable-bz2 \ - --enable-dvb \ - --enable-shm \ - --disable-acm \ - --disable-android_media \ - --disable-apple_media \ - --disable-avc \ - --disable-bluez \ - --disable-directfb \ - --disable-direct3d \ - --disable-directsound \ - --disable-nvenc \ - --disable-nvdec \ - --disable-sbc \ - --disable-spc \ - --disable-tinyalsa \ - --disable-uvch264 \ - --disable-vcd \ - --disable-wasapi \ - --disable-winks \ - --disable-winscreencap +BAD_GST_ENABLED_PLUGINS?= GOOD_GST_ALL_PLUGINS+= \ aalib \ + alpha \ + apetag \ + audiofx \ + audioparsers \ + auparse \ + autodetect \ + avi \ cairo \ + cutter \ + debugutils \ + deinterlace \ + directsound \ + dtmf \ + dv \ + dv1394 \ + effectv \ + equalizer \ + examples \ flac \ - gdk_pixbuf \ - gst_v4l2 \ + flv \ + flx \ + gdk-pixbuf \ + goom \ + goom2k1 \ gtk3 \ + icydemux \ + id3demux \ + imagefreeze \ + interleave \ + isomp4 \ jack \ jpeg \ lame \ + law \ + level \ libcaca \ - libdv \ - libpng \ + matroska \ + monoscope \ mpg123 \ + multifile \ + multipart \ + nls \ + oss \ + oss4 \ + osxaudio \ + osxvideo \ + png \ pulse \ - qt \ + qt5 \ + replaygain \ + rtp \ + rtpmanager \ + rtsp \ + shapewipe \ shout2 \ + smpte \ soup \ + spectrum \ speex \ taglib \ + tests \ twolame \ + udp \ + v4l2 \ + videobox \ + videocrop \ + videofilter \ + videomixer \ vpx \ + waveform \ + wavenc \ wavpack \ - x + wavparse \ + ximagesrc \ + y4m -GOOD_GST_NON_PLUGINS= \ - --disable-dv1394 \ - --disable-directsound \ - --disable-osx_audio \ - --disable-osx_video \ - --disable-waveform \ - --enable-bz2 \ - --enable-oss \ - --enable-oss4 \ - --enable-zlib +GOOD_GST_ENABLED_PLUGINS?= UGLY_GST_ALL_PLUGINS+= \ a52dec \ amrnb \ - amrwb \ + amrwbdec \ + asfdemux \ cdio \ + dvdlpcmdec \ dvdread \ + dvdsub \ mpeg2dec \ + nls \ + realmedia \ sidplay \ - x264 + x264 \ + xingmux + +UGLY_GST_ENABLED_PLUGINS?= -UGLY_GST_NON_PLUGINS= +# gstreamer scripts tend to call python3 rather than python +BINARY_ALIAS= python3=${PYTHON_VERSION} # Disable all plugins by default .if ${DIST}=="base" .for d in ${BASE_GST_ALL_PLUGINS} -CONFIGURE_ARGS+= --disable-${d} +CONFIGURE_ARGS+= -D${d}=disabled +.endfor +.for d in ${BASE_GST_ENABLED_PLUGINS} +CONFIGURE_ARGS+= -D${d}=enabled .endfor -CONFIGURE_ARGS+= ${BASE_GST_NON_PLUGINS} .endif .if ${DIST}=="bad" .for d in ${BAD_GST_ALL_PLUGINS} -CONFIGURE_ARGS+= --disable-${d} +CONFIGURE_ARGS+= -D${d}=disabled +.endfor +.for d in ${BAD_GST_ENABLED_PLUGINS} +CONFIGURE_ARGS+= -D${d}=enabled .endfor -CONFIGURE_ARGS+= ${BAD_GST_NON_PLUGINS} .endif .if ${DIST}=="good" .for d in ${GOOD_GST_ALL_PLUGINS} -CONFIGURE_ARGS+= --disable-${d} +CONFIGURE_ARGS+= -D${d}=disabled +.endfor +.for d in ${GOOD_GST_ENABLED_PLUGINS} +CONFIGURE_ARGS+= -D${d}=enabled .endfor -CONFIGURE_ARGS+= ${GOOD_GST_NON_PLUGINS} .endif .if ${DIST}=="ugly" .for d in ${UGLY_GST_ALL_PLUGINS} -CONFIGURE_ARGS+= --disable-${d} +CONFIGURE_ARGS+= -D${d}=disabled +.endfor +.for d in ${UGLY_GST_ENABLED_PLUGINS} +CONFIGURE_ARGS+= -D${d}=enabled .endfor -CONFIGURE_ARGS+= ${UGLY_GST_NON_PLUGINS} .endif .if ${GST_PLUGIN}!="base" && ${GST_PLUGIN}!="bad" && \ - ${GST_PLUGIN}!="good" && ${GST_PLUGIN}!="ugly" -CONFIGURE_ARGS+= --enable-${GST_PLUGIN} + ${GST_PLUGIN}!="good" && ${GST_PLUGIN}!="ugly" && \ + ${GST_PLUGIN}!="x" +CONFIGURE_ARGS+= -D${GST_PLUGIN}=enabled .endif .if !defined(NO_GSTREAMER_COMMON) GST_PLUGIN_SUFFIX?= -${GST_PLUGIN} -# Enable the right plugin -CONFIGURE_ARGS:=${CONFIGURE_ARGS:S|--disable-${GST_PLUGIN}|--enable-${GST_PLUGIN}|} +USE_GSTREAMER+= ${DIST:base=} GST_INC_DIR= include/gstreamer-${VERSION} GST_LIB_DIR= lib/gstreamer-${VERSION} -# Auto create PLIST -PLIST?= ${NONEXISTENT} - -# ------- plugins --------- - -# a52dec -gst_a52dec_LIB_DEPENDS= liba52.so:audio/liba52 - -# aalib -gst_aalib_LIB_DEPENDS= libaa.so:graphics/aalib -gst_aalib_USES= ncurses -gst_aalib_PLIST_FILES= ${GST_LIB_DIR}/libgstaasink.so - -# amrnb -gst_amrnb_LIB_DEPENDS= libopencore-amrnb.so:audio/opencore-amr -gst_amrnb_PLIST_FILES= ${GST_LIB_DIR}/libgstamrnb.so \ - share/gstreamer-${VERSION}/presets/GstAmrnbEnc.prs - -# amrwb -gst_amrwb_LIB_DEPENDS= libopencore-amrwb.so:audio/opencore-amr -gst_amrwb_GST_PLUGIN_DIR= ext/amrwbdec -gst_amrwb_PLIST_FILES= ${GST_LIB_DIR}/libgstamrwbdec.so - -# aom -gst_aom_LIB_DEPENDS= libaom.so:multimedia/aom - -# assrender -gst_assrender_LIB_DEPENDS= libass.so:multimedia/libass -gst_assrender_USES= compiler:c11 - -# bs2b -gst_bs2b_LIB_DEPENDS= libbs2b.so:audio/libbs2b - -# cairo -gst_cairo_USE_GNOME= cairo - -# cdparanoia -gst_cdparanoia_LIB_DEPENDS= libcdda_interface.so:audio/cdparanoia - -# cdio -gst_cdio_LIB_DEPENDS= libcdio.so:sysutils/libcdio - -# chromaprint -gst_chromaprint_LIB_DEPENDS= libchromaprint.so:audio/chromaprint - -# curl -gst_curl_LIB_DEPENDS= libcurl.so:ftp/curl \ - libssh2.so:security/libssh2 - -# dash -gst_dash_USE_GNOME= libxml2 -gst_dash_PLIST_FILES= ${GST_LIB_DIR}/libgstdashdemux.so - -# dtls -gst_dtls_USES= compiler:c11 ssl -gst_dtls_CONFIGURE_ENV= DTLS_CFLAGS="-I${OPENSSLINC}" \ - DTLS_LIBS="-L${OPENSSLLIB} -lcrypto -lssl" - -# dts -gst_dts_LIB_DEPENDS= libdca.so:multimedia/libdca -gst_dts_PLIST_FILES= ${GST_LIB_DIR}/libgstdtsdec.so - -# libdv -gst_libdv_LIB_DEPENDS= libdv.so:multimedia/libdv -gst_libdv_GST_PLUGIN_DIR= ext/dv -gst_libdv_PLIST_FILES= ${GST_LIB_DIR}/libgstdv.so - -# dvdread -gst_dvdread_LIB_DEPENDS=libdvdread.so:multimedia/libdvdread - -# faac -gst_faac_LIB_DEPENDS= libfaac.so:audio/faac - -# faad -gst_faad_LIB_DEPENDS= libfaad.so:audio/faad - -# flac -gst_flac_LIB_DEPENDS= libFLAC.so:audio/flac - -# flite -gst_flite_LIB_DEPENDS= libflite.so:audio/flite - -# gdk_pixbuf -gst_gdk_pixbuf_USE_GNOME= gdkpixbuf2 -gst_gdk_pixbuf_PLIST_FILES= ${GST_LIB_DIR}/libgstgdkpixbuf.so - -# gl -gst_gl_USES= gl -gst_gl_USE_GL= gl glu glesv2 egl -gst_gl_BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto -gst_gl_LIB_DEPENDS= libgraphene-1.0.so:graphics/graphene -gst_gl_CONFIGURE_ARGS= --enable-gl --enable-glx \ - --enable-egl --enable-gles2 -gst_gl_GST_PLUGIN_DIR= gst-libs/gst/gl ext/gl -gst_gl_PLIST_FILES= # - -# gme -gst_gme_LIB_DEPENDS= libgme.so:audio/libgme - -# gsm -gst_gsm_LIB_DEPENDS= libgsm.so:audio/gsm - -# gtk3 -gst_gtk3_USES= gnome -gst_gtk3_USE_GSTREAMER= gl -gst_gtk3_USE_GNOME= cairo gdkpixbuf2 gtk30 -gst_gtk3_CONFIGURE_ARGS=--enable-gtk3 -gst_gtk3_GST_PLUGIN_DIR=ext/gtk -gst_gtk3_PLIST_FILES= ${GST_LIB_DIR}/libgstgtk.so - -# hls -gst_hls_LIB_DEPENDS= libnettle.so:security/nettle - -# jack -gst_jack_LIB_DEPENDS= libjack.so:audio/jack - -# jpeg -gst_jpeg_USES= jpeg - -# kate -gst_kate_LIB_DEPENDS= libkate.so:multimedia/libkate - -# kms -gst_kms_LIB_DEPENDS= libdrm.so:graphics/libdrm -gst_kms_GST_PLUGIN_DIR= sys/kms - -# ladspa -gst_ladspa_BUILD_DEPENDS= ${LOCALBASE}/include/ladspa.h:audio/ladspa - -# lame -gst_lame_LIB_DEPENDS= libmp3lame.so:audio/lame - -# libcaca -gst_libcaca_LIB_DEPENDS= libcaca.so:graphics/libcaca -gst_libcaca_PLIST_FILES= ${GST_LIB_DIR}/libgstcacasink.so - -# libde265 -gst_libde265_LIB_DEPENDS= libde265.so:multimedia/libde265 -gst_libde265_PLIST_FILES= ${GST_LIB_DIR}/libgstde265.so - -# librfb -gst_librfb_USES= xorg -gst_librfb_USE_XORG= x11 - -# liblv2 -gst_lv2_USES= pkgconfig -gst_lv2_BUILD_DEPENDS= lv2>=1.14.0:audio/lv2 -gst_lv2_LIB_DEPENDS= libsord-0.so:devel/sord \ - libserd-0.so:devel/serd \ - libsratom-0.so:audio/sratom \ - liblilv-0.so:audio/lilv - -# png -gst_libpng_LIB_DEPENDS= libpng.so:graphics/png -gst_libpng_PLIST_FILES= ${GST_LIB_DIR}/libgstpng.so - -# libvisual -gst_libvisual_LIB_DEPENDS= libvisual-0.4.so:graphics/libvisual04 - -# modplug -gst_modplug_LIB_DEPENDS= libmodplug.so:audio/libmodplug - -# mpeg2enc -gst_mpeg2enc_LIB_DEPENDS= libmjpegutils.so:multimedia/mjpegtools - -# mpeg2dec -gst_mpeg2dec_LIB_DEPENDS= libmpeg2.so:multimedia/libmpeg2 - -# mplex -gst_mplex_LIB_DEPENDS= libmplex2.so:multimedia/mjpegtools - -# mpg123 -gst_mpg123_LIB_DEPENDS= libmpg123.so:audio/mpg123 - -# msdk -gst_msdk_LIB_DEPENDS= libgudev-1.0.so:devel/libgudev \ - libmfx.so:multimedia/intel-media-sdk \ - libva-drm.so:multimedia/libva -gst_msdk_GST_PLUGIN_DIR= sys/msdk - -# musepack -gst_musepack_LIB_DEPENDS=libmpcdec.so:audio/musepack - -# neon -gst_neon_LIB_DEPENDS+= libneon.so:www/neon -gst_neon_PLIST_FILES= ${GST_LIB_DIR}/libgstneonhttpsrc.so - -# ogg -gst_ogg_LIB_DEPENDS= libogg.so:audio/libogg - -# opencv -gst_opencv_LIB_DEPENDS= libopencv_highgui.so:graphics/opencv -gst_opencv_GST_PLUGIN_DIR= gst-libs/gst/opencv ext/opencv -gst_opencv_PLIST_FILES= # -gst_opencv_USES= compiler:c++11-lib - -# openexr -gst_openexr_LIB_DEPENDS= libOpenEXR.so:graphics/openexr - -# openjpeg -gst_openjpeg_LIB_DEPENDS= libopenjp2.so:graphics/openjpeg - -# openh264 -gst_openh264_LIB_DEPENDS= libopenh264.so:multimedia/openh264 - -# openmpt -gst_openmpt_LIB_DEPENDS= libopenmpt.so:audio/libopenmpt - -# opus -gst_opus_LIB_DEPENDS= libopus.so:audio/opus - -# pango -gst_pango_USE_GNOME= cairo pango - -# pulse -gst_pulse_LIB_DEPENDS= libpulse.so:audio/pulseaudio -gst_pulse_PLIST_FILES= ${GST_LIB_DIR}/libgstpulseaudio.so - -# qt -gst_qt_USES= compiler:c++11-lang qt:5 -gst_qt_USE_QT= core gui declarative buildtools:build network x11extras -gst_qt_USE_GSTREAMER= gl -gst_qt_PLIST_FILES= ${GST_LIB_DIR}/libgstqmlgl.so - -# resindvd -gst_resindvd_BUILD_DEPENDS= libdvdnav>=4.1.2:multimedia/libdvdnav -gst_resindvd_LIB_DEPENDS= libdvdread.so:multimedia/libdvdread -gst_resindvd_RUN_DEPENDS= libdvdnav>=4.1.2:multimedia/libdvdnav - -# rtmp -gst_rtmp_LIB_DEPENDS= librtmp.so:multimedia/librtmp - -# rsvg -gst_rsvg_USE_GNOME= cairo librsvg2 - -# shout2 -gst_shout2_LIB_DEPENDS= libshout.so:audio/libshout - -# sidplay -gst_sidplay_LIB_DEPENDS= libsidplay.so:audio/libsidplay -gst_sidplay_PLIST_FILES= ${GST_LIB_DIR}/libgstsid.so - -# smoothstreaming -gst_smoothstreaming_USE_GNOME= libxml2 - -# sndfile -gst_sndfile_LIB_DEPENDS= libsndfile.so:audio/libsndfile - -# soundtouch -gst_soundtouch_LIB_DEPENDS= libSoundTouch.so:audio/soundtouch - -# souphttpsrc -gst_soup_LIB_DEPENDS= libsoup-2.4.so:devel/libsoup - -# spandsp -gst_spandsp_LIB_DEPENDS= libspandsp.so:comms/spandsp - -# speex -gst_speex_LIB_DEPENDS= libspeex.so:audio/speex - -# srtp -gst_srtp_LIB_DEPENDS= libsrtp2.so:net/libsrtp2 - -# taglib -gst_taglib_LIB_DEPENDS= libtag.so:audio/taglib - -# theora -gst_theora_LIB_DEPENDS= libtheora.so:multimedia/libtheora \ - libogg.so:audio/libogg - -# ttml -gst_ttml_USE_GNOME= cairo libxml2 pango -gst_ttml_PLIST_FILES= ${GST_LIB_DIR}/libgstttmlsubs.so - -# twolame -gst_twolame_LIB_DEPENDS= libtwolame.so:audio/twolame - -# gst_v4l2 -gst_gst_v4l2_BUILD_DEPENDS= v4l_compat>0:multimedia/v4l_compat -gst_gst_v4l2_LIB_DEPENDS= libv4l2.so:multimedia/libv4l -gst_gst_v4l2_RUN_DEPENDS= webcamd:multimedia/webcamd -gst_gst_v4l2_PLIST_FILES= ${GST_LIB_DIR}/libgstvideo4linux2.so -gst_gst_v4l2_GST_PLUGIN_DIR= sys/v4l2 - -# vorbis -gst_vorbis_USE_GSTREAMER= ogg -gst_vorbis_LIB_DEPENDS= libvorbis.so:audio/libvorbis - -# vpx -gst_vpx_LIB_DEPENDS= libvpx.so:multimedia/libvpx -gst_vpx_PLIST_FILES= ${GST_LIB_DIR}/libgstvpx.so \ - share/gstreamer-${VERSION}/presets/GstVP8Enc.prs - -# vdpau -gst_vdpau_LIB_DEPENDS= libvdpau.so:multimedia/libvdpau -gst_vdpau_GST_PLUGIN_DIR= sys/vdpau - -# vulkan -gst_vulkan_USE_GSTREAMER= gl -gst_vulkan_BUILD_DEPENDS= ${LOCALBASE}/include/linux/input.h:devel/evdev-proto \ - ${LOCALBASE}/include/libdrm/drm_fourcc.h:graphics/libdrm \ - ${LOCALBASE}/include/vulkan/vulkan.h:graphics/vulkan-headers \ - wayland-protocols>=0:graphics/wayland-protocols -gst_vulkan_LIB_DEPENDS= libvulkan.so:graphics/vulkan-loader \ - libwayland-client.so:graphics/wayland -gst_vulkan_CONFIGURE_ARGS= --enable-wayland - -# webp -gst_webp_LIB_DEPENDS= libwebp.so:graphics/webp - -# webrtcdsp -gst_webrtcdsp_LIB_DEPENDS= libwebrtc_audio_processing.so:audio/webrtc-audio-processing0 - -# X ximage and xvimage sinks aka output -.if ${DIST} == base -gst_x_USES= xorg -gst_x_USE_XORG= x11 xv xext -gst_x_CONFIGURE_ARGS= --enable-xvideo --enable-xshm -gst_x_GST_PLUGIN_DIR= sys/ximage sys/xvimage -gst_x_PLIST_FILES= ${GST_LIB_DIR}/libgstximagesink.so \ - ${GST_LIB_DIR}/libgstxvimagesink.so -.endif - -.if ${DIST} == good -# Ximagesrc -gst_x_USES= xorg -gst_x_USE_XORG= x11 xfixes xdamage xext -gst_x_CONFIGURE_ARGS= --enable-x -gst_x_GST_PLUGIN_DIR= sys/ximage -gst_x_PLIST_FILES= ${GST_LIB_DIR}/libgstximagesrc.so -.endif - -# x264 -gst_x264_LIB_DEPENDS= libx264.so:multimedia/libx264 -gst_x264_PLIST_FILES= ${GST_LIB_DIR}/libgstx264.so \ - share/gstreamer-${VERSION}/presets/GstX264Enc.prs - -# x265 -gst_x265_LIB_DEPENDS= libx265.so:multimedia/x265 - -# xvid -gst_xvid_LIB_DEPENDS= libxvidcore.so:multimedia/xvid - -# wavpack -gst_wavpack_LIB_DEPENDS= libwavpack.so:audio/wavpack - -# zbar -gst_zbar_LIB_DEPENDS= libzbar.so:graphics/zbar - .endif # NO_GSTREAMER_COMMON -.if !defined(NO_GSTREAMER_COMMON) -gst_${GST_PLUGIN}_BUILD_DEPENDS?= -gst_${GST_PLUGIN}_LIB_DEPENDS?= -gst_${GST_PLUGIN}_RUN_DEPENDS?= -gst_${GST_PLUGIN}_USES?= -gst_${GST_PLUGIN}_USE_QT?= -gst_${GST_PLUGIN}_USE_XORG?= -gst_${GST_PLUGIN}_PLIST_FILES?= \ - ${GST_LIB_DIR}/libgst${GST_PLUGIN}${GST_PLIST_SUFFIX}.so -gst_${GST_PLUGIN}_EXTRA_LIBS?= -gst_${GST_PLUGIN}_PREBUILD_DIR?= -gst_${GST_PLUGIN}_GST_PLUGIN_DIR?= ext/${GST_PLUGIN} -gst_${GST_PLUGIN}_POSTBUILD_DIR?= -gst_${GST_PLUGIN}_USE_XORG?= -gst_${GST_PLUGIN}_USE_GNOME?= -gst_${GST_PLUGIN}_CONFIGURE_ENV?= -gst_${GST_PLUGIN}_USE_GL?= -gst_${GST_PLUGIN}_GLIB_SCHEMAS?= -gst_${GST_PLUGIN}_CONFIGURE_ARGS?= -gst_${GST_PLUGIN}_USE_SDL?= -gst_${GST_PLUGIN}_USE_GSTREAMER?= - -BUILD_DEPENDS+= ${gst_${GST_PLUGIN}_BUILD_DEPENDS} -LIB_DEPENDS+= ${gst_${GST_PLUGIN}_LIB_DEPENDS} -RUN_DEPENDS+= ${gst_${GST_PLUGIN}_RUN_DEPENDS} -USES+= ${gst_${GST_PLUGIN}_USES} -PLIST_FILES= ${gst_${GST_PLUGIN}_PLIST_FILES} -EXTRA_LIBS+= ${gst_${GST_PLUGIN}_EXTRA_LIBS} -.if ${gst_${GST_PLUGIN}_USE_XORG}!="" -USE_XORG+= ${gst_${GST_PLUGIN}_USE_XORG} -.endif -.if ${gst_${GST_PLUGIN}_USE_GNOME}!="" -USE_GNOME+= ${gst_${GST_PLUGIN}_USE_GNOME} -.endif -.if ${gst_${GST_PLUGIN}_USE_QT}!="" -USE_QT+= ${gst_${GST_PLUGIN}_USE_QT} -.endif -CONFIGURE_ENV+= ${gst_${GST_PLUGIN}_CONFIGURE_ENV} -.if ${gst_${GST_PLUGIN}_USE_GL}!="" -USE_GL+= ${gst_${GST_PLUGIN}_USE_GL} -.endif - -.if ${gst_${GST_PLUGIN}_GLIB_SCHEMAS}!="" -GLIB_SCHEMAS= ${gst_${GST_PLUGIN}_GLIB_SCHEMAS} -.endif - -CONFIGURE_ARGS+= ${gst_${GST_PLUGIN}_CONFIGURE_ARGS} - -.if ${gst_${GST_PLUGIN}_USE_SDL}!="" -USE_SDL= ${gst_${GST_PLUGIN}_USE_SDL} -.endif - -USE_GSTREAMER+= ${gst_${GST_PLUGIN}_USE_GSTREAMER} ${DIST:base=} -GST_PREBUILD_DIR= ${gst_${GST_PLUGIN}_GST_PREBUILD_DIR} -GST_PLUGIN_DIR= ${gst_${GST_PLUGIN}_GST_PLUGIN_DIR} -GST_POSTBUILD_DIR= ${gst_${GST_PLUGIN}_GST_POSTBUILD_DIR} - -.if !target(do-build) -do-build: -.for dir in ${GST_PREBUILD_DIR} ${GST_PLUGIN_DIR} ${GST_POSTBUILD_DIR} - @cd ${WRKSRC}/${dir}; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \ - ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET} -.endfor -.endif - -.if !target(do-install) -do-install: -.for dir in ${GST_PLUGIN_DIR} - @cd ${WRKSRC}/${dir}; ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \ - ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET} -.endfor -.endif -.endif Index: multimedia/gstreamer1-plugins/distinfo =================================================================== --- multimedia/gstreamer1-plugins/distinfo +++ multimedia/gstreamer1-plugins/distinfo @@ -1,9 +1,9 @@ -TIMESTAMP = 1575818122 -SHA256 (gst-plugins-base-1.16.2.tar.xz) = b13e73e2fe74a4166552f9577c3dcb24bed077021b9c7fa600d910ec6987816a -SIZE (gst-plugins-base-1.16.2.tar.xz) = 3939868 -SHA256 (gst-plugins-bad-1.16.2.tar.xz) = f1cb7aa2389569a5343661aae473f0a940a90b872001824bc47fa8072a041e74 -SIZE (gst-plugins-bad-1.16.2.tar.xz) = 4887812 -SHA256 (gst-plugins-ugly-1.16.2.tar.xz) = 5500415b865e8b62775d4742cbb9f37146a50caecfc0e7a6fc0160d3c560fbca -SIZE (gst-plugins-ugly-1.16.2.tar.xz) = 893964 -SHA256 (gst-plugins-good-1.16.2.tar.xz) = 40bb3bafda25c0b739c8fc36e48380fccf61c4d3f83747e97ac3f9b0171b1319 -SIZE (gst-plugins-good-1.16.2.tar.xz) = 3897172 +TIMESTAMP = 1662117432 +SHA256 (gst-plugins-base-1.20.3.tar.xz) = 7e30b3dd81a70380ff7554f998471d6996ff76bbe6fc5447096f851e24473c9f +SIZE (gst-plugins-base-1.20.3.tar.xz) = 3299976 +SHA256 (gst-plugins-bad-1.20.3.tar.xz) = 7a11c13b55dd1d2386dd902219e41cbfcdda8e1e0aa3e738186c95074b35da4f +SIZE (gst-plugins-bad-1.20.3.tar.xz) = 6222824 +SHA256 (gst-plugins-ugly-1.20.3.tar.xz) = 8caa20789a09c304b49cf563d33cca9421b1875b84fcc187e4a385fa01d6aefd +SIZE (gst-plugins-ugly-1.20.3.tar.xz) = 508272 +SHA256 (gst-plugins-good-1.20.3.tar.xz) = f8f3c206bf5cdabc00953920b47b3575af0ef15e9f871c0b6966f6d0aa5868b7 +SIZE (gst-plugins-good-1.20.3.tar.xz) = 3417252 Index: multimedia/gstreamer1-plugins/files/patch-Makefile.in =================================================================== --- multimedia/gstreamer1-plugins/files/patch-Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.in.orig 2013-03-10 14:54:07.000000000 +0000 -+++ Makefile.in 2013-03-10 14:55:01.000000000 +0000 -@@ -483,8 +483,6 @@ - gst-libs \ - gst sys $(SUBDIRS_EXT) \ - tools \ -- tests \ -- docs \ - po \ - common \ - m4 Index: multimedia/gstreamer1-plugins/files/patch-configure =================================================================== --- multimedia/gstreamer1-plugins/files/patch-configure +++ /dev/null @@ -1,109 +0,0 @@ ---- configure.orig 2019-03-02 18:59:35.242374000 +0100 -+++ configure 2019-03-02 19:00:32.651461000 +0100 -@@ -33987,54 +33987,9 @@ - _ACEOF - - fi -- if test "x$FOUND_CDPARANOIA" = "xyes"; -- then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for paranoia_cachemodel_size in -lcdda_paranoia" >&5 --$as_echo_n "checking for paranoia_cachemodel_size in -lcdda_paranoia... " >&6; } --if ${ac_cv_lib_cdda_paranoia_paranoia_cachemodel_size+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lcdda_paranoia -lcdda_interface $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ - --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char paranoia_cachemodel_size (); --int --main () --{ --return paranoia_cachemodel_size (); -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_cdda_paranoia_paranoia_cachemodel_size=yes --else -- ac_cv_lib_cdda_paranoia_paranoia_cachemodel_size=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdda_paranoia_paranoia_cachemodel_size" >&5 --$as_echo "$ac_cv_lib_cdda_paranoia_paranoia_cachemodel_size" >&6; } --if test "x$ac_cv_lib_cdda_paranoia_paranoia_cachemodel_size" = xyes; then : -- : --else -- HAVE_CDPARANOIA=no --fi - -- fi - -- -- - elif test $pkg_failed = untried; then - - -@@ -34176,51 +34131,6 @@ - cat >>confdefs.h <<_ACEOF - #define CDPARANOIA_HEADERS_IN_DIR /**/ - _ACEOF -- -- fi -- if test "x$FOUND_CDPARANOIA" = "xyes"; -- then -- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for paranoia_cachemodel_size in -lcdda_paranoia" >&5 --$as_echo_n "checking for paranoia_cachemodel_size in -lcdda_paranoia... " >&6; } --if ${ac_cv_lib_cdda_paranoia_paranoia_cachemodel_size+:} false; then : -- $as_echo_n "(cached) " >&6 --else -- ac_check_lib_save_LIBS=$LIBS --LIBS="-lcdda_paranoia -lcdda_interface $LIBS" --cat confdefs.h - <<_ACEOF >conftest.$ac_ext --/* end confdefs.h. */ -- --/* Override any GCC internal prototype to avoid an error. -- Use char because int might match the return type of a GCC -- builtin and then its argument prototype would still apply. */ --#ifdef __cplusplus --extern "C" --#endif --char paranoia_cachemodel_size (); --int --main () --{ --return paranoia_cachemodel_size (); -- ; -- return 0; --} --_ACEOF --if ac_fn_c_try_link "$LINENO"; then : -- ac_cv_lib_cdda_paranoia_paranoia_cachemodel_size=yes --else -- ac_cv_lib_cdda_paranoia_paranoia_cachemodel_size=no --fi --rm -f core conftest.err conftest.$ac_objext \ -- conftest$ac_exeext conftest.$ac_ext --LIBS=$ac_check_lib_save_LIBS --fi --{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cdda_paranoia_paranoia_cachemodel_size" >&5 --$as_echo "$ac_cv_lib_cdda_paranoia_paranoia_cachemodel_size" >&6; } --if test "x$ac_cv_lib_cdda_paranoia_paranoia_cachemodel_size" = xyes; then : -- : --else -- HAVE_CDPARANOIA=no --fi - - fi - Index: multimedia/gstreamer1-plugins/files/patch-ext_cdparanoia_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-ext_cdparanoia_meson.build @@ -0,0 +1,11 @@ +--- ext/cdparanoia/meson.build.orig 2022-09-08 19:40:48 UTC ++++ ext/cdparanoia/meson.build +@@ -33,7 +33,7 @@ if cdparanoia_found + ['gstcdparanoiasrc.c'], + include_directories: [configinc, libsinc], + c_args : gst_plugins_base_args, +- dependencies : cdparanoia_deps + glib_deps + [audio_dep, gst_dep, gst_base_dep], ++ dependencies : cdparanoia_deps + glib_deps + [dependency('gstreamer-audio-1.0'), gst_dep, gst_base_dep], + install : true, + install_dir : plugins_install_dir, + ) Index: multimedia/gstreamer1-plugins/files/patch-ext_gl_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-ext_gl_meson.build @@ -0,0 +1,11 @@ +--- ext/gl/meson.build.orig 2022-09-09 09:05:31 UTC ++++ ext/gl/meson.build +@@ -146,7 +146,7 @@ gstopengl = library('gstopengl', + objc_args : gst_plugins_base_args + gl_objc_args + extra_c_args, + link_args : noseh_link_args, + include_directories : [configinc], +- dependencies : [gstgl_dep, video_dep, ++ dependencies : [gstgl_dep, dependency('gstreamer-video-1.0'), + gst_base_dep, gst_controller_dep, libm] + optional_deps, + install : true, + install_dir : plugins_install_dir) Index: multimedia/gstreamer1-plugins/files/patch-ext_libvisual_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-ext_libvisual_meson.build @@ -0,0 +1,12 @@ +--- ext/libvisual/meson.build.orig 2022-09-12 14:49:46 UTC ++++ ext/libvisual/meson.build +@@ -13,7 +13,8 @@ if libvisual_dep.found() + libvisual_sources, + c_args : gst_plugins_base_args, + include_directories: [configinc, libsinc], +- dependencies : glib_deps + [libvisual_dep, audio_dep, video_dep, pbutils_dep, gst_dep, gst_base_dep], ++ dependencies : glib_deps + [libvisual_dep, dependency('gstreamer-audio-1.0'), ++ dependency('gstreamer-video-1.0'), dependency('gstreamer-pbutils-1.0'), gst_dep, gst_base_dep], + install : true, + install_dir : plugins_install_dir, + ) Index: multimedia/gstreamer1-plugins/files/patch-ext_ogg_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-ext_ogg_meson.build @@ -0,0 +1,13 @@ +--- ext/ogg/meson.build.orig 2022-09-07 20:35:50 UTC ++++ ext/ogg/meson.build +@@ -19,7 +19,9 @@ if ogg_dep.found() + c_args : gst_plugins_base_args, + link_args : noseh_link_args, + include_directories: [configinc, libsinc], +- dependencies : glib_deps + [ogg_dep, audio_dep, pbutils_dep, tag_dep, riff_dep, gst_dep, gst_base_dep], ++ dependencies : glib_deps + [ogg_dep, dependency('gstreamer-audio-1.0'), ++ dependency('gstreamer-pbutils-1.0'), dependency('gstreamer-tag-1.0'), ++ dependency('gstreamer-riff-1.0'), gst_dep, gst_base_dep], + install : true, + install_dir : plugins_install_dir, + ) Index: multimedia/gstreamer1-plugins/files/patch-ext_opus_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-ext_opus_meson.build @@ -0,0 +1,19 @@ +--- ext/opus/meson.build.orig 2022-09-06 22:11:13 UTC ++++ ext/opus/meson.build +@@ -11,12 +11,15 @@ opus_dep = dependency('opus', version: '>= 0.9.4', req + fallback: ['opus', 'opus_dep'], default_options: ['docs=disabled']) + + if opus_dep.found() ++ pbutils_dep2 = dependency('gstreamer-pbutils-@0@'.format(api_version)) ++ audio_dep2 = dependency('gstreamer-audio-@0@'.format(api_version)) ++ tag_dep2 = dependency('gstreamer-tag-@0@'.format(api_version)) + gstopus = library('gstopus', + opus_sources, + c_args : gst_plugins_base_args, + link_args : noseh_link_args, + include_directories: [configinc, libsinc], +- dependencies : glib_deps + [pbutils_dep, tag_dep, audio_dep, gst_dep, gst_base_dep, opus_dep, libm], ++ dependencies : glib_deps + [pbutils_dep2, tag_dep2, audio_dep2, gst_dep, gst_base_dep, opus_dep, libm], + install : true, + install_dir : plugins_install_dir, + ) Index: multimedia/gstreamer1-plugins/files/patch-ext_pango_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-ext_pango_meson.build @@ -0,0 +1,13 @@ +--- ext/pango/meson.build.orig 2022-09-16 21:45:01 UTC ++++ ext/pango/meson.build +@@ -18,7 +18,9 @@ if pango_dep.found() + c_args : gst_plugins_base_args, + link_args : noseh_link_args, + include_directories: [configinc, libsinc], +- dependencies : glib_deps + [pango_dep, video_dep, gst_dep, gst_base_dep, libm], ++ dependencies : glib_deps + [pango_dep, ++ dependency('gstreamer-video-1.0', required : true), ++ gst_dep, gst_base_dep, libm], + install : true, + install_dir : plugins_install_dir, + ) Index: multimedia/gstreamer1-plugins/files/patch-ext_theora_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-ext_theora_meson.build @@ -0,0 +1,12 @@ +--- ext/theora/meson.build.orig 2022-09-13 20:18:31 UTC ++++ ext/theora/meson.build +@@ -21,7 +21,8 @@ if theoradec_dep.found() or theoraenc_dep.found() + c_args : gst_plugins_base_args, + link_args : noseh_link_args, + include_directories: [configinc, libsinc], +- dependencies : theora_deps + glib_deps + [video_dep, tag_dep, gst_dep, gst_base_dep], ++ dependencies : theora_deps + glib_deps + [dependency('gstreamer-video-1.0'), ++ dependency('gstreamer-tag-1.0'), gst_base_dep], + install : true, + install_dir : plugins_install_dir, + ) Index: multimedia/gstreamer1-plugins/files/patch-ext_vorbis_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-ext_vorbis_meson.build @@ -0,0 +1,12 @@ +--- ext/vorbis/meson.build.orig 2022-09-07 21:09:11 UTC ++++ ext/vorbis/meson.build +@@ -31,7 +31,8 @@ if vorbis_dep.found() + c_args : gst_plugins_base_args, + link_args : noseh_link_args, + include_directories: [configinc, libsinc], +- dependencies : vorbis_deps + glib_deps + [audio_dep, tag_dep, gst_dep, gst_base_dep], ++ dependencies : vorbis_deps + glib_deps + [dependency('gstreamer-audio-1.0'), ++ dependency('gstreamer-tag-1.0'), gst_dep, gst_base_dep], + install : true, + install_dir : plugins_install_dir, + ) Index: multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_allocators_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_allocators_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/allocators/meson.build.orig 2022-09-06 20:56:00 UTC ++++ gst-libs/gst/allocators/meson.build +@@ -1,3 +1,4 @@ ++if get_option('allocators').enabled() + gst_allocators_headers = files([ + 'allocators.h', + 'allocators-prelude.h', +@@ -58,3 +59,4 @@ allocators_dep = declare_dependency(link_with: gstallo + sources : allocators_gen_sources) + + meson.override_dependency('gstreamer-allocators-1.0', allocators_dep) ++endif Index: multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_app_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_app_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/app/meson.build.orig 2022-09-06 20:56:57 UTC ++++ gst-libs/gst/app/meson.build +@@ -1,3 +1,4 @@ ++if get_option('app').enabled() + app_sources = files(['gstappsrc.c', 'gstappsink.c']) + + app_mkenum_headers = files([ +@@ -68,3 +69,4 @@ app_dep = declare_dependency(link_with: gstapp, + sources : app_gen_sources) + + meson.override_dependency(pkg_name, app_dep) ++endif Index: multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_audio_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_audio_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/audio/meson.build.orig 2022-09-06 20:57:46 UTC ++++ gst-libs/gst/audio/meson.build +@@ -1,3 +1,4 @@ ++if get_option('audio').enabled() + audio_src = files([ + 'audio.c', + 'audio-buffer.c', +@@ -189,3 +190,4 @@ audio_dep = declare_dependency(link_with : gstaudio, + sources : audio_gen_sources) + + meson.override_dependency(pkg_name, audio_dep) ++endif Index: multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_fft_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_fft_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/fft/meson.build.orig 2022-09-06 20:58:23 UTC ++++ gst-libs/gst/fft/meson.build +@@ -1,3 +1,4 @@ ++if get_option('fft').enabled() + fft_sources = [ + 'gstfft.c', + 'gstffts16.c', +@@ -50,3 +51,4 @@ fft_dep = declare_dependency(link_with: gstfft, + dependencies : [gst_dep]) + + meson.override_dependency(pkg_name, fft_dep) ++endif Index: multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_gl_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_gl_meson.build @@ -0,0 +1,69 @@ +--- gst-libs/gst/gl/meson.build.orig 2022-09-08 22:01:19 UTC ++++ gst-libs/gst/gl/meson.build +@@ -1049,7 +1049,7 @@ if build_gstgl + soversion : soversion, + darwin_versions : osxversion, + install : true, +- dependencies : [gst_base_dep, video_dep, allocators_dep, gmodule_dep, ++ dependencies : [gst_base_dep, dependency('gstreamer-video-1.0'), dependency('gstreamer-allocators-1.0'), gmodule_dep, + gl_lib_deps, gl_platform_deps, gl_winsys_deps, gl_misc_deps], + # don't confuse EGL/egl.h with gst-libs/gl/egl/egl.h on case-insensitive file systems + implicit_include_directories : false) +@@ -1060,10 +1060,10 @@ if build_gstgl + 'gl_apis=' + ' '.join(enabled_gl_apis), + ] + +- library_def = {'lib': pbutils} ++ library_def = {'lib': library('gstpbutils-@0@'.format(api_version))} + pkg_name = 'gstreamer-gl-1.0' + pkgconfig.generate(gstgl, +- libraries : [gstvideo, gst_base_dep, gst_dep], ++ libraries : [library('gstvideo-@0@'.format(api_version)), gst_base_dep, gst_dep], + variables : pkgconfig_variables + pkgconfig_gl_variables, + uninstalled_variables : pkgconfig_gl_variables, + subdirs : pkgconfig_subdirs, +@@ -1095,7 +1095,7 @@ if build_gstgl + 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'], + 'install' : true, + 'extra_args' : gir_init_section + ['--c-include=gst/gl/gl.h'], +- 'dependencies' : [video_dep, gst_dep, gst_base_dep], ++ 'dependencies' : [dependency('gstreamer-video-1.0'), gst_dep, gst_base_dep], + } + library_def += {'gir': [gir]} + if not static_build +@@ -1107,7 +1107,7 @@ if build_gstgl + gstgl_dep = declare_dependency(link_with : gstgl, + include_directories : [libsinc, compat_includes], + sources: gen_sources, +- dependencies : [video_dep, gst_base_dep]) ++ dependencies : [dependency('gstreamer-video-1.0'), gst_base_dep]) + gstglproto_dep = declare_dependency(dependencies : [gstgl_dep] + gl_lib_deps) + meson.override_dependency('gstreamer-gl-1.0', gstgl_dep) + meson.override_dependency('gstreamer-gl-prototypes-1.0', gstglproto_dep) +@@ -1134,7 +1134,7 @@ if build_gstgl + 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'], + 'install' : true, + 'extra_args' : gir_init_section + ['--c-include=gst/gl/x11/x11.h'], +- 'dependencies' : [video_dep, gst_dep, gst_base_dep] ++ 'dependencies' : [dependency('gstreamer-video-1.0'), gst_dep, gst_base_dep] + } + gir_dict = gir + {'includes': gir['includes'] + ['GstGL-1.0']} + libraries += [[pkg_name, {'gir': gir_dict}]] +@@ -1170,7 +1170,7 @@ if build_gstgl + 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'], + 'install' : true, + 'extra_args' : gir_init_section + ['--c-include=gst/gl/wayland/wayland.h'], +- 'dependencies' : [video_dep, gst_dep, gst_base_dep] ++ 'dependencies' : [dependency('gstreamer-video-1.0'), gst_dep, gst_base_dep] + } + + gir_dict = gir + {'includes': gir['includes'] + ['GstGL-1.0']} +@@ -1206,7 +1206,7 @@ if build_gstgl + 'includes' : ['Gst-1.0', 'GstBase-1.0', 'GstVideo-1.0'], + 'install' : true, + 'extra_args' : gir_init_section + ['--c-include=gst/gl/egl/egl.h'], +- 'dependencies' : [video_dep, gst_dep, gst_base_dep] ++ 'dependencies' : [dependency('gstreamer-video-1.0'), gst_dep, gst_base_dep] + } + gir_dict = gir + {'includes': gir['includes'] + ['GstGL-1.0']} + libraries += [[pkg_name, {'gir': gir_dict}]] Index: multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_pbutils_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_pbutils_meson.build @@ -0,0 +1,15 @@ +--- gst-libs/gst/pbutils/meson.build.orig 2022-09-06 20:58:54 UTC ++++ gst-libs/gst/pbutils/meson.build +@@ -1,3 +1,4 @@ ++if get_option('pbutils').enabled() + pbutils_sources = files([ + 'gstpluginsbaseversion.c', + 'pbutils.c', +@@ -98,4 +99,5 @@ pbutils_dep = declare_dependency(link_with : pbutils, + dependencies : gstpbutils_deps, + sources : pbutils_gen_sources) + +-meson.override_dependency(pkg_name, pbutils_dep) +\ No newline at end of file ++meson.override_dependency(pkg_name, pbutils_dep) ++endif Index: multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_riff_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_riff_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/riff/meson.build.orig 2022-09-06 21:07:15 UTC ++++ gst-libs/gst/riff/meson.build +@@ -1,3 +1,4 @@ ++if get_option('riff').enabled() + riff_sources = [ + 'riff.c', + 'riff-media.c', +@@ -62,3 +63,4 @@ riff_dep = declare_dependency(link_with: gstriff, + sources : riff_gen_sources ) + + meson.override_dependency(pkg_name, riff_dep) ++endif Index: multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_rtp_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_rtp_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/rtp/meson.build.orig 2022-09-06 21:07:44 UTC ++++ gst-libs/gst/rtp/meson.build +@@ -1,3 +1,4 @@ ++if get_option('rtp').enabled() + rtp_sources = files([ + 'gstrtpbuffer.c', + 'gstrtcpbuffer.c', +@@ -85,3 +86,4 @@ rtp_dep = declare_dependency(link_with : gst_rtp, + sources : rtp_gen_sources) + + meson.override_dependency(pkg_name, rtp_dep) ++endif Index: multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_rtsp_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_rtsp_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/rtsp/meson.build.orig 2022-09-06 21:08:11 UTC ++++ gst-libs/gst/rtsp/meson.build +@@ -1,3 +1,4 @@ ++if get_option('rtsp').enabled() + rtsp_sources = files([ + 'gstrtsptransport.c', + 'gstrtspurl.c', +@@ -90,3 +91,4 @@ rtsp_dep = declare_dependency(link_with : gst_rtsp, + sources : rtsp_gen_sources) + + meson.override_dependency(pkg_name, rtsp_dep) ++endif Index: multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_sdp_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_sdp_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/sdp/meson.build.orig 2022-09-06 21:08:38 UTC ++++ gst-libs/gst/sdp/meson.build +@@ -1,3 +1,4 @@ ++if get_option('sdp').enabled() + gst_sdp_headers = files([ + 'sdp.h', + 'sdp-prelude.h', +@@ -60,3 +61,4 @@ sdp_dep = declare_dependency(link_with: gstsdp, + sources: sdp_gen_sources) + + meson.override_dependency(pkg_name, sdp_dep) ++endif Index: multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_tag_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_tag_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/tag/meson.build.orig 2022-09-06 21:09:11 UTC ++++ gst-libs/gst/tag/meson.build +@@ -1,3 +1,4 @@ ++if get_option('tag').enabled() + tag_sources = files([ + 'gstvorbistag.c', + 'gstid3tag.c', +@@ -142,3 +143,4 @@ executable('mklicensestables', 'mklicensestables.c', + install : false) + + gst_tag_dir = meson.current_source_dir() ++endif Index: multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_video_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-gst-libs_gst_video_meson.build @@ -0,0 +1,12 @@ +--- gst-libs/gst/video/meson.build.orig 2022-09-06 21:09:42 UTC ++++ gst-libs/gst/video/meson.build +@@ -1,3 +1,4 @@ ++if get_option('video').enabled() + video_sources = files([ + 'colorbalance.c', + 'colorbalancechannel.c', +@@ -181,3 +182,4 @@ video_dep = declare_dependency(link_with : gstvideo, + sources : video_gen_sources) + + meson.override_dependency(pkg_name, video_dep) ++endif Index: multimedia/gstreamer1-plugins/files/patch-meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-meson.build @@ -0,0 +1,39 @@ +--- meson.build.orig 2022-09-03 05:39:18 UTC ++++ meson.build +@@ -17,6 +17,8 @@ endif + gst_version_is_stable = gst_version_minor.is_even() + gst_version_is_dev = gst_version_minor % 2 == 1 and gst_version_micro < 90 + ++build_gstgl = false ++ + host_system = host_machine.system() + + have_cxx = add_languages('cpp', native: false, required: false) +@@ -282,8 +284,10 @@ core_conf.set_quoted('GST_PACKAGE_ORIGIN', get_option( + + # FIXME: These should be configure options + core_conf.set_quoted('DEFAULT_VIDEOSINK', 'autovideosink') +-core_conf.set_quoted('DEFAULT_AUDIOSINK', 'autoaudiosink') + ++core_conf.set_quoted('DEFAULT_AUDIOSINK', get_option('defaultaudiosink')) ++core_conf.set_quoted('DEFAULT_AUDIOSRC', get_option('defaultaudiosrc')) ++ + # Set whether the audioresampling method should be detected at runtime + core_conf.set('AUDIORESAMPLE_FORMAT_' + get_option('audioresample_format').to_upper(), true) + +@@ -484,6 +488,7 @@ pkgconfig_plugins_base_libs_variables = [ + 'libraries=' + ' '.join(base_libraries), + ] + ++if get_option('pkgconfig').enabled() + pkgconfig.generate( + libraries : [gst_dep], + variables : pkgconfig_variables + pkgconfig_plugins_base_libs_variables, +@@ -497,6 +502,7 @@ pkgconfig.generate( + run_command(meson_pkg_config_file_fixup_script, + 'gstreamer-plugins-base-1.0', 'libraries', + check: true) ++endif + + if have_orcc + update_orc_dist_files = find_program('scripts/update-orc-dist-files.py') Index: multimedia/gstreamer1-plugins/files/patch-meson__options.txt =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-meson__options.txt @@ -0,0 +1,30 @@ +--- meson_options.txt.orig 2022-09-06 20:35:43 UTC ++++ meson_options.txt +@@ -1,9 +1,27 @@ ++option('tag', type : 'feature', value : 'auto', description : 'tag integration library and tag plugin') ++option('pkgconfig', type : 'feature', value : 'auto', description : 'pkgconfig integration library and pkgconfig plugin') ++option('fft', type : 'feature', value : 'auto', description : 'fft integration library and fft plugin') ++option('video', type : 'feature', value : 'auto', description : 'video integration library and video plugin') ++option('audio', type : 'feature', value : 'auto', description : 'audio integration library and audio plugin') ++option('rtp', type : 'feature', value : 'auto', description : 'rtp integration library and rtp plugin') ++option('pbutils', type : 'feature', value : 'auto', description : 'pbutils integration library and pbutils plugin') ++option('sdp', type : 'feature', value : 'auto', description : 'sdp integration library and sdp plugin') ++option('rtsp', type : 'feature', value : 'auto', description : 'rtsp integration library and rtsp plugin') ++option('riff', type : 'feature', value : 'auto', description : 'riff integration library and riff plugin') ++option('ximage', type : 'feature', value : 'auto', description : 'ximage integration library and ximage plugin') ++option('app', type : 'feature', value : 'auto', description : 'app integration library and app plugin') ++option('allocators', type : 'feature', value : 'auto', description : 'allocators integration library and allocators plugin') ++ + option('audioresample_format', type : 'combo', + choices : ['int', 'float', 'auto'], value : 'auto') + option('install_plugins_helper', type: 'string', value: '', + description: 'Path of distro helper script to call to install missing plugins') + option('iso-codes', type : 'feature', value : 'auto', + description: 'Use iso-codes in libgsttag (for language names)') ++option('defaultaudiosink', type : 'string', value : 'autoaudiosink', ++ description: 'set default audio sink') ++option('defaultaudiosrc', type : 'string', value : 'autoaudiosrc', ++ description: 'set default audio src') + + # OpenGL integration library options + option('gl_api', type : 'array', choices : ['opengl', 'gles2', 'auto'], value : ['auto'], Index: multimedia/gstreamer1-plugins/files/patch-sys_ximage_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-sys_ximage_meson.build @@ -0,0 +1,19 @@ +--- sys/ximage/meson.build.orig 2022-09-09 09:10:02 UTC ++++ sys/ximage/meson.build +@@ -1,3 +1,4 @@ ++if get_option('ximage').enabled() + no_warn_args = [] + # XKeycodeToKeysym is deprecated, but we use it when Xkb is unavailable + if cc.has_argument ('-Wno-deprecated-declarations') +@@ -8,9 +9,10 @@ gstximage = library('gstximagesink', + 'ximagesink.c', 'ximage.c', 'ximagepool.c', + c_args : gst_plugins_base_args + no_warn_args, + include_directories: [configinc, libsinc], +- dependencies : glib_deps + [video_dep, gst_base_dep, gst_dep, x11_dep, xshm_dep], ++ dependencies : glib_deps + [dependency('gstreamer-video-1.0'), gst_base_dep, gst_dep, x11_dep, xshm_dep], + install : true, + install_dir : plugins_install_dir, + ) + pkgconfig.generate(gstximage, install_dir : plugins_pkgconfig_install_dir) + plugins += [gstximage] ++endif Index: multimedia/gstreamer1-plugins/files/patch-sys_xvimage_meson.build =================================================================== --- /dev/null +++ multimedia/gstreamer1-plugins/files/patch-sys_xvimage_meson.build @@ -0,0 +1,13 @@ +--- sys/xvimage/meson.build.orig 2022-09-17 07:37:22 UTC ++++ sys/xvimage/meson.build +@@ -19,7 +19,9 @@ if xvideo_dep.found() + xvimage_sources, + c_args : gst_plugins_base_args + no_warn_args, + include_directories: [configinc, libsinc], +- dependencies : glib_deps + [video_dep, gst_base_dep, gst_dep, x11_dep, xshm_dep, xvideo_dep, libm], ++ dependencies : glib_deps + [ ++ dependency('gstreamer-video-1.0', required : true), ++ gst_base_dep, gst_dep, x11_dep, xshm_dep, xvideo_dep, libm], + install : true, + install_dir : plugins_install_dir, + ) Index: multimedia/gstreamer1-plugins/pkg-plist =================================================================== --- multimedia/gstreamer1-plugins/pkg-plist +++ multimedia/gstreamer1-plugins/pkg-plist @@ -99,6 +99,7 @@ include/gstreamer-%%VERSION%%/gst/video/colorbalancechannel.h include/gstreamer-%%VERSION%%/gst/video/gstvideoaffinetransformationmeta.h include/gstreamer-%%VERSION%%/gst/video/gstvideoaggregator.h +include/gstreamer-%%VERSION%%/gst/video/gstvideocodecalphameta.h include/gstreamer-%%VERSION%%/gst/video/gstvideodecoder.h include/gstreamer-%%VERSION%%/gst/video/gstvideoencoder.h include/gstreamer-%%VERSION%%/gst/video/gstvideofilter.h @@ -118,6 +119,7 @@ include/gstreamer-%%VERSION%%/gst/video/video-event.h include/gstreamer-%%VERSION%%/gst/video/video-format.h include/gstreamer-%%VERSION%%/gst/video/video-frame.h +include/gstreamer-%%VERSION%%/gst/video/video-hdr.h include/gstreamer-%%VERSION%%/gst/video/video-info.h include/gstreamer-%%VERSION%%/gst/video/video-multiview.h include/gstreamer-%%VERSION%%/gst/video/video-overlay-composition.h @@ -129,15 +131,15 @@ include/gstreamer-%%VERSION%%/gst/video/videodirection.h include/gstreamer-%%VERSION%%/gst/video/videoorientation.h include/gstreamer-%%VERSION%%/gst/video/videooverlay.h -lib/girepository-1.0/GstAllocators-%%VERSION%%.typelib -lib/girepository-1.0/GstApp-%%VERSION%%.typelib -lib/girepository-1.0/GstAudio-%%VERSION%%.typelib -lib/girepository-1.0/GstPbutils-%%VERSION%%.typelib -lib/girepository-1.0/GstRtp-%%VERSION%%.typelib -lib/girepository-1.0/GstRtsp-%%VERSION%%.typelib -lib/girepository-1.0/GstSdp-%%VERSION%%.typelib -lib/girepository-1.0/GstTag-%%VERSION%%.typelib -lib/girepository-1.0/GstVideo-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstAllocators-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstApp-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstAudio-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstPbutils-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstRtp-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstRtsp-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstSdp-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstTag-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstVideo-%%VERSION%%.typelib lib/gstreamer-%%VERSION%%/libgstadder.so lib/gstreamer-%%VERSION%%/libgstapp.so lib/gstreamer-%%VERSION%%/libgstaudioconvert.so @@ -208,15 +210,15 @@ man/man1/gst-device-monitor-%%VERSION%%.1.gz man/man1/gst-discoverer-%%VERSION%%.1.gz man/man1/gst-play-%%VERSION%%.1.gz -share/gir-1.0/GstAllocators-%%VERSION%%.gir -share/gir-1.0/GstApp-%%VERSION%%.gir -share/gir-1.0/GstAudio-%%VERSION%%.gir -share/gir-1.0/GstPbutils-%%VERSION%%.gir -share/gir-1.0/GstRtp-%%VERSION%%.gir -share/gir-1.0/GstRtsp-%%VERSION%%.gir -share/gir-1.0/GstSdp-%%VERSION%%.gir -share/gir-1.0/GstTag-%%VERSION%%.gir -share/gir-1.0/GstVideo-%%VERSION%%.gir +share/gir-%%VERSION%%/GstAllocators-%%VERSION%%.gir +share/gir-%%VERSION%%/GstApp-%%VERSION%%.gir +share/gir-%%VERSION%%/GstAudio-%%VERSION%%.gir +share/gir-%%VERSION%%/GstPbutils-%%VERSION%%.gir +share/gir-%%VERSION%%/GstRtp-%%VERSION%%.gir +share/gir-%%VERSION%%/GstRtsp-%%VERSION%%.gir +share/gir-%%VERSION%%/GstSdp-%%VERSION%%.gir +share/gir-%%VERSION%%/GstTag-%%VERSION%%.gir +share/gir-%%VERSION%%/GstVideo-%%VERSION%%.gir share/gst-plugins-base/%%VERSION%%/license-translations.dict share/locale/af/LC_MESSAGES/gst-plugins-base-%%VERSION%%.mo share/locale/az/LC_MESSAGES/gst-plugins-base-%%VERSION%%.mo Index: multimedia/gstreamer1-rtsp-server/Makefile =================================================================== --- multimedia/gstreamer1-rtsp-server/Makefile +++ multimedia/gstreamer1-rtsp-server/Makefile @@ -1,7 +1,7 @@ PORTNAME= gstreamer1-rtsp-server -PORTVERSION= 1.16.2 +PORTVERSION= 1.20.3 CATEGORIES= multimedia -MASTER_SITES= http://gstreamer.freedesktop.org/src/gst-rtsp-server/ +MASTER_SITES= https://gstreamer.freedesktop.org/src/gst-rtsp-server/ DISTNAME= gst-rtsp-server-${PORTVERSION} MAINTAINER= multimedia@FreeBSD.org @@ -11,13 +11,13 @@ LICENSE= LGPL20+ LICENSE_FILE= ${WRKSRC}/COPYING -USES= gmake gnome gstreamer libtool pathfix pkgconfig tar:xz +USES= bison gnome gstreamer libtool meson ninja pathfix pkgconfig python:3.8+,build tar:xz USE_LDCONFIG= yes -GNU_CONFIGURE= yes USE_GNOME= glib20 introspection:build USE_GSTREAMER= good bad -INSTALL_TARGET= install-strip -PLIST_SUB= VERSION=1.0 SOVERSION=0.1602.0 +BINARY_ALIAS= python3=${PYTHON_VERSION} + +PLIST_SUB= VERSION=1.0 SOVERSION=0.2003.0 .include Index: multimedia/gstreamer1-rtsp-server/distinfo =================================================================== --- multimedia/gstreamer1-rtsp-server/distinfo +++ multimedia/gstreamer1-rtsp-server/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1586566691 -SHA256 (gst-rtsp-server-1.16.2.tar.xz) = de07a2837b3b04820ce68264a4909f70c221b85dbff0cede7926e9cdbb1dc26e -SIZE (gst-rtsp-server-1.16.2.tar.xz) = 693368 +TIMESTAMP = 1661966465 +SHA256 (gst-rtsp-server-1.20.3.tar.xz) = ee402718be9b127f0e5e66ca4c1b4f42e4926ec93ba307b7ccca5dc6cc9794ca +SIZE (gst-rtsp-server-1.20.3.tar.xz) = 362348 Index: multimedia/gstreamer1-transcoder/Makefile =================================================================== --- multimedia/gstreamer1-transcoder/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -PORTNAME= gstreamer1-transcoder -PORTVERSION= 1.16.0 -CATEGORIES= multimedia - -MAINTAINER= kwm@FreeBSD.org -COMMENT= GStreamer Transcoding API -WWW= https://github.com/pitivi/gst-transcoder - -LICENSE= LGPL21 -LICENSE_FILE= ${WRKSRC}/LICENSE - -USES= compiler gnome gstreamer meson pkgconfig python:3.3+ #shebangfix -USE_GNOME= introspection -USE_GSTREAMER= core -USE_LDCONFIG= yes - -BINARY_ALIAS= python3=${PYTHON_VERSION} -#SHEBANG_FILES= configure - -USE_GITHUB= yes -GH_ACCOUNT= pitivi -GH_PROJECT= gst-transcoder - -OPTIONS_DEFINE= DOCS - -DOCS_BUILD_DEPENDS= gtkdoc-check:textproc/gtk-doc -DOCS_MESON_FALSE= disable_doc -DOCSDIR= ${PREFIX}/share/gtk-doc/html/gstreamer-transcoder/ - -.include - -.if ${CHOSEN_COMPILER_TYPE} == gcc -post-patch: - ${REINPLACE_CMD} -e '/-Wno-pedantic/d' \ - ${WRKSRC}/meson.build -.endif - -.include Index: multimedia/gstreamer1-transcoder/distinfo =================================================================== --- multimedia/gstreamer1-transcoder/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -TIMESTAMP = 1568457624 -SHA256 (pitivi-gst-transcoder-1.16.0_GH0.tar.gz) = b5e65c70f2827aee42810120ca9637fd1f56e7cccf825b1b2f20e575cebdcd62 -SIZE (pitivi-gst-transcoder-1.16.0_GH0.tar.gz) = 38543 Index: multimedia/gstreamer1-transcoder/pkg-descr =================================================================== --- multimedia/gstreamer1-transcoder/pkg-descr +++ /dev/null @@ -1,3 +0,0 @@ -Transcodes a stream defined by its first argument to the place -defined by its second argument into the format described in its -third argument or using the given file extension. Index: multimedia/gstreamer1-transcoder/pkg-plist =================================================================== --- multimedia/gstreamer1-transcoder/pkg-plist +++ /dev/null @@ -1,34 +0,0 @@ -bin/gst-transcoder-1.0 -include/gstreamer-1.0/gst/transcoder/gsttranscoder.h -lib/girepository-1.0/GstTranscoder-1.0.typelib -lib/gstreamer-1.0/libgsttranscode.so -lib/libgsttranscoder-1.0.so -lib/libgsttranscoder-1.0.so.0 -libdata/pkgconfig/gst-transcoder-1.0.pc -share/gir-1.0/GstTranscoder-1.0.gir -share/gstreamer-1.0/encoding-profiles/device/dvd.gep -share/gstreamer-1.0/encoding-profiles/file-extension/avi.gep -share/gstreamer-1.0/encoding-profiles/file-extension/flv.gep -share/gstreamer-1.0/encoding-profiles/file-extension/mkv.gep -share/gstreamer-1.0/encoding-profiles/file-extension/mp3.gep -share/gstreamer-1.0/encoding-profiles/file-extension/mp4.gep -share/gstreamer-1.0/encoding-profiles/file-extension/oga.gep -share/gstreamer-1.0/encoding-profiles/file-extension/ogv.gep -share/gstreamer-1.0/encoding-profiles/file-extension/webm.gep -share/gstreamer-1.0/encoding-profiles/online-services/youtube.gep -%%PORTDOCS%%%%DOCSDIR%%GstTranscoder.html -%%PORTDOCS%%%%DOCSDIR%%GstTranscoderSignalDispatcher.html -%%PORTDOCS%%%%DOCSDIR%%annotation-glossary.html -%%PORTDOCS%%%%DOCSDIR%%api-index-full.html -%%PORTDOCS%%%%DOCSDIR%%ch01.html -%%PORTDOCS%%%%DOCSDIR%%gst-transcoder-hierarchy.html -%%PORTDOCS%%%%DOCSDIR%%gst-transcoder.devhelp2 -%%PORTDOCS%%%%DOCSDIR%%home.png -%%PORTDOCS%%%%DOCSDIR%%index.html -%%PORTDOCS%%%%DOCSDIR%%left-insensitive.png -%%PORTDOCS%%%%DOCSDIR%%left.png -%%PORTDOCS%%%%DOCSDIR%%right-insensitive.png -%%PORTDOCS%%%%DOCSDIR%%right.png -%%PORTDOCS%%%%DOCSDIR%%style.css -%%PORTDOCS%%%%DOCSDIR%%up-insensitive.png -%%PORTDOCS%%%%DOCSDIR%%up.png Index: multimedia/gstreamer1-vaapi/Makefile =================================================================== --- multimedia/gstreamer1-vaapi/Makefile +++ multimedia/gstreamer1-vaapi/Makefile @@ -1,6 +1,5 @@ PORTNAME= gstreamer1-vaapi -PORTVERSION= 1.16.2 -PORTREVISION= 2 +PORTVERSION= 1.20.3 CATEGORIES= multimedia MASTER_SITES= https://gstreamer.freedesktop.org/src/gstreamer-vaapi/ DISTNAME= gstreamer-vaapi-${PORTVERSION} @@ -13,26 +12,26 @@ LIB_DEPENDS= libva.so:multimedia/libva -GNU_CONFIGURE= yes -INSTALL_TARGET= install-strip -USES= compiler:c11 gettext-runtime gl gmake gnome gstreamer libtool \ - pkgconfig tar:xz xorg +USES= bison compiler:c11 gettext-runtime gl gnome gstreamer libtool \ + meson ninja pkgconfig python:3.8+,build tar:xz xorg USE_LDCONFIG= yes USE_GNOME= glib20 -USE_GSTREAMER= bad gl +USE_GSTREAMER= bad USE_GL= gl USE_XORG= x11 xrandr xrender xorgproto +BINARY_ALIAS= python3=${PYTHON_VERSION} + OPTIONS_DEFINE= DRM WAYLAND DRM_DESC= Raw KMS/DRM backend -DRM_CONFIGURE_ENABLE= drm -DRM_LIB_DEPENDS= libudev.so:devel/libudev-devd \ - libdrm.so:graphics/libdrm +DRM_MESON_OFF= -Dwith_drm=no +DRM_LIB_DEPENDS=libudev.so:devel/libudev-devd \ + libdrm.so:graphics/libdrm -WAYLAND_CONFIGURE_ENABLE= wayland +WAYLAND_MESON_OFF= -Dwith_wayland=no WAYLAND_LIB_DEPENDS= libva-wayland.so:multimedia/libva \ - libwayland-client.so:graphics/wayland + libwayland-client.so:graphics/wayland .include Index: multimedia/gstreamer1-vaapi/distinfo =================================================================== --- multimedia/gstreamer1-vaapi/distinfo +++ multimedia/gstreamer1-vaapi/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1575826374 -SHA256 (gstreamer-vaapi-1.16.2.tar.xz) = 191de7b0ab64a85dd0875c990721e7be95518f60e2a9106beca162004ed7c601 -SIZE (gstreamer-vaapi-1.16.2.tar.xz) = 1095012 +TIMESTAMP = 1662144496 +SHA256 (gstreamer-vaapi-1.20.3.tar.xz) = 6ee99eb316abdde9ad37002915bd8c3867918f6fdc74b7cf2ac4c1ae0d690b45 +SIZE (gstreamer-vaapi-1.20.3.tar.xz) = 794840 Index: multimedia/gstreamer1-vaapi/pkg-plist =================================================================== --- multimedia/gstreamer1-vaapi/pkg-plist +++ multimedia/gstreamer1-vaapi/pkg-plist @@ -1,36 +1 @@ lib/gstreamer-1.0/libgstvaapi.so -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/api-index-full.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/ch01.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/ch02.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/ch03.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-1.0.devhelp2 -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-plugin-vaapi.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapidecodebin.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapih263dec.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapih264dec.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapih264enc.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapih265dec.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapih265enc.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapijpegdec.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapijpegenc.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapimpeg2dec.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapimpeg2enc.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapimpeg4dec.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapipostproc.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapisink.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapivc1dec.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapivp8dec.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapivp8enc.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapivp9dec.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-plugins-vaapivp9enc.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/gstreamer-vaapi-running.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/home.png -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/index.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/left-insensitive.png -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/left.png -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/object-tree.html -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/right-insensitive.png -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/right.png -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/style.css -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/up-insensitive.png -share/gtk-doc/html/gstreamer-vaapi-plugins-1.0/up.png Index: multimedia/gstreamer1-validate/Makefile =================================================================== --- multimedia/gstreamer1-validate/Makefile +++ multimedia/gstreamer1-validate/Makefile @@ -1,19 +1,20 @@ PORTNAME= gstreamer1-validate -PORTVERSION= 1.16.1 +PORTVERSION= 1.16.3 CATEGORIES= multimedia -MASTER_SITES= http://gstreamer.freedesktop.org/src/gst-validate/ +MASTER_SITES= https://gstreamer.freedesktop.org/src/gst-validate/ DISTNAME= gst-validate-${PORTVERSION} MAINTAINER= multimedia@FreeBSD.org COMMENT= Gstreamer element validation suite WWW= https://gstreamer.freedesktop.org/ -LIB_DEPENDS= libjson-glib-1.0.so:devel/json-glib \ - libgstrtspserver-1.0.so:multimedia/gstreamer1-rtsp-server - LICENSE= LGPL21+ LICENSE_FILE= ${WRKSRC}/COPYING +LIB_DEPENDS= libjson-glib-1.0.so:devel/json-glib \ + libgstrtspserver-1.0.so:multimedia/gstreamer1-rtsp-server \ + libharfbuzz.so:print/harfbuzz + USES= compiler:c11 gettext-runtime gmake gnome gstreamer libtool pathfix \ pkgconfig python shebangfix tar:xz SHEBANG_FILES= tools/gst-validate-launcher.in @@ -23,6 +24,8 @@ INSTALL_TARGET= install-strip USE_PYTHON= noflavors -PLIST_SUB= VERSION=1.0 SOVERSION=0.1601.0 +BINARY_ALIAS= python3=${PYTHON_VERSION} + +PLIST_SUB= VERSION=1.0 SOVERSION=0.1603.0 .include Index: multimedia/gstreamer1-validate/distinfo =================================================================== --- multimedia/gstreamer1-validate/distinfo +++ multimedia/gstreamer1-validate/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1575056805 -SHA256 (gst-validate-1.16.1.tar.xz) = 7f079b9b2a127604b98e297037dc8847ef50f4ce2b508aa2df0cac5b77562899 -SIZE (gst-validate-1.16.1.tar.xz) = 735364 +TIMESTAMP = 1662141068 +SHA256 (gst-validate-1.16.3.tar.xz) = c2064e887324af6aa476ca669234936711f253b29042f617f1d9f2597c4bf92b +SIZE (gst-validate-1.16.3.tar.xz) = 742180 Index: multimedia/gstreamer1/Makefile =================================================================== --- multimedia/gstreamer1/Makefile +++ multimedia/gstreamer1/Makefile @@ -1,8 +1,7 @@ PORTNAME= gstreamer -PORTVERSION= 1.16.2 +PORTVERSION= 1.20.3 CATEGORIES= multimedia -MASTER_SITES= GNOME \ - http://gstreamer.freedesktop.org/src/gstreamer/ +MASTER_SITES= https://gstreamer.freedesktop.org/src/gstreamer/ PKGNAMESUFFIX= 1 MAINTAINER= multimedia@FreeBSD.org @@ -12,22 +11,15 @@ LICENSE= LGPL20+ LICENSE_FILE= ${WRKSRC}/COPYING -USES= bison cpe gmake gnome libtool pathfix perl5 pkgconfig python tar:xz -USE_PERL5= build -USE_GNOME= glib20 introspection:build +USES= bison libtool gnome meson ninja pkgconfig python:3.8+,build shebangfix tar:xz +USE_GNOME= glib20 introspection:build -CPE_VENDOR= gstreamer_project - -GNU_CONFIGURE= yes -CONFIGURE_ARGS= --disable-tests \ - --disable-examples \ - --disable-failing-tests \ - --disable-fatal-warnings \ - --disable-gtk-doc -CONFIGURE_ENV= ac_cv_func_register_printf_function="no" -INSTALL_TARGET= install-strip +CONFIGURE_ARGS= -D tests=disabled \ + -D examples=disabled \ + -D dbghelp=disabled \ + -D doc=disabled PLIST_SUB= VERSION=${GST10_VERSION} \ - SOVERSION=0.1602.0 + SOVERSION=0.2003.0 USE_LDCONFIG= yes GST10_VERSION= 1.0 @@ -45,10 +37,16 @@ OPTIONS_DEFFAULT_i386= LIBUNWIND NLS_USES= gettext -NLS_CONFIGURE_ENABLE= nls +NLS_MESON_ENABLED= nls LIBUNWIND_DESC= Libunwind is optionally used by the leaks tracer LIBUNWIND_LIB_DEPENDS= libunwind.so:devel/libunwind -LIBUNWIND_CONFIGURE_WITH= unwind +LIBUNWIND_MESON_ENABLED= libunwind + +SHEBANG_FILES= gst/parse/get_flex_version.py \ + scripts/extract-release-date-from-doap-file.py \ + docs/gst-plugins-doc-cache-generator.py +python_OLD_CMD= "/usr/bin/env python3" +python_CMD= ${SETENV} ${PYTHON_VERSION} .include Index: multimedia/gstreamer1/distinfo =================================================================== --- multimedia/gstreamer1/distinfo +++ multimedia/gstreamer1/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1575817893 -SHA256 (gstreamer-1.16.2.tar.xz) = e3f044246783fd685439647373fa13ba14f7ab0b346eadd06437092f8419e94e -SIZE (gstreamer-1.16.2.tar.xz) = 3328600 +TIMESTAMP = 1661955042 +SHA256 (gstreamer-1.20.3.tar.xz) = 607daf64bbbd5fb18af9d17e21c0d22c4d702fffe83b23cb22d1b1af2ca23a2a +SIZE (gstreamer-1.20.3.tar.xz) = 2681088 Index: multimedia/gstreamer1/files/patch-Makefile.in =================================================================== --- multimedia/gstreamer1/files/patch-Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.in.orig 2018-09-16 12:03:27 UTC -+++ Makefile.in -@@ -569,7 +569,7 @@ top_srcdir = @top_srcdir@ - DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc - aclocaldir = $(datadir)/aclocal - aclocal_DATA = gst-element-check-1.0.m4 --SUBDIRS = pkgconfig gst libs plugins tests docs po m4 common data \ -+SUBDIRS = pkgconfig gst libs plugins tests po m4 common data \ - $(am__append_1) - - # These are all the possible subdirs Index: multimedia/gstreamer1/files/patch-libs_gst_controller_Makefile.in =================================================================== --- multimedia/gstreamer1/files/patch-libs_gst_controller_Makefile.in +++ /dev/null @@ -1,11 +0,0 @@ ---- libs/gst/controller/Makefile.in.orig 2019-12-03 10:52:27 UTC -+++ libs/gst/controller/Makefile.in -@@ -591,7 +591,7 @@ libgstcontroller_@GST_API_VERSION@_la_CFLAGS = $(GST_O - libgstcontroller_@GST_API_VERSION@_la_LIBADD = $(GST_OBJ_LIBS) $(LIBM) - libgstcontroller_@GST_API_VERSION@_la_LDFLAGS = $(GST_LIB_LDFLAGS) $(GST_ALL_LDFLAGS) $(GST_LT_LDFLAGS) - CLEANFILES = *.gcno *.gcda *.gcov $(BUILT_SOURCES) $(am__append_1) --enum_headers = $(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") -+enum_headers = $(foreach h,$(glib_enum_headers),\n#include \"$(h)\") - @HAVE_INTROSPECTION_TRUE@BUILT_GIRSOURCES = GstController-@GST_API_VERSION@.gir - @HAVE_INTROSPECTION_TRUE@gir_headers = $(patsubst %,$(srcdir)/%, \ - @HAVE_INTROSPECTION_TRUE@ $(libgstcontroller_@GST_API_VERSION@_include_HEADERS)) \ Index: multimedia/gstreamer1/pkg-plist =================================================================== --- multimedia/gstreamer1/pkg-plist +++ multimedia/gstreamer1/pkg-plist @@ -120,14 +120,15 @@ include/gstreamer-%%VERSION%%/gst/net/gstnetcontrolmessagemeta.h include/gstreamer-%%VERSION%%/gst/net/gstnettimepacket.h include/gstreamer-%%VERSION%%/gst/net/gstnettimeprovider.h +include/gstreamer-%%VERSION%%/gst/net/gstnetutils.h include/gstreamer-%%VERSION%%/gst/net/gstptpclock.h include/gstreamer-%%VERSION%%/gst/net/net-prelude.h include/gstreamer-%%VERSION%%/gst/net/net.h -lib/girepository-1.0/Gst-%%VERSION%%.typelib -lib/girepository-1.0/GstBase-%%VERSION%%.typelib -lib/girepository-1.0/GstCheck-%%VERSION%%.typelib -lib/girepository-1.0/GstController-%%VERSION%%.typelib -lib/girepository-1.0/GstNet-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/Gst-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstBase-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstCheck-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstController-%%VERSION%%.typelib +lib/girepository-%%VERSION%%/GstNet-%%VERSION%%.typelib lib/gstreamer-%%VERSION%%/libgstcoreelements.so lib/gstreamer-%%VERSION%%/libgstcoretracers.so lib/libgstbase-%%VERSION%%.so @@ -150,63 +151,62 @@ libdata/pkgconfig/gstreamer-check-%%VERSION%%.pc libdata/pkgconfig/gstreamer-controller-%%VERSION%%.pc libdata/pkgconfig/gstreamer-net-%%VERSION%%.pc -libexec/gstreamer-%%VERSION%%/gst-completion-helper +libexec/gstreamer-%%VERSION%%/gst-hotdoc-plugins-scanner libexec/gstreamer-%%VERSION%%/gst-plugin-scanner +libexec/gstreamer-%%VERSION%%/gst-plugins-doc-cache-generator @(root,wheel,4755) libexec/gstreamer-%%VERSION%%/gst-ptp-helper man/man1/gst-inspect-%%VERSION%%.1.gz man/man1/gst-launch-%%VERSION%%.1.gz man/man1/gst-stats-%%VERSION%%.1.gz man/man1/gst-typefind-%%VERSION%%.1.gz share/aclocal/gst-element-check-%%VERSION%%.m4 -share/bash-completion/completions/gst-inspect-%%VERSION%% -share/bash-completion/completions/gst-launch-%%VERSION%% -share/bash-completion/helpers/gst -share/gdb/auto-load%%RESETPREFIX%%/lib/libgstreamer-%%VERSION%%.so.%%SOVERSION%%-gdb.py -share/gir-1.0/Gst-%%VERSION%%.gir -share/gir-1.0/GstBase-%%VERSION%%.gir -share/gir-1.0/GstCheck-%%VERSION%%.gir -share/gir-1.0/GstController-%%VERSION%%.gir -share/gir-1.0/GstNet-%%VERSION%%.gir +share/gdb/auto-load/usr/local/lib/libgstreamer-%%VERSION%%.so.%%SOVERSION%%-gdb.py %%DATADIR%%-%%VERSION%%/gdb/glib_gobject_helper.py %%DATADIR%%-%%VERSION%%/gdb/gst_gdb.py -%%NLS%%share/locale/af/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/ast/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/az/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/be/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/bg/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/ca/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/cs/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/da/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/de/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/el/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/en_GB/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/eo/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/es/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/eu/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/fi/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/fr/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/fur/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/gl/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/hr/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/hu/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/id/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/it/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/ja/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/lt/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/nb/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/nl/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/pl/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/pt_BR/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/ro/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/ru/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/rw/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/sk/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/sl/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/sq/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/sr/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/sv/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/tr/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/uk/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/vi/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/zh_CN/LC_MESSAGES/gstreamer-%%VERSION%%.mo -%%NLS%%share/locale/zh_TW/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/gir-%%VERSION%%/Gst-%%VERSION%%.gir +share/gir-%%VERSION%%/GstBase-%%VERSION%%.gir +share/gir-%%VERSION%%/GstCheck-%%VERSION%%.gir +share/gir-%%VERSION%%/GstController-%%VERSION%%.gir +share/gir-%%VERSION%%/GstNet-%%VERSION%%.gir +share/locale/af/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/ast/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/az/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/be/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/bg/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/ca/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/cs/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/da/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/de/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/el/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/en_GB/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/eo/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/es/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/eu/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/fi/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/fr/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/fur/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/gl/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/hr/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/hu/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/id/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/it/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/ja/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/ko/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/lt/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/nb/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/nl/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/pl/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/pt_BR/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/ro/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/ru/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/rw/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/sk/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/sl/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/sq/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/sr/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/sv/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/tr/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/uk/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/vi/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/zh_CN/LC_MESSAGES/gstreamer-%%VERSION%%.mo +share/locale/zh_TW/LC_MESSAGES/gstreamer-%%VERSION%%.mo Index: multimedia/pitivi/Makefile =================================================================== --- multimedia/pitivi/Makefile +++ multimedia/pitivi/Makefile @@ -1,6 +1,6 @@ PORTNAME= pitivi PORTVERSION= 0.999 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= multimedia MASTER_SITES= GNOME @@ -12,7 +12,7 @@ BUILD_DEPENDS= gst-validate-launcher:multimedia/gstreamer1-validate \ itstool:textproc/itstool -LIB_DEPENDS= libgsttranscoder-1.0.so:multimedia/gstreamer1-transcoder +LIB_DEPENDS= libgsttranscoder-1.0.so:multimedia/gstreamer1-plugins-bad RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gstreamer1>=1.14.0:multimedia/py-gstreamer1@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}cairo>=0:graphics/py-cairo@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}matplotlib>=1.4:math/py-matplotlib@${PY_FLAVOR} \ Index: net/gstreamer1-plugins-srtp/Makefile =================================================================== --- net/gstreamer1-plugins-srtp/Makefile +++ net/gstreamer1-plugins-srtp/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= net COMMENT= GStreamer srtp plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libsrtp2.so:net/libsrtp2 + .include "${MASTERDIR}/Makefile" Index: net/gstreamer1-plugins-srtp/pkg-plist =================================================================== --- /dev/null +++ net/gstreamer1-plugins-srtp/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstsrtp.so Index: security/gstreamer1-plugins-dtls/Makefile =================================================================== --- security/gstreamer1-plugins-dtls/Makefile +++ security/gstreamer1-plugins-dtls/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= security COMMENT= GStreamer Datagram TLS (dtls) plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +USES= compiler:c11 ssl + .include "${MASTERDIR}/Makefile" Index: security/gstreamer1-plugins-dtls/pkg-plist =================================================================== --- /dev/null +++ security/gstreamer1-plugins-dtls/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstdtls.so Index: sysutils/gstreamer1-plugins-cdio/Makefile =================================================================== --- sysutils/gstreamer1-plugins-cdio/Makefile +++ sysutils/gstreamer1-plugins-cdio/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= sysutils COMMENT= GStreamer compact disc input and control library @@ -8,4 +8,10 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS= libcdio.so:sysutils/libcdio + .include "${MASTERDIR}/Makefile" + +MESON_ARGS+= -Dgpl=enabled Index: sysutils/gstreamer1-plugins-cdio/pkg-plist =================================================================== --- /dev/null +++ sysutils/gstreamer1-plugins-cdio/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstcdio.so Index: www/gstreamer1-plugins-neon/Makefile =================================================================== --- www/gstreamer1-plugins-neon/Makefile +++ www/gstreamer1-plugins-neon/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= www COMMENT= GStreamer neon http source plugin @@ -8,4 +8,8 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +LIB_DEPENDS+= libneon.so:www/neon + .include "${MASTERDIR}/Makefile" Index: www/gstreamer1-plugins-neon/pkg-plist =================================================================== --- /dev/null +++ www/gstreamer1-plugins-neon/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstneonhttpsrc.so Index: x11-toolkits/gstreamer1-plugins-gtk/Makefile =================================================================== --- x11-toolkits/gstreamer1-plugins-gtk/Makefile +++ x11-toolkits/gstreamer1-plugins-gtk/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= x11-toolkits GST_PLUGIN_SUFFIX= -gtk @@ -9,4 +9,10 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +USES= gnome +USE_GSTREAMER= gl +USE_GNOME= cairo gdkpixbuf2 gtk30 + .include "${MASTERDIR}/Makefile" Index: x11-toolkits/gstreamer1-plugins-gtk/pkg-plist =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstgtk.so Index: x11-toolkits/gstreamer1-plugins-gtk4/Makefile =================================================================== --- x11-toolkits/gstreamer1-plugins-gtk4/Makefile +++ x11-toolkits/gstreamer1-plugins-gtk4/Makefile @@ -1,21 +1,22 @@ -PORTNAME= gstreamer1-plugins-gtk4 -DISTVERSION= 1.16.2 +PORTREVISION= 0 CATEGORIES= x11-toolkits -MASTER_SITES= GNOME/sources/${DISTNAME:S/-${DISTVERSION}/\/${DISTVERSION:R}/} \ - https://gstreamer.freedesktop.org/src/${DISTNAME:S/-${DISTVERSION}//}/ -DISTNAME= gst-plugins-good-${DISTVERSION} +GST_PLUGIN_SUFFIX= -gtk4 MAINTAINER= jbeich@FreeBSD.org COMMENT= GStreamer GTK4 video sink plugin WWW= https://gstreamer.freedesktop.org/documentation/gtk/gtksink.html -LICENSE= LGPL21+ -LICENSE_FILE= ${WRKSRC}/COPYING +GST_PLUGIN= gtk4 +DIST= good -USES= compiler:c11 gnome gstreamer meson pkgconfig tar:xz +MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +USES= gnome USE_GNOME= cairo gtk40 USE_GSTREAMER= gl -MESON_ARGS= --auto-features=disabled -Dgtk4=enabled +MESON_ARGS+= --auto-features=disabled PLIST_FILES= lib/gstreamer-1.0/libgstgtk4.so -.include +EXTRA_PATCHES= ${.CURDIR}/files +PLIST= ${.CURDIR}/pkg-plist + +.include "${MASTERDIR}/Makefile" Index: x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gstgtkbasesink.h =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gstgtkbasesink.h @@ -0,0 +1,31 @@ +--- ext/gtk/gstgtkbasesink.h.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gstgtkbasesink.h +@@ -51,14 +51,14 @@ GType gst_gtk_base_sink_get_type (void); + struct _GstGtkBaseSink + { + /* */ +- GstVideoSink parent; ++ GstVideoSink parent; + +- GstVideoInfo v_info; ++ GstVideoInfo v_info; + + GtkGstBaseWidget *widget; + + /* properties */ +- gboolean force_aspect_ratio; ++ gboolean force_aspect_ratio; + GBinding *bind_aspect_ratio; + + gint par_n; +@@ -73,8 +73,8 @@ struct _GstGtkBaseSink + GBinding *bind_ignore_alpha; + + GtkWidget *window; +- gulong widget_destroy_id; +- gulong window_destroy_id; ++ gulong widget_destroy_id; ++ gulong window_destroy_id; + }; + + /** Index: x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gstgtkbasesink.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gstgtkbasesink.c @@ -0,0 +1,196 @@ +--- ext/gtk/gstgtkbasesink.c.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gstgtkbasesink.c +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -80,7 +81,7 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstGtkBaseSink, gst_ + G_IMPLEMENT_INTERFACE (GST_TYPE_NAVIGATION, + gst_gtk_base_sink_navigation_interface_init); + GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_base_sink, +- "gtkbasesink", 0, "Gtk Video Sink base class")); ++ "gtkbasesink", 0, "GTK Video Sink base class")); + + + static void +@@ -100,7 +101,7 @@ gst_gtk_base_sink_class_init (GstGtkBaseSinkClass * kl + gobject_class->get_property = gst_gtk_base_sink_get_property; + + g_object_class_install_property (gobject_class, PROP_WIDGET, +- g_param_spec_object ("widget", "Gtk Widget", ++ g_param_spec_object ("widget", "GTK Widget", + "The GtkWidget to place in the widget hierarchy " + "(must only be get from the GTK main thread)", + GTK_TYPE_WIDGET, +@@ -135,10 +136,13 @@ gst_gtk_base_sink_class_init (GstGtkBaseSinkClass * kl + G_MAXINT, G_MAXINT, 1, DEFAULT_VIDEO_PAR_N, DEFAULT_VIDEO_PAR_D, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + ++ /* Disabling alpha was removed in GTK4 */ ++#if !defined(BUILD_FOR_GTK4) + g_object_class_install_property (gobject_class, PROP_IGNORE_ALPHA, + g_param_spec_boolean ("ignore-alpha", "Ignore Alpha", + "When enabled, alpha will be ignored and converted to black", + DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++#endif + + gobject_class->finalize = gst_gtk_base_sink_finalize; + +@@ -169,6 +173,8 @@ gst_gtk_base_sink_finalize (GObject * object) + { + GstGtkBaseSink *gtk_sink = GST_GTK_BASE_SINK (object); + ++ GST_DEBUG ("finalizing base sink"); ++ + GST_OBJECT_LOCK (gtk_sink); + if (gtk_sink->window && gtk_sink->window_destroy_id) + g_signal_handler_disconnect (gtk_sink->window, gtk_sink->window_destroy_id); +@@ -193,6 +199,14 @@ static void + window_destroy_cb (GtkWidget * widget, GstGtkBaseSink * gtk_sink) + { + GST_OBJECT_LOCK (gtk_sink); ++ if (gtk_sink->widget) { ++ if (gtk_sink->widget_destroy_id) { ++ g_signal_handler_disconnect (gtk_sink->widget, ++ gtk_sink->widget_destroy_id); ++ gtk_sink->widget_destroy_id = 0; ++ } ++ g_clear_object (>k_sink->widget); ++ } + gtk_sink->window = NULL; + GST_OBJECT_UNLOCK (gtk_sink); + } +@@ -205,7 +219,11 @@ gst_gtk_base_sink_get_widget (GstGtkBaseSink * gtk_sin + + /* Ensure GTK is initialized, this has no side effect if it was already + * initialized. Also, we do that lazily, so the application can be first */ +- if (!gtk_init_check (NULL, NULL)) { ++ if (!gtk_init_check ( ++#if !defined(BUILD_FOR_GTK4) ++ NULL, NULL ++#endif ++ )) { + GST_INFO_OBJECT (gtk_sink, "Could not ensure GTK initialization."); + return NULL; + } +@@ -224,13 +242,16 @@ gst_gtk_base_sink_get_widget (GstGtkBaseSink * gtk_sin + g_object_bind_property (gtk_sink, "video-aspect-ratio-override", + gtk_sink->widget, "video-aspect-ratio-override", + G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); ++#if !defined(BUILD_FOR_GTK4) + gtk_sink->bind_ignore_alpha = + g_object_bind_property (gtk_sink, "ignore-alpha", gtk_sink->widget, + "ignore-alpha", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); ++#endif + + /* Take the floating ref, other wise the destruction of the container will + * make this widget disappear possibly before we are done. */ + gst_object_ref_sink (gtk_sink->widget); ++ + gtk_sink->widget_destroy_id = g_signal_connect (gtk_sink->widget, "destroy", + G_CALLBACK (widget_destroy_cb), gtk_sink); + +@@ -372,6 +393,9 @@ gst_gtk_base_sink_start_on_main (GstBaseSink * bsink) + GstGtkBaseSink *gst_sink = GST_GTK_BASE_SINK (bsink); + GstGtkBaseSinkClass *klass = GST_GTK_BASE_SINK_GET_CLASS (bsink); + GtkWidget *toplevel; ++#if defined(BUILD_FOR_GTK4) ++ GtkRoot *root; ++#endif + + if (gst_gtk_base_sink_get_widget (gst_sink) == NULL) { + GST_ERROR_OBJECT (bsink, "Could not ensure GTK initialization."); +@@ -380,19 +404,46 @@ gst_gtk_base_sink_start_on_main (GstBaseSink * bsink) + + /* After this point, gtk_sink->widget will always be set */ + ++#if defined(BUILD_FOR_GTK4) ++ root = gtk_widget_get_root (GTK_WIDGET (gst_sink->widget)); ++ if (!GTK_IS_ROOT (root)) { ++ GtkWidget *parent = gtk_widget_get_parent (GTK_WIDGET (gst_sink->widget)); ++ if (parent) { ++ GtkWidget *temp_parent; ++ while ((temp_parent = gtk_widget_get_parent (parent))) ++ parent = temp_parent; ++ } ++ toplevel = (parent) ? parent : GTK_WIDGET (gst_sink->widget); ++#else + toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gst_sink->widget)); + if (!gtk_widget_is_toplevel (toplevel)) { ++#endif + /* sanity check */ + g_assert (klass->window_title); + + /* User did not add widget its own UI, let's popup a new GtkWindow to + * make gst-launch-1.0 work. */ +- gst_sink->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); ++ gst_sink->window = gtk_window_new ( ++#if !defined(BUILD_FOR_GTK4) ++ GTK_WINDOW_TOPLEVEL ++#endif ++ ); + gtk_window_set_default_size (GTK_WINDOW (gst_sink->window), 640, 480); + gtk_window_set_title (GTK_WINDOW (gst_sink->window), klass->window_title); +- gtk_container_add (GTK_CONTAINER (gst_sink->window), toplevel); +- gst_sink->window_destroy_id = g_signal_connect (gst_sink->window, "destroy", +- G_CALLBACK (window_destroy_cb), gst_sink); ++#if defined(BUILD_FOR_GTK4) ++ gtk_window_set_child (GTK_WINDOW ( ++#else ++ gtk_container_add (GTK_CONTAINER ( ++#endif ++ gst_sink->window), toplevel); ++ ++ gst_sink->window_destroy_id = g_signal_connect ( ++#if defined(BUILD_FOR_GTK4) ++ GTK_WINDOW (gst_sink->window), ++#else ++ gst_sink->window, ++#endif ++ "destroy", G_CALLBACK (window_destroy_cb), gst_sink); + } + + return TRUE; +@@ -411,7 +462,11 @@ gst_gtk_base_sink_stop_on_main (GstBaseSink * bsink) + GstGtkBaseSink *gst_sink = GST_GTK_BASE_SINK (bsink); + + if (gst_sink->window) { ++#if defined(BUILD_FOR_GTK4) ++ gtk_window_destroy (GTK_WINDOW (gst_sink->window)); ++#else + gtk_widget_destroy (gst_sink->window); ++#endif + gst_sink->window = NULL; + gst_sink->widget = NULL; + } +@@ -432,10 +487,14 @@ gst_gtk_base_sink_stop (GstBaseSink * bsink) + } + + static void +-gst_gtk_widget_show_all_and_unref (GtkWidget * widget) ++gst_gtk_window_show_all_and_unref (GtkWidget * window) + { +- gtk_widget_show_all (widget); +- g_object_unref (widget); ++#if defined(BUILD_FOR_GTK4) ++ gtk_window_present (GTK_WINDOW (window)); ++#else ++ gtk_widget_show_all (window); ++#endif ++ g_object_unref (window); + } + + static GstStateChangeReturn +@@ -463,7 +522,7 @@ gst_gtk_base_sink_change_state (GstElement * element, + GST_OBJECT_UNLOCK (gtk_sink); + + if (window) +- gst_gtk_invoke_on_main ((GThreadFunc) gst_gtk_widget_show_all_and_unref, ++ gst_gtk_invoke_on_main ((GThreadFunc) gst_gtk_window_show_all_and_unref, + window); + + break; Index: x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gstgtkglsink.h =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gstgtkglsink.h @@ -0,0 +1,11 @@ +--- ext/gtk/gstgtkglsink.h.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gstgtkglsink.h +@@ -57,7 +57,7 @@ struct _GstGtkGLSink + gint display_width; + gint display_height; + +- gulong size_allocate_sig_handler; ++ gulong widget_resize_sig_handler; + gulong widget_destroy_sig_handler; + }; + Index: x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gstgtkglsink.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gstgtkglsink.c @@ -0,0 +1,187 @@ +--- ext/gtk/gstgtkglsink.c.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gstgtkglsink.c +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -23,6 +24,12 @@ + * @title: gtkglsink + */ + ++/** ++ * SECTION:element-gtk4glsink ++ * @title: gtk4glsink ++ */ ++ ++ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif +@@ -30,6 +37,7 @@ + #include + #include + ++#include "gtkconfig.h" + #include "gstgtkglsink.h" + #include "gtkgstglwidget.h" + +@@ -65,7 +73,7 @@ static GstStaticPadTemplate gst_gtk_gl_sink_template = + #define gst_gtk_gl_sink_parent_class parent_class + G_DEFINE_TYPE_WITH_CODE (GstGtkGLSink, gst_gtk_gl_sink, + GST_TYPE_GTK_BASE_SINK, GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_gl_sink, +- "gtkglsink", 0, "Gtk GL Video Sink")); ++ GTKCONFIG_GLSINK, 0, GTKCONFIG_NAME " GL Video Sink")); + GST_ELEMENT_REGISTER_DEFINE (gtkglsink, "gtkglsink", GST_RANK_NONE, + GST_TYPE_GTK_GL_SINK); + +@@ -101,7 +109,7 @@ gst_gtk_gl_sink_class_init (GstGtkGLSinkClass * klass) + gstbasesink_class->event = gst_gtk_gl_sink_event; + + gstgtkbasesink_class->create_widget = gtk_gst_gl_widget_new; +- gstgtkbasesink_class->window_title = "Gtk+ GL renderer"; ++ gstgtkbasesink_class->window_title = GTKCONFIG_NAME " GL Renderer"; + + /** + * gtkglsink:rotate-method: +@@ -117,9 +125,11 @@ gst_gtk_gl_sink_class_init (GstGtkGLSinkClass * klass) + GST_TYPE_VIDEO_ORIENTATION_METHOD, GST_VIDEO_ORIENTATION_IDENTITY, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + +- gst_element_class_set_metadata (gstelement_class, "Gtk GL Video Sink", ++ gst_element_class_set_metadata (gstelement_class, ++ GTKCONFIG_NAME " GL Video Sink", + "Sink/Video", "A video sink that renders to a GtkWidget using OpenGL", +- "Matthew Waters "); ++ "Matthew Waters , " ++ "Rafał Dzięgiel "); + + gst_element_class_add_static_pad_template (gstelement_class, + &gst_gtk_gl_sink_template); +@@ -202,16 +212,18 @@ gst_gtk_gl_sink_query (GstBaseSink * bsink, GstQuery * + } + + static void +-_size_changed_cb (GtkWidget * widget, GdkRectangle * rectangle, +- GstGtkGLSink * gtk_sink) ++_size_changed_cb (GtkWidget * widget, gint width, ++ gint height, GstGtkGLSink * gtk_sink) + { +- gint scale_factor, width, height; + gboolean reconfigure; + +- scale_factor = gtk_widget_get_scale_factor (widget); +- width = scale_factor * gtk_widget_get_allocated_width (widget); +- height = scale_factor * gtk_widget_get_allocated_height (widget); ++ GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget); + ++ /* Ignore size changes before widget is negotiated ++ * we are going to queue a resize after negotiation */ ++ if (!base_widget->negotiated) ++ return; ++ + GST_OBJECT_LOCK (gtk_sink); + reconfigure = + (width != gtk_sink->display_width || height != gtk_sink->display_height); +@@ -220,7 +232,7 @@ _size_changed_cb (GtkWidget * widget, GdkRectangle * r + GST_OBJECT_UNLOCK (gtk_sink); + + if (reconfigure) { +- GST_DEBUG_OBJECT (gtk_sink, "Sending reconfigure event on sinkpad."); ++ GST_DEBUG_OBJECT (gtk_sink, "Sending reconfigure event on sinkpad"); + gst_pad_push_event (GST_BASE_SINK (gtk_sink)->sinkpad, + gst_event_new_reconfigure ()); + } +@@ -229,9 +241,9 @@ _size_changed_cb (GtkWidget * widget, GdkRectangle * r + static void + destroy_cb (GtkWidget * widget, GstGtkGLSink * gtk_sink) + { +- if (gtk_sink->size_allocate_sig_handler) { +- g_signal_handler_disconnect (widget, gtk_sink->size_allocate_sig_handler); +- gtk_sink->size_allocate_sig_handler = 0; ++ if (gtk_sink->widget_resize_sig_handler) { ++ g_signal_handler_disconnect (widget, gtk_sink->widget_resize_sig_handler); ++ gtk_sink->widget_resize_sig_handler = 0; + } + + if (gtk_sink->widget_destroy_sig_handler) { +@@ -254,29 +266,34 @@ gst_gtk_gl_sink_start (GstBaseSink * bsink) + gst_widget = GTK_GST_GL_WIDGET (base_sink->widget); + + /* Track the allocation size */ +- gtk_sink->size_allocate_sig_handler = +- g_signal_connect (gst_widget, "size-allocate", +- G_CALLBACK (_size_changed_cb), gtk_sink); ++ if (!gtk_sink->widget_resize_sig_handler) { ++ gtk_sink->widget_resize_sig_handler = ++ g_signal_connect (gst_widget, "resize", ++ G_CALLBACK (_size_changed_cb), gtk_sink); ++ } + +- gtk_sink->widget_destroy_sig_handler = +- g_signal_connect (gst_widget, "destroy", G_CALLBACK (destroy_cb), +- gtk_sink); ++ if (!gtk_sink->widget_destroy_sig_handler) { ++ gtk_sink->widget_destroy_sig_handler = ++ g_signal_connect (gst_widget, "destroy", G_CALLBACK (destroy_cb), ++ gtk_sink); ++ } + +- _size_changed_cb (GTK_WIDGET (gst_widget), NULL, gtk_sink); +- + if (!gtk_gst_gl_widget_init_winsys (gst_widget)) { + GST_ELEMENT_ERROR (bsink, RESOURCE, NOT_FOUND, ("%s", +- "Failed to initialize OpenGL with Gtk"), (NULL)); ++ "Failed to initialize OpenGL with GTK"), (NULL)); + return FALSE; + } + +- gtk_sink->display = gtk_gst_gl_widget_get_display (gst_widget); +- gtk_sink->context = gtk_gst_gl_widget_get_context (gst_widget); +- gtk_sink->gtk_context = gtk_gst_gl_widget_get_gtk_context (gst_widget); ++ if (!gtk_sink->display) ++ gtk_sink->display = gtk_gst_gl_widget_get_display (gst_widget); ++ if (!gtk_sink->context) ++ gtk_sink->context = gtk_gst_gl_widget_get_context (gst_widget); ++ if (!gtk_sink->gtk_context) ++ gtk_sink->gtk_context = gtk_gst_gl_widget_get_gtk_context (gst_widget); + + if (!gtk_sink->display || !gtk_sink->context || !gtk_sink->gtk_context) { + GST_ELEMENT_ERROR (bsink, RESOURCE, NOT_FOUND, ("%s", +- "Failed to retrieve OpenGL context from Gtk"), (NULL)); ++ "Failed to retrieve OpenGL context from GTK"), (NULL)); + return FALSE; + } + +@@ -290,7 +307,14 @@ static gboolean + gst_gtk_gl_sink_stop (GstBaseSink * bsink) + { + GstGtkGLSink *gtk_sink = GST_GTK_GL_SINK (bsink); ++ GstGtkBaseSink *base_sink = GST_GTK_BASE_SINK (bsink); + ++ if (gtk_sink->widget_resize_sig_handler) { ++ g_signal_handler_disconnect (base_sink->widget, ++ gtk_sink->widget_resize_sig_handler); ++ gtk_sink->widget_resize_sig_handler = 0; ++ } ++ + if (gtk_sink->display) { + gst_object_unref (gtk_sink->display); + gtk_sink->display = NULL; +@@ -432,10 +456,10 @@ gst_gtk_gl_sink_finalize (GObject * object) + GstGtkGLSink *gtk_sink = GST_GTK_GL_SINK (object); + GstGtkBaseSink *base_sink = GST_GTK_BASE_SINK (object); + +- if (gtk_sink->size_allocate_sig_handler) { ++ if (gtk_sink->widget_resize_sig_handler) { + g_signal_handler_disconnect (base_sink->widget, +- gtk_sink->size_allocate_sig_handler); +- gtk_sink->size_allocate_sig_handler = 0; ++ gtk_sink->widget_resize_sig_handler); ++ gtk_sink->widget_resize_sig_handler = 0; + } + + if (gtk_sink->widget_destroy_sig_handler) { Index: x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gstgtksink.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gstgtksink.c @@ -0,0 +1,51 @@ +--- ext/gtk/gstgtksink.c.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gstgtksink.c +@@ -19,15 +19,22 @@ + */ + + /** +- * SECTION:element-gtkgstsink +- * @title: gtkgstsink ++ * SECTION:element-gtksink ++ * @title: gtksink + * + */ + ++/** ++ * SECTION:element-gtk4sink ++ * @title: gtk4sink ++ * ++ */ ++ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif + ++#include "gtkconfig.h" + #include "gtkgstwidget.h" + #include "gstgtksink.h" + +@@ -49,8 +56,8 @@ GST_STATIC_PAD_TEMPLATE ("sink", + + #define gst_gtk_sink_parent_class parent_class + G_DEFINE_TYPE_WITH_CODE (GstGtkSink, gst_gtk_sink, GST_TYPE_GTK_BASE_SINK, +- GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_sink, "gtksink", 0, +- "Gtk Video Sink")); ++ GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_sink, GTKCONFIG_SINK, 0, ++ GTKCONFIG_NAME " Video Sink")); + GST_ELEMENT_REGISTER_DEFINE (gtksink, "gtksink", GST_RANK_NONE, + GST_TYPE_GTK_SINK); + +@@ -64,9 +71,10 @@ gst_gtk_sink_class_init (GstGtkSinkClass * klass) + base_class = (GstGtkBaseSinkClass *) klass; + + base_class->create_widget = gtk_gst_widget_new; +- base_class->window_title = "Gtk+ Cairo renderer"; ++ base_class->window_title = GTKCONFIG_NAME " Cairo Renderer"; + +- gst_element_class_set_metadata (gstelement_class, "Gtk Video Sink", ++ gst_element_class_set_metadata (gstelement_class, ++ GTKCONFIG_NAME " Video Sink", + "Sink/Video", "A video sink that renders to a GtkWidget", + "Matthew Waters "); + Index: x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gstplugin.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gstplugin.c @@ -0,0 +1,52 @@ +--- ext/gtk/gstplugin.c.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gstplugin.c +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -22,28 +23,30 @@ + #include "config.h" + #endif + ++#include "gtkconfig.h" + #include "gstgtksink.h" +-#if defined(HAVE_GTK3_GL) ++#if defined(HAVE_GTK_GL) + #include "gstgtkglsink.h" + #endif + + static gboolean + plugin_init (GstPlugin * plugin) + { +- gboolean ret = FALSE; +- +- ret |= GST_ELEMENT_REGISTER (gtksink, plugin); +- +-#if defined(HAVE_GTK3_GL) +- ret |= GST_ELEMENT_REGISTER (gtkglsink, plugin); ++ if (!gst_element_register (plugin, GTKCONFIG_SINK, ++ GST_RANK_NONE, GST_TYPE_GTK_SINK)) { ++ return FALSE; ++ } ++#if defined(HAVE_GTK_GL) ++ if (!gst_element_register (plugin, GTKCONFIG_GLSINK, ++ GST_RANK_NONE, GST_TYPE_GTK_GL_SINK)) { ++ return FALSE; ++ } + #endif +- +- return ret; ++ return TRUE; + } + + GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, + GST_VERSION_MINOR, +- gtk, +- "Gtk+ sink", ++ GTKCONFIG_PLUGIN, GTKCONFIG_NAME " sink", + plugin_init, PACKAGE_VERSION, GST_LICENSE, GST_PACKAGE_NAME, + GST_PACKAGE_ORIGIN) Index: x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gtkconfig.h =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gtkconfig.h @@ -0,0 +1,38 @@ +--- ext/gtk/gtkconfig.h.orig 2022-09-18 22:21:54 UTC ++++ ext/gtk/gtkconfig.h +@@ -0,0 +1,35 @@ ++/* ++ * GStreamer ++ * Copyright (C) 2020 Rafał Dzięgiel ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, ++ * Boston, MA 02110-1301, USA. ++ */ ++ ++#if defined(BUILD_FOR_GTK4) ++#define GTKCONFIG_PLUGIN gtk4 ++#define GTKCONFIG_NAME "GTK4" ++#define GTKCONFIG_SINK_N gtk4sink ++#define GTKCONFIG_GLSINK_N gtk4glsink ++#define GTKCONFIG_SINK "gtk4sink" ++#define GTKCONFIG_GLSINK "gtk4glsink" ++#else ++#define GTKCONFIG_PLUGIN gtk ++#define GTKCONFIG_NAME "GTK" ++#define GTKCONFIG_SINK_N gtksink ++#define GTKCONFIG_GLSINK_N gtkglsink ++#define GTKCONFIG_SINK "gtksink" ++#define GTKCONFIG_GLSINK "gtkglsink" ++#endif Index: x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gtkgstbasewidget.h =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gtkgstbasewidget.h @@ -0,0 +1,53 @@ +--- ext/gtk/gtkgstbasewidget.h.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gtkgstbasewidget.h +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -25,6 +26,10 @@ + #include + #include + ++#if !defined(BUILD_FOR_GTK4) ++#include ++#endif ++ + #define GTK_GST_BASE_WIDGET(w) ((GtkGstBaseWidget *)(w)) + #define GTK_GST_BASE_WIDGET_CLASS(k) ((GtkGstBaseWidgetClass *)(k)) + #define GTK_GST_BASE_WIDGET_LOCK(w) g_mutex_lock(&((GtkGstBaseWidget*)(w))->lock) +@@ -39,9 +44,7 @@ struct _GtkGstBaseWidget + { + union { + GtkDrawingArea drawing_area; +-#if GTK_CHECK_VERSION(3, 15, 0) + GtkGLArea gl_area; +-#endif + } parent; + + /* properties */ +@@ -68,6 +71,11 @@ struct _GtkGstBaseWidget + GMutex lock; + GWeakRef element; + ++ /* event controllers */ ++ GtkEventController *key_controller; ++ GtkEventController *motion_controller; ++ GtkGesture *click_gesture; ++ + /* Pending draw idles callback */ + guint draw_id; + }; +@@ -76,9 +84,7 @@ struct _GtkGstBaseWidgetClass + { + union { + GtkDrawingAreaClass drawing_area_class; +-#if GTK_CHECK_VERSION(3, 15, 0) + GtkGLAreaClass gl_area_class; +-#endif + } parent_class; + }; + Index: x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gtkgstbasewidget.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gtkgstbasewidget.c @@ -0,0 +1,276 @@ +--- ext/gtk/gtkgstbasewidget.c.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gtkgstbasewidget.c +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -208,7 +209,23 @@ gtk_gst_base_widget_get_preferred_height (GtkWidget * + *natural = video_height; + } + ++#if defined(BUILD_FOR_GTK4) + static void ++gtk_gst_base_widget_measure (GtkWidget * widget, GtkOrientation orientation, ++ gint for_size, gint * min, gint * natural, ++ gint * minimum_baseline, gint * natural_baseline) ++{ ++ if (orientation == GTK_ORIENTATION_HORIZONTAL) ++ gtk_gst_base_widget_get_preferred_width (widget, min, natural); ++ else ++ gtk_gst_base_widget_get_preferred_height (widget, min, natural); ++ ++ *minimum_baseline = -1; ++ *natural_baseline = -1; ++} ++#endif ++ ++static void + gtk_gst_base_widget_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) + { +@@ -281,22 +298,46 @@ _gdk_key_to_navigation_string (guint keyval) + } + } + ++static GdkEvent * ++_get_current_event (GtkEventController * controller) ++{ ++#if defined(BUILD_FOR_GTK4) ++ return gtk_event_controller_get_current_event (controller); ++#else ++ return gtk_get_current_event (); ++#endif ++} ++ ++static void ++_gdk_event_free (GdkEvent * event) ++{ ++#if !defined(BUILD_FOR_GTK4) ++ if (event) ++ gdk_event_free (event); ++#endif ++} ++ + static gboolean +-gtk_gst_base_widget_key_event (GtkWidget * widget, GdkEventKey * event) ++gtk_gst_base_widget_key_event (GtkEventControllerKey * key_controller, ++ guint keyval, guint keycode, GdkModifierType state) + { ++ GtkEventController *controller = GTK_EVENT_CONTROLLER (key_controller); ++ GtkWidget *widget = gtk_event_controller_get_widget (controller); + GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget); + GstElement *element; + + if ((element = g_weak_ref_get (&base_widget->element))) { + if (GST_IS_NAVIGATION (element)) { +- const gchar *str = _gdk_key_to_navigation_string (event->keyval); +- const gchar *key_type = +- event->type == GDK_KEY_PRESS ? "key-press" : "key-release"; ++ GdkEvent *event = _get_current_event (controller); ++ const gchar *str = _gdk_key_to_navigation_string (keyval); + +- if (!str) +- str = event->string; +- +- gst_navigation_send_key_event (GST_NAVIGATION (element), key_type, str); ++ if (str) { ++ const gchar *key_type = ++ gdk_event_get_event_type (event) == ++ GDK_KEY_PRESS ? "key-press" : "key-release"; ++ gst_navigation_send_key_event (GST_NAVIGATION (element), key_type, str); ++ } ++ _gdk_event_free (event); + } + g_object_unref (element); + } +@@ -371,18 +412,39 @@ gtk_gst_base_widget_display_size_to_stream_size (GtkGs + } + + static gboolean +-gtk_gst_base_widget_button_event (GtkWidget * widget, GdkEventButton * event) ++gtk_gst_base_widget_button_event ( ++#if defined(BUILD_FOR_GTK4) ++ GtkGestureClick * gesture, ++#else ++ GtkGestureMultiPress * gesture, ++#endif ++ gint n_press, gdouble x, gdouble y) + { ++ GtkEventController *controller = GTK_EVENT_CONTROLLER (gesture); ++ GtkWidget *widget = gtk_event_controller_get_widget (controller); + GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget); + GstElement *element; + + if ((element = g_weak_ref_get (&base_widget->element))) { + if (GST_IS_NAVIGATION (element)) { ++ GdkEvent *event = _get_current_event (controller); + const gchar *key_type = +- event->type == +- GDK_BUTTON_PRESS ? "mouse-button-press" : "mouse-button-release"; ++ gdk_event_get_event_type (event) == GDK_BUTTON_PRESS ++ ? "mouse-button-press" : "mouse-button-release"; ++#if !defined(BUILD_FOR_GTK4) ++ guint button; ++ gdk_event_get_button (event, &button); ++#endif + gst_navigation_send_mouse_event (GST_NAVIGATION (element), key_type, +- event->button, event->x, event->y); ++#if defined(BUILD_FOR_GTK4) ++ /* Gesture is set to ignore other buttons so we do not have to check */ ++ GDK_BUTTON_PRIMARY, ++#else ++ button, ++#endif ++ x, y); ++ ++ _gdk_event_free (event); + } + g_object_unref (element); + } +@@ -391,15 +453,18 @@ gtk_gst_base_widget_button_event (GtkWidget * widget, + } + + static gboolean +-gtk_gst_base_widget_motion_event (GtkWidget * widget, GdkEventMotion * event) ++gtk_gst_base_widget_motion_event (GtkEventControllerMotion * motion_controller, ++ gdouble x, gdouble y) + { ++ GtkEventController *controller = GTK_EVENT_CONTROLLER (motion_controller); ++ GtkWidget *widget = gtk_event_controller_get_widget (controller); + GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget); + GstElement *element; + + if ((element = g_weak_ref_get (&base_widget->element))) { + if (GST_IS_NAVIGATION (element)) { + gst_navigation_send_mouse_event (GST_NAVIGATION (element), "mouse-move", +- 0, event->x, event->y); ++ 0, x, y); + } + g_object_unref (element); + } +@@ -407,6 +472,7 @@ gtk_gst_base_widget_motion_event (GtkWidget * widget, + return FALSE; + } + ++#if !defined(BUILD_FOR_GTK4) + static gboolean + gtk_gst_base_widget_scroll_event (GtkWidget * widget, GdkEventScroll * event) + { +@@ -450,8 +516,8 @@ gtk_gst_base_widget_scroll_event (GtkWidget * widget, + } + return FALSE; + } ++#endif + +- + void + gtk_gst_base_widget_class_init (GtkGstBaseWidgetClass * klass) + { +@@ -490,24 +556,20 @@ gtk_gst_base_widget_class_init (GtkGstBaseWidgetClass + "When enabled, alpha will be ignored and converted to black", + DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + ++#if defined(BUILD_FOR_GTK4) ++ widget_klass->measure = gtk_gst_base_widget_measure; ++#else + widget_klass->get_preferred_width = gtk_gst_base_widget_get_preferred_width; + widget_klass->get_preferred_height = gtk_gst_base_widget_get_preferred_height; +- widget_klass->key_press_event = gtk_gst_base_widget_key_event; +- widget_klass->key_release_event = gtk_gst_base_widget_key_event; +- widget_klass->button_press_event = gtk_gst_base_widget_button_event; +- widget_klass->button_release_event = gtk_gst_base_widget_button_event; +- widget_klass->motion_notify_event = gtk_gst_base_widget_motion_event; +- widget_klass->scroll_event = gtk_gst_base_widget_scroll_event; ++#endif + + GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_base_widget, "gtkbasewidget", 0, +- "Gtk Video Base Widget"); ++ "GTK Video Base Widget"); + } + + void + gtk_gst_base_widget_init (GtkGstBaseWidget * widget) + { +- int event_mask; +- + widget->force_aspect_ratio = DEFAULT_FORCE_ASPECT_RATIO; + widget->par_n = DEFAULT_DISPLAY_PAR_N; + widget->par_d = DEFAULT_DISPLAY_PAR_D; +@@ -521,20 +583,66 @@ gtk_gst_base_widget_init (GtkGstBaseWidget * widget) + g_weak_ref_init (&widget->element, NULL); + g_mutex_init (&widget->lock); + ++ widget->key_controller = gtk_event_controller_key_new ( ++#if !defined(BUILD_FOR_GTK4) ++ GTK_WIDGET (widget) ++#endif ++ ); ++ g_signal_connect (widget->key_controller, "key-pressed", ++ G_CALLBACK (gtk_gst_base_widget_key_event), NULL); ++ g_signal_connect (widget->key_controller, "key-released", ++ G_CALLBACK (gtk_gst_base_widget_key_event), NULL); ++ ++ widget->motion_controller = gtk_event_controller_motion_new ( ++#if !defined(BUILD_FOR_GTK4) ++ GTK_WIDGET (widget) ++#endif ++ ); ++ g_signal_connect (widget->motion_controller, "motion", ++ G_CALLBACK (gtk_gst_base_widget_motion_event), NULL); ++ ++ widget->click_gesture = ++#if defined(BUILD_FOR_GTK4) ++ gtk_gesture_click_new (); ++#else ++ gtk_gesture_multi_press_new (GTK_WIDGET (widget)); ++#endif ++ g_signal_connect (widget->click_gesture, "pressed", ++ G_CALLBACK (gtk_gst_base_widget_button_event), NULL); ++ g_signal_connect (widget->click_gesture, "released", ++ G_CALLBACK (gtk_gst_base_widget_button_event), NULL); ++ ++#if defined(BUILD_FOR_GTK4) ++ /* Otherwise widget in grid will appear as a 1x1px ++ * video which might be misleading for users */ ++ gtk_widget_set_hexpand (GTK_WIDGET (widget), TRUE); ++ gtk_widget_set_vexpand (GTK_WIDGET (widget), TRUE); ++ ++ gtk_widget_set_focusable (GTK_WIDGET (widget), TRUE); ++ gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (widget->click_gesture), ++ GDK_BUTTON_PRIMARY); ++ ++ gtk_widget_add_controller (GTK_WIDGET (widget), widget->key_controller); ++ gtk_widget_add_controller (GTK_WIDGET (widget), widget->motion_controller); ++ gtk_widget_add_controller (GTK_WIDGET (widget), ++ GTK_EVENT_CONTROLLER (widget->click_gesture)); ++#endif ++ + gtk_widget_set_can_focus (GTK_WIDGET (widget), TRUE); +- event_mask = gtk_widget_get_events (GTK_WIDGET (widget)); +- event_mask |= GDK_KEY_PRESS_MASK +- | GDK_KEY_RELEASE_MASK +- | GDK_BUTTON_PRESS_MASK +- | GDK_BUTTON_RELEASE_MASK +- | GDK_POINTER_MOTION_MASK | GDK_BUTTON_MOTION_MASK | GDK_SCROLL_MASK; +- gtk_widget_set_events (GTK_WIDGET (widget), event_mask); + } + + void + gtk_gst_base_widget_finalize (GObject * object) + { + GtkGstBaseWidget *widget = GTK_GST_BASE_WIDGET (object); ++ ++ /* GTK4 takes ownership of EventControllers ++ * while GTK3 still needs manual unref */ ++#if !defined(BUILD_FOR_GTK4) ++ g_object_unref (widget->key_controller); ++ g_object_unref (widget->motion_controller); ++ g_object_unref (widget->click_gesture); ++#endif + + gst_buffer_replace (&widget->pending_buffer, NULL); + gst_buffer_replace (&widget->buffer, NULL); Index: x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gtkgstglwidget.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gtkgstglwidget.c @@ -0,0 +1,53 @@ +--- ext/gtk/gtkgstglwidget.c.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gtkgstglwidget.c +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -30,12 +31,20 @@ + #include + + #if GST_GL_HAVE_WINDOW_X11 && defined (GDK_WINDOWING_X11) ++#if defined(BUILD_FOR_GTK4) ++#include ++#else + #include ++#endif + #include + #endif + + #if GST_GL_HAVE_WINDOW_WAYLAND && defined (GDK_WINDOWING_WAYLAND) ++#if defined(BUILD_FOR_GTK4) ++#include ++#else + #include ++#endif + #include + #endif + +@@ -81,8 +90,7 @@ static const GLfloat vertices[] = { + G_DEFINE_TYPE_WITH_CODE (GtkGstGLWidget, gtk_gst_gl_widget, GTK_TYPE_GL_AREA, + G_ADD_PRIVATE (GtkGstGLWidget) + GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "gtkgstglwidget", 0, +- "Gtk Gst GL Widget"); +- ); ++ "GTK Gst GL Widget")); + + static void + gtk_gst_gl_widget_bind_buffer (GtkGstGLWidget * gst_widget) +@@ -510,8 +518,11 @@ gtk_gst_gl_widget_init (GtkGstGLWidget * gst_widget) + + GST_INFO ("Created %" GST_PTR_FORMAT, priv->display); + ++ /* GTK4 always has alpha */ ++#if !defined(BUILD_FOR_GTK4) + gtk_gl_area_set_has_alpha (GTK_GL_AREA (gst_widget), + !base_widget->ignore_alpha); ++#endif + } + + static void Index: x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gtkgstwidget.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_gtkgstwidget.c @@ -0,0 +1,83 @@ +--- ext/gtk/gtkgstwidget.c.orig 2019-12-03 11:06:37 UTC ++++ ext/gtk/gtkgstwidget.c +@@ -38,17 +38,15 @@ + + G_DEFINE_TYPE (GtkGstWidget, gtk_gst_widget, GTK_TYPE_DRAWING_AREA); + +-static gboolean +-gtk_gst_widget_draw (GtkWidget * widget, cairo_t * cr) ++static void ++_drawing_area_draw (GtkDrawingArea * da, cairo_t * cr, ++ gint widget_width, gint widget_height, gpointer data) + { ++ GtkWidget *widget = GTK_WIDGET (da); + GtkGstBaseWidget *gst_widget = (GtkGstBaseWidget *) widget; +- guint widget_width, widget_height; + cairo_surface_t *surface; + GstVideoFrame frame; + +- widget_width = gtk_widget_get_allocated_width (widget); +- widget_height = gtk_widget_get_allocated_height (widget); +- + GTK_GST_BASE_WIDGET_LOCK (gst_widget); + + /* There is not much to optimize in term of redisplay, so simply swap the +@@ -148,7 +146,10 @@ gtk_gst_widget_draw (GtkWidget * widget, cairo_t * cr) + color.alpha = 1.0; + } else { + gtk_style_context_get_color (gtk_widget_get_style_context (widget), +- GTK_STATE_FLAG_NORMAL, &color); ++#if !defined(BUILD_FOR_GTK4) ++ GTK_STATE_FLAG_NORMAL, ++#endif ++ &color); + } + gdk_cairo_set_source_rgba (cr, &color); + cairo_rectangle (cr, 0, 0, widget_width, widget_height); +@@ -156,8 +157,20 @@ gtk_gst_widget_draw (GtkWidget * widget, cairo_t * cr) + } + + GTK_GST_BASE_WIDGET_UNLOCK (gst_widget); ++} ++ ++#if !defined(BUILD_FOR_GTK4) ++static gboolean ++gtk_gst_widget_draw (GtkWidget * widget, cairo_t * cr) ++{ ++ gint width = gtk_widget_get_allocated_width (widget); ++ gint height = gtk_widget_get_allocated_height (widget); ++ ++ _drawing_area_draw (GTK_DRAWING_AREA (widget), cr, width, height, NULL); ++ + return FALSE; + } ++#endif + + static void + gtk_gst_widget_finalize (GObject * object) +@@ -171,17 +184,25 @@ static void + gtk_gst_widget_class_init (GtkGstWidgetClass * klass) + { + GObjectClass *gobject_klass = (GObjectClass *) klass; ++#if !defined(BUILD_FOR_GTK4) + GtkWidgetClass *widget_klass = (GtkWidgetClass *) klass; ++#endif + + gtk_gst_base_widget_class_init (GTK_GST_BASE_WIDGET_CLASS (klass)); + gobject_klass->finalize = gtk_gst_widget_finalize; ++#if !defined(BUILD_FOR_GTK4) + widget_klass->draw = gtk_gst_widget_draw; ++#endif + } + + static void + gtk_gst_widget_init (GtkGstWidget * widget) + { + gtk_gst_base_widget_init (GTK_GST_BASE_WIDGET (widget)); ++#if defined(BUILD_FOR_GTK4) ++ gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (widget), ++ _drawing_area_draw, NULL, NULL); ++#endif + } + + GtkWidget * Index: x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_meson.build =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files/patch-ext_gtk_meson.build @@ -0,0 +1,119 @@ +--- ext/gtk/meson.build.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/meson.build +@@ -1,3 +1,4 @@ ++gtk_versions = [3, 4] + gtk_sources = [ + 'gstgtkbasesink.c', + 'gstgtksink.c', +@@ -6,54 +7,88 @@ gtk_sources = [ + 'gtkgstbasewidget.c', + 'gtkgstwidget.c', + ] ++gtk_dep = dependency('gtk+-3.0', required : get_option('gtk3')) ++gtk_optional_deps = [] + +-gtk_defines = [] +-optional_deps = [] ++gtk4_dep = dependency('gtk4', required : get_option('gtk4')) ++gtk4_optional_deps = [] + +-gtk_dep = dependency('gtk+-3.0', required : get_option('gtk3')) +-if gtk_dep.found() +- # FIXME: automagic +- if have_gstgl and gtk_dep.version().version_compare('>=3.15.0') +- have_gtk3_gl_windowing = false ++foreach gtk_ver : gtk_versions ++ gtkv = 'gtk' + gtk_ver.to_string() + ++ gtk_state = get_option(gtkv) ++ if gtk_state.disabled() ++ continue ++ endif ++ ++ min_ver = gtk_ver >= 4 ? '3.99.2' : '3.24.0' ++ x11_str = gtk_ver >= 4 ? gtkv + '-x11' : 'gtk+-x11-3.0' ++ way_str = gtk_ver >= 4 ? gtkv + '-wayland' : 'gtk+-wayland-3.0' ++ lib_dep = gtk_ver >= 4 ? gtk4_dep : gtk_dep ++ ++ if not lib_dep.found() or not lib_dep.version().version_compare('>=' + min_ver) ++ continue ++ endif ++ ++ lib_sources = [] ++ gtk_defines = [] ++ optional_deps = [] ++ have_gtk_gl_windowing = false ++ ++ lib_sources += gtk_sources ++ ++ if have_gstgl + if gst_gl_have_window_x11 and gst_gl_have_platform_glx + # FIXME: automagic +- gtk_x11_dep = dependency('gtk+-x11-3.0', required : false) ++ gtk_x11_dep = dependency(x11_str, required : false) + if gtk_x11_dep.found() + optional_deps += [gtk_x11_dep, gstglx11_dep] +- have_gtk3_gl_windowing = true ++ have_gtk_gl_windowing = true + endif + endif + + if gst_gl_have_window_wayland and gst_gl_have_platform_egl + # FIXME: automagic +- gtk_wayland_dep = dependency('gtk+-wayland-3.0', required : false) ++ gtk_wayland_dep = dependency(way_str, required : false) + if gtk_wayland_dep.found() + optional_deps += [gtk_wayland_dep, gstglegl_dep, gstglwayland_dep] +- have_gtk3_gl_windowing = true ++ have_gtk_gl_windowing = true + endif + endif ++ endif + +- if have_gtk3_gl_windowing +- gtk_sources += [ +- 'gstgtkglsink.c', +- 'gtkgstglwidget.c', +- ] +- optional_deps += [gstgl_dep, gstglproto_dep] +- gtk_defines += ['-DGST_USE_UNSTABLE_API', '-DHAVE_GTK3_GL'] +- endif ++ if have_gtk_gl_windowing ++ lib_sources += [ ++ 'gstgtkglsink.c', ++ 'gtkgstglwidget.c', ++ ] ++ optional_deps += gstgl_dep ++ optional_deps += gstglproto_dep ++ gtk_defines += ['-DGST_USE_UNSTABLE_API', '-DHAVE_GTK_GL'] + endif + +- gstgtk = library('gstgtk', +- gtk_sources, ++ if gtk_ver == 3 ++ gtk_optional_deps = optional_deps ++ elif gtk_ver == 4 ++ gtk4_optional_deps = optional_deps ++ gtk_defines += '-DBUILD_FOR_GTK4' ++ endif ++ ++ lib_name = 'gstgtk' ++ if gtk_ver > 3 ++ lib_name += gtk_ver.to_string() ++ endif ++ ++ gstgtk = library(lib_name, ++ lib_sources, + c_args : gst_plugins_good_args + gtk_defines, + link_args : noseh_link_args, + include_directories : [configinc], +- dependencies : [gtk_dep, gstvideo_dep, gstbase_dep, libm] + optional_deps, ++ dependencies : [lib_dep, gstvideo_dep, gstbase_dep, libm] + optional_deps, + install : true, + install_dir : plugins_install_dir, + ) + pkgconfig.generate(gstgtk, install_dir : plugins_pkgconfig_install_dir) + plugins += [gstgtk] +-endif ++endforeach + Index: x11-toolkits/gstreamer1-plugins-gtk4/files/patch-gtk4 =================================================================== --- x11-toolkits/gstreamer1-plugins-gtk4/files/patch-gtk4 +++ /dev/null @@ -1,1145 +0,0 @@ -https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/767 - ---- ext/gtk/gstgtkbasesink.c.orig 2019-12-03 11:06:37 UTC -+++ ext/gtk/gstgtkbasesink.c -@@ -1,6 +1,7 @@ - /* - * GStreamer - * Copyright (C) 2015 Matthew Waters -+ * Copyright (C) 2020 Rafał Dzięgiel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public -@@ -77,7 +78,7 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstGtkBaseSink, gst_ - G_IMPLEMENT_INTERFACE (GST_TYPE_NAVIGATION, - gst_gtk_base_sink_navigation_interface_init); - GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_base_sink, -- "gtkbasesink", 0, "Gtk Video Sink base class")); -+ "gtkbasesink", 0, "GTK Video Sink base class")); - - - static void -@@ -97,7 +98,7 @@ gst_gtk_base_sink_class_init (GstGtkBaseSinkClass * kl - gobject_class->get_property = gst_gtk_base_sink_get_property; - - g_object_class_install_property (gobject_class, PROP_WIDGET, -- g_param_spec_object ("widget", "Gtk Widget", -+ g_param_spec_object ("widget", "GTK Widget", - "The GtkWidget to place in the widget hierarchy " - "(must only be get from the GTK main thread)", - GTK_TYPE_WIDGET, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); -@@ -114,10 +115,13 @@ gst_gtk_base_sink_class_init (GstGtkBaseSinkClass * kl - "The pixel aspect ratio of the device", DEFAULT_PAR_N, DEFAULT_PAR_D, - G_MAXINT, 1, 1, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - -+ /* Disabling alpha was removed in GTK4 */ -+#if !defined(BUILD_FOR_GTK4) - g_object_class_install_property (gobject_class, PROP_IGNORE_ALPHA, - g_param_spec_boolean ("ignore-alpha", "Ignore Alpha", - "When enabled, alpha will be ignored and converted to black", - DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); -+#endif - - gobject_class->finalize = gst_gtk_base_sink_finalize; - -@@ -144,6 +148,8 @@ gst_gtk_base_sink_finalize (GObject * object) - { - GstGtkBaseSink *gtk_sink = GST_GTK_BASE_SINK (object); - -+ GST_DEBUG ("finalizing base sink"); -+ - GST_OBJECT_LOCK (gtk_sink); - if (gtk_sink->window && gtk_sink->window_destroy_id) - g_signal_handler_disconnect (gtk_sink->window, gtk_sink->window_destroy_id); -@@ -168,6 +174,14 @@ static void - window_destroy_cb (GtkWidget * widget, GstGtkBaseSink * gtk_sink) - { - GST_OBJECT_LOCK (gtk_sink); -+ if (gtk_sink->widget) { -+ if (gtk_sink->widget_destroy_id) { -+ g_signal_handler_disconnect (gtk_sink->widget, -+ gtk_sink->widget_destroy_id); -+ gtk_sink->widget_destroy_id = 0; -+ } -+ g_clear_object (>k_sink->widget); -+ } - gtk_sink->window = NULL; - GST_OBJECT_UNLOCK (gtk_sink); - } -@@ -180,7 +194,11 @@ gst_gtk_base_sink_get_widget (GstGtkBaseSink * gtk_sin - - /* Ensure GTK is initialized, this has no side effect if it was already - * initialized. Also, we do that lazily, so the application can be first */ -- if (!gtk_init_check (NULL, NULL)) { -+ if (!gtk_init_check ( -+#if !defined(BUILD_FOR_GTK4) -+ NULL, NULL -+#endif -+ )) { - GST_ERROR_OBJECT (gtk_sink, "Could not ensure GTK initialization."); - return NULL; - } -@@ -195,13 +213,16 @@ gst_gtk_base_sink_get_widget (GstGtkBaseSink * gtk_sin - gtk_sink->bind_pixel_aspect_ratio = - g_object_bind_property (gtk_sink, "pixel-aspect-ratio", gtk_sink->widget, - "pixel-aspect-ratio", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); -+#if !defined(BUILD_FOR_GTK4) - gtk_sink->bind_ignore_alpha = - g_object_bind_property (gtk_sink, "ignore-alpha", gtk_sink->widget, - "ignore-alpha", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); -+#endif - - /* Take the floating ref, other wise the destruction of the container will - * make this widget disapear possibly before we are done. */ - gst_object_ref_sink (gtk_sink->widget); -+ - gtk_sink->widget_destroy_id = g_signal_connect (gtk_sink->widget, "destroy", - G_CALLBACK (widget_destroy_cb), gtk_sink); - -@@ -311,25 +332,55 @@ gst_gtk_base_sink_start_on_main (GstBaseSink * bsink) - GstGtkBaseSink *gst_sink = GST_GTK_BASE_SINK (bsink); - GstGtkBaseSinkClass *klass = GST_GTK_BASE_SINK_GET_CLASS (bsink); - GtkWidget *toplevel; -+#if defined(BUILD_FOR_GTK4) -+ GtkRoot *root; -+#endif - - if (gst_gtk_base_sink_get_widget (gst_sink) == NULL) - return FALSE; - - /* After this point, gtk_sink->widget will always be set */ - -+#if defined(BUILD_FOR_GTK4) -+ root = gtk_widget_get_root (GTK_WIDGET (gst_sink->widget)); -+ if (!GTK_IS_ROOT (root)) { -+ GtkWidget *parent = gtk_widget_get_parent (GTK_WIDGET (gst_sink->widget)); -+ if (parent) { -+ GtkWidget *temp_parent; -+ while ((temp_parent = gtk_widget_get_parent (parent))) -+ parent = temp_parent; -+ } -+ toplevel = (parent) ? parent : GTK_WIDGET (gst_sink->widget); -+#else - toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gst_sink->widget)); - if (!gtk_widget_is_toplevel (toplevel)) { -+#endif - /* sanity check */ - g_assert (klass->window_title); - - /* User did not add widget its own UI, let's popup a new GtkWindow to - * make gst-launch-1.0 work. */ -- gst_sink->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); -+ gst_sink->window = gtk_window_new ( -+#if !defined(BUILD_FOR_GTK4) -+ GTK_WINDOW_TOPLEVEL -+#endif -+ ); - gtk_window_set_default_size (GTK_WINDOW (gst_sink->window), 640, 480); - gtk_window_set_title (GTK_WINDOW (gst_sink->window), klass->window_title); -- gtk_container_add (GTK_CONTAINER (gst_sink->window), toplevel); -- gst_sink->window_destroy_id = g_signal_connect (gst_sink->window, "destroy", -- G_CALLBACK (window_destroy_cb), gst_sink); -+#if defined(BUILD_FOR_GTK4) -+ gtk_window_set_child (GTK_WINDOW ( -+#else -+ gtk_container_add (GTK_CONTAINER ( -+#endif -+ gst_sink->window), toplevel); -+ -+ gst_sink->window_destroy_id = g_signal_connect ( -+#if defined(BUILD_FOR_GTK4) -+ GTK_WINDOW (gst_sink->window), -+#else -+ gst_sink->window, -+#endif -+ "destroy", G_CALLBACK (window_destroy_cb), gst_sink); - } - - return TRUE; -@@ -348,7 +399,11 @@ gst_gtk_base_sink_stop_on_main (GstBaseSink * bsink) - GstGtkBaseSink *gst_sink = GST_GTK_BASE_SINK (bsink); - - if (gst_sink->window) { -+#if defined(BUILD_FOR_GTK4) -+ gtk_window_destroy (GTK_WINDOW (gst_sink->window)); -+#else - gtk_widget_destroy (gst_sink->window); -+#endif - gst_sink->window = NULL; - gst_sink->widget = NULL; - } -@@ -369,10 +424,14 @@ gst_gtk_base_sink_stop (GstBaseSink * bsink) - } - - static void --gst_gtk_widget_show_all_and_unref (GtkWidget * widget) -+gst_gtk_window_show_all_and_unref (GtkWidget * window) - { -- gtk_widget_show_all (widget); -- g_object_unref (widget); -+#if defined(BUILD_FOR_GTK4) -+ gtk_window_present (GTK_WINDOW (window)); -+#else -+ gtk_widget_show_all (window); -+#endif -+ g_object_unref (window); - } - - static GstStateChangeReturn -@@ -400,7 +459,7 @@ gst_gtk_base_sink_change_state (GstElement * element, - GST_OBJECT_UNLOCK (gtk_sink); - - if (window) -- gst_gtk_invoke_on_main ((GThreadFunc) gst_gtk_widget_show_all_and_unref, -+ gst_gtk_invoke_on_main ((GThreadFunc) gst_gtk_window_show_all_and_unref, - window); - - break; ---- ext/gtk/gstgtkbasesink.h.orig 2019-12-03 11:06:37 UTC -+++ ext/gtk/gstgtkbasesink.h -@@ -51,14 +51,14 @@ GType gst_gtk_base_sink_get_type (void); - struct _GstGtkBaseSink - { - /* */ -- GstVideoSink parent; -+ GstVideoSink parent; - -- GstVideoInfo v_info; -+ GstVideoInfo v_info; - - GtkGstBaseWidget *widget; - - /* properties */ -- gboolean force_aspect_ratio; -+ gboolean force_aspect_ratio; - GBinding *bind_aspect_ratio; - - gint par_n; -@@ -69,8 +69,8 @@ struct _GstGtkBaseSink - GBinding *bind_ignore_alpha; - - GtkWidget *window; -- gulong widget_destroy_id; -- gulong window_destroy_id; -+ gulong widget_destroy_id; -+ gulong window_destroy_id; - }; - - /** ---- ext/gtk/gstgtkglsink.c.orig 2019-12-03 11:06:37 UTC -+++ ext/gtk/gstgtkglsink.c -@@ -1,6 +1,7 @@ - /* - * GStreamer - * Copyright (C) 2015 Matthew Waters -+ * Copyright (C) 2020 Rafał Dzięgiel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public -@@ -23,12 +24,18 @@ - * @title: gtkglsink - */ - -+/** -+ * SECTION:element-gtk4glsink -+ * @title: gtk4glsink -+ */ -+ - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif - - #include - -+#include "gtkconfig.h" - #include "gstgtkglsink.h" - #include "gtkgstglwidget.h" - -@@ -58,7 +65,7 @@ static GstStaticPadTemplate gst_gtk_gl_sink_template = - #define gst_gtk_gl_sink_parent_class parent_class - G_DEFINE_TYPE_WITH_CODE (GstGtkGLSink, gst_gtk_gl_sink, - GST_TYPE_GTK_BASE_SINK, GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_gl_sink, -- "gtkglsink", 0, "Gtk GL Video Sink")); -+ GTKCONFIG_GLSINK, 0, GTKCONFIG_NAME " GL Video Sink")); - - static void - gst_gtk_gl_sink_class_init (GstGtkGLSinkClass * klass) -@@ -82,11 +89,13 @@ gst_gtk_gl_sink_class_init (GstGtkGLSinkClass * klass) - gstbasesink_class->get_caps = gst_gtk_gl_sink_get_caps; - - gstgtkbasesink_class->create_widget = gtk_gst_gl_widget_new; -- gstgtkbasesink_class->window_title = "Gtk+ GL renderer"; -+ gstgtkbasesink_class->window_title = GTKCONFIG_NAME " GL Renderer"; - -- gst_element_class_set_metadata (gstelement_class, "Gtk GL Video Sink", -+ gst_element_class_set_metadata (gstelement_class, -+ GTKCONFIG_NAME " GL Video Sink", - "Sink/Video", "A video sink that renders to a GtkWidget using OpenGL", -- "Matthew Waters "); -+ "Matthew Waters , " -+ "Rafał Dzięgiel "); - - gst_element_class_add_static_pad_template (gstelement_class, - &gst_gtk_gl_sink_template); -@@ -120,16 +129,18 @@ gst_gtk_gl_sink_query (GstBaseSink * bsink, GstQuery * - } - - static void --_size_changed_cb (GtkWidget * widget, GdkRectangle * rectangle, -- GstGtkGLSink * gtk_sink) -+_size_changed_cb (GtkWidget * widget, gint width, -+ gint height, GstGtkGLSink * gtk_sink) - { -- gint scale_factor, width, height; - gboolean reconfigure; - -- scale_factor = gtk_widget_get_scale_factor (widget); -- width = scale_factor * gtk_widget_get_allocated_width (widget); -- height = scale_factor * gtk_widget_get_allocated_height (widget); -+ GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget); - -+ /* Ignore size changes before widget is negotiated -+ * we are going to queue a resize after negotiation */ -+ if (!base_widget->negotiated) -+ return; -+ - GST_OBJECT_LOCK (gtk_sink); - reconfigure = - (width != gtk_sink->display_width || height != gtk_sink->display_height); -@@ -138,7 +149,7 @@ _size_changed_cb (GtkWidget * widget, GdkRectangle * r - GST_OBJECT_UNLOCK (gtk_sink); - - if (reconfigure) { -- GST_DEBUG_OBJECT (gtk_sink, "Sending reconfigure event on sinkpad."); -+ GST_DEBUG_OBJECT (gtk_sink, "Sending reconfigure event on sinkpad"); - gst_pad_push_event (GST_BASE_SINK (gtk_sink)->sinkpad, - gst_event_new_reconfigure ()); - } -@@ -147,9 +158,9 @@ _size_changed_cb (GtkWidget * widget, GdkRectangle * r - static void - destroy_cb (GtkWidget * widget, GstGtkGLSink * gtk_sink) - { -- if (gtk_sink->size_allocate_sig_handler) { -- g_signal_handler_disconnect (widget, gtk_sink->size_allocate_sig_handler); -- gtk_sink->size_allocate_sig_handler = 0; -+ if (gtk_sink->widget_resize_sig_handler) { -+ g_signal_handler_disconnect (widget, gtk_sink->widget_resize_sig_handler); -+ gtk_sink->widget_resize_sig_handler = 0; - } - - if (gtk_sink->widget_destroy_sig_handler) { -@@ -172,29 +183,34 @@ gst_gtk_gl_sink_start (GstBaseSink * bsink) - gst_widget = GTK_GST_GL_WIDGET (base_sink->widget); - - /* Track the allocation size */ -- gtk_sink->size_allocate_sig_handler = -- g_signal_connect (gst_widget, "size-allocate", -- G_CALLBACK (_size_changed_cb), gtk_sink); -+ if (!gtk_sink->widget_resize_sig_handler) { -+ gtk_sink->widget_resize_sig_handler = -+ g_signal_connect (gst_widget, "resize", -+ G_CALLBACK (_size_changed_cb), gtk_sink); -+ } - -- gtk_sink->widget_destroy_sig_handler = -- g_signal_connect (gst_widget, "destroy", G_CALLBACK (destroy_cb), -- gtk_sink); -+ if (!gtk_sink->widget_destroy_sig_handler) { -+ gtk_sink->widget_destroy_sig_handler = -+ g_signal_connect (gst_widget, "destroy", G_CALLBACK (destroy_cb), -+ gtk_sink); -+ } - -- _size_changed_cb (GTK_WIDGET (gst_widget), NULL, gtk_sink); -- - if (!gtk_gst_gl_widget_init_winsys (gst_widget)) { - GST_ELEMENT_ERROR (bsink, RESOURCE, NOT_FOUND, ("%s", -- "Failed to initialize OpenGL with Gtk"), (NULL)); -+ "Failed to initialize OpenGL with GTK"), (NULL)); - return FALSE; - } - -- gtk_sink->display = gtk_gst_gl_widget_get_display (gst_widget); -- gtk_sink->context = gtk_gst_gl_widget_get_context (gst_widget); -- gtk_sink->gtk_context = gtk_gst_gl_widget_get_gtk_context (gst_widget); -+ if (!gtk_sink->display) -+ gtk_sink->display = gtk_gst_gl_widget_get_display (gst_widget); -+ if (!gtk_sink->context) -+ gtk_sink->context = gtk_gst_gl_widget_get_context (gst_widget); -+ if (!gtk_sink->gtk_context) -+ gtk_sink->gtk_context = gtk_gst_gl_widget_get_gtk_context (gst_widget); - - if (!gtk_sink->display || !gtk_sink->context || !gtk_sink->gtk_context) { - GST_ELEMENT_ERROR (bsink, RESOURCE, NOT_FOUND, ("%s", -- "Failed to retrieve OpenGL context from Gtk"), (NULL)); -+ "Failed to retrieve OpenGL context from GTK"), (NULL)); - return FALSE; - } - -@@ -208,7 +224,14 @@ static gboolean - gst_gtk_gl_sink_stop (GstBaseSink * bsink) - { - GstGtkGLSink *gtk_sink = GST_GTK_GL_SINK (bsink); -+ GstGtkBaseSink *base_sink = GST_GTK_BASE_SINK (bsink); - -+ if (gtk_sink->widget_resize_sig_handler) { -+ g_signal_handler_disconnect (base_sink->widget, -+ gtk_sink->widget_resize_sig_handler); -+ gtk_sink->widget_resize_sig_handler = 0; -+ } -+ - if (gtk_sink->display) { - gst_object_unref (gtk_sink->display); - gtk_sink->display = NULL; -@@ -348,10 +371,10 @@ gst_gtk_gl_sink_finalize (GObject * object) - GstGtkGLSink *gtk_sink = GST_GTK_GL_SINK (object); - GstGtkBaseSink *base_sink = GST_GTK_BASE_SINK (object); - -- if (gtk_sink->size_allocate_sig_handler) { -+ if (gtk_sink->widget_resize_sig_handler) { - g_signal_handler_disconnect (base_sink->widget, -- gtk_sink->size_allocate_sig_handler); -- gtk_sink->size_allocate_sig_handler = 0; -+ gtk_sink->widget_resize_sig_handler); -+ gtk_sink->widget_resize_sig_handler = 0; - } - - if (gtk_sink->widget_destroy_sig_handler) { ---- ext/gtk/gstgtkglsink.h.orig 2019-12-03 11:06:37 UTC -+++ ext/gtk/gstgtkglsink.h -@@ -65,7 +65,7 @@ struct _GstGtkGLSink - gint display_width; - gint display_height; - -- gulong size_allocate_sig_handler; -+ gulong widget_resize_sig_handler; - gulong widget_destroy_sig_handler; - }; - ---- ext/gtk/gstgtksink.c.orig 2019-12-03 11:06:37 UTC -+++ ext/gtk/gstgtksink.c -@@ -19,15 +19,22 @@ - */ - - /** -- * SECTION:element-gtkgstsink -- * @title: gtkgstsink -+ * SECTION:element-gtksink -+ * @title: gtksink - * - */ - -+/** -+ * SECTION:element-gtk4sink -+ * @title: gtk4sink -+ * -+ */ -+ - #ifdef HAVE_CONFIG_H - #include "config.h" - #endif - -+#include "gtkconfig.h" - #include "gtkgstwidget.h" - #include "gstgtksink.h" - -@@ -49,8 +56,8 @@ GST_STATIC_PAD_TEMPLATE ("sink", - - #define gst_gtk_sink_parent_class parent_class - G_DEFINE_TYPE_WITH_CODE (GstGtkSink, gst_gtk_sink, GST_TYPE_GTK_BASE_SINK, -- GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_sink, "gtksink", 0, -- "Gtk Video Sink")); -+ GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_sink, GTKCONFIG_SINK, 0, -+ GTKCONFIG_NAME " Video Sink")); - - static void - gst_gtk_sink_class_init (GstGtkSinkClass * klass) -@@ -62,9 +69,10 @@ gst_gtk_sink_class_init (GstGtkSinkClass * klass) - base_class = (GstGtkBaseSinkClass *) klass; - - base_class->create_widget = gtk_gst_widget_new; -- base_class->window_title = "Gtk+ Cairo renderer"; -+ base_class->window_title = GTKCONFIG_NAME " Cairo Renderer"; - -- gst_element_class_set_metadata (gstelement_class, "Gtk Video Sink", -+ gst_element_class_set_metadata (gstelement_class, -+ GTKCONFIG_NAME " Video Sink", - "Sink/Video", "A video sink that renders to a GtkWidget", - "Matthew Waters "); - ---- ext/gtk/gstplugin.c.orig 2019-12-03 11:06:37 UTC -+++ ext/gtk/gstplugin.c -@@ -1,6 +1,7 @@ - /* - * GStreamer - * Copyright (C) 2015 Matthew Waters -+ * Copyright (C) 2020 Rafał Dzięgiel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public -@@ -22,31 +23,31 @@ - #include "config.h" - #endif - -+#include "gtkconfig.h" - #include "gstgtksink.h" --#if defined(HAVE_GTK3_GL) -+ -+#if defined(HAVE_GTK_GL) - #include "gstgtkglsink.h" - #endif - - static gboolean - plugin_init (GstPlugin * plugin) - { -- if (!gst_element_register (plugin, "gtksink", -+ if (!gst_element_register (plugin, GTKCONFIG_SINK, - GST_RANK_NONE, GST_TYPE_GTK_SINK)) { - return FALSE; - } --#if defined(HAVE_GTK3_GL) -- if (!gst_element_register (plugin, "gtkglsink", -+#if defined(HAVE_GTK_GL) -+ if (!gst_element_register (plugin, GTKCONFIG_GLSINK, - GST_RANK_NONE, GST_TYPE_GTK_GL_SINK)) { - return FALSE; - } - #endif -- - return TRUE; - } - - GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, - GST_VERSION_MINOR, -- gtk, -- "Gtk+ sink", -+ GTKCONFIG_PLUGIN, GTKCONFIG_NAME " sink", - plugin_init, PACKAGE_VERSION, GST_LICENSE, GST_PACKAGE_NAME, - GST_PACKAGE_ORIGIN) ---- ext/gtk/gtkconfig.h.orig 2021-08-23 11:11:05 UTC -+++ ext/gtk/gtkconfig.h -@@ -0,0 +1,31 @@ -+/* -+ * GStreamer -+ * Copyright (C) 2020 Rafał Dzięgiel -+ * -+ * This library is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU Library General Public -+ * License as published by the Free Software Foundation; either -+ * version 2 of the License, or (at your option) any later version. -+ * -+ * This library is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ * Library General Public License for more details. -+ * -+ * You should have received a copy of the GNU Library General Public -+ * License along with this library; if not, write to the -+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, -+ * Boston, MA 02110-1301, USA. -+ */ -+ -+#if defined(BUILD_FOR_GTK4) -+#define GTKCONFIG_PLUGIN gtk4 -+#define GTKCONFIG_NAME "GTK4" -+#define GTKCONFIG_SINK "gtk4sink" -+#define GTKCONFIG_GLSINK "gtk4glsink" -+#else -+#define GTKCONFIG_PLUGIN gtk -+#define GTKCONFIG_NAME "GTK" -+#define GTKCONFIG_SINK "gtksink" -+#define GTKCONFIG_GLSINK "gtkglsink" -+#endif ---- ext/gtk/gtkgstbasewidget.c.orig 2019-12-03 11:06:37 UTC -+++ ext/gtk/gtkgstbasewidget.c -@@ -1,6 +1,7 @@ - /* - * GStreamer - * Copyright (C) 2015 Matthew Waters -+ * Copyright (C) 2020 Rafał Dzięgiel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public -@@ -74,7 +75,23 @@ gtk_gst_base_widget_get_preferred_height (GtkWidget * - *natural = video_height; - } - -+#if defined(BUILD_FOR_GTK4) - static void -+gtk_gst_base_widget_measure (GtkWidget * widget, GtkOrientation orientation, -+ gint for_size, gint * min, gint * natural, -+ gint * minimum_baseline, gint * natural_baseline) -+{ -+ if (orientation == GTK_ORIENTATION_HORIZONTAL) -+ gtk_gst_base_widget_get_preferred_width (widget, min, natural); -+ else -+ gtk_gst_base_widget_get_preferred_height (widget, min, natural); -+ -+ *minimum_baseline = -1; -+ *natural_baseline = -1; -+} -+#endif -+ -+static void - gtk_gst_base_widget_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec * pspec) - { -@@ -235,22 +252,46 @@ _gdk_key_to_navigation_string (guint keyval) - } - } - -+static GdkEvent * -+_get_current_event (GtkEventController * controller) -+{ -+#if defined(BUILD_FOR_GTK4) -+ return gtk_event_controller_get_current_event (controller); -+#else -+ return gtk_get_current_event (); -+#endif -+} -+ -+static void -+_gdk_event_free (GdkEvent * event) -+{ -+#if !defined(BUILD_FOR_GTK4) -+ if (event) -+ gdk_event_free (event); -+#endif -+} -+ - static gboolean --gtk_gst_base_widget_key_event (GtkWidget * widget, GdkEventKey * event) -+gtk_gst_base_widget_key_event (GtkEventControllerKey * key_controller, -+ guint keyval, guint keycode, GdkModifierType state) - { -+ GtkEventController *controller = GTK_EVENT_CONTROLLER (key_controller); -+ GtkWidget *widget = gtk_event_controller_get_widget (controller); - GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget); - GstElement *element; - - if ((element = g_weak_ref_get (&base_widget->element))) { - if (GST_IS_NAVIGATION (element)) { -- const gchar *str = _gdk_key_to_navigation_string (event->keyval); -- const gchar *key_type = -- event->type == GDK_KEY_PRESS ? "key-press" : "key-release"; -+ GdkEvent *event = _get_current_event (controller); -+ const gchar *str = _gdk_key_to_navigation_string (keyval); - -- if (!str) -- str = event->string; -- -- gst_navigation_send_key_event (GST_NAVIGATION (element), key_type, str); -+ if (str) { -+ const gchar *key_type = -+ gdk_event_get_event_type (event) == -+ GDK_KEY_PRESS ? "key-press" : "key-release"; -+ gst_navigation_send_key_event (GST_NAVIGATION (element), key_type, str); -+ } -+ _gdk_event_free (event); - } - g_object_unref (element); - } -@@ -325,22 +366,43 @@ _display_size_to_stream_size (GtkGstBaseWidget * base_ - } - - static gboolean --gtk_gst_base_widget_button_event (GtkWidget * widget, GdkEventButton * event) -+gtk_gst_base_widget_button_event ( -+#if defined(BUILD_FOR_GTK4) -+ GtkGestureClick * gesture, -+#else -+ GtkGestureMultiPress * gesture, -+#endif -+ gint n_press, gdouble x, gdouble y) - { -+ GtkEventController *controller = GTK_EVENT_CONTROLLER (gesture); -+ GtkWidget *widget = gtk_event_controller_get_widget (controller); - GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget); - GstElement *element; - - if ((element = g_weak_ref_get (&base_widget->element))) { - if (GST_IS_NAVIGATION (element)) { -+ GdkEvent *event = _get_current_event (controller); - const gchar *key_type = -- event->type == -- GDK_BUTTON_PRESS ? "mouse-button-press" : "mouse-button-release"; -- gdouble x, y; -+ gdk_event_get_event_type (event) == GDK_BUTTON_PRESS -+ ? "mouse-button-press" : "mouse-button-release"; -+ gdouble stream_x, stream_y; -+#if !defined(BUILD_FOR_GTK4) -+ guint button; -+ gdk_event_get_button (event, &button); -+#endif - -- _display_size_to_stream_size (base_widget, event->x, event->y, &x, &y); -+ _display_size_to_stream_size (base_widget, x, y, &stream_x, &stream_y); - - gst_navigation_send_mouse_event (GST_NAVIGATION (element), key_type, -- event->button, x, y); -+#if defined(BUILD_FOR_GTK4) -+ /* Gesture is set to ignore other buttons so we do not have to check */ -+ GDK_BUTTON_PRIMARY, -+#else -+ button, -+#endif -+ stream_x, stream_y); -+ -+ _gdk_event_free (event); - } - g_object_unref (element); - } -@@ -349,19 +411,22 @@ gtk_gst_base_widget_button_event (GtkWidget * widget, - } - - static gboolean --gtk_gst_base_widget_motion_event (GtkWidget * widget, GdkEventMotion * event) -+gtk_gst_base_widget_motion_event (GtkEventControllerMotion * motion_controller, -+ gdouble x, gdouble y) - { -+ GtkEventController *controller = GTK_EVENT_CONTROLLER (motion_controller); -+ GtkWidget *widget = gtk_event_controller_get_widget (controller); - GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget); - GstElement *element; - - if ((element = g_weak_ref_get (&base_widget->element))) { - if (GST_IS_NAVIGATION (element)) { -- gdouble x, y; -+ gdouble stream_x, stream_y; - -- _display_size_to_stream_size (base_widget, event->x, event->y, &x, &y); -+ _display_size_to_stream_size (base_widget, x, y, &stream_x, &stream_y); - - gst_navigation_send_mouse_event (GST_NAVIGATION (element), "mouse-move", -- 0, x, y); -+ 0, stream_x, stream_y); - } - g_object_unref (element); - } -@@ -395,23 +460,20 @@ gtk_gst_base_widget_class_init (GtkGstBaseWidgetClass - "When enabled, alpha will be ignored and converted to black", - DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); - -+#if defined(BUILD_FOR_GTK4) -+ widget_klass->measure = gtk_gst_base_widget_measure; -+#else - widget_klass->get_preferred_width = gtk_gst_base_widget_get_preferred_width; - widget_klass->get_preferred_height = gtk_gst_base_widget_get_preferred_height; -- widget_klass->key_press_event = gtk_gst_base_widget_key_event; -- widget_klass->key_release_event = gtk_gst_base_widget_key_event; -- widget_klass->button_press_event = gtk_gst_base_widget_button_event; -- widget_klass->button_release_event = gtk_gst_base_widget_button_event; -- widget_klass->motion_notify_event = gtk_gst_base_widget_motion_event; -+#endif - - GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_base_widget, "gtkbasewidget", 0, -- "Gtk Video Base Widget"); -+ "GTK Video Base Widget"); - } - - void - gtk_gst_base_widget_init (GtkGstBaseWidget * widget) - { -- int event_mask; -- - widget->force_aspect_ratio = DEFAULT_FORCE_ASPECT_RATIO; - widget->par_n = DEFAULT_PAR_N; - widget->par_d = DEFAULT_PAR_D; -@@ -423,20 +485,66 @@ gtk_gst_base_widget_init (GtkGstBaseWidget * widget) - g_weak_ref_init (&widget->element, NULL); - g_mutex_init (&widget->lock); - -+ widget->key_controller = gtk_event_controller_key_new ( -+#if !defined(BUILD_FOR_GTK4) -+ GTK_WIDGET (widget) -+#endif -+ ); -+ g_signal_connect (widget->key_controller, "key-pressed", -+ G_CALLBACK (gtk_gst_base_widget_key_event), NULL); -+ g_signal_connect (widget->key_controller, "key-released", -+ G_CALLBACK (gtk_gst_base_widget_key_event), NULL); -+ -+ widget->motion_controller = gtk_event_controller_motion_new ( -+#if !defined(BUILD_FOR_GTK4) -+ GTK_WIDGET (widget) -+#endif -+ ); -+ g_signal_connect (widget->motion_controller, "motion", -+ G_CALLBACK (gtk_gst_base_widget_motion_event), NULL); -+ -+ widget->click_gesture = -+#if defined(BUILD_FOR_GTK4) -+ gtk_gesture_click_new (); -+#else -+ gtk_gesture_multi_press_new (GTK_WIDGET (widget)); -+#endif -+ g_signal_connect (widget->click_gesture, "pressed", -+ G_CALLBACK (gtk_gst_base_widget_button_event), NULL); -+ g_signal_connect (widget->click_gesture, "released", -+ G_CALLBACK (gtk_gst_base_widget_button_event), NULL); -+ -+#if defined(BUILD_FOR_GTK4) -+ /* Otherwise widget in grid will appear as a 1x1px -+ * video which might be misleading for users */ -+ gtk_widget_set_hexpand (GTK_WIDGET (widget), TRUE); -+ gtk_widget_set_vexpand (GTK_WIDGET (widget), TRUE); -+ -+ gtk_widget_set_focusable (GTK_WIDGET (widget), TRUE); -+ gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (widget->click_gesture), -+ GDK_BUTTON_PRIMARY); -+ -+ gtk_widget_add_controller (GTK_WIDGET (widget), widget->key_controller); -+ gtk_widget_add_controller (GTK_WIDGET (widget), widget->motion_controller); -+ gtk_widget_add_controller (GTK_WIDGET (widget), -+ GTK_EVENT_CONTROLLER (widget->click_gesture)); -+#endif -+ - gtk_widget_set_can_focus (GTK_WIDGET (widget), TRUE); -- event_mask = gtk_widget_get_events (GTK_WIDGET (widget)); -- event_mask |= GDK_KEY_PRESS_MASK -- | GDK_KEY_RELEASE_MASK -- | GDK_BUTTON_PRESS_MASK -- | GDK_BUTTON_RELEASE_MASK -- | GDK_POINTER_MOTION_MASK | GDK_BUTTON_MOTION_MASK; -- gtk_widget_set_events (GTK_WIDGET (widget), event_mask); - } - - void - gtk_gst_base_widget_finalize (GObject * object) - { - GtkGstBaseWidget *widget = GTK_GST_BASE_WIDGET (object); -+ -+ /* GTK4 takes ownership of EventControllers -+ * while GTK3 still needs manual unref */ -+#if !defined(BUILD_FOR_GTK4) -+ g_object_unref (widget->key_controller); -+ g_object_unref (widget->motion_controller); -+ g_object_unref (widget->click_gesture); -+#endif - - gst_buffer_replace (&widget->pending_buffer, NULL); - gst_buffer_replace (&widget->buffer, NULL); ---- ext/gtk/gtkgstbasewidget.h.orig 2019-12-03 11:06:37 UTC -+++ ext/gtk/gtkgstbasewidget.h -@@ -1,6 +1,7 @@ - /* - * GStreamer - * Copyright (C) 2015 Matthew Waters -+ * Copyright (C) 2020 Rafał Dzięgiel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public -@@ -25,6 +26,10 @@ - #include - #include - -+#if !defined(BUILD_FOR_GTK4) -+#include -+#endif -+ - #define GTK_GST_BASE_WIDGET(w) ((GtkGstBaseWidget *)(w)) - #define GTK_GST_BASE_WIDGET_CLASS(k) ((GtkGstBaseWidgetClass *)(k)) - #define GTK_GST_BASE_WIDGET_LOCK(w) g_mutex_lock(&((GtkGstBaseWidget*)(w))->lock) -@@ -39,9 +44,7 @@ struct _GtkGstBaseWidget - { - union { - GtkDrawingArea drawing_area; --#if GTK_CHECK_VERSION(3, 15, 0) - GtkGLArea gl_area; --#endif - } parent; - - /* properties */ -@@ -67,6 +70,11 @@ struct _GtkGstBaseWidget - GMutex lock; - GWeakRef element; - -+ /* event controllers */ -+ GtkEventController *key_controller; -+ GtkEventController *motion_controller; -+ GtkGesture *click_gesture; -+ - /* Pending draw idles callback */ - guint draw_id; - }; -@@ -75,9 +83,7 @@ struct _GtkGstBaseWidgetClass - { - union { - GtkDrawingAreaClass drawing_area_class; --#if GTK_CHECK_VERSION(3, 15, 0) - GtkGLAreaClass gl_area_class; --#endif - } parent_class; - }; - ---- ext/gtk/gtkgstglwidget.c.orig 2019-12-03 11:06:37 UTC -+++ ext/gtk/gtkgstglwidget.c -@@ -1,6 +1,7 @@ - /* - * GStreamer - * Copyright (C) 2015 Matthew Waters -+ * Copyright (C) 2020 Rafał Dzięgiel - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public -@@ -30,12 +31,20 @@ - #include - - #if GST_GL_HAVE_WINDOW_X11 && defined (GDK_WINDOWING_X11) -+#if defined(BUILD_FOR_GTK4) -+#include -+#else - #include -+#endif - #include - #endif - - #if GST_GL_HAVE_WINDOW_WAYLAND && defined (GDK_WINDOWING_WAYLAND) -+#if defined(BUILD_FOR_GTK4) -+#include -+#else - #include -+#endif - #include - #endif - -@@ -78,8 +87,7 @@ static const GLfloat vertices[] = { - G_DEFINE_TYPE_WITH_CODE (GtkGstGLWidget, gtk_gst_gl_widget, GTK_TYPE_GL_AREA, - G_ADD_PRIVATE (GtkGstGLWidget) - GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "gtkgstglwidget", 0, -- "Gtk Gst GL Widget"); -- ); -+ "GTK Gst GL Widget")); - - static void - gtk_gst_gl_widget_bind_buffer (GtkGstGLWidget * gst_widget) -@@ -407,8 +415,11 @@ gtk_gst_gl_widget_init (GtkGstGLWidget * gst_widget) - - GST_INFO ("Created %" GST_PTR_FORMAT, priv->display); - -+ /* GTK4 always has alpha */ -+#if !defined(BUILD_FOR_GTK4) - gtk_gl_area_set_has_alpha (GTK_GL_AREA (gst_widget), - !base_widget->ignore_alpha); -+#endif - } - - static void ---- ext/gtk/gtkgstwidget.c.orig 2019-12-03 11:06:37 UTC -+++ ext/gtk/gtkgstwidget.c -@@ -38,17 +38,15 @@ - - G_DEFINE_TYPE (GtkGstWidget, gtk_gst_widget, GTK_TYPE_DRAWING_AREA); - --static gboolean --gtk_gst_widget_draw (GtkWidget * widget, cairo_t * cr) -+static void -+_drawing_area_draw (GtkDrawingArea * da, cairo_t * cr, -+ gint widget_width, gint widget_height, gpointer data) - { -+ GtkWidget *widget = GTK_WIDGET (da); - GtkGstBaseWidget *gst_widget = (GtkGstBaseWidget *) widget; -- guint widget_width, widget_height; - cairo_surface_t *surface; - GstVideoFrame frame; - -- widget_width = gtk_widget_get_allocated_width (widget); -- widget_height = gtk_widget_get_allocated_height (widget); -- - GTK_GST_BASE_WIDGET_LOCK (gst_widget); - - /* There is not much to optimize in term of redisplay, so simply swap the -@@ -148,7 +146,10 @@ gtk_gst_widget_draw (GtkWidget * widget, cairo_t * cr) - color.alpha = 1.0; - } else { - gtk_style_context_get_color (gtk_widget_get_style_context (widget), -- GTK_STATE_FLAG_NORMAL, &color); -+#if !defined(BUILD_FOR_GTK4) -+ GTK_STATE_FLAG_NORMAL, -+#endif -+ &color); - } - gdk_cairo_set_source_rgba (cr, &color); - cairo_rectangle (cr, 0, 0, widget_width, widget_height); -@@ -156,8 +157,20 @@ gtk_gst_widget_draw (GtkWidget * widget, cairo_t * cr) - } - - GTK_GST_BASE_WIDGET_UNLOCK (gst_widget); -+} -+ -+#if !defined(BUILD_FOR_GTK4) -+static gboolean -+gtk_gst_widget_draw (GtkWidget * widget, cairo_t * cr) -+{ -+ gint width = gtk_widget_get_allocated_width (widget); -+ gint height = gtk_widget_get_allocated_height (widget); -+ -+ _drawing_area_draw (GTK_DRAWING_AREA (widget), cr, width, height, NULL); -+ - return FALSE; - } -+#endif - - static void - gtk_gst_widget_finalize (GObject * object) -@@ -171,17 +184,25 @@ static void - gtk_gst_widget_class_init (GtkGstWidgetClass * klass) - { - GObjectClass *gobject_klass = (GObjectClass *) klass; -+#if !defined(BUILD_FOR_GTK4) - GtkWidgetClass *widget_klass = (GtkWidgetClass *) klass; -+#endif - - gtk_gst_base_widget_class_init (GTK_GST_BASE_WIDGET_CLASS (klass)); - gobject_klass->finalize = gtk_gst_widget_finalize; -+#if !defined(BUILD_FOR_GTK4) - widget_klass->draw = gtk_gst_widget_draw; -+#endif - } - - static void - gtk_gst_widget_init (GtkGstWidget * widget) - { - gtk_gst_base_widget_init (GTK_GST_BASE_WIDGET (widget)); -+#if defined(BUILD_FOR_GTK4) -+ gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (widget), -+ _drawing_area_draw, NULL, NULL); -+#endif - } - - GtkWidget * ---- ext/gtk/meson.build.orig 2019-12-03 11:06:37 UTC -+++ ext/gtk/meson.build -@@ -1,3 +1,4 @@ -+gtk_versions = [3, 4] - gtk_sources = [ - 'gstgtkbasesink.c', - 'gstgtksink.c', -@@ -6,52 +7,86 @@ gtk_sources = [ - 'gtkgstbasewidget.c', - 'gtkgstwidget.c', - ] -+gtk_dep = dependency('gtk+-3.0', required : get_option('gtk3')) -+gtk_optional_deps = [] - --gtk_defines = [] --optional_deps = [] -+gtk4_dep = dependency('gtk4', required : get_option('gtk4')) -+gtk4_optional_deps = [] - --gtk_dep = dependency('gtk+-3.0', required : get_option('gtk3')) --if gtk_dep.found() -- if build_gstgl and gstgl_dep.found() and gtk_dep.version().version_compare('>=3.15.0') -- have_gtk3_gl_windowing = false -+foreach gtk_ver : gtk_versions -+ gtkv = 'gtk' + gtk_ver.to_string() - -+ gtk_state = get_option(gtkv) -+ if gtk_state.disabled() -+ continue -+ endif -+ -+ min_ver = gtk_ver >= 4 ? '3.99.2' : '3.24.0' -+ x11_str = gtk_ver >= 4 ? gtkv + '-x11' : 'gtk+-x11-3.0' -+ way_str = gtk_ver >= 4 ? gtkv + '-wayland' : 'gtk+-wayland-3.0' -+ lib_dep = gtk_ver >= 4 ? gtk4_dep : gtk_dep -+ -+ if not lib_dep.found() or not lib_dep.version().version_compare('>=' + min_ver) -+ continue -+ endif -+ -+ lib_sources = [] -+ gtk_defines = [] -+ optional_deps = [] -+ have_gtk_gl_windowing = false -+ -+ lib_sources += gtk_sources -+ -+ if build_gstgl - if gst_gl_have_window_x11 and gst_gl_have_platform_glx - # FIXME: automagic -- gtk_x11_dep = dependency('gtk+-x11-3.0', required : false) -+ gtk_x11_dep = dependency(x11_str, required : false) - if gtk_x11_dep.found() - optional_deps += gtk_x11_dep -- have_gtk3_gl_windowing = true -+ have_gtk_gl_windowing = true - endif - endif - - if gst_gl_have_window_wayland and gst_gl_have_platform_egl - # FIXME: automagic -- gtk_wayland_dep = dependency('gtk+-wayland-3.0', required : false) -+ gtk_wayland_dep = dependency(way_str, required : false) - if gtk_wayland_dep.found() - optional_deps += gtk_wayland_dep -- have_gtk3_gl_windowing = true -+ have_gtk_gl_windowing = true - endif - endif -+ endif - -- if have_gtk3_gl_windowing -- gtk_sources += [ -- 'gstgtkglsink.c', -- 'gtkgstglwidget.c', -- ] -- optional_deps += gstgl_dep -- gtk_defines += ['-DGST_USE_UNSTABLE_API', '-DHAVE_GTK3_GL'] -- endif -+ if have_gtk_gl_windowing -+ lib_sources += [ -+ 'gstgtkglsink.c', -+ 'gtkgstglwidget.c', -+ ] -+ optional_deps += gstgl_dep -+ gtk_defines += ['-DGST_USE_UNSTABLE_API', '-DHAVE_GTK_GL'] - endif - -- gstgtk = library('gstgtk', -- gtk_sources, -+ if gtk_ver == 3 -+ gtk_optional_deps = optional_deps -+ elif gtk_ver == 4 -+ gtk4_optional_deps = optional_deps -+ gtk_defines += '-DBUILD_FOR_GTK4' -+ endif -+ -+ lib_name = 'gstgtk' -+ if gtk_ver > 3 -+ lib_name += gtk_ver.to_string() -+ endif -+ -+ gstgtk = library(lib_name, -+ lib_sources, - c_args : gst_plugins_good_args + gtk_defines, - link_args : noseh_link_args, - include_directories : [configinc], -- dependencies : [gtk_dep, gstvideo_dep, gstbase_dep, libm] + optional_deps, -+ dependencies : [lib_dep, gstvideo_dep, gstbase_dep, libm] + optional_deps, - install : true, - install_dir : plugins_install_dir, - ) - pkgconfig.generate(gstgtk, install_dir : plugins_pkgconfig_install_dir) --endif -+endforeach - ---- meson_options.txt.orig 2019-12-03 11:06:37 UTC -+++ meson_options.txt -@@ -53,6 +53,7 @@ option('dv1394', type : 'feature', value : 'auto', des - option('flac', type : 'feature', value : 'auto', description : 'FLAC audio codec plugin') - option('gdk-pixbuf', type : 'feature', value : 'auto', description : 'gdk-pixbuf image decoder, overlay, and sink plugin') - option('gtk3', type : 'feature', value : 'auto', description : 'GTK+ video sink plugin') -+option('gtk4', type : 'feature', value : 'disabled', description : 'GTK4 video sink plugin') - option('jack', type : 'feature', value : 'auto', description : 'JACK audio source/sink plugin') - option('jpeg', type : 'feature', value : 'auto', description : 'JPEG image codec plugin') - option('lame', type : 'feature', value : 'auto', description : 'LAME mp3 audio encoder plugin') ---- tests/examples/gtk/meson.build.orig 2019-12-03 11:06:37 UTC -+++ tests/examples/gtk/meson.build -@@ -1,5 +1,5 @@ - executable('gtksink', 'gtksink.c', -- dependencies: [gst_dep, gtk_dep, optional_deps], -+ dependencies: [gst_dep, gtk_dep, gtk_optional_deps], - c_args: gst_plugins_good_args, - include_directories: [configinc], - install: false) Index: x11-toolkits/gstreamer1-plugins-gtk4/files/patch-meson__options.txt =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files/patch-meson__options.txt @@ -0,0 +1,10 @@ +--- meson_options.txt.orig 2019-12-03 11:06:37 UTC ++++ meson_options.txt +@@ -53,6 +53,7 @@ option('dv1394', type : 'feature', value : 'auto', des + option('flac', type : 'feature', value : 'auto', description : 'FLAC audio codec plugin') + option('gdk-pixbuf', type : 'feature', value : 'auto', description : 'gdk-pixbuf image decoder, overlay, and sink plugin') + option('gtk3', type : 'feature', value : 'auto', description : 'GTK+ video sink plugin') ++option('gtk4', type : 'feature', value : 'disabled', description : 'GTK4 video sink plugin') + option('jack', type : 'feature', value : 'auto', description : 'JACK audio source/sink plugin') + option('jpeg', type : 'feature', value : 'auto', description : 'JPEG image codec plugin') + option('lame', type : 'feature', value : 'auto', description : 'LAME mp3 audio encoder plugin') Index: x11-toolkits/gstreamer1-plugins-gtk4/files/patch-tests_examples_gtk_meson.build =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files/patch-tests_examples_gtk_meson.build @@ -0,0 +1,9 @@ +--- tests/examples/gtk/meson.build.orig 2019-12-03 11:06:37 UTC ++++ tests/examples/gtk/meson.build +@@ -1,5 +1,5 @@ + executable('gtksink', 'gtksink.c', +- dependencies: [gst_dep, gtk_dep, optional_deps], ++ dependencies: [gst_dep, gtk_dep, gtk_optional_deps], + c_args: gst_plugins_good_args, + include_directories: [configinc], + install: false) Index: x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-docs_gst__plugins__cache.json =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-docs_gst__plugins__cache.json @@ -0,0 +1,161 @@ +--- docs/gst_plugins_cache.json.orig 2022-06-15 22:36:22 UTC ++++ docs/gst_plugins_cache.json +@@ -7087,10 +7087,10 @@ + "url": "Unknown package origin" + }, + "gtk": { +- "description": "Gtk+ sink", ++ "description": "GTK sink", + "elements": { + "gtkglsink": { +- "author": "Matthew Waters ", ++ "author": "Matthew Waters , Rafał Dzięgiel ", + "description": "A video sink that renders to a GtkWidget using OpenGL", + "hierarchy": [ + "GstGtkGLSink", +@@ -7106,7 +7106,7 @@ + "GstNavigation" + ], + "klass": "Sink/Video", +- "long-name": "Gtk GL Video Sink", ++ "long-name": "GTK GL Video Sink", + "pad-templates": { + "sink": { + "caps": "video/x-raw(memory:GLMemory):\n format: RGBA\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:GLMemory, meta:GstVideoOverlayComposition):\n format: RGBA\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n", +@@ -7147,7 +7147,7 @@ + "GstNavigation" + ], + "klass": "Sink/Video", +- "long-name": "Gtk Video Sink", ++ "long-name": "GTK Video Sink", + "pad-templates": { + "sink": { + "caps": "video/x-raw:\n format: { BGRx, BGRA }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n", +@@ -7224,6 +7224,127 @@ + "default": "0/1", + "max": "2147483647/1", + "min": "0/2147483647", ++ "mutable": "null", ++ "readable": true, ++ "type": "GstFraction", ++ "writable": true ++ }, ++ "widget": { ++ "blurb": "The GtkWidget to place in the widget hierarchy (must only be get from the GTK main thread)", ++ "conditionally-available": false, ++ "construct": false, ++ "construct-only": false, ++ "controllable": false, ++ "mutable": "null", ++ "readable": true, ++ "type": "GtkWidget", ++ "writable": false ++ } ++ } ++ } ++ }, ++ "package": "GStreamer Good Plug-ins", ++ "source": "gst-plugins-good", ++ "tracers": {}, ++ "url": "Unknown package origin" ++ }, ++ "gtk4": { ++ "description": "GTK4 sink", ++ "elements": { ++ "gtk4glsink": { ++ "author": "Matthew Waters , Rafał Dzięgiel ", ++ "description": "A video sink that renders to a GtkWidget using OpenGL", ++ "hierarchy": [ ++ "GstGtkGLSink", ++ "GstGtkBaseSink", ++ "GstVideoSink", ++ "GstBaseSink", ++ "GstElement", ++ "GstObject", ++ "GInitiallyUnowned", ++ "GObject" ++ ], ++ "interfaces": [ ++ "GstNavigation" ++ ], ++ "klass": "Sink/Video", ++ "long-name": "GTK4 GL Video Sink", ++ "pad-templates": { ++ "sink": { ++ "caps": "video/x-raw(memory:GLMemory):\n format: RGBA\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:GLMemory, meta:GstVideoOverlayComposition):\n format: RGBA\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n", ++ "direction": "sink", ++ "presence": "always" ++ } ++ }, ++ "rank": "none" ++ }, ++ "gtk4sink": { ++ "author": "Matthew Waters ", ++ "description": "A video sink that renders to a GtkWidget", ++ "hierarchy": [ ++ "GstGtkSink", ++ "GstGtkBaseSink", ++ "GstVideoSink", ++ "GstBaseSink", ++ "GstElement", ++ "GstObject", ++ "GInitiallyUnowned", ++ "GObject" ++ ], ++ "interfaces": [ ++ "GstNavigation" ++ ], ++ "klass": "Sink/Video", ++ "long-name": "GTK4 Video Sink", ++ "pad-templates": { ++ "sink": { ++ "caps": "video/x-raw:\n format: { BGRx, BGRA }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n", ++ "direction": "sink", ++ "presence": "always" ++ } ++ }, ++ "rank": "none" ++ } ++ }, ++ "filename": "gstgtk4", ++ "license": "LGPL", ++ "other-types": { ++ "GstGtkBaseSink": { ++ "hierarchy": [ ++ "GstGtkBaseSink", ++ "GstVideoSink", ++ "GstBaseSink", ++ "GstElement", ++ "GstObject", ++ "GInitiallyUnowned", ++ "GObject" ++ ], ++ "interfaces": [ ++ "GstNavigation" ++ ], ++ "kind": "object", ++ "properties": { ++ "force-aspect-ratio": { ++ "blurb": "When enabled, scaling will respect original aspect ratio", ++ "conditionally-available": false, ++ "construct": false, ++ "construct-only": false, ++ "controllable": false, ++ "default": "true", ++ "mutable": "null", ++ "readable": true, ++ "type": "gboolean", ++ "writable": true ++ }, ++ "pixel-aspect-ratio": { ++ "blurb": "The pixel aspect ratio of the device", ++ "conditionally-available": false, ++ "construct": false, ++ "construct-only": false, ++ "controllable": false, ++ "default": "0/1", ++ "max": "2147483647/1", ++ "min": "0/1", + "mutable": "null", + "readable": true, + "type": "GstFraction", Index: x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gstgtkbasesink.h =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gstgtkbasesink.h @@ -0,0 +1,31 @@ +--- ext/gtk/gstgtkbasesink.h.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gstgtkbasesink.h +@@ -51,14 +51,14 @@ GType gst_gtk_base_sink_get_type (void); + struct _GstGtkBaseSink + { + /* */ +- GstVideoSink parent; ++ GstVideoSink parent; + +- GstVideoInfo v_info; ++ GstVideoInfo v_info; + + GtkGstBaseWidget *widget; + + /* properties */ +- gboolean force_aspect_ratio; ++ gboolean force_aspect_ratio; + GBinding *bind_aspect_ratio; + + gint par_n; +@@ -73,8 +73,8 @@ struct _GstGtkBaseSink + GBinding *bind_ignore_alpha; + + GtkWidget *window; +- gulong widget_destroy_id; +- gulong window_destroy_id; ++ gulong widget_destroy_id; ++ gulong window_destroy_id; + }; + + /** Index: x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gstgtkbasesink.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gstgtkbasesink.c @@ -0,0 +1,192 @@ +--- ext/gtk/gstgtkbasesink.c.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gstgtkbasesink.c +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -80,7 +81,7 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstGtkBaseSink, gst_ + G_IMPLEMENT_INTERFACE (GST_TYPE_NAVIGATION, + gst_gtk_base_sink_navigation_interface_init); + GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_base_sink, +- "gtkbasesink", 0, "Gtk Video Sink base class")); ++ "gtkbasesink", 0, "GTK Video Sink base class")); + + + static void +@@ -100,7 +101,7 @@ gst_gtk_base_sink_class_init (GstGtkBaseSinkClass * kl + gobject_class->get_property = gst_gtk_base_sink_get_property; + + g_object_class_install_property (gobject_class, PROP_WIDGET, +- g_param_spec_object ("widget", "Gtk Widget", ++ g_param_spec_object ("widget", "GTK Widget", + "The GtkWidget to place in the widget hierarchy " + "(must only be get from the GTK main thread)", + GTK_TYPE_WIDGET, +@@ -135,10 +136,13 @@ gst_gtk_base_sink_class_init (GstGtkBaseSinkClass * kl + G_MAXINT, G_MAXINT, 1, DEFAULT_VIDEO_PAR_N, DEFAULT_VIDEO_PAR_D, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + ++ /* Disabling alpha was removed in GTK4 */ ++#if !defined(BUILD_FOR_GTK4) + g_object_class_install_property (gobject_class, PROP_IGNORE_ALPHA, + g_param_spec_boolean ("ignore-alpha", "Ignore Alpha", + "When enabled, alpha will be ignored and converted to black", + DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++#endif + + gobject_class->finalize = gst_gtk_base_sink_finalize; + +@@ -169,6 +173,8 @@ gst_gtk_base_sink_finalize (GObject * object) + { + GstGtkBaseSink *gtk_sink = GST_GTK_BASE_SINK (object); + ++ GST_DEBUG ("finalizing base sink"); ++ + GST_OBJECT_LOCK (gtk_sink); + if (gtk_sink->window && gtk_sink->window_destroy_id) + g_signal_handler_disconnect (gtk_sink->window, gtk_sink->window_destroy_id); +@@ -193,6 +199,14 @@ static void + window_destroy_cb (GtkWidget * widget, GstGtkBaseSink * gtk_sink) + { + GST_OBJECT_LOCK (gtk_sink); ++ if (gtk_sink->widget) { ++ if (gtk_sink->widget_destroy_id) { ++ g_signal_handler_disconnect (gtk_sink->widget, ++ gtk_sink->widget_destroy_id); ++ gtk_sink->widget_destroy_id = 0; ++ } ++ g_clear_object (>k_sink->widget); ++ } + gtk_sink->window = NULL; + GST_OBJECT_UNLOCK (gtk_sink); + } +@@ -205,7 +219,11 @@ gst_gtk_base_sink_get_widget (GstGtkBaseSink * gtk_sin + + /* Ensure GTK is initialized, this has no side effect if it was already + * initialized. Also, we do that lazily, so the application can be first */ +- if (!gtk_init_check (NULL, NULL)) { ++ if (!gtk_init_check ( ++#if !defined(BUILD_FOR_GTK4) ++ NULL, NULL ++#endif ++ )) { + GST_INFO_OBJECT (gtk_sink, "Could not ensure GTK initialization."); + return NULL; + } +@@ -224,9 +242,11 @@ gst_gtk_base_sink_get_widget (GstGtkBaseSink * gtk_sin + g_object_bind_property (gtk_sink, "video-aspect-ratio-override", + gtk_sink->widget, "video-aspect-ratio-override", + G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); ++#if !defined(BUILD_FOR_GTK4) + gtk_sink->bind_ignore_alpha = + g_object_bind_property (gtk_sink, "ignore-alpha", gtk_sink->widget, + "ignore-alpha", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); ++#endif + + /* Take the floating ref, other wise the destruction of the container will + * make this widget disappear possibly before we are done. */ +@@ -372,6 +392,9 @@ gst_gtk_base_sink_start_on_main (GstBaseSink * bsink) + GstGtkBaseSink *gst_sink = GST_GTK_BASE_SINK (bsink); + GstGtkBaseSinkClass *klass = GST_GTK_BASE_SINK_GET_CLASS (bsink); + GtkWidget *toplevel; ++#if defined(BUILD_FOR_GTK4) ++ GtkRoot *root; ++#endif + + if (gst_gtk_base_sink_get_widget (gst_sink) == NULL) { + GST_ERROR_OBJECT (bsink, "Could not ensure GTK initialization."); +@@ -380,19 +403,47 @@ gst_gtk_base_sink_start_on_main (GstBaseSink * bsink) + + /* After this point, gtk_sink->widget will always be set */ + ++#if defined(BUILD_FOR_GTK4) ++ root = gtk_widget_get_root (GTK_WIDGET (gst_sink->widget)); ++ if (!GTK_IS_ROOT (root)) { ++ GtkWidget *parent = gtk_widget_get_parent (GTK_WIDGET (gst_sink->widget)); ++ if (parent) { ++ GtkWidget *temp_parent; ++ while ((temp_parent = gtk_widget_get_parent (parent))) ++ parent = temp_parent; ++ } ++ toplevel = (parent) ? parent : GTK_WIDGET (gst_sink->widget); ++#else + toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gst_sink->widget)); + if (!gtk_widget_is_toplevel (toplevel)) { ++#endif + /* sanity check */ + g_assert (klass->window_title); + + /* User did not add widget its own UI, let's popup a new GtkWindow to + * make gst-launch-1.0 work. */ +- gst_sink->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); ++ gst_sink->window = gtk_window_new ( ++#if !defined(BUILD_FOR_GTK4) ++ GTK_WINDOW_TOPLEVEL ++#endif ++ ); + gtk_window_set_default_size (GTK_WINDOW (gst_sink->window), 640, 480); + gtk_window_set_title (GTK_WINDOW (gst_sink->window), klass->window_title); +- gtk_container_add (GTK_CONTAINER (gst_sink->window), toplevel); +- gst_sink->window_destroy_id = g_signal_connect (gst_sink->window, "destroy", +- G_CALLBACK (window_destroy_cb), gst_sink); ++ ++#if defined(BUILD_FOR_GTK4) ++ gtk_window_set_child (GTK_WINDOW ( ++#else ++ gtk_container_add (GTK_CONTAINER ( ++#endif ++ gst_sink->window), toplevel); ++ ++ gst_sink->window_destroy_id = g_signal_connect ( ++#if defined(BUILD_FOR_GTK4) ++ GTK_WINDOW (gst_sink->window), ++#else ++ gst_sink->window, ++#endif ++ "destroy", G_CALLBACK (window_destroy_cb), gst_sink); + } + + return TRUE; +@@ -411,7 +462,11 @@ gst_gtk_base_sink_stop_on_main (GstBaseSink * bsink) + GstGtkBaseSink *gst_sink = GST_GTK_BASE_SINK (bsink); + + if (gst_sink->window) { ++#if defined(BUILD_FOR_GTK4) ++ gtk_window_destroy (GTK_WINDOW (gst_sink->window)); ++#else + gtk_widget_destroy (gst_sink->window); ++#endif + gst_sink->window = NULL; + gst_sink->widget = NULL; + } +@@ -432,10 +487,14 @@ gst_gtk_base_sink_stop (GstBaseSink * bsink) + } + + static void +-gst_gtk_widget_show_all_and_unref (GtkWidget * widget) ++gst_gtk_window_show_all_and_unref (GtkWidget * window) + { +- gtk_widget_show_all (widget); +- g_object_unref (widget); ++#if defined(BUILD_FOR_GTK4) ++ gtk_window_present (GTK_WINDOW (window)); ++#else ++ gtk_widget_show_all (window); ++#endif ++ g_object_unref (window); + } + + static GstStateChangeReturn +@@ -463,7 +522,7 @@ gst_gtk_base_sink_change_state (GstElement * element, + GST_OBJECT_UNLOCK (gtk_sink); + + if (window) +- gst_gtk_invoke_on_main ((GThreadFunc) gst_gtk_widget_show_all_and_unref, ++ gst_gtk_invoke_on_main ((GThreadFunc) gst_gtk_window_show_all_and_unref, + window); + + break; Index: x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gstgtkglsink.h =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gstgtkglsink.h @@ -0,0 +1,11 @@ +--- ext/gtk/gstgtkglsink.h.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gstgtkglsink.h +@@ -57,7 +57,7 @@ struct _GstGtkGLSink + gint display_width; + gint display_height; + +- gulong size_allocate_sig_handler; ++ gulong widget_resize_sig_handler; + gulong widget_destroy_sig_handler; + }; + Index: x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gstgtkglsink.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gstgtkglsink.c @@ -0,0 +1,179 @@ +--- ext/gtk/gstgtkglsink.c.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gstgtkglsink.c +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -23,6 +24,12 @@ + * @title: gtkglsink + */ + ++/** ++ * SECTION:element-gtk4glsink ++ * @title: gtk4glsink ++ */ ++ ++ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif +@@ -65,7 +72,7 @@ static GstStaticPadTemplate gst_gtk_gl_sink_template = + #define gst_gtk_gl_sink_parent_class parent_class + G_DEFINE_TYPE_WITH_CODE (GstGtkGLSink, gst_gtk_gl_sink, + GST_TYPE_GTK_BASE_SINK, GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_gl_sink, +- "gtkglsink", 0, "Gtk GL Video Sink")); ++ GTKCONFIG_GLSINK, 0, GTKCONFIG_NAME " GL Video Sink")); + GST_ELEMENT_REGISTER_DEFINE (gtkglsink, "gtkglsink", GST_RANK_NONE, + GST_TYPE_GTK_GL_SINK); + +@@ -101,7 +108,7 @@ gst_gtk_gl_sink_class_init (GstGtkGLSinkClass * klass) + gstbasesink_class->event = gst_gtk_gl_sink_event; + + gstgtkbasesink_class->create_widget = gtk_gst_gl_widget_new; +- gstgtkbasesink_class->window_title = "Gtk+ GL renderer"; ++ gstgtkbasesink_class->window_title = GTKCONFIG_NAME " GL Renderer"; + + /** + * gtkglsink:rotate-method: +@@ -117,9 +124,11 @@ gst_gtk_gl_sink_class_init (GstGtkGLSinkClass * klass) + GST_TYPE_VIDEO_ORIENTATION_METHOD, GST_VIDEO_ORIENTATION_IDENTITY, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + +- gst_element_class_set_metadata (gstelement_class, "Gtk GL Video Sink", ++ gst_element_class_set_metadata (gstelement_class, ++ GTKCONFIG_NAME " GL Video Sink", + "Sink/Video", "A video sink that renders to a GtkWidget using OpenGL", +- "Matthew Waters "); ++ "Matthew Waters , " ++ "Rafał Dzięgiel "); + + gst_element_class_add_static_pad_template (gstelement_class, + &gst_gtk_gl_sink_template); +@@ -202,16 +211,18 @@ gst_gtk_gl_sink_query (GstBaseSink * bsink, GstQuery * + } + + static void +-_size_changed_cb (GtkWidget * widget, GdkRectangle * rectangle, +- GstGtkGLSink * gtk_sink) ++_size_changed_cb (GtkWidget * widget, gint width, ++ gint height, GstGtkGLSink * gtk_sink) + { +- gint scale_factor, width, height; + gboolean reconfigure; + +- scale_factor = gtk_widget_get_scale_factor (widget); +- width = scale_factor * gtk_widget_get_allocated_width (widget); +- height = scale_factor * gtk_widget_get_allocated_height (widget); ++ GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget); + ++ /* Ignore size changes before widget is negotiated ++ * we are going to queue a resize after negotiation */ ++ if (!base_widget->negotiated) ++ return; ++ + GST_OBJECT_LOCK (gtk_sink); + reconfigure = + (width != gtk_sink->display_width || height != gtk_sink->display_height); +@@ -220,7 +231,7 @@ _size_changed_cb (GtkWidget * widget, GdkRectangle * r + GST_OBJECT_UNLOCK (gtk_sink); + + if (reconfigure) { +- GST_DEBUG_OBJECT (gtk_sink, "Sending reconfigure event on sinkpad."); ++ GST_DEBUG_OBJECT (gtk_sink, "Sending reconfigure event on sinkpad"); + gst_pad_push_event (GST_BASE_SINK (gtk_sink)->sinkpad, + gst_event_new_reconfigure ()); + } +@@ -229,9 +240,9 @@ _size_changed_cb (GtkWidget * widget, GdkRectangle * r + static void + destroy_cb (GtkWidget * widget, GstGtkGLSink * gtk_sink) + { +- if (gtk_sink->size_allocate_sig_handler) { +- g_signal_handler_disconnect (widget, gtk_sink->size_allocate_sig_handler); +- gtk_sink->size_allocate_sig_handler = 0; ++ if (gtk_sink->widget_resize_sig_handler) { ++ g_signal_handler_disconnect (widget, gtk_sink->widget_resize_sig_handler); ++ gtk_sink->widget_resize_sig_handler = 0; + } + + if (gtk_sink->widget_destroy_sig_handler) { +@@ -254,29 +265,34 @@ gst_gtk_gl_sink_start (GstBaseSink * bsink) + gst_widget = GTK_GST_GL_WIDGET (base_sink->widget); + + /* Track the allocation size */ +- gtk_sink->size_allocate_sig_handler = +- g_signal_connect (gst_widget, "size-allocate", +- G_CALLBACK (_size_changed_cb), gtk_sink); ++ if (!gtk_sink->widget_resize_sig_handler) { ++ gtk_sink->widget_resize_sig_handler = ++ g_signal_connect (gst_widget, "resize", ++ G_CALLBACK (_size_changed_cb), gtk_sink); ++ } + +- gtk_sink->widget_destroy_sig_handler = +- g_signal_connect (gst_widget, "destroy", G_CALLBACK (destroy_cb), +- gtk_sink); ++ if (!gtk_sink->widget_destroy_sig_handler) { ++ gtk_sink->widget_destroy_sig_handler = ++ g_signal_connect (gst_widget, "destroy", G_CALLBACK (destroy_cb), ++ gtk_sink); ++ } + +- _size_changed_cb (GTK_WIDGET (gst_widget), NULL, gtk_sink); +- + if (!gtk_gst_gl_widget_init_winsys (gst_widget)) { + GST_ELEMENT_ERROR (bsink, RESOURCE, NOT_FOUND, ("%s", +- "Failed to initialize OpenGL with Gtk"), (NULL)); ++ "Failed to initialize OpenGL with GTK"), (NULL)); + return FALSE; + } + +- gtk_sink->display = gtk_gst_gl_widget_get_display (gst_widget); +- gtk_sink->context = gtk_gst_gl_widget_get_context (gst_widget); +- gtk_sink->gtk_context = gtk_gst_gl_widget_get_gtk_context (gst_widget); ++ if (!gtk_sink->display) ++ gtk_sink->display = gtk_gst_gl_widget_get_display (gst_widget); ++ if (!gtk_sink->context) ++ gtk_sink->context = gtk_gst_gl_widget_get_context (gst_widget); ++ if (!gtk_sink->gtk_context) ++ gtk_sink->gtk_context = gtk_gst_gl_widget_get_gtk_context (gst_widget); + + if (!gtk_sink->display || !gtk_sink->context || !gtk_sink->gtk_context) { + GST_ELEMENT_ERROR (bsink, RESOURCE, NOT_FOUND, ("%s", +- "Failed to retrieve OpenGL context from Gtk"), (NULL)); ++ "Failed to retrieve OpenGL context from GTK"), (NULL)); + return FALSE; + } + +@@ -290,7 +306,14 @@ static gboolean + gst_gtk_gl_sink_stop (GstBaseSink * bsink) + { + GstGtkGLSink *gtk_sink = GST_GTK_GL_SINK (bsink); ++ GstGtkBaseSink *base_sink = GST_GTK_BASE_SINK (bsink); + ++ if (gtk_sink->widget_resize_sig_handler) { ++ g_signal_handler_disconnect (base_sink->widget, ++ gtk_sink->widget_resize_sig_handler); ++ gtk_sink->widget_resize_sig_handler = 0; ++ } ++ + if (gtk_sink->display) { + gst_object_unref (gtk_sink->display); + gtk_sink->display = NULL; +@@ -432,10 +455,10 @@ gst_gtk_gl_sink_finalize (GObject * object) + GstGtkGLSink *gtk_sink = GST_GTK_GL_SINK (object); + GstGtkBaseSink *base_sink = GST_GTK_BASE_SINK (object); + +- if (gtk_sink->size_allocate_sig_handler) { ++ if (gtk_sink->widget_resize_sig_handler) { + g_signal_handler_disconnect (base_sink->widget, +- gtk_sink->size_allocate_sig_handler); +- gtk_sink->size_allocate_sig_handler = 0; ++ gtk_sink->widget_resize_sig_handler); ++ gtk_sink->widget_resize_sig_handler = 0; + } + + if (gtk_sink->widget_destroy_sig_handler) { Index: x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gstgtksink.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gstgtksink.c @@ -0,0 +1,40 @@ +--- ext/gtk/gstgtksink.c.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gstgtksink.c +@@ -19,15 +19,22 @@ + */ + + /** +- * SECTION:element-gtkgstsink +- * @title: gtkgstsink ++ * SECTION:element-gtksink ++ * @title: gtksink + * + */ + ++/** ++ * SECTION:element-gtk4sink ++ * @title: gtk4sink ++ * ++ */ ++ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif + ++#include "gtkconfig.h" + #include "gtkgstwidget.h" + #include "gstgtksink.h" + +@@ -64,9 +71,10 @@ gst_gtk_sink_class_init (GstGtkSinkClass * klass) + base_class = (GstGtkBaseSinkClass *) klass; + + base_class->create_widget = gtk_gst_widget_new; +- base_class->window_title = "Gtk+ Cairo renderer"; ++ base_class->window_title = GTKCONFIG_NAME " Cairo Renderer"; + +- gst_element_class_set_metadata (gstelement_class, "Gtk Video Sink", ++ gst_element_class_set_metadata (gstelement_class, ++ GTKCONFIG_NAME " Video Sink", + "Sink/Video", "A video sink that renders to a GtkWidget", + "Matthew Waters "); + Index: x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gstplugin.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gstplugin.c @@ -0,0 +1,45 @@ +--- ext/gtk/gstplugin.c.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gstplugin.c +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -22,8 +23,10 @@ + #include "config.h" + #endif + ++#include "gtkconfig.h" + #include "gstgtksink.h" +-#if defined(HAVE_GTK3_GL) ++ ++#if defined(HAVE_GTK_GL) + #include "gstgtkglsink.h" + #endif + +@@ -32,10 +35,10 @@ plugin_init (GstPlugin * plugin) + { + gboolean ret = FALSE; + +- ret |= GST_ELEMENT_REGISTER (gtksink, plugin); ++ ret |= GST_ELEMENT_REGISTER (GTKCONFIG_SINK, plugin); + +-#if defined(HAVE_GTK3_GL) +- ret |= GST_ELEMENT_REGISTER (gtkglsink, plugin); ++#if defined(HAVE_GTK_GL) ++ ret |= GST_ELEMENT_REGISTER (GTKCONFIG_GLSINK, plugin); + #endif + + return ret; +@@ -43,7 +46,6 @@ plugin_init (GstPlugin * plugin) + + GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, + GST_VERSION_MINOR, +- gtk, +- "Gtk+ sink", ++ GTKCONFIG_PLUGIN, GTKCONFIG_NAME " sink", + plugin_init, PACKAGE_VERSION, GST_LICENSE, GST_PACKAGE_NAME, + GST_PACKAGE_ORIGIN) Index: x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gtkconfig.h =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gtkconfig.h @@ -0,0 +1,34 @@ +--- ext/gtk/gtkconfig.h.orig 2022-09-18 19:39:45 UTC ++++ ext/gtk/gtkconfig.h +@@ -0,0 +1,31 @@ ++/* ++ * GStreamer ++ * Copyright (C) 2020 Rafał Dzięgiel ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, ++ * Boston, MA 02110-1301, USA. ++ */ ++ ++#if defined(BUILD_FOR_GTK4) ++#define GTKCONFIG_PLUGIN gtk4 ++#define GTKCONFIG_NAME "GTK4" ++#define GTKCONFIG_SINK "gtk4sink" ++#define GTKCONFIG_GLSINK "gtk4glsink" ++#else ++#define GTKCONFIG_PLUGIN gtk ++#define GTKCONFIG_NAME "GTK" ++#define GTKCONFIG_SINK "gtksink" ++#define GTKCONFIG_GLSINK "gtkglsink" ++#endif Index: x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gtkgstbasewidget.h =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gtkgstbasewidget.h @@ -0,0 +1,53 @@ +--- ext/gtk/gtkgstbasewidget.h ++++ ext/gtk/gtkgstbasewidget.h +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -25,6 +26,10 @@ + #include + #include + ++#if !defined(BUILD_FOR_GTK4) ++#include ++#endif ++ + #define GTK_GST_BASE_WIDGET(w) ((GtkGstBaseWidget *)(w)) + #define GTK_GST_BASE_WIDGET_CLASS(k) ((GtkGstBaseWidgetClass *)(k)) + #define GTK_GST_BASE_WIDGET_LOCK(w) g_mutex_lock(&((GtkGstBaseWidget*)(w))->lock) +@@ -39,9 +44,7 @@ struct _GtkGstBaseWidget + { + union { + GtkDrawingArea drawing_area; +-#if GTK_CHECK_VERSION(3, 15, 0) + GtkGLArea gl_area; +-#endif + } parent; + + /* properties */ +@@ -67,6 +70,11 @@ struct _GtkGstBaseWidget + GMutex lock; + GWeakRef element; + ++ /* event controllers */ ++ GtkEventController *key_controller; ++ GtkEventController *motion_controller; ++ GtkGesture *click_gesture; ++ + /* Pending draw idles callback */ + guint draw_id; + }; +@@ -75,9 +83,7 @@ struct _GtkGstBaseWidgetClass + { + union { + GtkDrawingAreaClass drawing_area_class; +-#if GTK_CHECK_VERSION(3, 15, 0) + GtkGLAreaClass gl_area_class; +-#endif + } parent_class; + }; + Index: x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gtkgstbasewidget.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gtkgstbasewidget.c @@ -0,0 +1,257 @@ +--- ext/gtk/gtkgstbasewidget.c.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gtkgstbasewidget.c +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -208,7 +209,23 @@ gtk_gst_base_widget_get_preferred_height (GtkWidget * + *natural = video_height; + } + ++#if defined(BUILD_FOR_GTK4) + static void ++gtk_gst_base_widget_measure (GtkWidget * widget, GtkOrientation orientation, ++ gint for_size, gint * min, gint * natural, ++ gint * minimum_baseline, gint * natural_baseline) ++{ ++ if (orientation == GTK_ORIENTATION_HORIZONTAL) ++ gtk_gst_base_widget_get_preferred_width (widget, min, natural); ++ else ++ gtk_gst_base_widget_get_preferred_height (widget, min, natural); ++ ++ *minimum_baseline = -1; ++ *natural_baseline = -1; ++} ++#endif ++ ++static void + gtk_gst_base_widget_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) + { +@@ -281,22 +298,46 @@ _gdk_key_to_navigation_string (guint keyval) + } + } + ++static GdkEvent * ++_get_current_event (GtkEventController * controller) ++{ ++#if defined(BUILD_FOR_GTK4) ++ return gtk_event_controller_get_current_event (controller); ++#else ++ return gtk_get_current_event (); ++#endif ++} ++ ++static void ++_gdk_event_free (GdkEvent * event) ++{ ++#if !defined(BUILD_FOR_GTK4) ++ if (event) ++ gdk_event_free (event); ++#endif ++} ++ + static gboolean +-gtk_gst_base_widget_key_event (GtkWidget * widget, GdkEventKey * event) ++gtk_gst_base_widget_key_event (GtkEventControllerKey * key_controller, ++ guint keyval, guint keycode, GdkModifierType state) + { ++ GtkEventController *controller = GTK_EVENT_CONTROLLER (key_controller); ++ GtkWidget *widget = gtk_event_controller_get_widget (controller); + GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget); + GstElement *element; + + if ((element = g_weak_ref_get (&base_widget->element))) { + if (GST_IS_NAVIGATION (element)) { +- const gchar *str = _gdk_key_to_navigation_string (event->keyval); +- const gchar *key_type = +- event->type == GDK_KEY_PRESS ? "key-press" : "key-release"; ++ GdkEvent *event = _get_current_event (controller); ++ const gchar *str = _gdk_key_to_navigation_string (keyval); + +- if (!str) +- str = event->string; +- +- gst_navigation_send_key_event (GST_NAVIGATION (element), key_type, str); ++ if (str) { ++ const gchar *key_type = ++ gdk_event_get_event_type (event) == ++ GDK_KEY_PRESS ? "key-press" : "key-release"; ++ gst_navigation_send_key_event (GST_NAVIGATION (element), key_type, str); ++ } ++ _gdk_event_free (event); + } + g_object_unref (element); + } +@@ -371,18 +412,38 @@ gtk_gst_base_widget_display_size_to_stream_size (GtkGs + } + + static gboolean +-gtk_gst_base_widget_button_event (GtkWidget * widget, GdkEventButton * event) ++gtk_gst_base_widget_button_event ( ++#if defined(BUILD_FOR_GTK4) ++ GtkGestureClick * gesture, ++#else ++ GtkGestureMultiPress * gesture, ++#endif ++ gint n_press, gdouble x, gdouble y) + { ++ GtkEventController *controller = GTK_EVENT_CONTROLLER (gesture); ++ GtkWidget *widget = gtk_event_controller_get_widget (controller); + GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget); + GstElement *element; + + if ((element = g_weak_ref_get (&base_widget->element))) { + if (GST_IS_NAVIGATION (element)) { ++ GdkEvent *event = _get_current_event (controller); + const gchar *key_type = +- event->type == +- GDK_BUTTON_PRESS ? "mouse-button-press" : "mouse-button-release"; ++ gdk_event_get_event_type (event) == GDK_BUTTON_PRESS ++ ? "mouse-button-press" : "mouse-button-release"; ++#if !defined(BUILD_FOR_GTK4) ++ guint button; ++ gdk_event_get_button (event, &button); ++#endif + gst_navigation_send_mouse_event (GST_NAVIGATION (element), key_type, +- event->button, event->x, event->y); ++#if defined(BUILD_FOR_GTK4) ++ /* Gesture is set to ignore other buttons so we do not have to check */ ++ GDK_BUTTON_PRIMARY, ++#else ++ button, ++#endif ++ event->x, event->y); ++ _gdk_event_free (event); + } + g_object_unref (element); + } +@@ -391,15 +452,18 @@ gtk_gst_base_widget_button_event (GtkWidget * widget, + } + + static gboolean +-gtk_gst_base_widget_motion_event (GtkWidget * widget, GdkEventMotion * event) ++gtk_gst_base_widget_motion_event (GtkEventControllerMotion * motion_controller, ++ gdouble x, gdouble y) + { ++ GtkEventController *controller = GTK_EVENT_CONTROLLER (motion_controller); ++ GtkWidget *widget = gtk_event_controller_get_widget (controller); + GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget); + GstElement *element; + + if ((element = g_weak_ref_get (&base_widget->element))) { + if (GST_IS_NAVIGATION (element)) { + gst_navigation_send_mouse_event (GST_NAVIGATION (element), "mouse-move", +- 0, event->x, event->y); ++ 0, x, y); + } + g_object_unref (element); + } +@@ -490,24 +554,20 @@ gtk_gst_base_widget_class_init (GtkGstBaseWidgetClass + "When enabled, alpha will be ignored and converted to black", + DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + ++#if defined(BUILD_FOR_GTK4) ++ widget_klass->measure = gtk_gst_base_widget_measure; ++#else + widget_klass->get_preferred_width = gtk_gst_base_widget_get_preferred_width; + widget_klass->get_preferred_height = gtk_gst_base_widget_get_preferred_height; +- widget_klass->key_press_event = gtk_gst_base_widget_key_event; +- widget_klass->key_release_event = gtk_gst_base_widget_key_event; +- widget_klass->button_press_event = gtk_gst_base_widget_button_event; +- widget_klass->button_release_event = gtk_gst_base_widget_button_event; +- widget_klass->motion_notify_event = gtk_gst_base_widget_motion_event; +- widget_klass->scroll_event = gtk_gst_base_widget_scroll_event; ++#endif + + GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_base_widget, "gtkbasewidget", 0, +- "Gtk Video Base Widget"); ++ "GTK Video Base Widget"); + } + + void + gtk_gst_base_widget_init (GtkGstBaseWidget * widget) + { +- int event_mask; +- + widget->force_aspect_ratio = DEFAULT_FORCE_ASPECT_RATIO; + widget->par_n = DEFAULT_DISPLAY_PAR_N; + widget->par_d = DEFAULT_DISPLAY_PAR_D; +@@ -521,20 +581,66 @@ gtk_gst_base_widget_init (GtkGstBaseWidget * widget) + g_weak_ref_init (&widget->element, NULL); + g_mutex_init (&widget->lock); + ++ widget->key_controller = gtk_event_controller_key_new ( ++#if !defined(BUILD_FOR_GTK4) ++ GTK_WIDGET (widget) ++#endif ++ ); ++ g_signal_connect (widget->key_controller, "key-pressed", ++ G_CALLBACK (gtk_gst_base_widget_key_event), NULL); ++ g_signal_connect (widget->key_controller, "key-released", ++ G_CALLBACK (gtk_gst_base_widget_key_event), NULL); ++ ++ widget->motion_controller = gtk_event_controller_motion_new ( ++#if !defined(BUILD_FOR_GTK4) ++ GTK_WIDGET (widget) ++#endif ++ ); ++ g_signal_connect (widget->motion_controller, "motion", ++ G_CALLBACK (gtk_gst_base_widget_motion_event), NULL); ++ ++ widget->click_gesture = ++#if defined(BUILD_FOR_GTK4) ++ gtk_gesture_click_new (); ++#else ++ gtk_gesture_multi_press_new (GTK_WIDGET (widget)); ++#endif ++ g_signal_connect (widget->click_gesture, "pressed", ++ G_CALLBACK (gtk_gst_base_widget_button_event), NULL); ++ g_signal_connect (widget->click_gesture, "released", ++ G_CALLBACK (gtk_gst_base_widget_button_event), NULL); ++ ++#if defined(BUILD_FOR_GTK4) ++ /* Otherwise widget in grid will appear as a 1x1px ++ * video which might be misleading for users */ ++ gtk_widget_set_hexpand (GTK_WIDGET (widget), TRUE); ++ gtk_widget_set_vexpand (GTK_WIDGET (widget), TRUE); ++ ++ gtk_widget_set_focusable (GTK_WIDGET (widget), TRUE); ++ gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (widget->click_gesture), ++ GDK_BUTTON_PRIMARY); ++ ++ gtk_widget_add_controller (GTK_WIDGET (widget), widget->key_controller); ++ gtk_widget_add_controller (GTK_WIDGET (widget), widget->motion_controller); ++ gtk_widget_add_controller (GTK_WIDGET (widget), ++ GTK_EVENT_CONTROLLER (widget->click_gesture)); ++#endif ++ + gtk_widget_set_can_focus (GTK_WIDGET (widget), TRUE); +- event_mask = gtk_widget_get_events (GTK_WIDGET (widget)); +- event_mask |= GDK_KEY_PRESS_MASK +- | GDK_KEY_RELEASE_MASK +- | GDK_BUTTON_PRESS_MASK +- | GDK_BUTTON_RELEASE_MASK +- | GDK_POINTER_MOTION_MASK | GDK_BUTTON_MOTION_MASK | GDK_SCROLL_MASK; +- gtk_widget_set_events (GTK_WIDGET (widget), event_mask); + } + + void + gtk_gst_base_widget_finalize (GObject * object) + { + GtkGstBaseWidget *widget = GTK_GST_BASE_WIDGET (object); ++ ++ /* GTK4 takes ownership of EventControllers ++ * while GTK3 still needs manual unref */ ++#if !defined(BUILD_FOR_GTK4) ++ g_object_unref (widget->key_controller); ++ g_object_unref (widget->motion_controller); ++ g_object_unref (widget->click_gesture); ++#endif + + gst_buffer_replace (&widget->pending_buffer, NULL); + gst_buffer_replace (&widget->buffer, NULL); Index: x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gtkgstglwidget.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gtkgstglwidget.c @@ -0,0 +1,53 @@ +--- ext/gtk/gtkgstglwidget.c ++++ ext/gtk/gtkgstglwidget.c +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -30,12 +31,20 @@ + #include + + #if GST_GL_HAVE_WINDOW_X11 && defined (GDK_WINDOWING_X11) ++#if defined(BUILD_FOR_GTK4) ++#include ++#else + #include ++#endif + #include + #endif + + #if GST_GL_HAVE_WINDOW_WAYLAND && defined (GDK_WINDOWING_WAYLAND) ++#if defined(BUILD_FOR_GTK4) ++#include ++#else + #include ++#endif + #include + #endif + +@@ -78,8 +87,7 @@ static const GLfloat vertices[] = { + G_DEFINE_TYPE_WITH_CODE (GtkGstGLWidget, gtk_gst_gl_widget, GTK_TYPE_GL_AREA, + G_ADD_PRIVATE (GtkGstGLWidget) + GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "gtkgstglwidget", 0, +- "Gtk Gst GL Widget"); +- ); ++ "GTK Gst GL Widget")); + + static void + gtk_gst_gl_widget_bind_buffer (GtkGstGLWidget * gst_widget) +@@ -407,8 +415,11 @@ gtk_gst_gl_widget_init (GtkGstGLWidget * gst_widget) + + GST_INFO ("Created %" GST_PTR_FORMAT, priv->display); + ++ /* GTK4 always has alpha */ ++#if !defined(BUILD_FOR_GTK4) + gtk_gl_area_set_has_alpha (GTK_GL_AREA (gst_widget), + !base_widget->ignore_alpha); ++#endif + } + + static void Index: x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gtkgstwidget.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_gtkgstwidget.c @@ -0,0 +1,83 @@ +--- ext/gtk/gtkgstwidget.c ++++ ext/gtk/gtkgstwidget.c +@@ -38,17 +38,15 @@ + + G_DEFINE_TYPE (GtkGstWidget, gtk_gst_widget, GTK_TYPE_DRAWING_AREA); + +-static gboolean +-gtk_gst_widget_draw (GtkWidget * widget, cairo_t * cr) ++static void ++_drawing_area_draw (GtkDrawingArea * da, cairo_t * cr, ++ gint widget_width, gint widget_height, gpointer data) + { ++ GtkWidget *widget = GTK_WIDGET (da); + GtkGstBaseWidget *gst_widget = (GtkGstBaseWidget *) widget; +- guint widget_width, widget_height; + cairo_surface_t *surface; + GstVideoFrame frame; + +- widget_width = gtk_widget_get_allocated_width (widget); +- widget_height = gtk_widget_get_allocated_height (widget); +- + GTK_GST_BASE_WIDGET_LOCK (gst_widget); + + /* There is not much to optimize in term of redisplay, so simply swap the +@@ -148,7 +146,10 @@ gtk_gst_widget_draw (GtkWidget * widget, cairo_t * cr) + color.alpha = 1.0; + } else { + gtk_style_context_get_color (gtk_widget_get_style_context (widget), +- GTK_STATE_FLAG_NORMAL, &color); ++#if !defined(BUILD_FOR_GTK4) ++ GTK_STATE_FLAG_NORMAL, ++#endif ++ &color); + } + gdk_cairo_set_source_rgba (cr, &color); + cairo_rectangle (cr, 0, 0, widget_width, widget_height); +@@ -156,8 +157,20 @@ gtk_gst_widget_draw (GtkWidget * widget, cairo_t * cr) + } + + GTK_GST_BASE_WIDGET_UNLOCK (gst_widget); ++} ++ ++#if !defined(BUILD_FOR_GTK4) ++static gboolean ++gtk_gst_widget_draw (GtkWidget * widget, cairo_t * cr) ++{ ++ gint width = gtk_widget_get_allocated_width (widget); ++ gint height = gtk_widget_get_allocated_height (widget); ++ ++ _drawing_area_draw (GTK_DRAWING_AREA (widget), cr, width, height, NULL); ++ + return FALSE; + } ++#endif + + static void + gtk_gst_widget_finalize (GObject * object) +@@ -171,17 +184,25 @@ static void + gtk_gst_widget_class_init (GtkGstWidgetClass * klass) + { + GObjectClass *gobject_klass = (GObjectClass *) klass; ++#if !defined(BUILD_FOR_GTK4) + GtkWidgetClass *widget_klass = (GtkWidgetClass *) klass; ++#endif + + gtk_gst_base_widget_class_init (GTK_GST_BASE_WIDGET_CLASS (klass)); + gobject_klass->finalize = gtk_gst_widget_finalize; ++#if !defined(BUILD_FOR_GTK4) + widget_klass->draw = gtk_gst_widget_draw; ++#endif + } + + static void + gtk_gst_widget_init (GtkGstWidget * widget) + { + gtk_gst_base_widget_init (GTK_GST_BASE_WIDGET (widget)); ++#if defined(BUILD_FOR_GTK4) ++ gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (widget), ++ _drawing_area_draw, NULL, NULL); ++#endif + } + + GtkWidget * Index: x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_meson.build =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-ext_gtk_meson.build @@ -0,0 +1,118 @@ +--- ext/gtk/meson.build ++++ ext/gtk/meson.build +@@ -1,3 +1,4 @@ ++gtk_versions = [3, 4] + gtk_sources = [ + 'gstgtkbasesink.c', + 'gstgtksink.c', +@@ -6,54 +7,86 @@ gtk_sources = [ + 'gtkgstbasewidget.c', + 'gtkgstwidget.c', + ] ++gtk_dep = dependency('gtk+-3.0', required : get_option('gtk3')) ++gtk_optional_deps = [] + +-gtk_defines = [] +-optional_deps = [] ++gtk4_dep = dependency('gtk4', required : get_option('gtk4')) ++gtk4_optional_deps = [] + +-gtk_dep = dependency('gtk+-3.0', required : get_option('gtk3')) +-if gtk_dep.found() +- # FIXME: automagic +- if have_gstgl and gtk_dep.version().version_compare('>=3.15.0') +- have_gtk3_gl_windowing = false ++foreach gtk_ver : gtk_versions ++ gtkv = 'gtk' + gtk_ver.to_string() ++ ++ gtk_state = get_option(gtkv) ++ if gtk_state.disabled() ++ continue ++ endif ++ ++ min_ver = gtk_ver >= 4 ? '3.99.2' : '3.24.0' ++ x11_str = gtk_ver >= 4 ? gtkv + '-x11' : 'gtk+-x11-3.0' ++ way_str = gtk_ver >= 4 ? gtkv + '-wayland' : 'gtk+-wayland-3.0' ++ lib_dep = gtk_ver >= 4 ? gtk4_dep : gtk_dep ++ ++ if not lib_dep.found() or not lib_dep.version().version_compare('>=' + min_ver) ++ continue ++ endif ++ ++ lib_sources = [] ++ gtk_defines = [] ++ optional_deps = [] ++ have_gtk_gl_windowing = false + ++ lib_sources += gtk_sources ++ ++ if have_gstgl + if gst_gl_have_window_x11 and gst_gl_have_platform_glx + # FIXME: automagic +- gtk_x11_dep = dependency('gtk+-x11-3.0', required : false) ++ gtk_x11_dep = dependency(x11_str, required : false) + if gtk_x11_dep.found() + optional_deps += [gtk_x11_dep, gstglx11_dep] +- have_gtk3_gl_windowing = true ++ have_gtk_gl_windowing = true + endif + endif + + if gst_gl_have_window_wayland and gst_gl_have_platform_egl + # FIXME: automagic +- gtk_wayland_dep = dependency('gtk+-wayland-3.0', required : false) ++ gtk_wayland_dep = dependency(way_str, required : false) + if gtk_wayland_dep.found() + optional_deps += [gtk_wayland_dep, gstglegl_dep, gstglwayland_dep] +- have_gtk3_gl_windowing = true ++ have_gtk_gl_windowing = true + endif + endif ++ endif + +- if have_gtk3_gl_windowing +- gtk_sources += [ +- 'gstgtkglsink.c', +- 'gtkgstglwidget.c', +- ] +- optional_deps += [gstgl_dep, gstglproto_dep] +- gtk_defines += ['-DGST_USE_UNSTABLE_API', '-DHAVE_GTK3_GL'] +- endif ++ if have_gtk_gl_windowing ++ lib_sources += [ ++ 'gstgtkglsink.c', ++ 'gtkgstglwidget.c', ++ ] ++ optional_deps += [gstgl_dep, gstglproto_dep] ++ gtk_defines += ['-DGST_USE_UNSTABLE_API', '-DHAVE_GTK_GL'] ++ endif ++ ++ if gtk_ver == 3 ++ gtk_optional_deps = optional_deps ++ elif gtk_ver == 4 ++ gtk4_optional_deps = optional_deps ++ gtk_defines += '-DBUILD_FOR_GTK4' ++ endif ++ ++ lib_name = 'gstgtk' ++ if gtk_ver > 3 ++ lib_name += gtk_ver.to_string() + endif + +- gstgtk = library('gstgtk', +- gtk_sources, ++ gstgtk = library(lib_name, ++ lib_sources, + c_args : gst_plugins_good_args + gtk_defines, + link_args : noseh_link_args, + include_directories : [configinc], +- dependencies : [gtk_dep, gstvideo_dep, gstbase_dep, libm] + optional_deps, ++ dependencies : [lib_dep, gstvideo_dep, gstbase_dep, libm] + optional_deps, + install : true, + install_dir : plugins_install_dir, + ) + pkgconfig.generate(gstgtk, install_dir : plugins_pkgconfig_install_dir) + plugins += [gstgtk] +-endif +- ++endforeach Index: x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-meson__options.txt =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-meson__options.txt @@ -0,0 +1,10 @@ +--- meson_options.txt ++++ meson_options.txt +@@ -53,6 +53,7 @@ option('dv1394', type : 'feature', value : 'auto', description : 'Digital IEEE13 + option('flac', type : 'feature', value : 'auto', description : 'FLAC audio codec plugin') + option('gdk-pixbuf', type : 'feature', value : 'auto', description : 'gdk-pixbuf image decoder, overlay, and sink plugin') + option('gtk3', type : 'feature', value : 'auto', description : 'GTK+ video sink plugin') ++option('gtk4', type : 'feature', value : 'disabled', description : 'GTK4 video sink plugin') + option('jack', type : 'feature', value : 'auto', description : 'JACK audio source/sink plugin') + option('jpeg', type : 'feature', value : 'auto', description : 'JPEG image codec plugin') + option('lame', type : 'feature', value : 'auto', description : 'LAME mp3 audio encoder plugin') Index: x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-tests_examples_gtk_meson.build =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files4/patch-tests_examples_gtk_meson.build @@ -0,0 +1,9 @@ +--- tests/examples/gtk/meson.build ++++ tests/examples/gtk/meson.build +@@ -1,5 +1,5 @@ + executable('gtksink', 'gtksink.c', +- dependencies: [gst_dep, gtk_dep, optional_deps], ++ dependencies: [gst_dep, gtk_dep, gtk_optional_deps], + c_args: gst_plugins_good_args, + include_directories: [configinc], + install: false) Index: x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-docs_gst__plugins__cache.json =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-docs_gst__plugins__cache.json @@ -0,0 +1,161 @@ +--- docs/gst_plugins_cache.json.orig 2022-06-15 22:36:22 UTC ++++ docs/gst_plugins_cache.json +@@ -7087,10 +7087,10 @@ + "url": "Unknown package origin" + }, + "gtk": { +- "description": "Gtk+ sink", ++ "description": "GTK sink", + "elements": { + "gtkglsink": { +- "author": "Matthew Waters ", ++ "author": "Matthew Waters , Rafał Dzięgiel ", + "description": "A video sink that renders to a GtkWidget using OpenGL", + "hierarchy": [ + "GstGtkGLSink", +@@ -7106,7 +7106,7 @@ + "GstNavigation" + ], + "klass": "Sink/Video", +- "long-name": "Gtk GL Video Sink", ++ "long-name": "GTK GL Video Sink", + "pad-templates": { + "sink": { + "caps": "video/x-raw(memory:GLMemory):\n format: RGBA\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:GLMemory, meta:GstVideoOverlayComposition):\n format: RGBA\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n", +@@ -7147,7 +7147,7 @@ + "GstNavigation" + ], + "klass": "Sink/Video", +- "long-name": "Gtk Video Sink", ++ "long-name": "GTK Video Sink", + "pad-templates": { + "sink": { + "caps": "video/x-raw:\n format: { BGRx, BGRA }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n", +@@ -7224,6 +7224,127 @@ + "default": "0/1", + "max": "2147483647/1", + "min": "0/2147483647", ++ "mutable": "null", ++ "readable": true, ++ "type": "GstFraction", ++ "writable": true ++ }, ++ "widget": { ++ "blurb": "The GtkWidget to place in the widget hierarchy (must only be get from the GTK main thread)", ++ "conditionally-available": false, ++ "construct": false, ++ "construct-only": false, ++ "controllable": false, ++ "mutable": "null", ++ "readable": true, ++ "type": "GtkWidget", ++ "writable": false ++ } ++ } ++ } ++ }, ++ "package": "GStreamer Good Plug-ins", ++ "source": "gst-plugins-good", ++ "tracers": {}, ++ "url": "Unknown package origin" ++ }, ++ "gtk4": { ++ "description": "GTK4 sink", ++ "elements": { ++ "gtk4glsink": { ++ "author": "Matthew Waters , Rafał Dzięgiel ", ++ "description": "A video sink that renders to a GtkWidget using OpenGL", ++ "hierarchy": [ ++ "GstGtkGLSink", ++ "GstGtkBaseSink", ++ "GstVideoSink", ++ "GstBaseSink", ++ "GstElement", ++ "GstObject", ++ "GInitiallyUnowned", ++ "GObject" ++ ], ++ "interfaces": [ ++ "GstNavigation" ++ ], ++ "klass": "Sink/Video", ++ "long-name": "GTK4 GL Video Sink", ++ "pad-templates": { ++ "sink": { ++ "caps": "video/x-raw(memory:GLMemory):\n format: RGBA\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n\nvideo/x-raw(memory:GLMemory, meta:GstVideoOverlayComposition):\n format: RGBA\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n", ++ "direction": "sink", ++ "presence": "always" ++ } ++ }, ++ "rank": "none" ++ }, ++ "gtk4sink": { ++ "author": "Matthew Waters ", ++ "description": "A video sink that renders to a GtkWidget", ++ "hierarchy": [ ++ "GstGtkSink", ++ "GstGtkBaseSink", ++ "GstVideoSink", ++ "GstBaseSink", ++ "GstElement", ++ "GstObject", ++ "GInitiallyUnowned", ++ "GObject" ++ ], ++ "interfaces": [ ++ "GstNavigation" ++ ], ++ "klass": "Sink/Video", ++ "long-name": "GTK4 Video Sink", ++ "pad-templates": { ++ "sink": { ++ "caps": "video/x-raw:\n format: { BGRx, BGRA }\n width: [ 1, 2147483647 ]\n height: [ 1, 2147483647 ]\n framerate: [ 0/1, 2147483647/1 ]\n", ++ "direction": "sink", ++ "presence": "always" ++ } ++ }, ++ "rank": "none" ++ } ++ }, ++ "filename": "gstgtk4", ++ "license": "LGPL", ++ "other-types": { ++ "GstGtkBaseSink": { ++ "hierarchy": [ ++ "GstGtkBaseSink", ++ "GstVideoSink", ++ "GstBaseSink", ++ "GstElement", ++ "GstObject", ++ "GInitiallyUnowned", ++ "GObject" ++ ], ++ "interfaces": [ ++ "GstNavigation" ++ ], ++ "kind": "object", ++ "properties": { ++ "force-aspect-ratio": { ++ "blurb": "When enabled, scaling will respect original aspect ratio", ++ "conditionally-available": false, ++ "construct": false, ++ "construct-only": false, ++ "controllable": false, ++ "default": "true", ++ "mutable": "null", ++ "readable": true, ++ "type": "gboolean", ++ "writable": true ++ }, ++ "pixel-aspect-ratio": { ++ "blurb": "The pixel aspect ratio of the device", ++ "conditionally-available": false, ++ "construct": false, ++ "construct-only": false, ++ "controllable": false, ++ "default": "0/1", ++ "max": "2147483647/1", ++ "min": "0/1", + "mutable": "null", + "readable": true, + "type": "GstFraction", Index: x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gstgtkbasesink.h =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gstgtkbasesink.h @@ -0,0 +1,31 @@ +--- ext/gtk/gstgtkbasesink.h.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gstgtkbasesink.h +@@ -51,14 +51,14 @@ GType gst_gtk_base_sink_get_type (void); + struct _GstGtkBaseSink + { + /* */ +- GstVideoSink parent; ++ GstVideoSink parent; + +- GstVideoInfo v_info; ++ GstVideoInfo v_info; + + GtkGstBaseWidget *widget; + + /* properties */ +- gboolean force_aspect_ratio; ++ gboolean force_aspect_ratio; + GBinding *bind_aspect_ratio; + + gint par_n; +@@ -73,8 +73,8 @@ struct _GstGtkBaseSink + GBinding *bind_ignore_alpha; + + GtkWidget *window; +- gulong widget_destroy_id; +- gulong window_destroy_id; ++ gulong widget_destroy_id; ++ gulong window_destroy_id; + }; + + /** Index: x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gstgtkbasesink.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gstgtkbasesink.c @@ -0,0 +1,192 @@ +--- ext/gtk/gstgtkbasesink.c.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gstgtkbasesink.c +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -80,7 +81,7 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstGtkBaseSink, gst_ + G_IMPLEMENT_INTERFACE (GST_TYPE_NAVIGATION, + gst_gtk_base_sink_navigation_interface_init); + GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_base_sink, +- "gtkbasesink", 0, "Gtk Video Sink base class")); ++ "gtkbasesink", 0, "GTK Video Sink base class")); + + + static void +@@ -100,7 +101,7 @@ gst_gtk_base_sink_class_init (GstGtkBaseSinkClass * kl + gobject_class->get_property = gst_gtk_base_sink_get_property; + + g_object_class_install_property (gobject_class, PROP_WIDGET, +- g_param_spec_object ("widget", "Gtk Widget", ++ g_param_spec_object ("widget", "GTK Widget", + "The GtkWidget to place in the widget hierarchy " + "(must only be get from the GTK main thread)", + GTK_TYPE_WIDGET, +@@ -135,10 +136,13 @@ gst_gtk_base_sink_class_init (GstGtkBaseSinkClass * kl + G_MAXINT, G_MAXINT, 1, DEFAULT_VIDEO_PAR_N, DEFAULT_VIDEO_PAR_D, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + ++ /* Disabling alpha was removed in GTK4 */ ++#if !defined(BUILD_FOR_GTK4) + g_object_class_install_property (gobject_class, PROP_IGNORE_ALPHA, + g_param_spec_boolean ("ignore-alpha", "Ignore Alpha", + "When enabled, alpha will be ignored and converted to black", + DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); ++#endif + + gobject_class->finalize = gst_gtk_base_sink_finalize; + +@@ -169,6 +173,8 @@ gst_gtk_base_sink_finalize (GObject * object) + { + GstGtkBaseSink *gtk_sink = GST_GTK_BASE_SINK (object); + ++ GST_DEBUG ("finalizing base sink"); ++ + GST_OBJECT_LOCK (gtk_sink); + if (gtk_sink->window && gtk_sink->window_destroy_id) + g_signal_handler_disconnect (gtk_sink->window, gtk_sink->window_destroy_id); +@@ -193,6 +199,14 @@ static void + window_destroy_cb (GtkWidget * widget, GstGtkBaseSink * gtk_sink) + { + GST_OBJECT_LOCK (gtk_sink); ++ if (gtk_sink->widget) { ++ if (gtk_sink->widget_destroy_id) { ++ g_signal_handler_disconnect (gtk_sink->widget, ++ gtk_sink->widget_destroy_id); ++ gtk_sink->widget_destroy_id = 0; ++ } ++ g_clear_object (>k_sink->widget); ++ } + gtk_sink->window = NULL; + GST_OBJECT_UNLOCK (gtk_sink); + } +@@ -205,7 +219,11 @@ gst_gtk_base_sink_get_widget (GstGtkBaseSink * gtk_sin + + /* Ensure GTK is initialized, this has no side effect if it was already + * initialized. Also, we do that lazily, so the application can be first */ +- if (!gtk_init_check (NULL, NULL)) { ++ if (!gtk_init_check ( ++#if !defined(BUILD_FOR_GTK4) ++ NULL, NULL ++#endif ++ )) { + GST_INFO_OBJECT (gtk_sink, "Could not ensure GTK initialization."); + return NULL; + } +@@ -224,9 +242,11 @@ gst_gtk_base_sink_get_widget (GstGtkBaseSink * gtk_sin + g_object_bind_property (gtk_sink, "video-aspect-ratio-override", + gtk_sink->widget, "video-aspect-ratio-override", + G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); ++#if !defined(BUILD_FOR_GTK4) + gtk_sink->bind_ignore_alpha = + g_object_bind_property (gtk_sink, "ignore-alpha", gtk_sink->widget, + "ignore-alpha", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE); ++#endif + + /* Take the floating ref, other wise the destruction of the container will + * make this widget disappear possibly before we are done. */ +@@ -372,6 +392,9 @@ gst_gtk_base_sink_start_on_main (GstBaseSink * bsink) + GstGtkBaseSink *gst_sink = GST_GTK_BASE_SINK (bsink); + GstGtkBaseSinkClass *klass = GST_GTK_BASE_SINK_GET_CLASS (bsink); + GtkWidget *toplevel; ++#if defined(BUILD_FOR_GTK4) ++ GtkRoot *root; ++#endif + + if (gst_gtk_base_sink_get_widget (gst_sink) == NULL) { + GST_ERROR_OBJECT (bsink, "Could not ensure GTK initialization."); +@@ -380,19 +403,47 @@ gst_gtk_base_sink_start_on_main (GstBaseSink * bsink) + + /* After this point, gtk_sink->widget will always be set */ + ++#if defined(BUILD_FOR_GTK4) ++ root = gtk_widget_get_root (GTK_WIDGET (gst_sink->widget)); ++ if (!GTK_IS_ROOT (root)) { ++ GtkWidget *parent = gtk_widget_get_parent (GTK_WIDGET (gst_sink->widget)); ++ if (parent) { ++ GtkWidget *temp_parent; ++ while ((temp_parent = gtk_widget_get_parent (parent))) ++ parent = temp_parent; ++ } ++ toplevel = (parent) ? parent : GTK_WIDGET (gst_sink->widget); ++#else + toplevel = gtk_widget_get_toplevel (GTK_WIDGET (gst_sink->widget)); + if (!gtk_widget_is_toplevel (toplevel)) { ++#endif + /* sanity check */ + g_assert (klass->window_title); + + /* User did not add widget its own UI, let's popup a new GtkWindow to + * make gst-launch-1.0 work. */ +- gst_sink->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); ++ gst_sink->window = gtk_window_new ( ++#if !defined(BUILD_FOR_GTK4) ++ GTK_WINDOW_TOPLEVEL ++#endif ++ ); + gtk_window_set_default_size (GTK_WINDOW (gst_sink->window), 640, 480); + gtk_window_set_title (GTK_WINDOW (gst_sink->window), klass->window_title); +- gtk_container_add (GTK_CONTAINER (gst_sink->window), toplevel); +- gst_sink->window_destroy_id = g_signal_connect (gst_sink->window, "destroy", +- G_CALLBACK (window_destroy_cb), gst_sink); ++ ++#if defined(BUILD_FOR_GTK4) ++ gtk_window_set_child (GTK_WINDOW ( ++#else ++ gtk_container_add (GTK_CONTAINER ( ++#endif ++ gst_sink->window), toplevel); ++ ++ gst_sink->window_destroy_id = g_signal_connect ( ++#if defined(BUILD_FOR_GTK4) ++ GTK_WINDOW (gst_sink->window), ++#else ++ gst_sink->window, ++#endif ++ "destroy", G_CALLBACK (window_destroy_cb), gst_sink); + } + + return TRUE; +@@ -411,7 +462,11 @@ gst_gtk_base_sink_stop_on_main (GstBaseSink * bsink) + GstGtkBaseSink *gst_sink = GST_GTK_BASE_SINK (bsink); + + if (gst_sink->window) { ++#if defined(BUILD_FOR_GTK4) ++ gtk_window_destroy (GTK_WINDOW (gst_sink->window)); ++#else + gtk_widget_destroy (gst_sink->window); ++#endif + gst_sink->window = NULL; + gst_sink->widget = NULL; + } +@@ -432,10 +487,14 @@ gst_gtk_base_sink_stop (GstBaseSink * bsink) + } + + static void +-gst_gtk_widget_show_all_and_unref (GtkWidget * widget) ++gst_gtk_window_show_all_and_unref (GtkWidget * window) + { +- gtk_widget_show_all (widget); +- g_object_unref (widget); ++#if defined(BUILD_FOR_GTK4) ++ gtk_window_present (GTK_WINDOW (window)); ++#else ++ gtk_widget_show_all (window); ++#endif ++ g_object_unref (window); + } + + static GstStateChangeReturn +@@ -463,7 +522,7 @@ gst_gtk_base_sink_change_state (GstElement * element, + GST_OBJECT_UNLOCK (gtk_sink); + + if (window) +- gst_gtk_invoke_on_main ((GThreadFunc) gst_gtk_widget_show_all_and_unref, ++ gst_gtk_invoke_on_main ((GThreadFunc) gst_gtk_window_show_all_and_unref, + window); + + break; Index: x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gstgtkglsink.h =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gstgtkglsink.h @@ -0,0 +1,11 @@ +--- ext/gtk/gstgtkglsink.h ++++ ext/gtk/gstgtkglsink.h +@@ -57,7 +57,7 @@ struct _GstGtkGLSink + gint display_width; + gint display_height; + +- gulong size_allocate_sig_handler; ++ gulong widget_resize_sig_handler; + gulong widget_destroy_sig_handler; + }; + Index: x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gstgtkglsink.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gstgtkglsink.c @@ -0,0 +1,186 @@ +--- ext/gtk/gstgtkglsink.c.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gstgtkglsink.c +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -23,6 +24,11 @@ + * @title: gtkglsink + */ + ++/** ++ * SECTION:element-gtk4glsink ++ * @title: gtk4glsink ++ */ ++ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif +@@ -30,6 +36,7 @@ + #include + #include + ++#include "gtkconfig.h" + #include "gstgtkglsink.h" + #include "gtkgstglwidget.h" + +@@ -65,7 +72,7 @@ static GstStaticPadTemplate gst_gtk_gl_sink_template = + #define gst_gtk_gl_sink_parent_class parent_class + G_DEFINE_TYPE_WITH_CODE (GstGtkGLSink, gst_gtk_gl_sink, + GST_TYPE_GTK_BASE_SINK, GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_gl_sink, +- "gtkglsink", 0, "Gtk GL Video Sink")); ++ GTKCONFIG_GLSINK, 0, GTKCONFIG_NAME " GL Video Sink")); + GST_ELEMENT_REGISTER_DEFINE (gtkglsink, "gtkglsink", GST_RANK_NONE, + GST_TYPE_GTK_GL_SINK); + +@@ -101,7 +108,7 @@ gst_gtk_gl_sink_class_init (GstGtkGLSinkClass * klass) + gstbasesink_class->event = gst_gtk_gl_sink_event; + + gstgtkbasesink_class->create_widget = gtk_gst_gl_widget_new; +- gstgtkbasesink_class->window_title = "Gtk+ GL renderer"; ++ gstgtkbasesink_class->window_title = GTKCONFIG_NAME " GL Renderer"; + + /** + * gtkglsink:rotate-method: +@@ -117,9 +124,11 @@ gst_gtk_gl_sink_class_init (GstGtkGLSinkClass * klass) + GST_TYPE_VIDEO_ORIENTATION_METHOD, GST_VIDEO_ORIENTATION_IDENTITY, + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + +- gst_element_class_set_metadata (gstelement_class, "Gtk GL Video Sink", ++ gst_element_class_set_metadata (gstelement_class, ++ GTKCONFIG_NAME " GL Video Sink", + "Sink/Video", "A video sink that renders to a GtkWidget using OpenGL", +- "Matthew Waters "); ++ "Matthew Waters , " ++ "Rafał Dzięgiel "); + + gst_element_class_add_static_pad_template (gstelement_class, + &gst_gtk_gl_sink_template); +@@ -202,16 +211,18 @@ gst_gtk_gl_sink_query (GstBaseSink * bsink, GstQuery * + } + + static void +-_size_changed_cb (GtkWidget * widget, GdkRectangle * rectangle, +- GstGtkGLSink * gtk_sink) ++_size_changed_cb (GtkWidget * widget, gint width, ++ gint height, GstGtkGLSink * gtk_sink) + { +- gint scale_factor, width, height; + gboolean reconfigure; + +- scale_factor = gtk_widget_get_scale_factor (widget); +- width = scale_factor * gtk_widget_get_allocated_width (widget); +- height = scale_factor * gtk_widget_get_allocated_height (widget); ++ GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget); + ++ /* Ignore size changes before widget is negotiated ++ * we are going to queue a resize after negotiation */ ++ if (!base_widget->negotiated) ++ return; ++ + GST_OBJECT_LOCK (gtk_sink); + reconfigure = + (width != gtk_sink->display_width || height != gtk_sink->display_height); +@@ -220,7 +231,7 @@ _size_changed_cb (GtkWidget * widget, GdkRectangle * r + GST_OBJECT_UNLOCK (gtk_sink); + + if (reconfigure) { +- GST_DEBUG_OBJECT (gtk_sink, "Sending reconfigure event on sinkpad."); ++ GST_DEBUG_OBJECT (gtk_sink, "Sending reconfigure event on sinkpad"); + gst_pad_push_event (GST_BASE_SINK (gtk_sink)->sinkpad, + gst_event_new_reconfigure ()); + } +@@ -229,9 +240,9 @@ _size_changed_cb (GtkWidget * widget, GdkRectangle * r + static void + destroy_cb (GtkWidget * widget, GstGtkGLSink * gtk_sink) + { +- if (gtk_sink->size_allocate_sig_handler) { +- g_signal_handler_disconnect (widget, gtk_sink->size_allocate_sig_handler); +- gtk_sink->size_allocate_sig_handler = 0; ++ if (gtk_sink->widget_resize_sig_handler) { ++ g_signal_handler_disconnect (widget, gtk_sink->widget_resize_sig_handler); ++ gtk_sink->widget_resize_sig_handler = 0; + } + + if (gtk_sink->widget_destroy_sig_handler) { +@@ -254,29 +265,34 @@ gst_gtk_gl_sink_start (GstBaseSink * bsink) + gst_widget = GTK_GST_GL_WIDGET (base_sink->widget); + + /* Track the allocation size */ +- gtk_sink->size_allocate_sig_handler = +- g_signal_connect (gst_widget, "size-allocate", +- G_CALLBACK (_size_changed_cb), gtk_sink); ++ if (!gtk_sink->widget_resize_sig_handler) { ++ gtk_sink->widget_resize_sig_handler = ++ g_signal_connect (gst_widget, "resize", ++ G_CALLBACK (_size_changed_cb), gtk_sink); ++ } + +- gtk_sink->widget_destroy_sig_handler = +- g_signal_connect (gst_widget, "destroy", G_CALLBACK (destroy_cb), +- gtk_sink); ++ if (!gtk_sink->widget_destroy_sig_handler) { ++ gtk_sink->widget_destroy_sig_handler = ++ g_signal_connect (gst_widget, "destroy", G_CALLBACK (destroy_cb), ++ gtk_sink); ++ } + +- _size_changed_cb (GTK_WIDGET (gst_widget), NULL, gtk_sink); +- + if (!gtk_gst_gl_widget_init_winsys (gst_widget)) { + GST_ELEMENT_ERROR (bsink, RESOURCE, NOT_FOUND, ("%s", +- "Failed to initialize OpenGL with Gtk"), (NULL)); ++ "Failed to initialize OpenGL with GTK"), (NULL)); + return FALSE; + } + +- gtk_sink->display = gtk_gst_gl_widget_get_display (gst_widget); +- gtk_sink->context = gtk_gst_gl_widget_get_context (gst_widget); +- gtk_sink->gtk_context = gtk_gst_gl_widget_get_gtk_context (gst_widget); ++ if (!gtk_sink->display) ++ gtk_sink->display = gtk_gst_gl_widget_get_display (gst_widget); ++ if (!gtk_sink->context) ++ gtk_sink->context = gtk_gst_gl_widget_get_context (gst_widget); ++ if (!gtk_sink->gtk_context) ++ gtk_sink->gtk_context = gtk_gst_gl_widget_get_gtk_context (gst_widget); + + if (!gtk_sink->display || !gtk_sink->context || !gtk_sink->gtk_context) { + GST_ELEMENT_ERROR (bsink, RESOURCE, NOT_FOUND, ("%s", +- "Failed to retrieve OpenGL context from Gtk"), (NULL)); ++ "Failed to retrieve OpenGL context from GTK"), (NULL)); + return FALSE; + } + +@@ -290,7 +306,14 @@ static gboolean + gst_gtk_gl_sink_stop (GstBaseSink * bsink) + { + GstGtkGLSink *gtk_sink = GST_GTK_GL_SINK (bsink); ++ GstGtkBaseSink *base_sink = GST_GTK_BASE_SINK (bsink); + ++ if (gtk_sink->widget_resize_sig_handler) { ++ g_signal_handler_disconnect (base_sink->widget, ++ gtk_sink->widget_resize_sig_handler); ++ gtk_sink->widget_resize_sig_handler = 0; ++ } ++ + if (gtk_sink->display) { + gst_object_unref (gtk_sink->display); + gtk_sink->display = NULL; +@@ -432,10 +455,10 @@ gst_gtk_gl_sink_finalize (GObject * object) + GstGtkGLSink *gtk_sink = GST_GTK_GL_SINK (object); + GstGtkBaseSink *base_sink = GST_GTK_BASE_SINK (object); + +- if (gtk_sink->size_allocate_sig_handler) { ++ if (gtk_sink->widget_resize_sig_handler) { + g_signal_handler_disconnect (base_sink->widget, +- gtk_sink->size_allocate_sig_handler); +- gtk_sink->size_allocate_sig_handler = 0; ++ gtk_sink->widget_resize_sig_handler); ++ gtk_sink->widget_resize_sig_handler = 0; + } + + if (gtk_sink->widget_destroy_sig_handler) { Index: x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gstgtksink.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gstgtksink.c @@ -0,0 +1,40 @@ +--- ext/gtk/gstgtksink.c.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gstgtksink.c +@@ -19,15 +19,22 @@ + */ + + /** +- * SECTION:element-gtkgstsink +- * @title: gtkgstsink ++ * SECTION:element-gtksink ++ * @title: gtksink + * + */ + ++/** ++ * SECTION:element-gtk4sink ++ * @title: gtk4sink ++ * ++ */ ++ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif + ++#include "gtkconfig.h" + #include "gtkgstwidget.h" + #include "gstgtksink.h" + +@@ -64,9 +71,10 @@ gst_gtk_sink_class_init (GstGtkSinkClass * klass) + base_class = (GstGtkBaseSinkClass *) klass; + + base_class->create_widget = gtk_gst_widget_new; +- base_class->window_title = "Gtk+ Cairo renderer"; ++ base_class->window_title = GTKCONFIG_NAME " Cairo Renderer"; + +- gst_element_class_set_metadata (gstelement_class, "Gtk Video Sink", ++ gst_element_class_set_metadata (gstelement_class, ++ GTKCONFIG_NAME " Video Sink", + "Sink/Video", "A video sink that renders to a GtkWidget", + "Matthew Waters "); + Index: x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gstplugin.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gstplugin.c @@ -0,0 +1,45 @@ +--- ext/gtk/gstplugin.c.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gstplugin.c +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -22,8 +23,10 @@ + #include "config.h" + #endif + ++#include "gtkconfig.h" + #include "gstgtksink.h" +-#if defined(HAVE_GTK3_GL) ++ ++#if defined(HAVE_GTK_GL) + #include "gstgtkglsink.h" + #endif + +@@ -32,10 +35,10 @@ plugin_init (GstPlugin * plugin) + { + gboolean ret = FALSE; + +- ret |= GST_ELEMENT_REGISTER (gtksink, plugin); ++ ret |= GST_ELEMENT_REGISTER (GTKCONFIG_SINK, plugin); + +-#if defined(HAVE_GTK3_GL) +- ret |= GST_ELEMENT_REGISTER (gtkglsink, plugin); ++#if defined(HAVE_GTK_GL) ++ ret |= GST_ELEMENT_REGISTER (GTKCONFIG_GLSINK, plugin); + #endif + + return ret; +@@ -43,7 +46,6 @@ plugin_init (GstPlugin * plugin) + + GST_PLUGIN_DEFINE (GST_VERSION_MAJOR, + GST_VERSION_MINOR, +- gtk, +- "Gtk+ sink", ++ GTKCONFIG_PLUGIN, GTKCONFIG_NAME " sink", + plugin_init, PACKAGE_VERSION, GST_LICENSE, GST_PACKAGE_NAME, + GST_PACKAGE_ORIGIN) Index: x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gtkconfig.h =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gtkconfig.h @@ -0,0 +1,34 @@ +--- /dev/null ++++ ext/gtk/gtkconfig.h +@@ -0,0 +1,31 @@ ++/* ++ * GStreamer ++ * Copyright (C) 2020 Rafał Dzięgiel ++ * ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, ++ * Boston, MA 02110-1301, USA. ++ */ ++ ++#if defined(BUILD_FOR_GTK4) ++#define GTKCONFIG_PLUGIN gtk4 ++#define GTKCONFIG_NAME "GTK4" ++#define GTKCONFIG_SINK "gtk4sink" ++#define GTKCONFIG_GLSINK "gtk4glsink" ++#else ++#define GTKCONFIG_PLUGIN gtk ++#define GTKCONFIG_NAME "GTK" ++#define GTKCONFIG_SINK "gtksink" ++#define GTKCONFIG_GLSINK "gtkglsink" ++#endif Index: x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gtkgstbasewidget.h =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gtkgstbasewidget.h @@ -0,0 +1,53 @@ +--- ext/gtk/gtkgstbasewidget.h ++++ ext/gtk/gtkgstbasewidget.h +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -25,6 +26,10 @@ + #include + #include + ++#if !defined(BUILD_FOR_GTK4) ++#include ++#endif ++ + #define GTK_GST_BASE_WIDGET(w) ((GtkGstBaseWidget *)(w)) + #define GTK_GST_BASE_WIDGET_CLASS(k) ((GtkGstBaseWidgetClass *)(k)) + #define GTK_GST_BASE_WIDGET_LOCK(w) g_mutex_lock(&((GtkGstBaseWidget*)(w))->lock) +@@ -39,9 +44,7 @@ struct _GtkGstBaseWidget + { + union { + GtkDrawingArea drawing_area; +-#if GTK_CHECK_VERSION(3, 15, 0) + GtkGLArea gl_area; +-#endif + } parent; + + /* properties */ +@@ -67,6 +70,11 @@ struct _GtkGstBaseWidget + GMutex lock; + GWeakRef element; + ++ /* event controllers */ ++ GtkEventController *key_controller; ++ GtkEventController *motion_controller; ++ GtkGesture *click_gesture; ++ + /* Pending draw idles callback */ + guint draw_id; + }; +@@ -75,9 +83,7 @@ struct _GtkGstBaseWidgetClass + { + union { + GtkDrawingAreaClass drawing_area_class; +-#if GTK_CHECK_VERSION(3, 15, 0) + GtkGLAreaClass gl_area_class; +-#endif + } parent_class; + }; + Index: x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gtkgstbasewidget.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gtkgstbasewidget.c @@ -0,0 +1,257 @@ +--- ext/gtk/gtkgstbasewidget.c.orig 2022-06-15 22:36:22 UTC ++++ ext/gtk/gtkgstbasewidget.c +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -208,7 +209,23 @@ gtk_gst_base_widget_get_preferred_height (GtkWidget * + *natural = video_height; + } + ++#if defined(BUILD_FOR_GTK4) + static void ++gtk_gst_base_widget_measure (GtkWidget * widget, GtkOrientation orientation, ++ gint for_size, gint * min, gint * natural, ++ gint * minimum_baseline, gint * natural_baseline) ++{ ++ if (orientation == GTK_ORIENTATION_HORIZONTAL) ++ gtk_gst_base_widget_get_preferred_width (widget, min, natural); ++ else ++ gtk_gst_base_widget_get_preferred_height (widget, min, natural); ++ ++ *minimum_baseline = -1; ++ *natural_baseline = -1; ++} ++#endif ++ ++static void + gtk_gst_base_widget_set_property (GObject * object, guint prop_id, + const GValue * value, GParamSpec * pspec) + { +@@ -281,22 +298,46 @@ _gdk_key_to_navigation_string (guint keyval) + } + } + ++static GdkEvent * ++_get_current_event (GtkEventController * controller) ++{ ++#if defined(BUILD_FOR_GTK4) ++ return gtk_event_controller_get_current_event (controller); ++#else ++ return gtk_get_current_event (); ++#endif ++} ++ ++static void ++_gdk_event_free (GdkEvent * event) ++{ ++#if !defined(BUILD_FOR_GTK4) ++ if (event) ++ gdk_event_free (event); ++#endif ++} ++ + static gboolean +-gtk_gst_base_widget_key_event (GtkWidget * widget, GdkEventKey * event) ++gtk_gst_base_widget_key_event (GtkEventControllerKey * key_controller, ++ guint keyval, guint keycode, GdkModifierType state) + { ++ GtkEventController *controller = GTK_EVENT_CONTROLLER (key_controller); ++ GtkWidget *widget = gtk_event_controller_get_widget (controller); + GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget); + GstElement *element; + + if ((element = g_weak_ref_get (&base_widget->element))) { + if (GST_IS_NAVIGATION (element)) { +- const gchar *str = _gdk_key_to_navigation_string (event->keyval); +- const gchar *key_type = +- event->type == GDK_KEY_PRESS ? "key-press" : "key-release"; ++ GdkEvent *event = _get_current_event (controller); ++ const gchar *str = _gdk_key_to_navigation_string (keyval); + +- if (!str) +- str = event->string; +- +- gst_navigation_send_key_event (GST_NAVIGATION (element), key_type, str); ++ if (str) { ++ const gchar *key_type = ++ gdk_event_get_event_type (event) == ++ GDK_KEY_PRESS ? "key-press" : "key-release"; ++ gst_navigation_send_key_event (GST_NAVIGATION (element), key_type, str); ++ } ++ _gdk_event_free (event); + } + g_object_unref (element); + } +@@ -371,18 +412,38 @@ gtk_gst_base_widget_display_size_to_stream_size (GtkGs + } + + static gboolean +-gtk_gst_base_widget_button_event (GtkWidget * widget, GdkEventButton * event) ++gtk_gst_base_widget_button_event ( ++#if defined(BUILD_FOR_GTK4) ++ GtkGestureClick * gesture, ++#else ++ GtkGestureMultiPress * gesture, ++#endif ++ gint n_press, gdouble x, gdouble y) + { ++ GtkEventController *controller = GTK_EVENT_CONTROLLER (gesture); ++ GtkWidget *widget = gtk_event_controller_get_widget (controller); + GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget); + GstElement *element; + + if ((element = g_weak_ref_get (&base_widget->element))) { + if (GST_IS_NAVIGATION (element)) { ++ GdkEvent *event = _get_current_event (controller); + const gchar *key_type = +- event->type == +- GDK_BUTTON_PRESS ? "mouse-button-press" : "mouse-button-release"; ++ gdk_event_get_event_type (event) == GDK_BUTTON_PRESS ++ ? "mouse-button-press" : "mouse-button-release"; ++#if !defined(BUILD_FOR_GTK4) ++ guint button; ++ gdk_event_get_button (event, &button); ++#endif + gst_navigation_send_mouse_event (GST_NAVIGATION (element), key_type, +- event->button, event->x, event->y); ++#if defined(BUILD_FOR_GTK4) ++ /* Gesture is set to ignore other buttons so we do not have to check */ ++ GDK_BUTTON_PRIMARY, ++#else ++ button, ++#endif ++ event->x, event->y); ++ _gdk_event_free (event); + } + g_object_unref (element); + } +@@ -391,15 +452,18 @@ gtk_gst_base_widget_button_event (GtkWidget * widget, + } + + static gboolean +-gtk_gst_base_widget_motion_event (GtkWidget * widget, GdkEventMotion * event) ++gtk_gst_base_widget_motion_event (GtkEventControllerMotion * motion_controller, ++ gdouble x, gdouble y) + { ++ GtkEventController *controller = GTK_EVENT_CONTROLLER (motion_controller); ++ GtkWidget *widget = gtk_event_controller_get_widget (controller); + GtkGstBaseWidget *base_widget = GTK_GST_BASE_WIDGET (widget); + GstElement *element; + + if ((element = g_weak_ref_get (&base_widget->element))) { + if (GST_IS_NAVIGATION (element)) { + gst_navigation_send_mouse_event (GST_NAVIGATION (element), "mouse-move", +- 0, event->x, event->y); ++ 0, x, y); + } + g_object_unref (element); + } +@@ -490,24 +554,20 @@ gtk_gst_base_widget_class_init (GtkGstBaseWidgetClass + "When enabled, alpha will be ignored and converted to black", + DEFAULT_IGNORE_ALPHA, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); + ++#if defined(BUILD_FOR_GTK4) ++ widget_klass->measure = gtk_gst_base_widget_measure; ++#else + widget_klass->get_preferred_width = gtk_gst_base_widget_get_preferred_width; + widget_klass->get_preferred_height = gtk_gst_base_widget_get_preferred_height; +- widget_klass->key_press_event = gtk_gst_base_widget_key_event; +- widget_klass->key_release_event = gtk_gst_base_widget_key_event; +- widget_klass->button_press_event = gtk_gst_base_widget_button_event; +- widget_klass->button_release_event = gtk_gst_base_widget_button_event; +- widget_klass->motion_notify_event = gtk_gst_base_widget_motion_event; +- widget_klass->scroll_event = gtk_gst_base_widget_scroll_event; ++#endif + + GST_DEBUG_CATEGORY_INIT (gst_debug_gtk_base_widget, "gtkbasewidget", 0, +- "Gtk Video Base Widget"); ++ "GTK Video Base Widget"); + } + + void + gtk_gst_base_widget_init (GtkGstBaseWidget * widget) + { +- int event_mask; +- + widget->force_aspect_ratio = DEFAULT_FORCE_ASPECT_RATIO; + widget->par_n = DEFAULT_DISPLAY_PAR_N; + widget->par_d = DEFAULT_DISPLAY_PAR_D; +@@ -521,20 +581,66 @@ gtk_gst_base_widget_init (GtkGstBaseWidget * widget) + g_weak_ref_init (&widget->element, NULL); + g_mutex_init (&widget->lock); + ++ widget->key_controller = gtk_event_controller_key_new ( ++#if !defined(BUILD_FOR_GTK4) ++ GTK_WIDGET (widget) ++#endif ++ ); ++ g_signal_connect (widget->key_controller, "key-pressed", ++ G_CALLBACK (gtk_gst_base_widget_key_event), NULL); ++ g_signal_connect (widget->key_controller, "key-released", ++ G_CALLBACK (gtk_gst_base_widget_key_event), NULL); ++ ++ widget->motion_controller = gtk_event_controller_motion_new ( ++#if !defined(BUILD_FOR_GTK4) ++ GTK_WIDGET (widget) ++#endif ++ ); ++ g_signal_connect (widget->motion_controller, "motion", ++ G_CALLBACK (gtk_gst_base_widget_motion_event), NULL); ++ ++ widget->click_gesture = ++#if defined(BUILD_FOR_GTK4) ++ gtk_gesture_click_new (); ++#else ++ gtk_gesture_multi_press_new (GTK_WIDGET (widget)); ++#endif ++ g_signal_connect (widget->click_gesture, "pressed", ++ G_CALLBACK (gtk_gst_base_widget_button_event), NULL); ++ g_signal_connect (widget->click_gesture, "released", ++ G_CALLBACK (gtk_gst_base_widget_button_event), NULL); ++ ++#if defined(BUILD_FOR_GTK4) ++ /* Otherwise widget in grid will appear as a 1x1px ++ * video which might be misleading for users */ ++ gtk_widget_set_hexpand (GTK_WIDGET (widget), TRUE); ++ gtk_widget_set_vexpand (GTK_WIDGET (widget), TRUE); ++ ++ gtk_widget_set_focusable (GTK_WIDGET (widget), TRUE); ++ gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (widget->click_gesture), ++ GDK_BUTTON_PRIMARY); ++ ++ gtk_widget_add_controller (GTK_WIDGET (widget), widget->key_controller); ++ gtk_widget_add_controller (GTK_WIDGET (widget), widget->motion_controller); ++ gtk_widget_add_controller (GTK_WIDGET (widget), ++ GTK_EVENT_CONTROLLER (widget->click_gesture)); ++#endif ++ + gtk_widget_set_can_focus (GTK_WIDGET (widget), TRUE); +- event_mask = gtk_widget_get_events (GTK_WIDGET (widget)); +- event_mask |= GDK_KEY_PRESS_MASK +- | GDK_KEY_RELEASE_MASK +- | GDK_BUTTON_PRESS_MASK +- | GDK_BUTTON_RELEASE_MASK +- | GDK_POINTER_MOTION_MASK | GDK_BUTTON_MOTION_MASK | GDK_SCROLL_MASK; +- gtk_widget_set_events (GTK_WIDGET (widget), event_mask); + } + + void + gtk_gst_base_widget_finalize (GObject * object) + { + GtkGstBaseWidget *widget = GTK_GST_BASE_WIDGET (object); ++ ++ /* GTK4 takes ownership of EventControllers ++ * while GTK3 still needs manual unref */ ++#if !defined(BUILD_FOR_GTK4) ++ g_object_unref (widget->key_controller); ++ g_object_unref (widget->motion_controller); ++ g_object_unref (widget->click_gesture); ++#endif + + gst_buffer_replace (&widget->pending_buffer, NULL); + gst_buffer_replace (&widget->buffer, NULL); Index: x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gtkgstglwidget.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gtkgstglwidget.c @@ -0,0 +1,53 @@ +--- ext/gtk/gtkgstglwidget.c ++++ ext/gtk/gtkgstglwidget.c +@@ -1,6 +1,7 @@ + /* + * GStreamer + * Copyright (C) 2015 Matthew Waters ++ * Copyright (C) 2020 Rafał Dzięgiel + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public +@@ -30,12 +31,20 @@ + #include + + #if GST_GL_HAVE_WINDOW_X11 && defined (GDK_WINDOWING_X11) ++#if defined(BUILD_FOR_GTK4) ++#include ++#else + #include ++#endif + #include + #endif + + #if GST_GL_HAVE_WINDOW_WAYLAND && defined (GDK_WINDOWING_WAYLAND) ++#if defined(BUILD_FOR_GTK4) ++#include ++#else + #include ++#endif + #include + #endif + +@@ -78,8 +87,7 @@ static const GLfloat vertices[] = { + G_DEFINE_TYPE_WITH_CODE (GtkGstGLWidget, gtk_gst_gl_widget, GTK_TYPE_GL_AREA, + G_ADD_PRIVATE (GtkGstGLWidget) + GST_DEBUG_CATEGORY_INIT (GST_CAT_DEFAULT, "gtkgstglwidget", 0, +- "Gtk Gst GL Widget"); +- ); ++ "GTK Gst GL Widget")); + + static void + gtk_gst_gl_widget_bind_buffer (GtkGstGLWidget * gst_widget) +@@ -407,8 +415,11 @@ gtk_gst_gl_widget_init (GtkGstGLWidget * gst_widget) + + GST_INFO ("Created %" GST_PTR_FORMAT, priv->display); + ++ /* GTK4 always has alpha */ ++#if !defined(BUILD_FOR_GTK4) + gtk_gl_area_set_has_alpha (GTK_GL_AREA (gst_widget), + !base_widget->ignore_alpha); ++#endif + } + + static void Index: x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gtkgstwidget.c =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_gtkgstwidget.c @@ -0,0 +1,83 @@ +--- ext/gtk/gtkgstwidget.c ++++ ext/gtk/gtkgstwidget.c +@@ -38,17 +38,15 @@ + + G_DEFINE_TYPE (GtkGstWidget, gtk_gst_widget, GTK_TYPE_DRAWING_AREA); + +-static gboolean +-gtk_gst_widget_draw (GtkWidget * widget, cairo_t * cr) ++static void ++_drawing_area_draw (GtkDrawingArea * da, cairo_t * cr, ++ gint widget_width, gint widget_height, gpointer data) + { ++ GtkWidget *widget = GTK_WIDGET (da); + GtkGstBaseWidget *gst_widget = (GtkGstBaseWidget *) widget; +- guint widget_width, widget_height; + cairo_surface_t *surface; + GstVideoFrame frame; + +- widget_width = gtk_widget_get_allocated_width (widget); +- widget_height = gtk_widget_get_allocated_height (widget); +- + GTK_GST_BASE_WIDGET_LOCK (gst_widget); + + /* There is not much to optimize in term of redisplay, so simply swap the +@@ -148,7 +146,10 @@ gtk_gst_widget_draw (GtkWidget * widget, cairo_t * cr) + color.alpha = 1.0; + } else { + gtk_style_context_get_color (gtk_widget_get_style_context (widget), +- GTK_STATE_FLAG_NORMAL, &color); ++#if !defined(BUILD_FOR_GTK4) ++ GTK_STATE_FLAG_NORMAL, ++#endif ++ &color); + } + gdk_cairo_set_source_rgba (cr, &color); + cairo_rectangle (cr, 0, 0, widget_width, widget_height); +@@ -156,8 +157,20 @@ gtk_gst_widget_draw (GtkWidget * widget, cairo_t * cr) + } + + GTK_GST_BASE_WIDGET_UNLOCK (gst_widget); ++} ++ ++#if !defined(BUILD_FOR_GTK4) ++static gboolean ++gtk_gst_widget_draw (GtkWidget * widget, cairo_t * cr) ++{ ++ gint width = gtk_widget_get_allocated_width (widget); ++ gint height = gtk_widget_get_allocated_height (widget); ++ ++ _drawing_area_draw (GTK_DRAWING_AREA (widget), cr, width, height, NULL); ++ + return FALSE; + } ++#endif + + static void + gtk_gst_widget_finalize (GObject * object) +@@ -171,17 +184,25 @@ static void + gtk_gst_widget_class_init (GtkGstWidgetClass * klass) + { + GObjectClass *gobject_klass = (GObjectClass *) klass; ++#if !defined(BUILD_FOR_GTK4) + GtkWidgetClass *widget_klass = (GtkWidgetClass *) klass; ++#endif + + gtk_gst_base_widget_class_init (GTK_GST_BASE_WIDGET_CLASS (klass)); + gobject_klass->finalize = gtk_gst_widget_finalize; ++#if !defined(BUILD_FOR_GTK4) + widget_klass->draw = gtk_gst_widget_draw; ++#endif + } + + static void + gtk_gst_widget_init (GtkGstWidget * widget) + { + gtk_gst_base_widget_init (GTK_GST_BASE_WIDGET (widget)); ++#if defined(BUILD_FOR_GTK4) ++ gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (widget), ++ _drawing_area_draw, NULL, NULL); ++#endif + } + + GtkWidget * Index: x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_meson.build =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-ext_gtk_meson.build @@ -0,0 +1,118 @@ +--- ext/gtk/meson.build ++++ ext/gtk/meson.build +@@ -1,3 +1,4 @@ ++gtk_versions = [3, 4] + gtk_sources = [ + 'gstgtkbasesink.c', + 'gstgtksink.c', +@@ -6,54 +7,86 @@ gtk_sources = [ + 'gtkgstbasewidget.c', + 'gtkgstwidget.c', + ] ++gtk_dep = dependency('gtk+-3.0', required : get_option('gtk3')) ++gtk_optional_deps = [] + +-gtk_defines = [] +-optional_deps = [] ++gtk4_dep = dependency('gtk4', required : get_option('gtk4')) ++gtk4_optional_deps = [] + +-gtk_dep = dependency('gtk+-3.0', required : get_option('gtk3')) +-if gtk_dep.found() +- # FIXME: automagic +- if have_gstgl and gtk_dep.version().version_compare('>=3.15.0') +- have_gtk3_gl_windowing = false ++foreach gtk_ver : gtk_versions ++ gtkv = 'gtk' + gtk_ver.to_string() ++ ++ gtk_state = get_option(gtkv) ++ if gtk_state.disabled() ++ continue ++ endif ++ ++ min_ver = gtk_ver >= 4 ? '3.99.2' : '3.24.0' ++ x11_str = gtk_ver >= 4 ? gtkv + '-x11' : 'gtk+-x11-3.0' ++ way_str = gtk_ver >= 4 ? gtkv + '-wayland' : 'gtk+-wayland-3.0' ++ lib_dep = gtk_ver >= 4 ? gtk4_dep : gtk_dep ++ ++ if not lib_dep.found() or not lib_dep.version().version_compare('>=' + min_ver) ++ continue ++ endif ++ ++ lib_sources = [] ++ gtk_defines = [] ++ optional_deps = [] ++ have_gtk_gl_windowing = false + ++ lib_sources += gtk_sources ++ ++ if have_gstgl + if gst_gl_have_window_x11 and gst_gl_have_platform_glx + # FIXME: automagic +- gtk_x11_dep = dependency('gtk+-x11-3.0', required : false) ++ gtk_x11_dep = dependency(x11_str, required : false) + if gtk_x11_dep.found() + optional_deps += [gtk_x11_dep, gstglx11_dep] +- have_gtk3_gl_windowing = true ++ have_gtk_gl_windowing = true + endif + endif + + if gst_gl_have_window_wayland and gst_gl_have_platform_egl + # FIXME: automagic +- gtk_wayland_dep = dependency('gtk+-wayland-3.0', required : false) ++ gtk_wayland_dep = dependency(way_str, required : false) + if gtk_wayland_dep.found() + optional_deps += [gtk_wayland_dep, gstglegl_dep, gstglwayland_dep] +- have_gtk3_gl_windowing = true ++ have_gtk_gl_windowing = true + endif + endif ++ endif + +- if have_gtk3_gl_windowing +- gtk_sources += [ +- 'gstgtkglsink.c', +- 'gtkgstglwidget.c', +- ] +- optional_deps += [gstgl_dep, gstglproto_dep] +- gtk_defines += ['-DGST_USE_UNSTABLE_API', '-DHAVE_GTK3_GL'] +- endif ++ if have_gtk_gl_windowing ++ lib_sources += [ ++ 'gstgtkglsink.c', ++ 'gtkgstglwidget.c', ++ ] ++ optional_deps += [gstgl_dep, gstglproto_dep] ++ gtk_defines += ['-DGST_USE_UNSTABLE_API', '-DHAVE_GTK_GL'] ++ endif ++ ++ if gtk_ver == 3 ++ gtk_optional_deps = optional_deps ++ elif gtk_ver == 4 ++ gtk4_optional_deps = optional_deps ++ gtk_defines += '-DBUILD_FOR_GTK4' ++ endif ++ ++ lib_name = 'gstgtk' ++ if gtk_ver > 3 ++ lib_name += gtk_ver.to_string() + endif + +- gstgtk = library('gstgtk', +- gtk_sources, ++ gstgtk = library(lib_name, ++ lib_sources, + c_args : gst_plugins_good_args + gtk_defines, + link_args : noseh_link_args, + include_directories : [configinc], +- dependencies : [gtk_dep, gstvideo_dep, gstbase_dep, libm] + optional_deps, ++ dependencies : [lib_dep, gstvideo_dep, gstbase_dep, libm] + optional_deps, + install : true, + install_dir : plugins_install_dir, + ) + pkgconfig.generate(gstgtk, install_dir : plugins_pkgconfig_install_dir) + plugins += [gstgtk] +-endif +- ++endforeach Index: x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-meson__options.txt =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-meson__options.txt @@ -0,0 +1,10 @@ +--- meson_options.txt ++++ meson_options.txt +@@ -53,6 +53,7 @@ option('dv1394', type : 'feature', value : 'auto', description : 'Digital IEEE13 + option('flac', type : 'feature', value : 'auto', description : 'FLAC audio codec plugin') + option('gdk-pixbuf', type : 'feature', value : 'auto', description : 'gdk-pixbuf image decoder, overlay, and sink plugin') + option('gtk3', type : 'feature', value : 'auto', description : 'GTK+ video sink plugin') ++option('gtk4', type : 'feature', value : 'disabled', description : 'GTK4 video sink plugin') + option('jack', type : 'feature', value : 'auto', description : 'JACK audio source/sink plugin') + option('jpeg', type : 'feature', value : 'auto', description : 'JPEG image codec plugin') + option('lame', type : 'feature', value : 'auto', description : 'LAME mp3 audio encoder plugin') Index: x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-tests_examples_gtk_meson.build =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-gtk4/files5/patch-tests_examples_gtk_meson.build @@ -0,0 +1,9 @@ +--- tests/examples/gtk/meson.build ++++ tests/examples/gtk/meson.build +@@ -1,5 +1,5 @@ + executable('gtksink', 'gtksink.c', +- dependencies: [gst_dep, gtk_dep, optional_deps], ++ dependencies: [gst_dep, gtk_dep, gtk_optional_deps], + c_args: gst_plugins_good_args, + include_directories: [configinc], + install: false) Index: x11-toolkits/gstreamer1-plugins-pango/Makefile =================================================================== --- x11-toolkits/gstreamer1-plugins-pango/Makefile +++ x11-toolkits/gstreamer1-plugins-pango/Makefile @@ -1,4 +1,4 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= x11-toolkits COMMENT= GStreamer pango textoverlay plugin @@ -8,4 +8,10 @@ MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +USE_GNOME= cairo pango +USES= xorg +USE_XORG= x11 xext + .include "${MASTERDIR}/Makefile" Index: x11-toolkits/gstreamer1-plugins-pango/pkg-plist =================================================================== --- /dev/null +++ x11-toolkits/gstreamer1-plugins-pango/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstpango.so Index: x11/gstreamer1-plugins-x/Makefile =================================================================== --- x11/gstreamer1-plugins-x/Makefile +++ x11/gstreamer1-plugins-x/Makefile @@ -1,11 +1,20 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= x11 COMMENT= GStreamer X and Xvideo output plugins GST_PLUGIN= x + +BASE_GST_ENABLED_PLUGINS= ximage \ + xvideo DIST= base MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +USES= xorg +USE_XORG= x11 xv xext +CONFIGURE_ARGS= -Dxvideo=enabled -Dxshm=enabled + .include "${MASTERDIR}/Makefile" Index: x11/gstreamer1-plugins-x/pkg-plist =================================================================== --- /dev/null +++ x11/gstreamer1-plugins-x/pkg-plist @@ -0,0 +1,3 @@ +lib/gstreamer-%%VERSION%%/libgstximagesink.so +lib/gstreamer-%%VERSION%%/libgstxvimagesink.so + Index: x11/gstreamer1-plugins-ximagesrc/Makefile =================================================================== --- x11/gstreamer1-plugins-ximagesrc/Makefile +++ x11/gstreamer1-plugins-ximagesrc/Makefile @@ -1,12 +1,22 @@ -PORTREVISION= 2 +PORTREVISION= 0 CATEGORIES= x11 PKGNAMESUFFIX= 1-plugins-ximagesrc COMMENT= GStreamer X source plugin -GST_PLUGIN= x +GST_PLUGIN= ximagesrc DIST= good +GOOD_GST_ENABLED_PLUGINS= ximagesrc \ + ximagesrc-xshm \ + ximagesrc-xfixes \ + ximagesrc-xdamage + MASTERDIR= ${.CURDIR}/../../multimedia/gstreamer1-plugins +PLIST= ${.CURDIR}/pkg-plist + +USES= xorg +USE_XORG= x11 xfixes xdamage xext + .include "${MASTERDIR}/Makefile" Index: x11/gstreamer1-plugins-ximagesrc/pkg-plist =================================================================== --- /dev/null +++ x11/gstreamer1-plugins-ximagesrc/pkg-plist @@ -0,0 +1 @@ +lib/gstreamer-%%VERSION%%/libgstximagesrc.so