Compare commits

1 Commits
main ... 1.1

5 changed files with 20 additions and 82 deletions

View File

@@ -1,28 +0,0 @@
From: Sebastian Ramacher <sebastian@ramacher.at>
Date: Fri, 2 Aug 2024 23:38:21 +0200
Subject: Fix compatibility with ffmpeg 7.0
---
src/audio/ffmpeg_audio_reader.h | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/audio/ffmpeg_audio_reader.h b/src/audio/ffmpeg_audio_reader.h
index 35b2934..d57d9a1 100644
--- a/src/audio/ffmpeg_audio_reader.h
+++ b/src/audio/ffmpeg_audio_reader.h
@@ -118,8 +118,13 @@ inline bool FFmpegAudioReader::SetInputSampleRate(int sample_rate) {
inline bool FFmpegAudioReader::SetInputChannels(int channels) {
char buf[64];
- sprintf(buf, "%d", channels);
- return av_dict_set(&m_input_opts, "channels", buf, 0) >= 0;
+ if (channels == 1)
+ sprintf(buf, "%s", "mono");
+ else if (channels == 2)
+ sprintf(buf, "%s", "stereo");
+ else
+ sprintf(buf, "%d channels", channels);
+ return av_dict_set(&m_input_opts, "ch_layout", buf, 0) >= 0;
}
inline bool FFmpegAudioReader::Open(const std::string &file_name) {

Binary file not shown.

BIN
chromaprint-1.5.1.tar.gz LFS Normal file

Binary file not shown.

View File

@@ -1,39 +1,3 @@
-------------------------------------------------------------------
Sat Jan 25 08:50:23 UTC 2025 - Dave Plater <davejplater@gmail.com>
- Add 0005-Fix-compatibility-with-ffmpeg-7.0.patch and force build
with ffmpeg-7 libraries
-------------------------------------------------------------------
Fri Jan 24 13:45:25 UTC 2025 - Dave Plater <davejplater@gmail.com>
- Update to git snapshot 1.5.1+git.20221217 to allow build against
ffmpeg-5 libraries. No other major changes.
-------------------------------------------------------------------
Wed Dec 11 12:25:42 UTC 2024 - Bjørn Lie <bjorn.lie@gmail.com>
- Use kissfft for shared library, ffmpeg is only needed for the
standalone fpcalc tool.
-------------------------------------------------------------------
Wed Nov 8 12:38:27 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
- Drop unused and unneeded libtag-devel Requires from devel package
-------------------------------------------------------------------
Tue Oct 24 10:19:34 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
- Drop unused libtag-devel BuildRequires.
- Use cmake_build macro.
-------------------------------------------------------------------
Fri Oct 20 08:56:45 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>
- Drop fftw3-devel BuildRequires and Requires, pass DFFT_LIB=avfft
to cmake, use the already present ffmpeg lib.
- Use ldconfig_scriptlets for post(un) handling.
-------------------------------------------------------------------
Wed May 3 09:39:48 UTC 2023 - Bjørn Lie <bjorn.lie@gmail.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package chromaprint
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2012 Pascal Bleser <pascal.bleser@opensuse.org>
#
# All modifications and additions to the file contributed by third parties
@@ -17,26 +17,25 @@
#
%define rev aa67c95b9e486884a6d3ee8b0c91207d8c2b0551
%define soname 1
Name: chromaprint
Version: 1.5.1+git.20221217
Version: 1.5.1
Release: 0
Summary: Audio Fingerprinting Library
License: LGPL-2.1-only AND MIT
URL: https://acoustid.org/chromaprint
#https://github.com/acoustid/chromaprint/archive/refs/
Source0: https://github.com/acoustid/chromaprint/archive/%{rev}.tar.gz#/%{name}-%{version}.tar.gz
Source0: https://github.com/acoustid/chromaprint/releases/download/v%{version}/%{name}-%{version}.tar.gz
Source1: baselibs.conf
Patch0: 0005-Fix-compatibility-with-ffmpeg-7.0.patch
BuildRequires: cmake
BuildRequires: ffmpeg-7-libavcodec-devel
BuildRequires: fftw3-devel
BuildRequires: gcc-c++
BuildRequires: libtag-devel
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libavformat)
BuildRequires: pkgconfig(libavutil)
BuildRequires: pkgconfig(libswresample)
BuildRequires: pkgconfig(libavcodec) < 59
BuildRequires: pkgconfig(libavformat) < 59
BuildRequires: pkgconfig(libavresample)
BuildRequires: pkgconfig(libavutil) < 58
BuildRequires: pkgconfig(libswresample) < 57
%description
Chromaprint is the core component of the Acoustid project. It's a client-side
@@ -55,7 +54,9 @@ audio source.
%package -n libchromaprint-devel
Summary: Audio Fingerprinting Library
License: LGPL-2.1-or-later
Requires: fftw3-devel
Requires: libchromaprint%{soname} = %{version}
Requires: libtag-devel
%description -n libchromaprint-devel
Chromaprint is the core component of the Acoustid project. It's a client-side
@@ -76,21 +77,22 @@ This package contains fpcalc, a command-line tool to perform Chromaprint
fingerprinting.
%prep
%autosetup -p1 -n %{name}-%{rev}
%autosetup -p1
%build
%cmake \
-DCMAKE_SKIP_RPATH=TRUE \
-DCMAKE_BUILD_WITH_INSTALL_RPATH=FALSE \
-DUSE_AVFFT=ON -DFFT_LIB=kissfft \
-DUSE_AVFFT=ON \
-DBUILD_TESTS=OFF -DBUILD_TOOLS=ON
%cmake_build
%make_build
%install
%cmake_install
%ldconfig_scriptlets -n libchromaprint%{soname}
%post -n libchromaprint%{soname} -p /sbin/ldconfig
%postun -n libchromaprint%{soname} -p /sbin/ldconfig
%files -n libchromaprint%{soname}
%license LICENSE.md