Update gstreamer plugin to 1.18.2

... and also switch the gstreamer plugin to use the meson build system.
epel9
Kalev Lember 4 years ago
parent b90746d4ce
commit 371c707e69

@ -0,0 +1,27 @@
From 3e57512bea64ae9d231441caae96037a96aef2bf Mon Sep 17 00:00:00 2001
From: Troy Dawson <tdawson@redhat.com>
Date: Mon, 19 Oct 2020 14:09:32 -0700
Subject: [PATCH] No va test when va disabled
---
tests/examples/meson.build | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/examples/meson.build b/tests/examples/meson.build
index a41fc16..a73c81d 100644
--- a/tests/examples/meson.build
+++ b/tests/examples/meson.build
@@ -13,7 +13,9 @@ if not get_option('opencv').disabled()
subdir('opencv', if_found: opencv_dep)
endif
subdir('uvch264')
-subdir('va')
+if not get_option('va').disabled()
+ subdir('va')
+endif
subdir('waylandsink')
subdir('webrtc')
--
2.18.4

@ -0,0 +1,32 @@
From 9815fd1e2ab13f765b75b39e3764fe1e860cb251 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Thu, 10 Sep 2020 10:35:11 -0700
Subject: [PATCH] examples: only check opencv_dep if option is not disabled
(#1406)
We can't check opencv_dep if the option is disabled because it's
never initialized in that case, since 833a65cc .
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
tests/examples/meson.build | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/examples/meson.build b/tests/examples/meson.build
index 2eba1d47e..a41fc1679 100644
--- a/tests/examples/meson.build
+++ b/tests/examples/meson.build
@@ -9,7 +9,9 @@ subdir('mpegts')
subdir('msdk')
subdir('mxf')
subdir('nvcodec')
-subdir('opencv', if_found: opencv_dep)
+if not get_option('opencv').disabled()
+ subdir('opencv', if_found: opencv_dep)
+endif
subdir('uvch264')
subdir('va')
subdir('waylandsink')
--
2.28.0

@ -44,6 +44,7 @@ dataurisrc
dccp
debugutils
dtmf
dvbsubenc
faceoverlay
festival
fieldanalysis
@ -88,6 +89,8 @@ proxy
qtmux
rawparse
removesilence
rist
rtmp2
rtp
rtpmux
rtpvp8
@ -100,7 +103,9 @@ smooth
speed
stereo
subenc
switchbin
timecode
transcode
tta
valve
videofilters
@ -168,20 +173,6 @@ for subdir in gst ext sys; do
echo "**** Removing $MODULE ****"
echo "Removing directory $dir"
rm -r $dir || error "Cannot remove $dir"
if grep -q "AG_GST_CHECK_PLUGIN($MODULE)" configure.ac ; then
echo "Removing element check for $MODULE"
grep -v "AG_GST_CHECK_PLUGIN($MODULE)" configure.ac > configure.ac.new && mv configure.ac.new configure.ac
fi
echo "Removing Makefile generation for $MODULE"
grep -v "$dir/Makefile" configure.ac > configure.ac.new && mv configure.ac.new configure.ac
# Urgh
if test $MODULE = real ; then
grep -v "AG_GST_DISABLE_PLUGIN(real)" configure.ac > configure.ac.new && mv configure.ac.new configure.ac
fi
echo "Removing documentation for $MODULE"
if grep -q "$MODULE" docs/plugins/Makefile.am ; then
grep -v $dir docs/plugins/Makefile.am > docs/plugins/Makefile.am.new && mv docs/plugins/Makefile.am.new docs/plugins/Makefile.am
fi
echo
elif test $subdir = ext || test $subdir = sys; then
# Ignore library or system non-blacklisted plugins
@ -201,10 +192,6 @@ if test "x$unknown" != "x"; then
exit 1
fi
#autoreconf
NOCONFIGURE=1 \
./autogen.sh
popd > /dev/null
tar cJf $NEW_SOURCE $DIRECTORY

@ -1,13 +0,0 @@
diff -urNp gst-plugins-bad-1.16.2.orig/common/gst-glib-gen.mak gst-plugins-bad-1.16.2/common/gst-glib-gen.mak
--- gst-plugins-bad-1.16.2.orig/common/gst-glib-gen.mak 2020-03-20 14:57:08.587740695 +0100
+++ gst-plugins-bad-1.16.2/common/gst-glib-gen.mak 2020-03-20 15:00:42.584798988 +0100
@@ -8,7 +8,8 @@
#glib_gen_decl_banner=GST_EXPORT
#glib_gen_decl_include=\#include <gst/foo/foo-prelude.h>
-enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\")
+hash:=\#
+enum_headers=$(foreach h,$(glib_enum_headers),\n$(hash)include \"$(h)\")
# these are all the rules generating the relevant files
$(glib_gen_basename)-marshal.h: $(glib_gen_basename)-marshal.list

@ -0,0 +1,14 @@
diff -up gst-plugins-bad-1.18.2/ext/openh264/meson.build.orig gst-plugins-bad-1.18.2/ext/openh264/meson.build
--- gst-plugins-bad-1.18.2/ext/openh264/meson.build.orig 2020-12-06 14:24:13.000000000 +0100
+++ gst-plugins-bad-1.18.2/ext/openh264/meson.build 2021-02-11 11:48:58.660450319 +0100
@@ -4,9 +4,7 @@ openh264_sources = [
'gstopenh264plugin.c',
]
-openh264_dep = dependency('openh264', version : '>= 1.3.0',
- required : get_option('openh264'),
- fallback: ['openh264', 'openh264_dep'])
+openh264_dep = cc.find_library('openh264')
if openh264_dep.found()
gstopenh264 = library('gstopenh264',

@ -4,12 +4,12 @@
%global shortcommit1 %(c=%{commit1}; echo ${c:0:7})
%global openh264_version 2.1.1
%global gst_version 1.16.2
%global gst_version 1.18.2
Name: openh264
Version: %{openh264_version}
# Also bump the Release tag for gstreamer1-plugin-openh264 down below
Release: 1%{?dist}
Release: 2%{?dist}
Summary: H.264 codec library
License: BSD
@ -22,19 +22,21 @@ Source1: https://github.com/mozilla/gmp-api/archive/%{commit1}/gmp-api-%{
Source2: gst-plugins-bad-openh264-%{gst_version}.tar.xz
Source3: gst-p-bad-cleanup.sh
# https://gitlab.freedesktop.org/gstreamer/common/-/merge_requests/4
# https://bugzilla.redhat.com/show_bug.cgi?id=1799497
Patch0: gstreamer1-plugins-bad-build-adapt-to-backwards-incompatible-change.patch
# Fix build failure with opencv disabled:
# https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1406
# https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1570
Patch0: 0001-examples-only-check-opencv_dep-if-option-is-not-disa.patch
# Fix build failure with va disabled:
Patch1: 0001-No-va-test-when-va-disabled.patch
# Don't use pkg-config for finding openh264 as we are building against an in-tree copy
Patch2: hardcode-openh264-dep.patch
BuildRequires: gcc-c++
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: chrpath
BuildRequires: gettext-devel
BuildRequires: gstreamer1-devel >= %{gst_version}
BuildRequires: gstreamer1-plugins-base-devel >= %{gst_version}
BuildRequires: libtool
BuildRequires: make
BuildRequires: meson
BuildRequires: nasm
%description
@ -63,7 +65,7 @@ browsers.
%package -n gstreamer1-plugin-openh264
Version: %{gst_version}
Release: 2%{?dist}
Release: 1%{?dist}
Summary: GStreamer H.264 plugin
Supplements: totem%{?_isa}
@ -85,6 +87,8 @@ mv gmp-api-%{commit1} gmp-api
tar -xf %{S:2}
pushd gst-plugins-bad-%{gst_version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
popd
# Update the makefile with our build options
@ -106,17 +110,14 @@ make plugin %{?_smp_mflags}
# openh264 libraries
pushd gst-plugins-bad-%{gst_version}
ln -s ../codec/api/svc wels
export OPENH264_CFLAGS="-I."
export OPENH264_LIBS="-L`pwd`/.. -lopenh264"
autoreconf --force --install
%configure \
--with-package-name="Fedora gstreamer1-plugin-openh264 package" \
--with-package-origin="http://www.openh264.org/" \
--disable-static \
--disable-gl \
--disable-hls \
--enable-openh264
make V=1 %{?_smp_mflags}
CFLAGS="%{build_cflags} -I." \
LDFLAGS="%{build_ldflags} -L`pwd`/.." \
%meson \
--auto-features=disabled \
-D package-name="Fedora gstreamer1-plugin-openh264 package" \
-D package-origin="http://www.openh264.org/" \
-D openh264=enabled
%meson_build
popd
@ -144,7 +145,7 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.a
# Install the gstreamer plugin
pushd gst-plugins-bad-%{gst_version}
%make_install
%meson_install
# Register as an AppStream component to be visible in the software center
#
@ -185,24 +186,12 @@ cat > $RPM_BUILD_ROOT%{_datadir}/appdata/gstreamer-openh264.appdata.xml <<EOF
</component>
EOF
# Remove libtool .la files
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
# Remove unwanted gst-plugins-bad files
rm -rf $RPM_BUILD_ROOT%{_bindir}/gst-transcoder-1.0
rm -rf $RPM_BUILD_ROOT%{_includedir}/gstreamer-1.0/
rm -rf $RPM_BUILD_ROOT%{_libdir}/girepository-1.0/Gst*.typelib
rm -rf $RPM_BUILD_ROOT%{_libdir}/pkgconfig/gstreamer-*.pc
rm -rf $RPM_BUILD_ROOT%{_libdir}/libgst*.so*
rm -rf $RPM_BUILD_ROOT%{_datadir}/gir-1.0/Gst*.gir
rm -rf $RPM_BUILD_ROOT%{_datadir}/gstreamer-1.0/
rm -rf $RPM_BUILD_ROOT%{_datadir}/gtk-doc/html/gst-plugins-bad*/
rm -rf $RPM_BUILD_ROOT%{_datadir}/locale/*/*/gst-plugins-bad-1.0.mo
# Only keep libgstopenh264.so
find $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/ -not -name 'libgstopenh264.so' -type f | xargs rm
# Kill rpath
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/gstreamer-1.0/libgstopenh264.so
popd
@ -231,6 +220,9 @@ popd
%changelog
* Thu Feb 11 2021 Kalev Lember <klember@redhat.com> - 2.1.1-2
- Update gstreamer plugin to 1.18.2
* Fri May 22 2020 Kalev Lember <klember@redhat.com> - 2.1.1-1
- Update to 2.1.1
- Add totem supplements to gstreamer1-plugin-openh264

@ -1,3 +1,3 @@
SHA512 (gmp-api-c5f1d0f.tar.gz) = 20bf28b117b4d1d24ee659809940f14e9985757fc09fff1e900feac3f17343033c38248782c4d6c3f15a0eeb1f994c4d91283a3b2131ea94b83e340cd54ef574
SHA512 (gst-plugins-bad-openh264-1.16.2.tar.xz) = 02bbd2bda02b1edc6a7e25d5131107122ddaa963aa1fc94c2b869356290591e704d0f31d6a139099488a4151486183f7bb834e24d67831f72e56965c32fdd86f
SHA512 (gst-plugins-bad-openh264-1.18.2.tar.xz) = a62e4715e79604d11f495ae01816b0caf6f7f6d3023cbe0d54b0e56933dc89a911ffed950a57325153bf5c899219893705926c34d29789ef45fe03385d86d758
SHA512 (openh264-2.1.1.tar.gz) = f9c2925fa902c6278da40f68b967d25e62db7ce3541e8f5e7a0ee174204b6ecc7026b5853885c361f48ca01d71bacd585fb5b91f01f0c054ece80943f1afcf79

Loading…
Cancel
Save