[packages/ffms2] - updated to 5.0 for ffmpeg 6.1+ (new soname)
qboosh
qboosh at pld-linux.org
Sat Oct 5 13:42:28 CEST 2024
commit ff48cadb20acb317f251093beb3a3f45920f15ee
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Oct 5 12:53:53 2024 +0200
- updated to 5.0 for ffmpeg 6.1+ (new soname)
ffmpeg5.patch | 106 ----------------------------------------------------------
ffms2.spec | 26 +++++---------
2 files changed, 8 insertions(+), 124 deletions(-)
---
diff --git a/ffms2.spec b/ffms2.spec
index e0ffdec..1668d1c 100644
--- a/ffms2.spec
+++ b/ffms2.spec
@@ -1,26 +1,22 @@
#
# Conditional build:
-%bcond_without static_libs # don't build static libraries
-%bcond_without avresample # avresample support via libavresample
+%bcond_without static_libs # static library
Summary: FFmpegSource - FFmpeg wrapper library
Summary(pl.UTF-8): FFmpegSource - biblioteka obudowująca FFmpeg
Name: ffms2
-Version: 2.40
-Release: 2
+Version: 5.0
+Release: 1
License: MIT (ffmpegsource itself), GPL v3+ (forced by ffmpeg)
Group: Libraries
#Source0Download: https://github.com/FFMS/ffms2/releases
Source0: https://github.com/FFMS/ffms2/archive/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 141f194432d70bbf5456a847043f332a
-Patch0: ffmpeg5.patch
+# Source0-md5: c90259950777de3c429a78038a6a00a3
URL: https://github.com/FFMS/ffms2
BuildRequires: autoconf >= 2.58
BuildRequires: automake >= 1:1.11
-# PKG_CHECK_MODULES(LIBAV, [libavformat >= 53.20.0 libavcodec >= 53.24.0 libswscale >= 0.7.0 libavutil >= 51.21.0 ])
-BuildRequires: ffmpeg-devel >= 0.9
-# libavresample >= 1.0.0 or libswresample >= 1.0.0
-%{?with_avresample:BuildRequires: ffmpeg-devel >= 1.1}
+# libavformat >= 60.16.0 libavcodec >= 60.31.0 libswscale >= 7.5.0 libavutil >= 58.29.0 libswresample >= 4.12.0
+BuildRequires: ffmpeg-devel >= 6.1
%ifarch %{armv6}
BuildRequires: libatomic-devel
%endif
@@ -57,11 +53,7 @@ Summary: Header files for FFmpegSource library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki FFmpegSource
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-%if %{with avresample}
-Requires: ffmpeg-devel >= 1.1
-%else
-Requires: ffmpeg-devel >= 0.9
-%endif
+Requires: ffmpeg-devel >= 6.1
Requires: libstdc++-devel
Requires: zlib-devel
Provides: ffmpegsource-devel = %{version}-%{release}
@@ -88,7 +80,6 @@ Statyczna biblioteka FFmpegSource.
%prep
%setup -q
-%patch0 -p1
install -d src/config
@@ -103,7 +94,6 @@ CXXFLAGS="%{rpmcxxflags} -Wall -Wextra"
%ifarch %{armv6}
LIBS=-latomic \
%endif
- --enable-avresample%{!?with_avresample:=no} \
--disable-silent-rules \
--enable-shared \
%{__enable_disable static_libs static}
@@ -132,7 +122,7 @@ rm -rf $RPM_BUILD_ROOT
%doc COPYING README.md
%attr(755,root,root) %{_bindir}/ffmsindex
%attr(755,root,root) %{_libdir}/libffms2.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libffms2.so.4
+%attr(755,root,root) %ghost %{_libdir}/libffms2.so.5
%files devel
%defattr(644,root,root,755)
diff --git a/ffmpeg5.patch b/ffmpeg5.patch
deleted file mode 100644
index 4bca0f9..0000000
--- a/ffmpeg5.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From 586d87de3f896d0c4ff01b21f572375e11f9c3f1 Mon Sep 17 00:00:00 2001
-From: Derek Buitenhuis <derek.buitenhuis at gmail.com>
-Date: Tue, 4 May 2021 14:20:47 +0100
-Subject: [PATCH] configure: Remove deprecated API use
-
-Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
----
- configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index b35ef80bc..d19714d0f 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -102,10 +102,10 @@ CFLAGS="$_CFLAGS $FFMPEG_CFLAGS"
-
- AC_DEFUN([TEST_FFMPEG],
- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-- #include <libavcodec/avcodec.h>
-+ #include <libavformat/avformat.h>
- #include <libswscale/swscale.h>
- ]],[[
-- avcodec_register_all();
-+ avformat_network_init();
- swscale_version();
- ]])], [eval $1=yes], [eval $1=no])
- ])
-From 45673149e9a2f5586855ad472e3059084eaa36b1 Mon Sep 17 00:00:00 2001
-From: Derek Buitenhuis <derek.buitenhuis at gmail.com>
-Date: Tue, 4 May 2021 14:41:21 +0100
-Subject: [PATCH] Use auto for AVCodec
-
-The geniuses over at FFmpeg decided to constify this API, so old
-versions of the library will return AVCodec *, while new versions
-of the libary will return const AVCodec *, which, in C++, are not
-OK to convert between.
-
-Rather than use some macro hell in ffmscompat.h, we can work around
-this by using auto.
-
-Gross.
-
-Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
----
- src/core/audiosource.cpp | 2 +-
- src/core/indexing.cpp | 6 +++---
- src/core/videosource.cpp | 2 +-
- 3 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/src/core/audiosource.cpp b/src/core/audiosource.cpp
-index e4ce97cdb..ac0966636 100644
---- a/src/core/audiosource.cpp
-+++ b/src/core/audiosource.cpp
-@@ -469,7 +469,7 @@ void FFMS_AudioSource::OpenFile() {
-
- LAVFOpenFile(SourceFile.c_str(), FormatContext, TrackNumber);
-
-- AVCodec *Codec = avcodec_find_decoder(FormatContext->streams[TrackNumber]->codecpar->codec_id);
-+ auto *Codec = avcodec_find_decoder(FormatContext->streams[TrackNumber]->codecpar->codec_id);
- if (Codec == nullptr)
- throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_CODEC,
- "Audio codec not found");
-diff --git a/src/core/indexing.cpp b/src/core/indexing.cpp
-index e547c5abf..59fb4e8ea 100644
---- a/src/core/indexing.cpp
-+++ b/src/core/indexing.cpp
-@@ -384,7 +384,7 @@ FFMS_TrackType FFMS_Indexer::GetTrackType(int Track) {
- }
-
- const char *FFMS_Indexer::GetTrackCodec(int Track) {
-- AVCodec *codec = avcodec_find_decoder(FormatContext->streams[Track]->codecpar->codec_id);
-+ auto *codec = avcodec_find_decoder(FormatContext->streams[Track]->codecpar->codec_id);
- return codec ? codec->name : nullptr;
- }
-
-@@ -402,7 +402,7 @@ FFMS_Index *FFMS_Indexer::DoIndexing() {
- UseDTS);
-
- if (IndexMask.count(i) && FormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) {
-- AVCodec *VideoCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id);
-+ auto *VideoCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id);
- if (!VideoCodec) {
- FormatContext->streams[i]->discard = AVDISCARD_ALL;
- IndexMask.erase(i);
-@@ -433,7 +433,7 @@ FFMS_Index *FFMS_Indexer::DoIndexing() {
- IndexMask.insert(i);
- }
- } else if (IndexMask.count(i) && FormatContext->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) {
-- AVCodec *AudioCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id);
-+ auto *AudioCodec = avcodec_find_decoder(FormatContext->streams[i]->codecpar->codec_id);
- if (AudioCodec == nullptr)
- throw FFMS_Exception(FFMS_ERROR_CODEC, FFMS_ERROR_UNSUPPORTED,
- "Audio codec not found");
-diff --git a/src/core/videosource.cpp b/src/core/videosource.cpp
-index b889970e2..8956c2256 100644
---- a/src/core/videosource.cpp
-+++ b/src/core/videosource.cpp
-@@ -171,7 +171,7 @@ FFMS_VideoSource::FFMS_VideoSource(const char *SourceFile, FFMS_Index &Index, in
-
- LAVFOpenFile(SourceFile, FormatContext, VideoTrack);
-
-- AVCodec *Codec = avcodec_find_decoder(FormatContext->streams[VideoTrack]->codecpar->codec_id);
-+ auto *Codec = avcodec_find_decoder(FormatContext->streams[VideoTrack]->codecpar->codec_id);
- if (Codec == nullptr)
- throw FFMS_Exception(FFMS_ERROR_DECODING, FFMS_ERROR_CODEC,
- "Video codec not found");
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ffms2.git/commitdiff/ff48cadb20acb317f251093beb3a3f45920f15ee
More information about the pld-cvs-commit
mailing list