mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2025-12-26 13:40:22 +00:00
rebuild(deps:main/ffmpeg): link against ffmpeg 7.1 - Part 1
This commit is contained in:
@@ -3,13 +3,40 @@ TERMUX_PKG_DESCRIPTION="A library to label music and sounds"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=0.4.9
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_REVISION=4
|
||||
TERMUX_PKG_SRCURL=https://aubio.org/pub/aubio-${TERMUX_PKG_VERSION}.tar.bz2
|
||||
TERMUX_PKG_SHA256=d48282ae4dab83b3dc94c16cf011bcb63835c1c02b515490e1883049c3d1f3da
|
||||
TERMUX_PKG_DEPENDS="ffmpeg, libsamplerate, libsndfile"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_pre_configure() {
|
||||
declare -a _commits=(
|
||||
8a05420e
|
||||
cdfe9cef
|
||||
245deead
|
||||
0b947f96
|
||||
53bc55cd
|
||||
)
|
||||
|
||||
declare -a _checksums=(
|
||||
33b730d1aa0562d5cb96341fce268acb8a42a0381e9dcd52caef0fc2737b8ad0
|
||||
025b6d0668601a17ce8312ad4930d7ba99715b754191208347df46b9a07b0a91
|
||||
ed8b8c76867884ff97e7df6d6992c9df6fd6396f002e103f7718ab978daff417
|
||||
1eb42cc2c51ca67ca6d54d2f223c3c3775041bf2743ccdddddd325e9365dc301
|
||||
e0d4ef1d61143130f919682b5288ad3030d9472f2c3b91d5c2703f9ec71e962d
|
||||
)
|
||||
|
||||
for i in "${!_commits[@]}"; do
|
||||
PATCHFILE="${TERMUX_PKG_CACHEDIR}/aubio_patch_${_commits[i]}.patch"
|
||||
termux_download \
|
||||
"https://github.com/aubio/aubio/commit/${_commits[i]}.patch" \
|
||||
"$PATCHFILE" \
|
||||
"${_checksums[i]}"
|
||||
patch -p1 -i "$PATCHFILE"
|
||||
done
|
||||
|
||||
patch -p1 -i "${TERMUX_PKG_BUILDER_DIR}"/src-io-source_avcodec.c.diff
|
||||
|
||||
CPPFLAGS+=" -DFF_API_LAVF_AVCTX"
|
||||
}
|
||||
|
||||
|
||||
17
packages/aubio/src-io-source_avcodec.c.diff
Normal file
17
packages/aubio/src-io-source_avcodec.c.diff
Normal file
@@ -0,0 +1,17 @@
|
||||
https://gitlab.archlinux.org/archlinux/packaging/packages/aubio/-/blob/56986603eec1be74cf205b8dded14d4972cf06b7/ffmpeg7.patch
|
||||
|
||||
diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c
|
||||
index 71ea8b5f..ad91f5eb 100644
|
||||
--- a/src/io/source_avcodec.c
|
||||
+++ b/src/io/source_avcodec.c
|
||||
@@ -345,8 +345,8 @@ void aubio_source_avcodec_reset_resampler(aubio_source_avcodec_t * s)
|
||||
av_channel_layout_default(&input_layout, s->input_channels);
|
||||
av_channel_layout_default(&output_layout, s->input_channels);
|
||||
|
||||
- av_opt_set_chlayout(avr, "in_channel_layout", &input_layout, 0);
|
||||
- av_opt_set_chlayout(avr, "out_channel_layout", &output_layout, 0);
|
||||
+ av_opt_set_chlayout(avr, "in_chlayout", &input_layout, 0);
|
||||
+ av_opt_set_chlayout(avr, "out_chlayout", &output_layout, 0);
|
||||
#else
|
||||
int64_t input_layout = av_get_default_channel_layout(s->input_channels);
|
||||
int64_t output_layout = av_get_default_channel_layout(s->input_channels);
|
||||
@@ -5,7 +5,7 @@ TERMUX_PKG_MAINTAINER="@termux"
|
||||
_COMMIT=aa67c95b9e486884a6d3ee8b0c91207d8c2b0551
|
||||
_COMMIT_DATE=20221217
|
||||
TERMUX_PKG_VERSION=1.5.1-p${_COMMIT_DATE}
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=git+https://github.com/acoustid/chromaprint
|
||||
TERMUX_PKG_SHA256=5a880f6e976fdbbfbc1d5487d27cf59fba7398c675c6cb5069aaf3d3cff716a7
|
||||
TERMUX_PKG_GIT_BRANCH=master
|
||||
|
||||
@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Small, fast and powerful console music player"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION="2.12.0"
|
||||
TERMUX_PKG_REVISION="2"
|
||||
TERMUX_PKG_REVISION="3"
|
||||
TERMUX_PKG_DEPENDS="ffmpeg, libandroid-support, libflac, libiconv, libmad, libmodplug, libvorbis, libwavpack, ncurses, opusfile, pulseaudio"
|
||||
TERMUX_PKG_SRCURL=https://github.com/cmus/cmus/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=44b96cd5f84b0d84c33097c48454232d5e6a19cd33b9b6503ba9c13b6686bfc7
|
||||
|
||||
@@ -5,6 +5,7 @@ TERMUX_PKG_MAINTAINER="@termux"
|
||||
_COMMIT=e2062c8003d2ce8592e146c26b714311a1419ec5
|
||||
_COMMIT_DATE=20240913
|
||||
TERMUX_PKG_VERSION=2.2.3-p${_COMMIT_DATE}
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=git+https://github.com/dirkvdb/ffmpegthumbnailer
|
||||
TERMUX_PKG_SHA256=4cdf9f3afa2b34bf19f0d6cfb24d523918351ba5d5623fda54874e7c6bd4011d
|
||||
TERMUX_PKG_GIT_BRANCH=master
|
||||
|
||||
@@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Data flow based image processing framework"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION="0.4.50"
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://download.gimp.org/pub/gegl/${TERMUX_PKG_VERSION%.*}/gegl-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=6084969b06ee86ca71142133773f27e13f02e5a6a22c2cfce452ecaaddb790c1
|
||||
TERMUX_PKG_DEPENDS="babl, ffmpeg, gdk-pixbuf, glib, json-glib, libandroid-support, libc++, libcairo, libjasper, libjpeg-turbo, libpng, librsvg, libtiff, libwebp, littlecms, openexr, pango, poppler"
|
||||
|
||||
@@ -4,6 +4,7 @@ TERMUX_PKG_DESCRIPTION="An open-source multimedia framework focused on modularit
|
||||
TERMUX_PKG_LICENSE="LGPL-2.1"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION="2.4.0"
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/gpac/gpac/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=99c8c994d5364b963d18eff24af2576b38d38b3460df27d451248982ea16157a
|
||||
TERMUX_PKG_DEPENDS="ffmpeg, freetype, liba52, libjpeg-turbo, liblzma, libmad, libnghttp2, libogg, libpng, libtheora, libvorbis, openjpeg, openssl, pulseaudio, xvidcore, zlib"
|
||||
@@ -11,6 +12,23 @@ TERMUX_PKG_EXTRA_MAKE_ARGS="STRIP=:"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-x11"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
declare -a _commits=(
|
||||
18863aa2
|
||||
)
|
||||
|
||||
declare -a _checksums=(
|
||||
3a4e10a031bc081a402bfd24889f85fcbf99d4fd36a9086aedda546445037bec
|
||||
)
|
||||
|
||||
for i in "${!_commits[@]}"; do
|
||||
PATCHFILE="${TERMUX_PKG_CACHEDIR}/gpac_patch_${_commits[i]}.patch"
|
||||
termux_download \
|
||||
"https://github.com/gpac/gpac/commit/${_commits[i]}.patch" \
|
||||
"$PATCHFILE" \
|
||||
"${_checksums[i]}"
|
||||
patch -p1 -i "$PATCHFILE"
|
||||
done
|
||||
|
||||
CFLAGS+=" -fPIC"
|
||||
for f in $CFLAGS $CPPFLAGS; do
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --extra-cflags=$f"
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
+++ ./src/filters/ff_mx.c
|
||||
@@ -247,11 +247,7 @@
|
||||
}
|
||||
|
||||
|
||||
-#if (LIBAVFORMAT_VERSION_MAJOR <= 59)
|
||||
static int ffavio_write_packet(void *opaque, uint8_t *buf, int buf_size)
|
||||
-#else
|
||||
-static int ffavio_write_packet(void *opaque, const uint8_t *buf, int buf_size)
|
||||
-#endif
|
||||
{
|
||||
GF_FFMuxCtx *ctx = (GF_FFMuxCtx *)opaque;
|
||||
return (int) gf_fwrite(buf, buf_size, ctx->gfio);
|
||||
@@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="GStreamer Libav plug-in contains one plugin with a set o
|
||||
TERMUX_PKG_LICENSE="LGPL-2.1"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION="1.24.10"
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://gstreamer.freedesktop.org/src/gst-libav/gst-libav-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=4cf2e2d8204e54ba8af9519a8b9b7ffa6e951a7087afa0dfe83c125d49bbb5fb
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
|
||||
@@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="GPL-2.0, BSD 3-Clause"
|
||||
TERMUX_PKG_LICENSE_FILE="COPYING, LICENCE.miniupnpd"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.3.3
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=git+https://git.code.sf.net/p/minidlna/git
|
||||
TERMUX_PKG_GIT_BRANCH=v${TERMUX_PKG_VERSION//./_}
|
||||
TERMUX_PKG_DEPENDS="ffmpeg, libexif, libflac, libiconv, libid3tag, libjpeg-turbo, libogg, libsqlite, libvorbis"
|
||||
|
||||
15
packages/minidlna/libav.h.patch
Normal file
15
packages/minidlna/libav.h.patch
Normal file
@@ -0,0 +1,15 @@
|
||||
https://gitlab.archlinux.org/archlinux/packaging/packages/minidlna/-/blob/affcf0dd1e6f8e33d0ba90b2b0733736fa1aeb71/ffmpeg7.patch
|
||||
|
||||
diff --git a/libav.h b/libav.h
|
||||
index b69752c..aed9d18 100644
|
||||
--- a/libav.h
|
||||
+++ b/libav.h
|
||||
@@ -174,7 +174,7 @@ lav_get_interlaced(AVStream *s)
|
||||
#define lav_codec_tag(s) s->codecpar->codec_tag
|
||||
#define lav_sample_rate(s) s->codecpar->sample_rate
|
||||
#define lav_bit_rate(s) s->codecpar->bit_rate
|
||||
-#define lav_channels(s) s->codecpar->channels
|
||||
+#define lav_channels(s) s->codecpar->ch_layout.nb_channels
|
||||
#define lav_width(s) s->codecpar->width
|
||||
#define lav_height(s) s->codecpar->height
|
||||
#define lav_profile(s) s->codecpar->profile
|
||||
@@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Music player daemon"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION="0.23.16"
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/MusicPlayerDaemon/MPD/archive/v$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=a3ba8a4ef53c681ae5d415a79fbd1409d61cb3d03389a51595af24b330ecbb61
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
|
||||
@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="The Movie Player"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.5
|
||||
TERMUX_PKG_REVISION=6
|
||||
TERMUX_PKG_REVISION=7
|
||||
TERMUX_PKG_SRCURL=https://mplayerhq.hu/MPlayer/releases/MPlayer-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=650cd55bb3cb44c9b39ce36dac488428559799c5f18d16d98edb2b7256cbbf85
|
||||
TERMUX_PKG_DEPENDS="ffmpeg, fontconfig, freetype, fribidi, liba52, libass, libbluray, libdvdnav, libdvdread, libiconv, libjpeg-turbo, liblzo, libmad, libmp3lame, libogg, libpng, libtheora, libtwolame, libvorbis, libx11, libx264, libxext, libxss, libxv, mpg123, ncurses, openal-soft, pulseaudio, xvidcore, zlib"
|
||||
|
||||
304
packages/mplayer/mplayer-1.5-ffmpeg-7.1-cherrypicks.patch
Normal file
304
packages/mplayer/mplayer-1.5-ffmpeg-7.1-cherrypicks.patch
Normal file
@@ -0,0 +1,304 @@
|
||||
This is cherry-picked from commits found
|
||||
inside the upstream mplayer repository
|
||||
which is an SVN repository that it's hard to find an active gitweb mirror of.
|
||||
it is possible to download using this command:
|
||||
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
|
||||
The fmt-conversion.c change could be found using this command:
|
||||
svn log fmt-conversion.c | head -n50
|
||||
Then, it is possible to obtain this commit in unified diff format by using this
|
||||
command.
|
||||
cd mplayer/
|
||||
svn diff -c r38450 .
|
||||
A similar process was used for the other files patched by this patch,
|
||||
by getting the SVN hashes r38453, r38644, r38636, r38451 and r38452.
|
||||
--- a/av_helpers.c
|
||||
+++ b/av_helpers.c
|
||||
@@ -120,38 +120,39 @@ int lavc_encode_audio(AVCodecContext *ctx, void *src, int src_len, void *dst, in
|
||||
{
|
||||
void *orig_src = src;
|
||||
int bps = av_get_bytes_per_sample(ctx->sample_fmt);
|
||||
- int planar = ctx->channels > 1 && av_sample_fmt_is_planar(ctx->sample_fmt);
|
||||
+ int channels = ctx->ch_layout.nb_channels;
|
||||
+ int planar = channels > 1 && av_sample_fmt_is_planar(ctx->sample_fmt);
|
||||
int isac3 = ctx->codec->id == AV_CODEC_ID_AC3;
|
||||
int n;
|
||||
int got;
|
||||
AVPacket pkt;
|
||||
AVFrame *frame = av_frame_alloc();
|
||||
- if ((ctx->channels == 6 || ctx->channels == 5) &&
|
||||
+ if ((channels == 6 || channels == 5) &&
|
||||
(isac3 || !strcmp(ctx->codec->name,"libfaac"))) {
|
||||
reorder_channel_nch(src, AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT,
|
||||
isac3 ? AF_CHANNEL_LAYOUT_LAVC_DEFAULT : AF_CHANNEL_LAYOUT_AAC_DEFAULT,
|
||||
- ctx->channels,
|
||||
+ channels,
|
||||
src_len / bps, bps);
|
||||
}
|
||||
- frame->nb_samples = src_len / ctx->channels / bps;
|
||||
+ frame->nb_samples = src_len / channels / bps;
|
||||
if (planar) {
|
||||
// TODO: this is horribly inefficient.
|
||||
int ch;
|
||||
src = av_mallocz(src_len);
|
||||
- for (ch = 0; ch < ctx->channels; ch++) {
|
||||
+ for (ch = 0; ch < channels; ch++) {
|
||||
uint8_t *tmps = (uint8_t *)orig_src + ch*bps;
|
||||
- uint8_t *tmpd = (uint8_t *)src + ch*src_len/ctx->channels;
|
||||
+ uint8_t *tmpd = (uint8_t *)src + ch*src_len/channels;
|
||||
int s;
|
||||
for (s = 0; s < frame->nb_samples; s++) {
|
||||
memcpy(tmpd, tmps, bps);
|
||||
- tmps += ctx->channels * bps;
|
||||
+ tmps += channels * bps;
|
||||
tmpd += bps;
|
||||
}
|
||||
}
|
||||
}
|
||||
frame->format = ctx->sample_fmt;
|
||||
- frame->channels = ctx->channels;
|
||||
- n = avcodec_fill_audio_frame(frame, ctx->channels, ctx->sample_fmt, src, src_len, 1);
|
||||
+ frame->ch_layout.nb_channels = channels;
|
||||
+ n = avcodec_fill_audio_frame(frame, channels, ctx->sample_fmt, src, src_len, 1);
|
||||
if (n < 0) return 0;
|
||||
n = avcodec_send_frame(ctx, frame);
|
||||
av_init_packet(&pkt);
|
||||
--- a/fmt-conversion.c
|
||||
+++ b/fmt-conversion.c
|
||||
@@ -138,7 +138,6 @@ static const struct {
|
||||
{ IMGFMT_422P, AV_PIX_FMT_YUVJ422P },
|
||||
{ IMGFMT_444P, AV_PIX_FMT_YUVJ444P },
|
||||
{ IMGFMT_440P, AV_PIX_FMT_YUVJ440P },
|
||||
- { IMGFMT_XVMC_IDCT_MPEG2, AV_PIX_FMT_XVMC },
|
||||
{ 0, AV_PIX_FMT_NONE }
|
||||
};
|
||||
|
||||
--- a/libaf/af_lavcac3enc.c
|
||||
+++ b/libaf/af_lavcac3enc.c
|
||||
@@ -96,7 +96,7 @@ static int control(struct af_instance_s *af, int cmd, void *arg)
|
||||
|
||||
bit_rate = s->bit_rate ? s->bit_rate : default_bit_rate[af->data->nch];
|
||||
|
||||
- if (s->lavc_actx->channels != af->data->nch ||
|
||||
+ if (s->lavc_actx->ch_layout.nb_channels != af->data->nch ||
|
||||
s->lavc_actx->sample_rate != af->data->rate ||
|
||||
s->lavc_actx->bit_rate != bit_rate) {
|
||||
|
||||
@@ -104,7 +104,7 @@ static int control(struct af_instance_s *af, int cmd, void *arg)
|
||||
avcodec_close(s->lavc_actx);
|
||||
|
||||
// Put sample parameters
|
||||
- s->lavc_actx->channels = af->data->nch;
|
||||
+ s->lavc_actx->ch_layout.nb_channels = af->data->nch;
|
||||
s->lavc_actx->sample_rate = af->data->rate;
|
||||
s->lavc_actx->sample_fmt = AV_SAMPLE_FMT_S16P;
|
||||
s->lavc_actx->bit_rate = bit_rate;
|
||||
--- a/libmpcodecs/ad_ffmpeg.c
|
||||
+++ b/libmpcodecs/ad_ffmpeg.c
|
||||
@@ -79,10 +79,10 @@ static int setup_format(sh_audio_t *sh_audio, const AVCodecContext *lavc_context
|
||||
} else if (sh_audio->wf->nSamplesPerSec && !c->srate_changed)
|
||||
samplerate=sh_audio->wf->nSamplesPerSec;
|
||||
}
|
||||
- if (lavc_context->channels != sh_audio->channels ||
|
||||
+ if (lavc_context->ch_layout.nb_channels != sh_audio->channels ||
|
||||
samplerate != sh_audio->samplerate ||
|
||||
sample_format != sh_audio->sample_format) {
|
||||
- sh_audio->channels=lavc_context->channels;
|
||||
+ sh_audio->channels=lavc_context->ch_layout.nb_channels;
|
||||
sh_audio->samplerate=samplerate;
|
||||
sh_audio->sample_format = sample_format;
|
||||
sh_audio->samplesize=af_fmt2bits(sh_audio->sample_format)/ 8;
|
||||
@@ -121,14 +121,14 @@ static int init(sh_audio_t *sh_audio)
|
||||
lavc_context->sample_rate = sh_audio->samplerate;
|
||||
lavc_context->bit_rate = sh_audio->i_bps * 8;
|
||||
if(sh_audio->wf){
|
||||
- lavc_context->channels = sh_audio->wf->nChannels;
|
||||
+ lavc_context->ch_layout.nb_channels = sh_audio->wf->nChannels;
|
||||
lavc_context->sample_rate = sh_audio->wf->nSamplesPerSec;
|
||||
lavc_context->bit_rate = sh_audio->wf->nAvgBytesPerSec * 8;
|
||||
lavc_context->block_align = sh_audio->wf->nBlockAlign;
|
||||
lavc_context->bits_per_coded_sample = sh_audio->wf->wBitsPerSample;
|
||||
+ } else {
|
||||
+ lavc_context->ch_layout.nb_channels = sh_audio->channels;
|
||||
}
|
||||
- lavc_context->channel_layout = sh_audio->channel_layout;
|
||||
- lavc_context->request_channel_layout = av_get_default_channel_layout(audio_output_channels);
|
||||
lavc_context->codec_tag = sh_audio->format; //FOURCC
|
||||
lavc_context->codec_id = lavc_codec->id; // not sure if required, imho not --A'rpi
|
||||
|
||||
@@ -274,7 +274,7 @@ static av_always_inline void copy_samples_planar(size_t bps,
|
||||
static int copy_samples(AVCodecContext *avc, AVFrame *frame,
|
||||
unsigned char *buf, int max_size)
|
||||
{
|
||||
- int channels = avc->channels;
|
||||
+ int channels = avc->ch_layout.nb_channels;
|
||||
int sample_size = av_get_bytes_per_sample(avc->sample_fmt);
|
||||
int size = channels * sample_size * frame->nb_samples;
|
||||
|
||||
@@ -369,12 +369,12 @@ static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int m
|
||||
if (len2 < 0)
|
||||
return len2;
|
||||
if(len2>0){
|
||||
- if (((AVCodecContext *)sh_audio->context)->channels >= 5) {
|
||||
+ if (((AVCodecContext *)sh_audio->context)->ch_layout.nb_channels >= 5) {
|
||||
int samplesize = av_get_bytes_per_sample(((AVCodecContext *)
|
||||
sh_audio->context)->sample_fmt);
|
||||
reorder_channel_nch(buf, AF_CHANNEL_LAYOUT_LAVC_DEFAULT,
|
||||
AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT,
|
||||
- ((AVCodecContext *)sh_audio->context)->channels,
|
||||
+ ((AVCodecContext *)sh_audio->context)->ch_layout.nb_channels,
|
||||
len2 / samplesize, samplesize);
|
||||
}
|
||||
//len=len2;break;
|
||||
--- a/libmpcodecs/ad_spdif.c
|
||||
+++ b/libmpcodecs/ad_spdif.c
|
||||
@@ -55,7 +55,7 @@ static int read_packet(void *p, uint8_t *buf, int buf_size)
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static int write_packet(void *p, uint8_t *buf, int buf_size)
|
||||
+static int write_packet(void *p, const uint8_t *buf, int buf_size)
|
||||
{
|
||||
int len;
|
||||
struct spdifContext *ctx = p;
|
||||
--- a/libmpcodecs/ae_lavc.c
|
||||
+++ b/libmpcodecs/ae_lavc.c
|
||||
@@ -50,7 +50,7 @@ static int bind_lavc(audio_encoder_t *encoder, muxer_stream_t *mux_a)
|
||||
{
|
||||
mux_a->wf = malloc(sizeof(WAVEFORMATEX)+lavc_actx->extradata_size+256);
|
||||
mux_a->wf->wFormatTag = lavc_param_atag;
|
||||
- mux_a->wf->nChannels = lavc_actx->channels;
|
||||
+ mux_a->wf->nChannels = lavc_actx->ch_layout.nb_channels;
|
||||
mux_a->wf->nSamplesPerSec = lavc_actx->sample_rate;
|
||||
mux_a->wf->nAvgBytesPerSec = (lavc_actx->bit_rate / 8);
|
||||
mux_a->avg_rate= lavc_actx->bit_rate;
|
||||
@@ -192,7 +192,7 @@ int mpae_init_lavc(audio_encoder_t *encoder)
|
||||
mp_msg(MSGT_MENCODER,MSGL_ERR, "Audio encoder requires unknown or unsupported input format\n");
|
||||
return 0;
|
||||
}
|
||||
- lavc_actx->channels = encoder->params.channels;
|
||||
+ lavc_actx->ch_layout.nb_channels = encoder->params.channels;
|
||||
lavc_actx->sample_rate = encoder->params.sample_rate;
|
||||
lavc_actx->time_base.num = 1;
|
||||
lavc_actx->time_base.den = encoder->params.sample_rate;
|
||||
@@ -219,7 +219,7 @@ int mpae_init_lavc(audio_encoder_t *encoder)
|
||||
*/
|
||||
if(lavc_param_atag == 0x11) {
|
||||
int blkalign = 2048;
|
||||
- int framesize = (blkalign - 4 * lavc_actx->channels) * 8 / (4 * lavc_actx->channels) + 1;
|
||||
+ int framesize = (blkalign - 4 * lavc_actx->ch_layout.nb_channels) * 8 / (4 * lavc_actx->ch_layout.nb_channels) + 1;
|
||||
lavc_actx->bit_rate = lavc_actx->sample_rate*8*blkalign/framesize;
|
||||
}
|
||||
if((lavc_param_audio_global_header&1)
|
||||
@@ -238,7 +238,7 @@ int mpae_init_lavc(audio_encoder_t *encoder)
|
||||
|
||||
if(lavc_param_atag == 0x11) {
|
||||
lavc_actx->block_align = 2048;
|
||||
- lavc_actx->frame_size = (lavc_actx->block_align - 4 * lavc_actx->channels) * 8 / (4 * lavc_actx->channels) + 1;
|
||||
+ lavc_actx->frame_size = (lavc_actx->block_align - 4 * lavc_actx->ch_layout.nb_channels) * 8 / (4 * lavc_actx->ch_layout.nb_channels) + 1;
|
||||
}
|
||||
|
||||
encoder->decode_buffer_size = lavc_actx->frame_size *
|
||||
--- a/libmpcodecs/vd_ffmpeg.c
|
||||
+++ b/libmpcodecs/vd_ffmpeg.c
|
||||
@@ -515,8 +515,8 @@ static void uninit(sh_video_t *sh){
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_INFO, "QP: %d, count: %d\n", i, ctx->qp_stat[i]);
|
||||
}
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_INFO, MSGTR_MPCODECS_ArithmeticMeanOfQP,
|
||||
- ctx->qp_sum / avctx->frame_number,
|
||||
- 1.0/(ctx->inv_qp_sum / avctx->frame_number)
|
||||
+ ctx->qp_sum / avctx->frame_num,
|
||||
+ 1.0/(ctx->inv_qp_sum / avctx->frame_num)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -526,7 +526,6 @@ static void uninit(sh_video_t *sh){
|
||||
|
||||
av_freep(&avctx->extradata);
|
||||
av_freep(&avctx->hwaccel_context);
|
||||
- av_freep(&avctx->slice_offset);
|
||||
}
|
||||
|
||||
avcodec_free_context(&avctx);
|
||||
--- a/libmpcodecs/ve_lavc.c
|
||||
+++ b/libmpcodecs/ve_lavc.c
|
||||
@@ -741,7 +741,7 @@ static int encode_frame(struct vf_instance *vf, AVFrame *pic, double pts){
|
||||
int res;
|
||||
|
||||
if(pts == MP_NOPTS_VALUE)
|
||||
- pts= lavc_venc_context->frame_number * av_q2d(lavc_venc_context->time_base);
|
||||
+ pts= lavc_venc_context->frame_num * av_q2d(lavc_venc_context->time_base);
|
||||
|
||||
if(pic){
|
||||
#if 0
|
||||
--- a/libmpdemux/demux_lavf.c
|
||||
+++ b/libmpdemux/demux_lavf.c
|
||||
@@ -309,8 +309,8 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
|
||||
wf= calloc(sizeof(*wf) + codec->extradata_size, 1);
|
||||
codec->codec_tag = mp_codec_id2tag(codec->codec_id, codec->codec_tag, 1);
|
||||
wf->wFormatTag= codec->codec_tag;
|
||||
- wf->nChannels= codec->channels;
|
||||
- sh_audio->channel_layout = codec->channel_layout;
|
||||
+ wf->nChannels= codec->ch_layout.nb_channels;
|
||||
+ sh_audio->channel_layout = codec->ch_layout.u.mask;
|
||||
wf->nSamplesPerSec= codec->sample_rate;
|
||||
wf->nAvgBytesPerSec= codec->bit_rate/8;
|
||||
wf->nBlockAlign= codec->block_align ? codec->block_align : 1;
|
||||
@@ -332,7 +332,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
|
||||
sh_audio->audio.dwRate /= g;
|
||||
// printf("sca:%d rat:%d fs:%d sr:%d ba:%d\n", sh_audio->audio.dwScale, sh_audio->audio.dwRate, codec->frame_size, codec->sample_rate, codec->block_align);
|
||||
sh_audio->format= codec->codec_tag;
|
||||
- sh_audio->channels= codec->channels;
|
||||
+ sh_audio->channels= codec->ch_layout.nb_channels;
|
||||
sh_audio->samplerate= codec->sample_rate;
|
||||
sh_audio->i_bps= codec->bit_rate/8;
|
||||
switch (codec->codec_id) {
|
||||
--- a/libmpdemux/muxer_lavf.c
|
||||
+++ b/libmpdemux/muxer_lavf.c
|
||||
@@ -77,7 +77,7 @@ const m_option_t lavfopts_conf[] = {
|
||||
{NULL, NULL, 0, 0, 0, 0, NULL}
|
||||
};
|
||||
|
||||
-static int mp_write(void *opaque, uint8_t *buf, int size)
|
||||
+static int mp_write(void *opaque, const uint8_t *buf, int size)
|
||||
{
|
||||
muxer_t *muxer = opaque;
|
||||
return stream_write_buffer(muxer->stream, buf, size);
|
||||
@@ -192,7 +192,7 @@ static void fix_parameters(muxer_stream_t *stream)
|
||||
mp_msg(MSGT_MUXER, MSGL_INFO, "AUDIO CODEC ID: %x, TAG: %x\n", ctx->codec_id, (uint32_t) ctx->codec_tag);
|
||||
ctx->sample_rate = stream->wf->nSamplesPerSec;
|
||||
// mp_msg(MSGT_MUXER, MSGL_INFO, "stream->h.dwSampleSize: %d\n", stream->h.dwSampleSize);
|
||||
- ctx->channels = stream->wf->nChannels;
|
||||
+ ctx->ch_layout.nb_channels = stream->wf->nChannels;
|
||||
if(stream->h.dwRate && (stream->h.dwScale * (int64_t)ctx->sample_rate) % stream->h.dwRate == 0)
|
||||
ctx->frame_size= (stream->h.dwScale * (int64_t)ctx->sample_rate) / stream->h.dwRate;
|
||||
mp_msg(MSGT_MUXER, MSGL_V, "MUXER_LAVF(audio stream) frame_size: %d, scale: %u, sps: %u, rate: %u, ctx->block_align = stream->wf->nBlockAlign; %d=%d stream->wf->nAvgBytesPerSec:%d\n",
|
||||
--- a/libvo/osx_common.h
|
||||
+++ b/libvo/osx_common.h
|
||||
@@ -19,6 +19,8 @@
|
||||
#ifndef MPLAYER_OSX_COMMON_H
|
||||
#define MPLAYER_OSX_COMMON_H
|
||||
|
||||
+struct MPGLContext;
|
||||
+
|
||||
int convert_key(unsigned key, unsigned charcode);
|
||||
void change_movie_aspect(float new_aspect);
|
||||
void config_movie_aspect(float config_aspect);
|
||||
@@ -32,6 +34,6 @@ void vo_osx_ontop(void);
|
||||
void vo_osx_fullscreen(void);
|
||||
int vo_osx_check_events(void);
|
||||
void vo_osx_update_xinerama_info(void);
|
||||
-void vo_osx_swap_buffers(void);
|
||||
+void vo_osx_swap_buffers(struct MPGLContext *);
|
||||
|
||||
#endif /* MPLAYER_OSX_COMMON_H */
|
||||
--- a/libvo/osx_objc_common.m
|
||||
+++ b/libvo/osx_objc_common.m
|
||||
@@ -118,7 +118,7 @@ void vo_osx_update_xinerama_info(void)
|
||||
[oglv update_screen_info];
|
||||
}
|
||||
|
||||
-void vo_osx_swap_buffers(void)
|
||||
+void vo_osx_swap_buffers(struct MPGLContext *)
|
||||
{
|
||||
[oglv->glContext flushBuffer];
|
||||
}
|
||||
97
packages/mplayer/mplayer-1.5-ffmpeg-7.1.patch
Normal file
97
packages/mplayer/mplayer-1.5-ffmpeg-7.1.patch
Normal file
@@ -0,0 +1,97 @@
|
||||
https://gitlab.archlinux.org/archlinux/packaging/packages/mplayer/-/blob/2ed3ad82c1bfe3a9afb46b7ea80e83ef52a16c4f/ffmpeg-7.patch
|
||||
|
||||
Index: libao2/ao_jack.c
|
||||
===================================================================
|
||||
--- a/libao2/ao_jack.c (revisión: 38542)
|
||||
+++ b/libao2/ao_jack.c (copia de trabajo)
|
||||
@@ -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);
|
||||
@@ -125,12 +126,12 @@
|
||||
*/
|
||||
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);
|
||||
+ 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(buffer, &di, cnt * num_bufs * sizeof(float));
|
||||
return cnt;
|
||||
}
|
||||
|
||||
@@ -242,7 +243,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,7 +303,7 @@
|
||||
free(client_name);
|
||||
if (client)
|
||||
jack_client_close(client);
|
||||
- av_fifo_free(buffer);
|
||||
+ av_fifo_freep2(&buffer);
|
||||
buffer = NULL;
|
||||
return 0;
|
||||
}
|
||||
@@ -315,7 +316,7 @@
|
||||
reset();
|
||||
usec_sleep(100 * 1000);
|
||||
jack_client_close(client);
|
||||
- av_fifo_free(buffer);
|
||||
+ av_fifo_freep2(&buffer);
|
||||
buffer = NULL;
|
||||
}
|
||||
|
||||
@@ -324,7 +325,7 @@
|
||||
*/
|
||||
static void reset(void) {
|
||||
paused = 1;
|
||||
- av_fifo_reset(buffer);
|
||||
+ av_fifo_reset2(buffer);
|
||||
paused = 0;
|
||||
}
|
||||
|
||||
@@ -343,7 +344,7 @@
|
||||
}
|
||||
|
||||
static int get_space(void) {
|
||||
- return av_fifo_space(buffer);
|
||||
+ return av_fifo_can_write(buffer);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -357,7 +358,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;
|
||||
@@ -4,6 +4,7 @@ TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Joshua Kahn @TomJo2000"
|
||||
# Update both mpv and mpv-x to the same version in one PR.
|
||||
TERMUX_PKG_VERSION="0.39.0"
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/mpv-player/mpv/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=2ca92437affb62c2b559b4419ea4785c70d023590500e8a52e95ea3ab4554683
|
||||
TERMUX_PKG_AUTO_UPDATE=false
|
||||
|
||||
@@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="blingful TUIs and character graphics"
|
||||
TERMUX_PKG_LICENSE="Apache-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION="3.0.11"
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/dankamongmen/notcurses/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=acc8809b457935a44c4dcaf0ee505ada23594f08aa2ae610acb6f2355afd550a
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
|
||||
@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="pianobar is a free/open-source, console-based client for
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=2022.04.01
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://github.com/PromyLOPh/pianobar/archive/${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=2653c6659a141868625ab24ecf04210d20347d50e0bd03e670e2daefa9f4fb2d
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
@@ -11,6 +11,25 @@ TERMUX_PKG_UPDATE_TAG_TYPE="newest-tag"
|
||||
TERMUX_PKG_DEPENDS="libao, ffmpeg, libgcrypt, libcurl, json-c"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
termux_step_pre_configure() {
|
||||
declare -a _commits=(
|
||||
8bf4c1bb
|
||||
)
|
||||
|
||||
declare -a _checksums=(
|
||||
ab8f7539189a21064b1773551b393df16c34a371d23f38bf5394ca7b6e0ec411
|
||||
)
|
||||
|
||||
for i in "${!_commits[@]}"; do
|
||||
PATCHFILE="${TERMUX_PKG_CACHEDIR}/pianobar_patch_${_commits[i]}.patch"
|
||||
termux_download \
|
||||
"https://github.com/PromyLOPh/pianobar/commit/${_commits[i]}.patch" \
|
||||
"$PATCHFILE" \
|
||||
"${_checksums[i]}"
|
||||
patch -p1 -i "$PATCHFILE"
|
||||
done
|
||||
}
|
||||
|
||||
termux_step_post_make_install(){
|
||||
#install useful script
|
||||
install -Dm755 "$TERMUX_PKG_SRCDIR"/contrib/headless_pianobar "$TERMUX_PREFIX"/bin/pianoctl
|
||||
|
||||
@@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="MIT, LGPL-2.1, LGPL-3.0, GPL-2.0"
|
||||
TERMUX_PKG_LICENSE_FILE="COPYING, LICENSE"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION="1.2.0"
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL="https://gitlab.freedesktop.org/pipewire/pipewire/-/archive/${TERMUX_PKG_VERSION}/pipewire-${TERMUX_PKG_VERSION}.tar.bz2"
|
||||
TERMUX_PKG_SHA256=a78516611257429633a1e020566cf03150a73d58c54e67bff936fd103d5bc6ce
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
|
||||
@@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="A simple audio normalizazion utility"
|
||||
TERMUX_PKG_LICENSE="BSD 2-Clause"
|
||||
TERMUX_PKG_MAINTAINER="Joshua Kahn @TomJo2000"
|
||||
TERMUX_PKG_VERSION="3.5.3"
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/complexlogic/rsgain/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=4288ecec00b0d907af86779b38874a2c4dcd67005f1b7fe09f6767ac5dc8e7a6
|
||||
TERMUX_PKG_DEPENDS='taglib, libc++, libinih, libebur128, ffmpeg'
|
||||
|
||||
@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A terminal image and video viewer"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION="1.6.0"
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=https://github.com/hzeller/timg/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=9e1b99b4eaed82297ad2ebbde02e3781775e3bba6d3e298d7598be5f4e1c49af
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
|
||||
@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A post-processing tool for scanned sheets of paper"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1:7.0.0
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://github.com/unpaper/unpaper/archive/refs/tags/unpaper-${TERMUX_PKG_VERSION#*:}.tar.gz
|
||||
TERMUX_PKG_SHA256=601b64b030edb4a734510a7bdcab371c7a33c4501f9a0e231e3d326df50e2313
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
|
||||
@@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="A library for playback of various streamed audio formats
|
||||
TERMUX_PKG_LICENSE="ISC"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION="1951"
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/vgmstream/vgmstream/archive/refs/tags/r${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=d70df729a6a6c5b75a648374fac78c2a27ec6858716da80543f71958d2500065
|
||||
TERMUX_PKG_AUTO_UPDATE=true
|
||||
|
||||
Reference in New Issue
Block a user