diff --git a/fix-dav1d-1.0.patch b/fix-dav1d-1.0.patch new file mode 100644 index 0000000..47799bc --- /dev/null +++ b/fix-dav1d-1.0.patch @@ -0,0 +1,149 @@ +From 55b24abf7219a0c6a6560187496e41fd60638552 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Fri, 18 Mar 2022 11:42:49 +0100 +Subject: [PATCH 1/2] dav1d: fix compilation with (upcoming) dav1d 1.0 + +(cherry picked from commit dbf45cea2a8abdfbef897b8a71f3eb782bb1b712) (edited) +edited: +- 3.0 has the 128 pixels padding elsewhere +- 3.0 has an extra parameter for add_integer_with_range() +- 3.0 was setting i_extra_picture_buffers further down in the code +- 3.0 uses 16 threads max + +Signed-off-by: Steve Lhomme +--- + modules/codec/dav1d.c | 22 +++++++++++++++++++++- + 1 file changed, 21 insertions(+), 1 deletion(-) + +diff --git a/modules/codec/dav1d.c b/modules/codec/dav1d.c +index 039165f52e..cfabbc27cb 100644 +--- a/modules/codec/dav1d.c ++++ b/modules/codec/dav1d.c +@@ -63,10 +63,16 @@ vlc_module_begin () + set_category(CAT_INPUT) + set_subcategory(SUBCAT_INPUT_VCODEC) + ++#if DAV1D_API_VERSION_MAJOR >= 6 ++ add_integer_with_range("dav1d-thread-frames", 0, 0, DAV1D_MAX_THREADS, ++ THREAD_FRAMES_TEXT, THREAD_FRAMES_LONGTEXT, false) ++ add_obsolete_string("dav1d-thread-tiles") // unused with dav1d 1.0 ++#else + add_integer_with_range("dav1d-thread-frames", 0, 0, DAV1D_MAX_FRAME_THREADS, + THREAD_FRAMES_TEXT, THREAD_FRAMES_LONGTEXT, false) + add_integer_with_range("dav1d-thread-tiles", 0, 0, DAV1D_MAX_TILE_THREADS, + THREAD_TILES_TEXT, THREAD_TILES_LONGTEXT, false) ++#endif + vlc_module_end () + + /***************************************************************************** +@@ -294,6 +300,11 @@ static int OpenDecoder(vlc_object_t *p_this) + return VLC_ENOMEM; + + dav1d_default_settings(&p_sys->s); ++#if DAV1D_API_VERSION_MAJOR >= 6 ++ p_sys->s.n_threads = var_InheritInteger(p_this, "dav1d-thread-frames"); ++ if (p_sys->s.n_threads == 0) ++ p_sys->s.n_threads = (i_core_count < 16) ? i_core_count : 16; ++#else + p_sys->s.n_tile_threads = var_InheritInteger(p_this, "dav1d-thread-tiles"); + if (p_sys->s.n_tile_threads == 0) + p_sys->s.n_tile_threads = +@@ -303,6 +314,7 @@ static int OpenDecoder(vlc_object_t *p_this) + p_sys->s.n_frame_threads = var_InheritInteger(p_this, "dav1d-thread-frames"); + if (p_sys->s.n_frame_threads == 0) + p_sys->s.n_frame_threads = (i_core_count < 16) ? i_core_count : 16; ++#endif + p_sys->s.allocator.cookie = dec; + p_sys->s.allocator.alloc_picture_callback = NewPicture; + p_sys->s.allocator.release_picture_callback = FreePicture; +@@ -313,12 +325,20 @@ static int OpenDecoder(vlc_object_t *p_this) + return VLC_EGENERIC; + } + ++#if DAV1D_API_VERSION_MAJOR >= 6 ++ msg_Dbg(p_this, "Using dav1d version %s with %d threads", ++ dav1d_version(), p_sys->s.n_threads); ++ ++ dec->i_extra_picture_buffers = (p_sys->s.n_threads - 1); ++#else + msg_Dbg(p_this, "Using dav1d version %s with %d/%d frame/tile threads", + dav1d_version(), p_sys->s.n_frame_threads, p_sys->s.n_tile_threads); + ++ dec->i_extra_picture_buffers = (p_sys->s.n_frame_threads - 1); ++#endif ++ + dec->pf_decode = Decode; + dec->pf_flush = FlushDecoder; +- dec->i_extra_picture_buffers = (p_sys->s.n_frame_threads - 1); + + dec->fmt_out.video.i_width = dec->fmt_in.video.i_width; + dec->fmt_out.video.i_height = dec->fmt_in.video.i_height; +-- +2.36.1 + + +From c95e5288ab2d222346b19552a462afe5159d1122 Mon Sep 17 00:00:00 2001 +From: Steve Lhomme +Date: Mon, 21 Mar 2022 15:53:52 +0100 +Subject: [PATCH 2/2] dav1d: limit the number of extra frames needed by the + decoder + +The i_extra_picture_buffers is used to add pictures to the pool that the core +will allocate. dav1d is actually using n_threads frames. And the core is +allocating 10 frames per default for AV1. So we need to add the missing ones. + +(cherry picked from commit a32031dc0f5f32083fc54a21397bce732742ccbe) (rebased) +rebased: +- the code dav1d 1.0.0 in 3.0 uses different max versions + +Signed-off-by: Steve Lhomme +--- + modules/codec/dav1d.c | 25 +++++++++++++++++++++++-- + 1 file changed, 23 insertions(+), 2 deletions(-) + +diff --git a/modules/codec/dav1d.c b/modules/codec/dav1d.c +index cfabbc27cb..8a439ce4ff 100644 +--- a/modules/codec/dav1d.c ++++ b/modules/codec/dav1d.c +@@ -304,7 +304,28 @@ static int OpenDecoder(vlc_object_t *p_this) + p_sys->s.n_threads = var_InheritInteger(p_this, "dav1d-thread-frames"); + if (p_sys->s.n_threads == 0) + p_sys->s.n_threads = (i_core_count < 16) ? i_core_count : 16; +-#else ++ ++#if DAV1D_API_VERSION_MAJOR > 6 || DAV1D_API_VERSION_MINOR >= 7 ++ // after dav1d 1.0.0 ++ p_sys->s.max_frame_delay = dav1d_get_frame_delay( &p_sys->s ); ++#else // 1.0.0 ++ // corresponds to c->n_fc when max_frame_delay is 0 in dav1d 1.0.0 ++ static const uint8_t fc_lut[49] = { ++ 1, /* 1 */ ++ 2, 2, 2, /* 2- 4 */ ++ 3, 3, 3, 3, 3, /* 5- 9 */ ++ 4, 4, 4, 4, 4, 4, 4, /* 10-16 */ ++ 5, 5, 5, 5, 5, 5, 5, 5, 5, /* 17-25 */ ++ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, /* 26-36 */ ++ 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, /* 37-49 */ ++ }; ++ if (p_sys->s.n_threads >= 50) ++ p_sys->s.max_frame_delay = 8; ++ else ++ p_sys->s.max_frame_delay = fc_lut[p_sys->s.n_threads - 1]; ++#endif ++ ++#else // before dav1d 1.0.0 + p_sys->s.n_tile_threads = var_InheritInteger(p_this, "dav1d-thread-tiles"); + if (p_sys->s.n_tile_threads == 0) + p_sys->s.n_tile_threads = +@@ -329,7 +350,7 @@ static int OpenDecoder(vlc_object_t *p_this) + msg_Dbg(p_this, "Using dav1d version %s with %d threads", + dav1d_version(), p_sys->s.n_threads); + +- dec->i_extra_picture_buffers = (p_sys->s.n_threads - 1); ++ dec->i_extra_picture_buffers = p_sys->s.max_frame_delay; + #else + msg_Dbg(p_this, "Using dav1d version %s with %d/%d frame/tile threads", + dav1d_version(), p_sys->s.n_frame_threads, p_sys->s.n_tile_threads); +-- +2.36.1 + diff --git a/sources b/sources index bee4498..111f80b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vlc-c4ab31d.tar.gz) = 1d3f5b61c6aa7b9f3f62badc153143c0ec4b86fbe0b807edc3101d951bc4b4c615dacc734eeb3376b9ff9e7a8299e2d11ca463ddcceadaa1cf9d5ea1b015eb76 +SHA512 (vlc-e9eceae.tar.gz) = 164e9e96954415ed25b5b0256e50f588a6853223a859805609ba7a4ce2ab0f1cc0966926182e7fe74a1a6d7b63deacbe3aaf67316b41c33b024999fb45b5902e diff --git a/vlc.spec b/vlc.spec index 5605b5a..e782f9e 100644 --- a/vlc.spec +++ b/vlc.spec @@ -1,6 +1,7 @@ -%global commit0 c4ab31d5f0d5d0ba298706241d5b67ae49215935 +%global commit0 e9eceaed4d838dbd84638bfb2e4bdd08294163b1 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) -#global vlc_rc -rc9 +#global vlc_rc -rc2 +%global vlc_setup vlc-%{?commit0} %global _with_bootstrap 1 @@ -26,15 +27,22 @@ %global _with_dav1d 1 %global _with_aom 1 %ifarch x86_64 ppc64le aarch64 +%if ! (0%{?fedora} >= 37) %global _with_asdcp 1 %endif +%endif + +%if 0%{?rhel} && 0%{?rhel} >= 9 +%global _without_libdc1394 1 +%endif -%if 0%{?fedora} || 0%{?el8} +%if ! 0%{?el7} %global _with_bluray 1 %global _with_wayland 1 %endif %if 0%{?fedora} +%global _with_lirc 1 %ifarch x86_64 i686 %global _with_crystalhd 1 %endif @@ -50,19 +58,11 @@ Summary: The cross-platform open-source multimedia framework, player and server Epoch: 1 Name: vlc -Version: 3.0.17.2 +Version: 3.0.18 Release: 1%{?dist} License: GPLv2+ URL: https://www.videolan.org -%if 0%{?commit0:1} Source0: https://code.videolan.org/videolan/vlc/-/archive/%{commit0}/vlc-%{shortcommit0}.tar.gz -%global vlc_setup vlc-%{?commit0} -%else -Source0: https://download.videolan.org/pub/videolan/%{?vlc_rc:testing/}vlc/%{version}%{?vlc_rc}/vlc-%{version}%{?vlc_rc}.tar.xz -%global vlc_setup vlc-%{version}%{?vlc_rc} -%endif -Patch0: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_20.patch -Patch1: https://github.com/RPi-Distro/vlc/raw/buster-rpt/debian/patches/mmal_chain.patch Patch3: 0001-Use-SYSTEM-wide-ciphers-for-gnutls.patch Patch5: Lower-libgcrypt-to-1.5.3.patch Patch6: Restore-support-for-thread-callbacks-for-older-gcryp.patch @@ -71,11 +71,6 @@ Patch7: Switch-to-Fedora-lua-5.1.patch # Backport for 3.0 notifyd without gtk3 Patch9: notify-don-t-depend-on-any-GTK-version.patch -Patch12: 0001-Revert-access-libdvdread-6.1.2-supports-UTF-8-paths-.patch -# https://code.videolan.org/videolan/vlc/-/issues/25473#note_256576 -Patch13: 0001-Get-addr-by-ref.-from-getConnectionEndpointAddress.patch -# https://code.videolan.org/videolan/vlc/-/merge_requests/889 -Patch14: Remove_legacy_caca.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib @@ -99,7 +94,11 @@ BuildRequires: cdparanoia-devel %{?_with_dav1d:BuildRequires: libdav1d-devel} BuildRequires: pkgconfig(dbus-1) %{?_with_faad2:BuildRequires: faad2-devel} +%if 0%{?fedora} >= 36 || 0%{?rhel} >= 9 +%{?_with_ffmpeg:BuildRequires: compat-ffmpeg4-devel} +%else %{?_with_ffmpeg:BuildRequires: ffmpeg-devel >= 0.4.9-0} +%endif BuildRequires: flac-devel %{?_with_fluidsynth:BuildRequires: fluidsynth-devel} BuildRequires: fribidi-devel @@ -121,9 +120,8 @@ BuildRequires: pkgconfig(libchromaprint) %{?_with_crystalhd:BuildRequires: libcrystalhd-devel} BuildRequires: pkgconfig(daaladec) BuildRequires: pkgconfig(daalaenc) -BuildRequires: libdc1394-devel >= 2.1.0 +%{!?_without_libdc1394:BuildRequires: libdc1394-devel} %{?_with_libdca:BuildRequires: libdca-devel} -BuildRequires: libdv-devel %{?_with_libdvbpsi:BuildRequires: libdvbpsi-devel} BuildRequires: libdvdnav-devel BuildRequires: libebml-devel @@ -136,7 +134,6 @@ BuildRequires: libmatroska-devel >= 0.7.6 BuildRequires: libmfx-devel %endif BuildRequires: libmodplug-devel -BuildRequires: libmp4v2-devel BuildRequires: libmpcdec-devel BuildRequires: libmpg123-devel BuildRequires: libmtp-devel >= 1.0.0 @@ -147,14 +144,13 @@ BuildRequires: libssh2-devel BuildRequires: libsysfs-devel BuildRequires: libshout-devel BuildRequires: libsmbclient-devel -BuildRequires: libtar-devel BuildRequires: libtheora-devel BuildRequires: libtiger-devel BuildRequires: libtiff-devel BuildRequires: pkgconfig(libidn) BuildRequires: pkgconfig(libjpeg) # Not Yet in EL8 -%if ! 0%{?el8} +%if 0%{?fedora} BuildRequires: pkgconfig(libplacebo) %endif BuildRequires: pkgconfig(libudev) @@ -167,19 +163,18 @@ BuildRequires: pkgconfig(vdpau) BuildRequires: pkgconfig(vorbis) BuildRequires: pkgconfig(vpx) BuildRequires: pkgconfig(libxml-2.0) -BuildRequires: lirc-devel +%{?_with_lirc:BuildRequires: lirc-devel } %{?_with_live555:BuildRequires: live555-devel >= 0-0.33} BuildRequires: kernel-headers BuildRequires: pkgconfig(gl) BuildRequires: pkgconfig(glu) BuildRequires: libsamplerate-devel BuildRequires: libshout-devel -%if 0%{?fedora} || 0%{?el8} +%if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: lua5.1-devel, lua5.1 %else BuildRequires: lua-devel %endif -BuildRequires: minizip-devel %{?_with_libmpeg2:BuildRequires: libmpeg2-devel >= 0.3.2} BuildRequires: ncurses-devel %{?_with_opencv:BuildRequires: pkgconfig(opencv)} @@ -306,10 +301,6 @@ Summary: VLC media player core Provides: vlc-nox = %{epoch}:%{version}-%{release} %{?live555_version:Requires: live555%{?_isa} = %{live555_version}} %{?lua_version:Requires: lua(abi) = %{lua_version}} -Requires: libmicrodns%{?_isa} > 0.1.2-1 -%if 0%{?fc31} -Requires: srt-libs%{?_isa} > 1.4.1-3 -%endif %description core VLC media player core components @@ -328,9 +319,6 @@ VLC media player extras modules. %prep %setup -q -n %{vlc_setup} -%{?_with_rpi: -%patch0 -p1 -} %patch3 -p1 %if 0%{?el7} %patch5 -p1 @@ -349,13 +337,6 @@ sed -i -e 's/luac/luac-5.1/g' configure.ac %endif %patch9 -p1 -%if 0%{?rhel} >= 7 -%patch12 -p1 -%endif -%patch13 -p1 -%if 0%{?fedora} > 35 -%patch14 -p1 -%endif %{?_with_bootstrap: rm aclocal.m4 m4/lib*.m4 m4/lt*.m4 || : @@ -374,10 +355,10 @@ touch src/revision.txt --disable-dependency-tracking \ --disable-optimizations \ --disable-silent-rules \ - --with-default-font=%{_fontbasedir}/dejavu/DejaVuSans.ttf \ - --with-default-font-family=DejaVuSans \ - --with-default-monospace-font=%{_fontbasedir}/dejavu/DejaVuSansMono.ttf \ - --with-default-monospace-font-family=DejaVuSansMono \ + --with-default-font=%{_fontbasedir}/dejavu/DejaVuSans.ttf \ + --with-default-font-family=DejaVuSans \ + --with-default-monospace-font=%{_fontbasedir}/dejavu/DejaVuSansMono.ttf \ + --with-default-monospace-font-family=DejaVuSansMono \ --with-kde-solid=no \ --with-pic \ --disable-rpath \ @@ -620,6 +601,45 @@ fi || : %changelog +* Sun Oct 16 2022 Nicolas Chauvet - 1:3.0.18-1 +- Update to 3.0.18 + +* Fri Sep 30 2022 Nicolas Chauvet - 1:3.0.18-0.3.rc +- Update to 3.0.18-rc2 + +* Mon Sep 26 2022 Leigh Scott - 1:3.0.18-0.2.rc +- Rebuild for new flac + +* Mon Aug 29 2022 Nicolas Chauvet - 1:3.0.18-0.1.rc +- Update to 3.0.18-rc +- Drop mmal downstream (rpi) patches +- Drop merged patches + +* Mon Aug 08 2022 RPM Fusion Release Engineering - 1:3.0.17.4-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild and ffmpeg + 5.1 + +* Fri Jul 22 2022 Leigh Scott - 1:3.0.17.4-7 +- Rebuild for new ffmpeg + +* Fri Jul 15 2022 Leigh Scott - 1:3.0.17.4-6 +- rebuilt + +* Tue Jul 05 2022 Nicolas Chauvet - 1:3.0.17.4-5 +- rebuilt + +* Fri Jun 24 2022 Robert-André Mauchin - 1:3.0.17.4-4 +- Rebuilt for new AOM and dav1d + +* Fri Jun 24 2022 Nicolas Chauvet - 1:3.0.17.4-3 +- Rebuilt + +* Sun Jun 12 2022 Sérgio Basto - 1:3.0.17.4-2 +- Mass rebuild for x264-0.164 + +* Sun May 15 2022 Nicolas Chauvet - 1:3.0.17.4-1 +- Update to 3.0.17.4 + * Thu Mar 10 2022 Leigh Scott - 1:3.0.17.2-1 - Update to 3.0.17.2 (rfbz#6241)