Compare commits

...

1 Commits
el9 ... i10ce

12
.gitignore vendored

@ -1,11 +1 @@
Blue-1.11.tar.bz2 SOURCES/mplayer-export-2024-10-08.tar.xz
MPlayer-1.3.0.tar.xz
/mplayer-export-2018-01-19.tar.bz2
/mplayer-export-2018-04-24.tar.bz2
/mplayer-export-2018-06-20.tar.bz2
/mplayer-export-2019-04-16.tar.bz2
/MPlayer-1.4.tar.xz
/mplayer-export-2021-03-13.tar.xz
/mplayer-export-2021-11-09.tar.xz
/MPlayer-1.5.tar.xz
/mplayer-export-2022-07-26.tar.xz

@ -0,0 +1 @@
a1e23141da186a83965522ac138f90ae4dc133ac SOURCES/mplayer-export-2024-10-08.tar.xz

@ -0,0 +1,129 @@
From 98f80775dff2b9f83ba9b2e247ef7b2174a107bf Mon Sep 17 00:00:00 2001
From: Alexander Strasser <eclipse7@gmx.net>
Date: Wed, 3 Apr 2024 22:57:40 +0200
Subject: [PATCH] ao jack: Switch from AVFifoBuffer to AVFifo
Removed from lavu on major bump to 59
TODO: Check for potential concurrency problems
---
libao2/ao_jack.c | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
--- a/libao2/ao_jack.c
+++ b/libao2/ao_jack.c
@@ -71,7 +71,7 @@
#define BUFFSIZE (NUM_CHUNKS * CHUNK_SIZE)
//! buffer for audio data
-static AVFifoBuffer *buffer;
+static AVFifo *buffer;
/**
* \brief insert len bytes into buffer
@@ -82,9 +82,10 @@
* If there is not enough room, the buffer is filled up
*/
static int write_buffer(unsigned char* data, int len) {
- int free = av_fifo_space(buffer);
+ int free = av_fifo_can_write(buffer);
if (len > free) len = free;
- return av_fifo_generic_write(buffer, data, len, NULL);
+ av_fifo_write(buffer, data, len);
+ return len;
}
static void silence(float **bufs, int cnt, int num_bufs);
@@ -96,10 +97,11 @@
int pos;
};
-static void deinterleave(void *info, void *src, int len) {
+static int deinterleave(void *info, void *src, size_t *lenp) {
struct deinterleave *di = info;
float *s = src;
int i;
+ int len = *lenp;
len /= sizeof(float);
for (i = 0; i < len; i++) {
di->bufs[di->cur_buf++][di->pos] = s[i];
@@ -108,6 +110,7 @@
di->pos++;
}
}
+ return 0;
}
/**
@@ -125,12 +128,13 @@
*/
static int read_buffer(float **bufs, int cnt, int num_bufs) {
struct deinterleave di = {bufs, num_bufs, 0, 0};
- int buffered = av_fifo_size(buffer);
+ size_t len = cnt * num_bufs * sizeof(float);
+ int buffered = av_fifo_can_read(buffer);
if (cnt * sizeof(float) * num_bufs > buffered) {
silence(bufs, cnt, num_bufs);
cnt = buffered / sizeof(float) / num_bufs;
}
- av_fifo_generic_read(buffer, &di, cnt * num_bufs * sizeof(float), deinterleave);
+ av_fifo_read_to_cb(buffer, deinterleave, &di, &len);
return cnt;
}
@@ -242,7 +246,7 @@
mp_msg(MSGT_AO, MSGL_FATAL, "[JACK] cannot open server\n");
goto err_out;
}
- buffer = av_fifo_alloc(BUFFSIZE);
+ buffer = av_fifo_alloc2(BUFFSIZE, 1, 0);
jack_set_process_callback(client, outputaudio, 0);
// list matching ports if connections should be made
@@ -302,8 +306,7 @@
free(client_name);
if (client)
jack_client_close(client);
- av_fifo_free(buffer);
- buffer = NULL;
+ av_fifo_freep2(&buffer);
return 0;
}
@@ -315,8 +318,7 @@
reset();
usec_sleep(100 * 1000);
jack_client_close(client);
- av_fifo_free(buffer);
- buffer = NULL;
+ av_fifo_freep2(&buffer);
}
/**
@@ -324,7 +326,7 @@
*/
static void reset(void) {
paused = 1;
- av_fifo_reset(buffer);
+ av_fifo_reset2(buffer);
paused = 0;
}
@@ -343,7 +345,7 @@
}
static int get_space(void) {
- return av_fifo_space(buffer);
+ return av_fifo_can_write(buffer);
}
/**
@@ -357,7 +359,7 @@
}
static float get_delay(void) {
- int buffered = av_fifo_size(buffer); // could be less
+ int buffered = av_fifo_can_read(buffer); // could be less
float in_jack = jack_latency;
if (estimate && callback_interval > 0) {
float elapsed = (float)GetTimer() / 1000000.0 - callback_time;

@ -0,0 +1,30 @@
#!/bin/bash
set -e
tmp=$(mktemp -d)
trap cleanup EXIT
cleanup() {
set +e
[ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp"
}
unset CDPATH
pwd=$(pwd)
svn=$(date +%Y-%m-%d)
#svn=2019-04-16
dirname=mplayer-export-$svn
mplayer_rev={$svn}
#mplayer_rev=HEAD
cd "$tmp"
svn checkout -r ${mplayer_rev} svn://svn.mplayerhq.hu/mplayer/trunk $dirname
cd $dirname
svn_revision=`LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2`
sed -i -e 's/\(SVN-r[0-9]* \)/\1rpmfusion /' -e "s/UNKNOWN/SVN-r$svn_revision/" version.sh
find . -type d -name .svn -print0 | xargs -0r rm -rf
cd ..
tar Jcf "$pwd"/$dirname.tar.xz $dirname
cd - >/dev/null

@ -1,18 +1,17 @@
%ifarch x86_64
%global _lto_cflags %{nil} %global _lto_cflags %{nil}
%endif %global build_type_safety_c 0
%global codecdir %{_libdir}/codecs %global codecdir %{_libdir}/codecs
%global pre 20220726svn %global pre 20241008svn
%global svn 1 %global svn 1
%global svnbuild 2022-07-26 %global svnbuild 2024-10-08
Name: mplayer Name: mplayer
Version: 1.5.1 Version: 1.5.1
%if 0%{?svn} %if 0%{?svn}
Release: 0.3%{?pre:.%{pre}}%{?dist} Release: 0.16%{?pre:.%{pre}}%{?dist}
%else %else
Release: 3%{?dist} Release: 16%{?dist}
%endif %endif
Summary: Movie player playing most video formats and DVDs Summary: Movie player playing most video formats and DVDs
@ -28,7 +27,6 @@ Source0: mplayer-export-%{svnbuild}.tar.xz
%else %else
Source0: https://www.mplayerhq.hu/MPlayer/releases/MPlayer-%{version}%{?pre}.tar.xz Source0: https://www.mplayerhq.hu/MPlayer/releases/MPlayer-%{version}%{?pre}.tar.xz
%endif %endif
Source1: https://www.mplayerhq.hu/MPlayer/skins/Blue-1.11.tar.bz2
Source10: mplayer-snapshot.sh Source10: mplayer-snapshot.sh
# set defaults for Fedora # set defaults for Fedora
Patch0: %{name}-config.patch Patch0: %{name}-config.patch
@ -36,22 +34,21 @@ Patch0: %{name}-config.patch
Patch1: %{name}-manlinks.patch Patch1: %{name}-manlinks.patch
# use system FFmpeg libraries # use system FFmpeg libraries
Patch2: %{name}-ffmpeg.patch Patch2: %{name}-ffmpeg.patch
Patch3: 0204_fix-ftbfs-jack-ffmpeg7.patch
BuildRequires: SDL-devel BuildRequires: SDL-devel
BuildRequires: a52dec-devel BuildRequires: a52dec-devel
BuildRequires: aalib-devel BuildRequires: aalib-devel
BuildRequires: alsa-lib-devel BuildRequires: alsa-lib-devel
BuildRequires: bzip2-devel BuildRequires: bzip2-devel
BuildRequires: desktop-file-utils
BuildRequires: enca-devel BuildRequires: enca-devel
BuildRequires: ffmpeg-devel >= 0.10 BuildRequires: ffmpeg-devel
BuildRequires: fontconfig-devel BuildRequires: fontconfig-devel
BuildRequires: freetype-devel >= 2.0.9 BuildRequires: freetype-devel >= 2.0.9
BuildRequires: fribidi-devel BuildRequires: fribidi-devel
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: giflib-devel BuildRequires: giflib-devel
BuildRequires: gsm-devel BuildRequires: gsm-devel
BuildRequires: gtk2-devel
BuildRequires: jack-audio-connection-kit-devel BuildRequires: jack-audio-connection-kit-devel
BuildRequires: ladspa-devel BuildRequires: ladspa-devel
BuildRequires: lame-devel BuildRequires: lame-devel
@ -79,7 +76,7 @@ BuildRequires: speex-devel >= 1.1
BuildRequires: twolame-devel BuildRequires: twolame-devel
BuildRequires: x264-devel >= 0.0.0-0.28 BuildRequires: x264-devel >= 0.0.0-0.28
BuildRequires: xvidcore-devel >= 0.9.2 BuildRequires: xvidcore-devel >= 0.9.2
BuildRequires: yasm BuildRequires: nasm
%{?_with_a52dec:BuildRequires: a52dec-devel} %{?_with_a52dec:BuildRequires: a52dec-devel}
%{?_with_arts:BuildRequires: arts-devel} %{?_with_arts:BuildRequires: arts-devel}
%{?_with_dga:BuildRequires: libXxf86dga-devel} %{?_with_dga:BuildRequires: libXxf86dga-devel}
@ -103,8 +100,8 @@ BuildRequires: libxml2
BuildRequires: libxslt BuildRequires: libxslt
%endif %endif
Requires: mplayer-common = %{version}-%{release} Requires: mplayer-common = %{version}-%{release}
Requires: ffmpeg-libs%{?_isa}
Provides: mplayer-backend Provides: mplayer-backend
Obsoletes: mplayer-gui
%description %description
MPlayer is a movie player that plays most MPEG, VOB, AVI, OGG/OGM, MPlayer is a movie player that plays most MPEG, VOB, AVI, OGG/OGM,
@ -138,19 +135,9 @@ Summary: MPlayer common files
%description common %description common
This package contains common files for MPlayer packages. This package contains common files for MPlayer packages.
%package gui
Summary: GUI for MPlayer
Requires: mplayer-common = %{version}-%{release}
Requires: ffmpeg-libs%{?_isa}
Requires: hicolor-icon-theme
%description gui
This package contains a GUI for MPlayer and a default skin for it.
%package -n mencoder %package -n mencoder
Summary: MPlayer movie encoder Summary: MPlayer movie encoder
Requires: mplayer-common = %{version}-%{release} Requires: mplayer-common = %{version}-%{release}
Requires: ffmpeg-libs%{?_isa}
%description -n mencoder %description -n mencoder
This package contains the MPlayer movie encoder. This package contains the MPlayer movie encoder.
@ -228,24 +215,14 @@ This package contains various scripts from MPlayer TOOLS directory.
%setup -q -n MPlayer-%{version}%{?pre} %setup -q -n MPlayer-%{version}%{?pre}
rm -rf ffmpeg rm -rf ffmpeg
%endif %endif
%patch0 -p1 -b .config %patch -P 0 -p1 -b .config
%patch1 -p1 -b .manlinks %patch -P 1 -p1 -b .manlinks
%patch2 -p1 -b .ffmpeg %patch -P 2 -p1 -b .ffmpeg
%patch -P 3 -p1 -b .ffmpeg7
mkdir GUI
cp -a `ls -1|grep -v GUI` GUI/
sed -i '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!%{__python3}=' TOOLS/{mphelp_check,vobshift}.py sed -i '1s=^#! */usr/bin/\(python\|env python\)[23]\?=#!%{__python3}=' TOOLS/{mphelp_check,vobshift}.py
%build %build
pushd GUI
export CC=gcc
export CXX=g++
%{mp_configure}--enable-gui --disable-mencoder
%make_build V=1
popd
export CC=gcc export CC=gcc
export CXX=g++ export CXX=g++
%{mp_configure} %{mp_configure}
@ -289,27 +266,6 @@ install -Dpm 644 etc/example.conf \
install -pm 644 etc/{input,menu}.conf $RPM_BUILD_ROOT%{_sysconfdir}/mplayer/ install -pm 644 etc/{input,menu}.conf $RPM_BUILD_ROOT%{_sysconfdir}/mplayer/
# GUI mplayer
install -pm 755 GUI/%{name} $RPM_BUILD_ROOT%{_bindir}/gmplayer
# Default skin
install -dm 755 $RPM_BUILD_ROOT%{_datadir}/mplayer/skins
tar xjC $RPM_BUILD_ROOT%{_datadir}/mplayer/skins --exclude=.svn -f %{SOURCE1}
ln -s Blue $RPM_BUILD_ROOT%{_datadir}/mplayer/skins/default
# Icons
for iconsize in 16x16 22x22 24x24 32x32 48x48 256x256
do
install -dm 755 $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/$iconsize/apps
install -pm 644 etc/mplayer$iconsize.png \
$RPM_BUILD_ROOT%{_datadir}/icons/hicolor/$iconsize/apps/mplayer.png
done
# Desktop file
desktop-file-install \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
etc/%{name}.desktop
# Codec dir # Codec dir
install -dm 755 $RPM_BUILD_ROOT%{codecdir} install -dm 755 $RPM_BUILD_ROOT%{codecdir}
sed -i '1s:#!/usr/bin/env python:#!/usr/bin/env python2:' %{buildroot}%{_bindir}/vobshift sed -i '1s:#!/usr/bin/env python:#!/usr/bin/env python2:' %{buildroot}%{_bindir}/vobshift
@ -317,20 +273,6 @@ sed -i '1s:#!/usr/bin/env python:#!/usr/bin/env python2:' %{buildroot}%{_bindir}
%find_lang %{name} --with-man %find_lang %{name} --with-man
%find_lang mencoder --with-man %find_lang mencoder --with-man
%if (0%{?rhel} && 0%{?rhel} <= 7)
%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
%postun
if [ $1 -eq 0 ] ; then
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi
%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%endif
%files %files
%{_bindir}/mplayer %{_bindir}/mplayer
@ -345,12 +287,6 @@ fi
%dir %{_datadir}/mplayer/ %dir %{_datadir}/mplayer/
%{_mandir}/man1/mplayer.1* %{_mandir}/man1/mplayer.1*
%files gui
%{_bindir}/gmplayer
%{_datadir}/applications/*mplayer.desktop
%{_datadir}/icons/hicolor/*/apps/mplayer.png
%{_datadir}/mplayer/skins/
%files -n mencoder -f mencoder.lang %files -n mencoder -f mencoder.lang
%{_bindir}/mencoder %{_bindir}/mencoder
%{_mandir}/man1/mencoder.1* %{_mandir}/man1/mencoder.1*
@ -381,6 +317,50 @@ fi
%{_datadir}/mplayer/*.fp %{_datadir}/mplayer/*.fp
%changelog %changelog
* Sat Jan 04 2025 Arkady L. Shane <tigro@msvsphere-os.ru> - 1.5.1-0.16.20241008svn
- Rebuilt for MSVSphere 10
* Tue Oct 08 2024 Nicolas Chauvet <kwizart@gmail.com> - 1.5.1-0.16.20241008svn
- Update snapshot
* Fri Aug 02 2024 RPM Fusion Release Engineering <sergiomb@rpmfusion.org> - 1.5.1-0.15.20240415svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Mon Apr 15 2024 Leigh Scott <leigh123linux@gmail.com> - 1.5.1-0.14.20240415svn
- Update snapshot to fix AVChannelLayout issue (rfbz#6911)
* Tue Apr 09 2024 Leigh Scott <leigh123linux@gmail.com> - 1.5.1-0.13.20240409svn
- Update snapshot to fix AVChannelLayout issue (rfbz#6911)
* Mon Mar 18 2024 Leigh Scott <leigh123linux@gmail.com> - 1.5.1-0.12.20240317svn
- Drop GUI
* Sun Mar 17 2024 Leigh Scott <leigh123linux@gmail.com> - 1.5.1-0.11.20240317svn
- Update snapshot
- Readd GUI
* Sun Feb 04 2024 RPM Fusion Release Engineering <sergiomb@rpmfusion.org> - 1.5.1-0.10.20230811svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Jan 09 2024 Leigh Scott <leigh123linux@gmail.com> - 1.5.1-0.9.20230811svn
- Use compat-ffmpeg5
* Fri Aug 11 2023 Leigh Scott <leigh123linux@gmail.com> - 1.5.1-0.8.20230811svn
- Update snapshot
- Drop GUI
* Wed Aug 02 2023 RPM Fusion Release Engineering <sergiomb@rpmfusion.org> - 1.5.1-0.7.20230530svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Tue May 30 2023 Leigh Scott <leigh123linux@gmail.com> - 1.5.1-0.6.20230530svn
- Drop requires ffmpeg-libs
* Tue May 30 2023 Leigh Scott <leigh123linux@gmail.com> - 1.5.1-0.5.20230530svn
- Use compat-ffmpeg4 as mplayer doesn't support ffmpeg-6.0 (rfbz#6692)
* Tue Feb 28 2023 Leigh Scott <leigh123linux@gmail.com> - 1.5.1-0.4.20230228svn
- Rebuild for new ffmpeg
* Tue Nov 22 2022 Leigh Scott <leigh123linux@gmail.com> - 1.5.1-0.3.20220726svn * Tue Nov 22 2022 Leigh Scott <leigh123linux@gmail.com> - 1.5.1-0.3.20220726svn
- Fix rfbz#6500 - Fix rfbz#6500

@ -1,2 +0,0 @@
SHA512 (mplayer-export-2022-07-26.tar.xz) = 73b2bbf53e7b60cc3f157aa3039017fd664b15230bb605aae1e78958e09be4e1fd6192133d30fd6a865b2fea52ade896ad575d93d8002a5b2de0f5f8aac33f92
SHA512 (Blue-1.11.tar.bz2) = 88fbe7af71acaff50a6fab61c6d52095e155ab9842543bda3505c8c14ac95985748f67c2753e249e4aea35eb6deda568cf8b831a75bcfd1394dd029ff32a9267
Loading…
Cancel
Save