Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
Neal Gompa | 877408547b | |
Neal Gompa | 882dab2b6a | |
Yaakov Selkowitz | 90bff85ed7 | |
Neal Gompa | 354b83ba8a | |
Neal Gompa | af350001d8 | |
Leigh Scott | 6c78504a94 | |
Neal Gompa | e48877b7d0 |
|
@ -0,0 +1,33 @@
|
|||
From fc7fb12f22180d03428310da7eca55403a123322 Mon Sep 17 00:00:00 2001
|
||||
From: dvhh <dvhh-at-yahoo.com@ffmpeg.org>
|
||||
Date: Sat, 18 Jun 2022 01:46:12 +0900
|
||||
Subject: [PATCH 2/2] configure: fix SDL2 version check for pkg_config fallback
|
||||
|
||||
pkg_config fallback for SDL2 use 2.1.0 as max (excluded) version
|
||||
where the pkg_config specify 3.0.0
|
||||
Correcting fallback version to be in line with the pkg_config version
|
||||
|
||||
Signed-off-by: dvhh <dvhh@yahoo.com>
|
||||
Signed-off-by: Marton Balint <cus@passwd.hu>
|
||||
|
||||
(cherry picked from commit c6fdbe26ef30fff817581e5ed6e078d96111248a)
|
||||
---
|
||||
configure | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index e731a9d3ff..596be632c4 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -6747,7 +6747,7 @@ if enabled sdl2; then
|
||||
sdl2_cflags=$("${SDL2_CONFIG}" --cflags)
|
||||
sdl2_extralibs=$("${SDL2_CONFIG}" --libs)
|
||||
test_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) >= 0x020001" $sdl2_cflags &&
|
||||
- test_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x020100" $sdl2_cflags &&
|
||||
+ test_cpp_condition SDL.h "(SDL_MAJOR_VERSION<<16 | SDL_MINOR_VERSION<<8 | SDL_PATCHLEVEL) < 0x030000" $sdl2_cflags &&
|
||||
check_func_headers SDL_events.h SDL_PollEvent $sdl2_extralibs $sdl2_cflags &&
|
||||
enable sdl2
|
||||
fi
|
||||
--
|
||||
2.36.1
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
From 081b35c5b598fef0a2e47753752f7607ff90a2d3 Mon Sep 17 00:00:00 2001
|
||||
From b8886826f44b4562aa2fbae3715ca6aa9e1b15e1 Mon Sep 17 00:00:00 2001
|
||||
From: Neal Gompa <ngompa@fedoraproject.org>
|
||||
Date: Fri, 18 Feb 2022 08:12:54 -0500
|
||||
Date: Wed, 12 Oct 2022 10:26:35 -0400
|
||||
Subject: [PATCH] avcodec/openh264: Add the ability to dlopen() OpenH264
|
||||
|
||||
We can't directly depend on OpenH264, but we can weakly link to it
|
||||
|
@ -14,17 +14,17 @@ Signed-off-by: Neal Gompa <ngompa@fedoraproject.org>
|
|||
---
|
||||
configure | 3 +
|
||||
libavcodec/Makefile | 1 +
|
||||
libavcodec/libopenh264.c | 15 +++-
|
||||
libavcodec/libopenh264.c | 18 +++-
|
||||
libavcodec/libopenh264_dlopen.c | 147 ++++++++++++++++++++++++++++++++
|
||||
libavcodec/libopenh264_dlopen.h | 58 +++++++++++++
|
||||
libavcodec/libopenh264dec.c | 10 +++
|
||||
libavcodec/libopenh264enc.c | 10 +++
|
||||
7 files changed, 243 insertions(+), 1 deletion(-)
|
||||
7 files changed, 245 insertions(+), 2 deletions(-)
|
||||
create mode 100644 libavcodec/libopenh264_dlopen.c
|
||||
create mode 100644 libavcodec/libopenh264_dlopen.h
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 6b5ef6332e..f08e566e98 100755
|
||||
index 7a62f0c248..2369ea0240 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -250,6 +250,7 @@ External library support:
|
||||
|
@ -43,7 +43,7 @@ index 6b5ef6332e..f08e566e98 100755
|
|||
libopenjpeg
|
||||
libopenmpt
|
||||
libopenvino
|
||||
@@ -6575,6 +6577,7 @@ enabled libopencv && { check_headers opencv2/core/core_c.h &&
|
||||
@@ -6582,6 +6584,7 @@ enabled libopencv && { check_headers opencv2/core/core_c.h &&
|
||||
require libopencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } ||
|
||||
require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; }
|
||||
enabled libopenh264 && require_pkg_config libopenh264 openh264 wels/codec_api.h WelsGetCodecVersion
|
||||
|
@ -64,7 +64,7 @@ index 3adf1536d8..9dc8389ce2 100644
|
|||
OBJS-$(CONFIG_LIBOPENH264_ENCODER) += libopenh264enc.o libopenh264.o
|
||||
OBJS-$(CONFIG_LIBOPENJPEG_DECODER) += libopenjpegdec.o
|
||||
diff --git a/libavcodec/libopenh264.c b/libavcodec/libopenh264.c
|
||||
index 59c61a3a4c..9b7dfc59be 100644
|
||||
index 59c61a3a4c..14d83e27df 100644
|
||||
--- a/libavcodec/libopenh264.c
|
||||
+++ b/libavcodec/libopenh264.c
|
||||
@@ -20,8 +20,13 @@
|
||||
|
@ -81,11 +81,14 @@ index 59c61a3a4c..9b7dfc59be 100644
|
|||
|
||||
#include "libavutil/log.h"
|
||||
|
||||
@@ -52,7 +57,15 @@ int ff_libopenh264_check_version(void *logctx)
|
||||
@@ -51,8 +56,17 @@ int ff_libopenh264_check_version(void *logctx)
|
||||
// Mingw GCC < 4.7 on x86_32 uses an incorrect/buggy ABI for the WelsGetCodecVersion
|
||||
// function (for functions returning larger structs), thus skip the check in those
|
||||
// configurations.
|
||||
#if !defined(_WIN32) || !defined(__GNUC__) || !ARCH_X86_32 || AV_GCC_VERSION_AT_LEAST(4, 7)
|
||||
-#if !defined(_WIN32) || !defined(__GNUC__) || !ARCH_X86_32 || AV_GCC_VERSION_AT_LEAST(4, 7)
|
||||
- OpenH264Version libver = WelsGetCodecVersion();
|
||||
+ // Also, for dlopened OpenH264, we should not do the version check. It's too punitive.
|
||||
+#if !defined(_WIN32) || !defined(__GNUC__) || !ARCH_X86_32 || AV_GCC_VERSION_AT_LEAST(4, 7) || !defined(CONFIG_LIBOPENH264_DLOPEN)
|
||||
+ OpenH264Version libver;
|
||||
+
|
||||
+#ifdef CONFIG_LIBOPENH264_DLOPEN
|
||||
|
@ -100,7 +103,7 @@ index 59c61a3a4c..9b7dfc59be 100644
|
|||
return AVERROR(EINVAL);
|
||||
diff --git a/libavcodec/libopenh264_dlopen.c b/libavcodec/libopenh264_dlopen.c
|
||||
new file mode 100644
|
||||
index 0000000000..b350679f18
|
||||
index 0000000000..49ea8ff44f
|
||||
--- /dev/null
|
||||
+++ b/libavcodec/libopenh264_dlopen.c
|
||||
@@ -0,0 +1,147 @@
|
||||
|
@ -225,7 +228,7 @@ index 0000000000..b350679f18
|
|||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
+#define OPENH264_LIB "libopenh264.so.6"
|
||||
+#define OPENH264_LIB "libopenh264.so.7"
|
||||
+ libopenh264 = dlopen(OPENH264_LIB, RTLD_LAZY);
|
||||
+ err = dlerror();
|
||||
+ if (err != NULL) {
|
||||
|
@ -376,5 +379,5 @@ index 2001dc22b4..c8b1348df2 100644
|
|||
return AVERROR_ENCODER_NOT_FOUND;
|
||||
|
||||
--
|
||||
2.34.1
|
||||
2.36.1
|
||||
|
||||
|
|
72
ffmpeg.spec
72
ffmpeg.spec
|
@ -2,9 +2,7 @@
|
|||
%bcond_with upstream_tarball
|
||||
%bcond_with all_codecs
|
||||
|
||||
# Break dependency cycles, e.g.:
|
||||
# ffmpeg (libavcodec-free) → chromaprint → ffmpeg
|
||||
# by disabling certain optional dependencies.
|
||||
# Break dependency cycles by disabling certain optional dependencies.
|
||||
%bcond_with bootstrap
|
||||
|
||||
# If you want to do a build with the upstream source tarball, then set the
|
||||
|
@ -41,6 +39,19 @@
|
|||
%bcond_without dc1394
|
||||
%endif
|
||||
|
||||
# Break chromaprint dependency cycle:
|
||||
# ffmpeg (libavcodec-free) → chromaprint → ffmpeg
|
||||
%if %{with bootstrap}
|
||||
%bcond_with chromaprint
|
||||
%else
|
||||
%bcond_without chromaprint
|
||||
%endif
|
||||
|
||||
%if 0%{?rhel}
|
||||
# Disable dependencies not offered in RHEL
|
||||
%bcond_with chromaprint
|
||||
%endif
|
||||
|
||||
%if %{with all_codecs}
|
||||
%bcond_without rtmp
|
||||
%bcond_without x264
|
||||
|
@ -60,6 +71,7 @@
|
|||
%if "%{__isa_bits}" == "64"
|
||||
%global lib64_suffix ()(64bit)
|
||||
%endif
|
||||
%global openh264_soversion 7
|
||||
|
||||
%global av_codec_soversion 59
|
||||
%global av_device_soversion 59
|
||||
|
@ -73,8 +85,8 @@
|
|||
Name: ffmpeg
|
||||
%global pkg_name %{name}%{?pkg_suffix}
|
||||
|
||||
Version: 5.0.1
|
||||
Release: 11%{?dist}
|
||||
Version: 5.0.2
|
||||
Release: 2%{?dist}
|
||||
Summary: A complete solution to record, convert and stream audio and video
|
||||
License: GPLv3+
|
||||
URL: https://ffmpeg.org/
|
||||
|
@ -108,6 +120,8 @@ Patch5: ffmpeg-allow-fdk-aac-free.patch
|
|||
Patch6: ffmpeg-fix-gnutls-priority.patch
|
||||
# http://ffmpeg.org/pipermail/ffmpeg-devel/2022-February/293194.html
|
||||
Patch7: ffmpeg-openh264-averr-on-bad-version.patch
|
||||
# Backport fixes to recognize sdl2 with new versioning scheme
|
||||
Patch9: 0002-configure-fix-SDL2-version-check-for-pkg_config-fall.patch
|
||||
|
||||
# Set up dlopen for openh264
|
||||
Patch1001: ffmpeg-dlopen-openh264.patch
|
||||
|
@ -159,7 +173,7 @@ BuildRequires: pkgconfig(libbluray)
|
|||
BuildRequires: pkgconfig(libbs2b)
|
||||
BuildRequires: pkgconfig(libcdio)
|
||||
BuildRequires: pkgconfig(libcdio_paranoia)
|
||||
%if %{without bootstrap}
|
||||
%if %{with chromaprint}
|
||||
BuildRequires: pkgconfig(libchromaprint)
|
||||
%endif
|
||||
BuildRequires: pkgconfig(libdrm)
|
||||
|
@ -168,6 +182,7 @@ BuildRequires: pkgconfig(libomxil-bellagio)
|
|||
BuildRequires: pkgconfig(libopenjp2)
|
||||
BuildRequires: pkgconfig(libopenmpt)
|
||||
BuildRequires: pkgconfig(libpulse)
|
||||
BuildRequires: pkgconfig(librist)
|
||||
BuildRequires: pkgconfig(librsvg-2.0)
|
||||
BuildRequires: pkgconfig(libssh)
|
||||
BuildRequires: pkgconfig(libv4l2)
|
||||
|
@ -182,7 +197,6 @@ BuildRequires: pkgconfig(netcdf)
|
|||
BuildRequires: pkgconfig(ogg)
|
||||
BuildRequires: pkgconfig(openal)
|
||||
BuildRequires: pkgconfig(OpenCL)
|
||||
BuildRequires: pkgconfig(opencv4)
|
||||
BuildRequires: pkgconfig(opus)
|
||||
BuildRequires: pkgconfig(rav1e)
|
||||
BuildRequires: pkgconfig(rubberband)
|
||||
|
@ -305,11 +319,6 @@ machines have created. It supports the most obscure ancient formats up to the
|
|||
cutting edge. No matter if they were designed by some standards committee, the
|
||||
community or a corporation.
|
||||
|
||||
This package contains also private headers for libavformat, libavcodec and
|
||||
libavutil which are needed by libav-tools to build. No other package apart
|
||||
from libav should depend on these private headers which are expected to
|
||||
break compatibility without any notice.
|
||||
|
||||
%package -n libavcodec%{?pkg_suffix}
|
||||
Summary: FFmpeg codec library
|
||||
Requires: libavutil%{?pkg_suffix}%{_isa} = %{version}-%{release}
|
||||
|
@ -317,7 +326,7 @@ Requires: libswresample%{?pkg_suffix}%{_isa} = %{version}-%{release}
|
|||
# We dlopen() openh264, so weak-depend on it...
|
||||
## Note, we can do this because openh264 is provided in a default-enabled
|
||||
## third party repository provided by Cisco.
|
||||
Recommends: libopenh264.so.6%{?lib64_suffix}
|
||||
Recommends: libopenh264.so.%{openh264_soversion}%{?lib64_suffix}
|
||||
|
||||
%description -n libavcodec%{?pkg_suffix}
|
||||
The libavcodec library provides a generic encoding/decoding framework
|
||||
|
@ -561,10 +570,10 @@ cp -a doc/examples/{*.c,Makefile,README} _doc/examples/
|
|||
--disable-openssl \
|
||||
--enable-bzlib \
|
||||
--enable-frei0r \
|
||||
%if %{with bootstrap}
|
||||
--disable-chromaprint \
|
||||
%else
|
||||
%if %{with chromaprint}
|
||||
--enable-chromaprint \
|
||||
%else
|
||||
--disable-chromaprint \
|
||||
%endif
|
||||
--enable-gcrypt \
|
||||
--enable-gnutls \
|
||||
|
@ -601,6 +610,7 @@ cp -a doc/examples/{*.c,Makefile,README} _doc/examples/
|
|||
--enable-libopus \
|
||||
--enable-libpulse \
|
||||
--enable-librav1e \
|
||||
--enable-librist \
|
||||
--enable-librsvg \
|
||||
--enable-librubberband \
|
||||
--enable-libsnappy \
|
||||
|
@ -724,25 +734,6 @@ done
|
|||
%install
|
||||
%make_install V=1
|
||||
|
||||
# Install private headers required by libav-tools
|
||||
for f in libavformat/options_table.h \
|
||||
libavformat/os_support.h \
|
||||
libavformat/internal.h \
|
||||
libavcodec/options_table.h \
|
||||
libavutil/libm.h \
|
||||
libavutil/internal.h \
|
||||
libavutil/colorspace.h \
|
||||
libavutil/timer.h \
|
||||
libavutil/x86/emms.h \
|
||||
libavutil/aarch64/timer.h \
|
||||
libavutil/arm/timer.h \
|
||||
libavutil/bfin/timer.h \
|
||||
libavutil/ppc/timer.h \
|
||||
libavutil/x86/timer.h; do
|
||||
install -m 0755 -d "%{buildroot}%{_includedir}/ffmpeg/private/$(dirname "${f}")"
|
||||
cp -a ${f} "%{buildroot}%{_includedir}/ffmpeg/private/${f}"
|
||||
done
|
||||
|
||||
# We will package is as %%doc in the devel package
|
||||
rm -rf %{buildroot}%{_datadir}/%{name}/examples
|
||||
|
||||
|
@ -768,7 +759,6 @@ rm -rf %{buildroot}%{_datadir}/%{name}/examples
|
|||
%files -n %{pkg_name}-devel
|
||||
%doc MAINTAINERS doc/APIchanges doc/*.txt
|
||||
%doc _doc/examples
|
||||
%{_includedir}/%{name}/private
|
||||
|
||||
%files -n libavcodec%{?pkg_suffix}
|
||||
%license COPYING.GPLv2 LICENSE.md
|
||||
|
@ -850,6 +840,16 @@ rm -rf %{buildroot}%{_datadir}/%{name}/examples
|
|||
%{_mandir}/man3/libswscale.3*
|
||||
|
||||
%changelog
|
||||
* Thu Feb 16 2023 Neal Gompa <ngompa@fedoraproject.org> - 5.0.2-2
|
||||
- Enable support for the RIST protocol through librist
|
||||
|
||||
* Tue Nov 22 2022 Neal Gompa <ngompa@fedoraproject.org> - 5.0.2-1
|
||||
- Update to 5.0.2
|
||||
|
||||
* Wed Oct 12 2022 Neal Gompa <ngompa@fedoraproject.org> - 5.0.1-12
|
||||
- Refresh dlopen headers and patch for OpenH264 2.3.1
|
||||
- Backport patches to fix building with newer SDL2 versions
|
||||
|
||||
* Thu Jun 09 2022 Neal Gompa <ngompa@fedoraproject.org> - 5.0.1-11
|
||||
- Ensure libavdevice-devel is pulled in with devel metapackage
|
||||
|
||||
|
|
|
@ -2237,6 +2237,7 @@ libavformat/latmenc.c
|
|||
libavformat/libavformat.v
|
||||
libavformat/libmodplug.c
|
||||
libavformat/libopenmpt.c
|
||||
libavformat/librist.c
|
||||
libavformat/libsmbclient.c
|
||||
libavformat/libsrt.c
|
||||
libavformat/libssh.c
|
||||
|
|
6
sources
6
sources
|
@ -1,4 +1,4 @@
|
|||
SHA512 (ffmpeg-free-5.0.1.tar.xz) = 313277c2fb62829606c3434f03392351b7964734bef188f7838f754a383d8ad8b890ddd615aa7360ba2a72755fa54a6b967ff2f5a30da7a5490d31b562028e19
|
||||
SHA512 (ffmpeg-5.0.1.tar.xz.asc) = 9c4bd404196c3a3808bae92873aefc77f8c26a9419cc6130a3f2359a75c8e83189d206e9aee8ff85c5a7fe4a98da24e11cf607ec351386c18979ec2d5ad3b3ad
|
||||
SHA512 (ffmpeg-dlopen-headers.tar.xz) = b6f62a96e5b199bb52bf7c9c934c5d194a1486f350513dda68c47439d2653605400228a98e289d3bce8b8c0c2a5d95fde2813e238d2bd17d049887df4a7c947a
|
||||
SHA512 (ffmpeg-free-5.0.2.tar.xz) = fd207aaf450799d334b1b8fa293f257dc5286ebc10e822bd6559b66bdf197167182227b359bb18bcfb7a52b915bb8c4e67c341dcdfe43b9960503bade64e7bc6
|
||||
SHA512 (ffmpeg-5.0.2.tar.xz.asc) = 2cbe55fc15ff20a90b7b3beba22364e013338db53f68b9f228f3c773d955ed149221730ac403dc781c74bbb8c5909573bfd27377b96654496428f709fa79225c
|
||||
SHA512 (ffmpeg-dlopen-headers.tar.xz) = 97e6986fc2bb9dfa4516135a76b04d27ceb52ff96f0af21a6169919aeefefb4d2e2e24a771959689cdbec385f5d71614ba661223c67c0e94089a6dd823a30099
|
||||
SHA512 (ffmpeg.keyring) = 9b36506835db36f776b7ddb53ad6fa9e915e6ca2f9c7cfebe8eb45513e1036a985283590a840ca313a111bf35dc3731f68885aaafb1fb7011ec433cc119e5165
|
||||
|
|
Loading…
Reference in New Issue