diff --git a/.deadbeef.metadata b/.deadbeef.metadata index 066ee35..05a249d 100644 --- a/.deadbeef.metadata +++ b/.deadbeef.metadata @@ -1,4 +1,4 @@ -77e8437727a7ca08c393d03752dc743b26d7aac2 SOURCES/ddb_output_pw-97ab728.tar.gz -7bf6483c6c1fc6626eba3806019141edb6d9d61c SOURCES/ddb_dsp_libretro-97ab728.tar.gz -00fa16ae68c81ab2d29452cbc89838e6304e86b0 SOURCES/mp4p-97ab728.tar.gz -c4d4c1085212387d4d558f625bb5a5f919f56c3c SOURCES/1.9.5.tar.gz +dfda39e3074b4b6474df4565b3bf86c343c157dc SOURCES/1.9.6.tar.gz +999af9b0c8b79dd7eac061c4144508608495576d SOURCES/ddb_output_pw-156195c.tar.gz +1f85758e9a639ec86f8dfbd42b530e9ff49b8807 SOURCES/ddb_dsp_libretro-156195c.tar.gz +ec22f372f190acdc62593760de7084c58df05773 SOURCES/mp4p-156195c.tar.gz diff --git a/.gitignore b/.gitignore index 627d220..686838b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -SOURCES/ddb_output_pw-97ab728.tar.gz -SOURCES/ddb_dsp_libretro-97ab728.tar.gz -SOURCES/mp4p-97ab728.tar.gz -SOURCES/1.9.5.tar.gz +SOURCES/1.9.6.tar.gz +SOURCES/ddb_output_pw-156195c.tar.gz +SOURCES/ddb_dsp_libretro-156195c.tar.gz +SOURCES/mp4p-156195c.tar.gz diff --git a/SOURCES/0001-Drop-inappropriate-symbold.patch b/SOURCES/0001-Drop-inappropriate-symbols.patch similarity index 76% rename from SOURCES/0001-Drop-inappropriate-symbold.patch rename to SOURCES/0001-Drop-inappropriate-symbols.patch index c3b2902..f5fbc05 100644 --- a/SOURCES/0001-Drop-inappropriate-symbold.patch +++ b/SOURCES/0001-Drop-inappropriate-symbols.patch @@ -1,21 +1,21 @@ -From 323eacc79f2551e23d1b14f753e3bc38989c298d Mon Sep 17 00:00:00 2001 -From: tigro -Date: Tue, 28 Nov 2023 18:36:11 +0300 -Subject: [PATCH] Drop inappropriate symbold +From ff5fd95f56936db97da747bf71ece8b872b9f209 Mon Sep 17 00:00:00 2001 +From: tigro +Date: Sat, 28 Dec 2024 12:27:48 +0300 +Subject: [PATCH] Drop inappropriate symbols --- ChangeLog | 1 - about.txt | 2 -- help.txt | 2 -- - main.c | 1 - plugins/cocoaui/help-cocoa.txt | 2 -- + src/main.c | 1 - 5 files changed, 8 deletions(-) diff --git a/ChangeLog b/ChangeLog -index e41de53..f7116d5 100644 +index e85a0cc..4ec7ab5 100644 --- a/ChangeLog +++ b/ChangeLog -@@ -94,7 +94,6 @@ version 1.9.0 +@@ -110,7 +110,6 @@ version 1.9.0 Added: Improved DSP preferences GTK UI (Saivert) Added: Improved handling of invalid MP3 files Added: Last.fm scrobbler will use HTTPS by default @@ -43,18 +43,6 @@ index 8cb62ed..2dad563 100644 Help file for GTK version of Deadbeef Player (Linux/*BSD and friends) * LINKS -diff --git a/main.c b/main.c -index d420bed..965604b 100644 ---- a/main.c -+++ b/main.c -@@ -1068,7 +1068,6 @@ main_cleanup_and_quit (void) { - plug_cleanup (); - trace ("logger_free\n"); - -- trace ("💛💙\n"); - ddb_logger_free(); - - char crash_marker[PATH_MAX]; diff --git a/plugins/cocoaui/help-cocoa.txt b/plugins/cocoaui/help-cocoa.txt index fa03d57..e4c2296 100644 --- a/plugins/cocoaui/help-cocoa.txt @@ -65,6 +53,18 @@ index fa03d57..e4c2296 100644 Help file for Cocoa/macOS version of DeaDBeeF Player * LINKS +diff --git a/src/main.c b/src/main.c +index 8c9f30f..1c0885a 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -1069,7 +1069,6 @@ main_cleanup_and_quit (void) { + plug_cleanup (); + trace ("logger_free\n"); + +- trace ("💛💙\n"); + ddb_logger_free(); + + char crash_marker[PATH_MAX]; -- -2.43.0 +2.47.1 diff --git a/SOURCES/deadbeef-ffmpeg-7.patch b/SOURCES/deadbeef-ffmpeg-7.patch new file mode 100644 index 0000000..4cc4c96 --- /dev/null +++ b/SOURCES/deadbeef-ffmpeg-7.patch @@ -0,0 +1,176 @@ +From d4cca5605447122cd080691f43e46047a6039359 Mon Sep 17 00:00:00 2001 +From: Christopher Snowhill +Date: Fri, 21 Jun 2024 21:35:53 -0700 +Subject: [PATCH] ffmpeg: update API to support FFMPEG 7 + +--- + plugins/ffmpeg/ffmpeg.c | 53 ++++++++++++++++++++++++++++++++++------- + 1 file changed, 44 insertions(+), 9 deletions(-) + +diff --git a/plugins/ffmpeg/ffmpeg.c b/plugins/ffmpeg/ffmpeg.c +index 97545e987d..69c4e83df8 100644 +--- a/plugins/ffmpeg/ffmpeg.c ++++ b/plugins/ffmpeg/ffmpeg.c +@@ -62,7 +62,7 @@ static int enable_dop = 0; + + typedef struct { + DB_fileinfo_t info; +- AVCodec *codec; ++ const AVCodec *codec; + AVCodecContext *codec_context; + int need_to_free_codec_context; + AVFormatContext *format_context; +@@ -115,12 +115,20 @@ int is_codec_dsd(enum AVCodecID codec_id) { + // ensure that the buffer can contain entire frame of frame_size bytes per channel + static int + ensure_buffer (ffmpeg_info_t *info, size_t frame_size) { ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 0, 0) ++ if (!info->buffer || info->buffer_size < frame_size * info->codec_context->ch_layout.nb_channels) { ++#else + if (!info->buffer || info->buffer_size < frame_size * info->codec_context->channels) { ++#endif + if (info->buffer) { + free (info->buffer); + info->buffer = NULL; + } ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 0, 0) ++ info->buffer_size = frame_size*info->codec_context->ch_layout.nb_channels; ++#else + info->buffer_size = frame_size*info->codec_context->channels; ++#endif + info->left_in_buffer = 0; + int err = posix_memalign ((void **)&info->buffer, 16, info->buffer_size); + if (err) { +@@ -137,7 +145,7 @@ _get_audio_codec_from_stream(AVFormatContext *format_context, int stream_index, + if (format_context->streams[stream_index]->codecpar->codec_type != AVMEDIA_TYPE_AUDIO) { + return 0; + } +- AVCodec *codec = avcodec_find_decoder(format_context->streams[stream_index]->codecpar->codec_id); ++ const AVCodec *codec = avcodec_find_decoder(format_context->streams[stream_index]->codecpar->codec_id); + if (codec == NULL) { + return 0; + } +@@ -154,7 +162,7 @@ _get_audio_codec_from_stream(AVFormatContext *format_context, int stream_index, + if (ctx == NULL) { + return 0; + } +- AVCodec *codec = avcodec_find_decoder (ctx->codec_id); ++ const AVCodec *codec = avcodec_find_decoder (ctx->codec_id); + if (codec == NULL) { + return 0; + } +@@ -231,7 +239,11 @@ ffmpeg_init (DB_fileinfo_t *_info, DB_playItem_t *it) { + int bps = av_get_bytes_per_sample (info->codec_context->sample_fmt)*8; + int samplerate = info->codec_context->sample_rate; + ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 0, 0) ++ if (bps <= 0 || info->codec_context->ch_layout.nb_channels <= 0 || samplerate <= 0) { ++#else + if (bps <= 0 || info->codec_context->channels <= 0 || samplerate <= 0) { ++#endif + return -1; + } + +@@ -248,7 +260,11 @@ ffmpeg_init (DB_fileinfo_t *_info, DB_playItem_t *it) { + _info->plugin = &plugin.decoder; + _info->readpos = 0; + _info->fmt.bps = bps; ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 0, 0) ++ _info->fmt.channels = info->codec_context->ch_layout.nb_channels; ++#else + _info->fmt.channels = info->codec_context->channels; ++#endif + _info->fmt.samplerate = samplerate; + if (info->codec_context->sample_fmt == AV_SAMPLE_FMT_FLT || info->codec_context->sample_fmt == AV_SAMPLE_FMT_FLTP) { + _info->fmt.is_float = 1; +@@ -296,7 +312,9 @@ _free_info_data(ffmpeg_info_t *info) { + av_packet_unref (&info->pkt); + } + if (info->codec_context) { ++#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(61, 0, 0) + avcodec_close (info->codec_context); ++#endif + + // The ctx is owned by AVFormatContext in legacy mode + if (info->need_to_free_codec_context) { +@@ -396,7 +414,11 @@ ffmpeg_read (DB_fileinfo_t *_info, char *bytes, int size) { + return -1; + } + ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 0, 0) ++ int chCnt = info->codec_context->ch_layout.nb_channels; ++#else + int chCnt = info->codec_context->channels; ++#endif + int chSize = info->pkt.size / chCnt; + uint32_t *pOut = (uint32_t *)info->buffer; + uint8_t marker = 0x05; +@@ -462,25 +484,30 @@ ffmpeg_read (DB_fileinfo_t *_info, char *bytes, int size) { + return -1; + } + if (av_sample_fmt_is_planar(info->codec_context->sample_fmt)) { ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 0, 0) ++ int chCnt = info->codec_context->ch_layout.nb_channels; ++#else ++ int chCnt = info->codec_context->channels; ++#endif + out_size = 0; +- for (int c = 0; c < info->codec_context->channels; c++) { ++ for (int c = 0; c < chCnt; c++) { + for (int i = 0; i < info->frame->nb_samples; i++) { + if (_info->fmt.bps == 8) { +- info->buffer[i*info->codec_context->channels+c] = ((int8_t *)info->frame->extended_data[c])[i]; ++ info->buffer[i*chCnt+c] = ((int8_t *)info->frame->extended_data[c])[i]; + out_size++; + } + else if (_info->fmt.bps == 16) { + int16_t outsample = ((int16_t *)info->frame->extended_data[c])[i]; +- ((int16_t*)info->buffer)[i*info->codec_context->channels+c] = outsample; ++ ((int16_t*)info->buffer)[i*chCnt+c] = outsample; + out_size += 2; + } + else if (_info->fmt.bps == 24) { +- memcpy (&info->buffer[(i*info->codec_context->channels+c)*3], &((int8_t*)info->frame->extended_data[c])[i*3], 3); ++ memcpy (&info->buffer[(i*chCnt+c)*3], &((int8_t*)info->frame->extended_data[c])[i*3], 3); + out_size += 3; + } + else if (_info->fmt.bps == 32) { + int32_t sample = ((int32_t *)info->frame->extended_data[c])[i]; +- ((int32_t*)info->buffer)[i*info->codec_context->channels+c] = sample; ++ ((int32_t*)info->buffer)[i*chCnt+c] = sample; + out_size += 4; + } + } +@@ -784,7 +811,11 @@ ffmpeg_insert (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname) { + trace ("ffmpeg: samplerate is %d\n", samplerate); + trace ("ffmpeg: duration is %f\n", duration); + ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 0, 0) ++ if (bps <= 0 || info.codec_context->ch_layout.nb_channels <= 0 || samplerate <= 0) { ++#else + if (bps <= 0 || info.codec_context->channels <= 0 || samplerate <= 0) { ++#endif + goto error; + } + +@@ -819,7 +850,11 @@ ffmpeg_insert (ddb_playlist_t *plt, DB_playItem_t *after, const char *fname) { + deadbeef->pl_add_meta (it, ":FILE_SIZE", s); + snprintf (s, sizeof (s), "%d", bps); + deadbeef->pl_add_meta (it, ":BPS", s); ++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 0, 0) ++ snprintf (s, sizeof (s), "%d", info.codec_context->ch_layout.nb_channels); ++#else + snprintf (s, sizeof (s), "%d", info.codec_context->channels); ++#endif + deadbeef->pl_add_meta (it, ":CHANNELS", s); + if (is_codec_dsd(info.codec_context->codec_id)) { + snprintf (s, sizeof (s), "%d", samplerate * 8); +@@ -904,7 +939,7 @@ ffmpeg_init_exts (void) { + n = add_new_exts (n, new_exts, ';'); + } + else { +- AVInputFormat *ifmt = NULL; ++ const AVInputFormat *ifmt = NULL; + /* + * It's quite complicated to enumerate all supported extensions in + * ffmpeg. If a decoder defines extensions in ffmpeg, the probing diff --git a/SPECS/deadbeef.spec b/SPECS/deadbeef.spec index 94fca8d..2f3a6e5 100644 --- a/SPECS/deadbeef.spec +++ b/SPECS/deadbeef.spec @@ -3,18 +3,18 @@ %global build_cxxflags %build_cxxflags -std=c++11 # Git submodules -%global mp4p_commit 97ab7285d244de9cde6333e381f9f797b89ce8aa +%global mp4p_commit 156195ccb635f016dc34b89425bfbecf046c90d4 %global mp4p_shortcommit %(c=%{mp4p_commit}; echo ${c:0:7}) -%global ddb_dsp_libretro_commit b0921907bc8f5c8468d01de290980d236797b14e +%global ddb_dsp_libretro_commit b4d3db19566398603069d02eeacb3b06987a1b74 %global ddb_dsp_libretro_shortcommit %(c=%{mp4p_commit}; echo ${c:0:7}) -%global ddb_output_pw_commit 14a3fc6b4e725fbb91009276b1220d39475928f8 +%global ddb_output_pw_commit 0b099d13ab0e89d9934aabdeb2872f0f66ea6960 %global ddb_output_pw_shortcommit %(c=%{mp4p_commit}; echo ${c:0:7}) Name: deadbeef -Version: 1.9.5 -Release: 2%{?dist}.inferit.1 +Version: 1.9.6 +Release: 4%{?dist}.inferit Summary: An audio player for GNU/Linux License: GPL-2.0-or later AND LGPL-2.0-or-later and BSD and MIT AND Zlib @@ -23,9 +23,10 @@ Source0: https://github.com/DeaDBeeF-Player/%{name}/archive/%{version}.ta Source1: https://github.com/DeaDBeeF-Player/mp4p/archive/%{mp4p_commit}/mp4p-%{mp4p_shortcommit}.tar.gz Source2: https://github.com/DeaDBeeF-Player/ddb_dsp_libretro/archive/%{ddb_dsp_libretro_commit}/ddb_dsp_libretro-%{ddb_dsp_libretro_shortcommit}.tar.gz Source3: https://github.com/DeaDBeeF-Player/ddb_output_pw/archive/%{ddb_output_pw_commit}/ddb_output_pw-%{ddb_output_pw_shortcommit}.tar.gz -Patch0: 0001-Revert-Russian-Removing.patch -Patch1: 0001-Drop-inappropriate-symbold.patch -Patch100: 0001-Added-Russian-description-for-ArcMenu.patch +Patch0: https://github.com/DeaDBeeF-Player/deadbeef/commit/d4cca5605447122cd080691f43e46047a6039359.patch#/deadbeef-ffmpeg-7.patch +Patch100: 0001-Revert-Russian-Removing.patch +Patch101: 0001-Drop-inappropriate-symbols.patch +Patch102: 0001-Added-Russian-description-for-ArcMenu.patch # Build for armv7hl failed # https://github.com/DeaDBeeF-Player/deadbeef/issues/2538 @@ -66,6 +67,7 @@ BuildRequires: libdispatch-devel Requires: hicolor-icon-theme Requires: %{name}-plugins%{?_isa} = %{version}-%{release} +Recommends: deadbeef-mpris2-plugin %description DeaDBeeF (as in 0xDEADBEEF) is an audio player for GNU/Linux systems with X11 @@ -100,6 +102,9 @@ mv ddb_dsp_libretro-%{ddb_dsp_libretro_commit}/* external/ddb_dsp_libretro sed -i 's|#include ||' external/ddb_dsp_libretro/sinc_resampler.h sed -i "s|#pragma once|#pragma once\n#include |" external/ddb_dsp_libretro/sinc_resampler.h sed -i "s|size_t|std::size_t|" external/ddb_dsp_libretro/sinc_resampler.h +%ifnarch x86_64 +sed -i -re 's/^(.*)\s+([-]msse3)\s+(.*)$/\1 \3/g' external/ddb_dsp_libretro/Makefile.am +%endif tar -xvf %{SOURCE3} mv ddb_output_pw-%{ddb_output_pw_commit}/* external/ddb_output_pw @@ -113,13 +118,7 @@ do sed -i "s|$data Shortcut Group|X-$data Shortcut Group|" deadbeef.desktop.in done -# Remove unknown pragma -sed -i '/#pragma warning "using sse2 for ftoi"/d' fastftoi.h - %build -%if 0%{?fedora} && 0%{?fedora} > 35 -export PKG_CONFIG_PATH="%{_libdir}/compat-ffmpeg4/pkgconfig" -%endif ./autogen.sh %configure \ --enable-ffmpeg --docdir=%{_defaultdocdir}/%{name}-%{version} \ @@ -175,16 +174,31 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop %changelog -* Tue Nov 28 2023 Arkady L. Shane - 1.9.5-2.inferit.1 +* Sat Dec 28 2024 Arkady L. Shane - 1.9.6-4.inferit +- Added Russian description for ArcMenu +- Revert politial remove of Russian support - Drop inappropriate symbols -* Wed Aug 09 2023 Sergey Cherevko - 1.9.5-2.inferit -- Added Russian description for ArcMenu -- Rebuilt for MSVSphere 9.2 +* Sat Oct 12 2024 Leigh Scott - 1.9.6-4 +- rebuild for ffmpeg -* Wed Jul 19 2023 Arkady L. Shane - 1.9.5-2 -- Rebuilt for MSVSphere 9.2 -- Revert politial remove of Russian support +* Thu Aug 01 2024 RPM Fusion Release Engineering - 1.9.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Sat Feb 03 2024 RPM Fusion Release Engineering - 1.9.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Nov 13 2023 Vasiliy N. Glazov - 1.9.6-1 +- Update to 1.9.6 + +* Wed Nov 08 2023 Leigh Scott - 1.9.5-5 +- Rebuild for new faad2 version + +* Fri Aug 04 2023 Vasiliy N. Glazov - 1.9.5-4 +- Fix Build for F39 + +* Tue Aug 01 2023 Vasiliy N. Glazov - 1.9.5-3 +- Add mpris plugin to recommends * Wed Mar 01 2023 Leigh Scott - 1.9.5-2 - Rebuild for new ffmpeg