Update to 1.2.13

This commit is contained in:
Neal Gompa 2023-03-12 13:12:52 -04:00
parent 86d512f4c7
commit 6de5350a6f
7 changed files with 206 additions and 105 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ xine-lib-1.1.19-pruned.tar.bz2
/xine-lib-1.1.20.1-pruned.tar.xz
/xine-lib-1.1.21-pruned.tar.xz
/xine-lib-1.2.12.tar.xz
/xine-lib-1.2.13.tar.xz

View File

@ -1,35 +0,0 @@
diff -uNrp a/src/combined/ffmpeg/ffmpeg_compat.h b/src/combined/ffmpeg/ffmpeg_compat.h
--- a/src/combined/ffmpeg/ffmpeg_compat.h 2022-03-06 16:31:23.000000000 +0000
+++ b/src/combined/ffmpeg/ffmpeg_compat.h 2022-08-09 12:09:50.709059577 +0100
@@ -19,6 +19,8 @@
*
* Compability macros for various ffmpeg versions
*/
+#include <libavcodec/version.h>
+#include <libavutil/version.h>
#ifndef XINE_AVCODEC_COMPAT_H
#define XINE_AVCODEC_COMPAT_H
diff -uNrp a/src/combined/ffmpeg/ffmpeg_decoder.h b/src/combined/ffmpeg/ffmpeg_decoder.h
--- a/src/combined/ffmpeg/ffmpeg_decoder.h 2022-03-06 16:31:23.000000000 +0000
+++ b/src/combined/ffmpeg/ffmpeg_decoder.h 2022-08-09 12:42:16.081772933 +0100
@@ -17,6 +17,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*/
+#include <libavcodec/version.h>
+#include <libavformat/avformat.h>
#ifndef HAVE_XINE_DECODER_H
#define HAVE_XINE_DECODER_H
diff -uNrp a/src/combined/ffmpeg/input_avio.c b/src/combined/ffmpeg/input_avio.c
--- a/src/combined/ffmpeg/input_avio.c 2022-03-06 16:31:23.000000000 +0000
+++ b/src/combined/ffmpeg/input_avio.c 2022-08-09 11:33:54.527895581 +0100
@@ -28,6 +28,7 @@
#include <string.h>
#include <pthread.h>
+#include <libavutil/avutil.h>
#include <libavformat/avio.h>
#define LOG_MODULE "libavio"

View File

@ -1 +1 @@
SHA512 (xine-lib-1.2.12.tar.xz) = cdc913d0c78a3a34bd6e4060040fd844f22dbc673330e30769c83e9682a46f3369af8f59bd0c759ddc601de979b13d53e7ed10c54f3b78bdc63afceb484826be
SHA512 (xine-lib-1.2.13.tar.xz) = 088a446dd962c3cef621b56edd48fa2e1b47566108b4097d74899a9e5316a1f205993041d3070f45b706f168837579811e5e98c7e52ec278c683379407084bc4

View File

@ -1,40 +0,0 @@
# HG changeset patch
# User Petri Hintukainen <phintuka@users.sourceforge.net>
# Date 1648142359 -7200
# Thu Mar 24 19:19:19 2022 +0200
# Node ID 97248a71021428baa49e2b2af34f566a3257452a
# Parent b044102cc61810eec217d3911028ec18f87408cc
dav1d 1.0.0 support
https://sourceforge.net/p/xine/tickets/11/
diff -r b044102cc618 -r 97248a710214 ChangeLog
--- a/ChangeLog Thu Mar 17 14:05:08 2022 +0200
+++ b/ChangeLog Thu Mar 24 19:19:19 2022 +0200
@@ -1,3 +1,5 @@
+ * Add dav1d 1.0.0 support.
+
xine-lib (1.2.12) 2022-03-09
* Add string tree library (generic info parser).
* Add OpenSL ES audio output plugin.
diff -r b044102cc618 -r 97248a710214 src/video_dec/dav1d.c
--- a/src/video_dec/dav1d.c Thu Mar 17 14:05:08 2022 +0200
+++ b/src/video_dec/dav1d.c Thu Mar 24 19:19:19 2022 +0200
@@ -544,11 +544,17 @@
/* multithreading */
ncpu = xine_cpu_count();
+#if DAV1D_API_VERSION_MAJOR > 5
+ settings.n_threads = ncpu + 1;
+ xprintf(stream->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": "
+ "Using %d threads\n", settings.n_threads);
+#else
settings.n_frame_threads = (ncpu > 8) ? 4 : (ncpu < 2) ? 1 : ncpu/2;
settings.n_tile_threads = MAX(1, ncpu - settings.n_frame_threads + 1);
xprintf(stream->xine, XINE_VERBOSITY_DEBUG, LOG_MODULE ": "
"Using %d frame threads, %d tile threads\n",
settings.n_frame_threads, settings.n_tile_threads);
+#endif
/* dri frame allocator */
settings.allocator.cookie = this;

View File

@ -1,22 +0,0 @@
# HG changeset patch
# User Xavier Bachelot <xavier@bachelot.org>
# Date 1646916446 -3600
# Thu Mar 10 13:47:26 2022 +0100
# Node ID 6488085f778dd8115562ca308e2a60b502954dfc
# Parent 41217d6440d1f52478180d7e477aa7e7df953507
Fix build with older libcaca
This was introduced in 3f383e
diff -r 41217d6440d1 -r 6488085f778d src/video_out/video_out_caca.c
--- a/src/video_out/video_out_caca.c Wed Mar 09 15:12:14 2022 +0200
+++ b/src/video_out/video_out_caca.c Thu Mar 10 13:47:26 2022 +0100
@@ -44,7 +44,7 @@
# define caca_get_canvas_height cucul_get_canvas_height
# define caca_free_canvas cucul_free_canvas
# define caca_dither_t cucul_dither_t
-# define caca_create_dither define cucul_create_dither
+# define caca_create_dither cucul_create_dither
# define caca_dither_bitmap cucul_dither_bitmap
# define caca_free_dither cucul_free_dither
#endif

View File

@ -0,0 +1,196 @@
# HG changeset patch
# User Torsten Jager <t.jager@gmx.de>
# Date 1674929040 -3600
# Sat Jan 28 19:04:00 2023 +0100
# Node ID 771f4ae27e582123ff3500444718fc8f96186d74
# Parent 250f1c09f4244c3e7ca7d414410c57bd387792c3
ffmpeg compatibility update.
diff -r 250f1c09f424 -r 771f4ae27e58 src/combined/ffmpeg/demux_avformat.c
--- a/src/combined/ffmpeg/demux_avformat.c Wed Jan 25 17:03:55 2023 +0100
+++ b/src/combined/ffmpeg/demux_avformat.c Sat Jan 28 19:04:00 2023 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013-2022 the xine project
+ * Copyright (C) 2013-2023 the xine project
* Copyright (C) 2013-2020 Petri Hintukainen <phintuka@users.sourceforge.net>
*
* This file is part of xine, a free video player.
@@ -423,8 +423,13 @@
}
#ifdef XFF_CODECPAR
+# if XFF_AUDIO_CHANNEL_LAYOUT < 2
if (st->codecpar && st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO &&
st->codecpar->sample_rate != 0 && st->codecpar->channels != 0)
+# else
+ if (st->codecpar && st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO &&
+ st->codecpar->sample_rate != 0 && st->codecpar->ch_layout.nb_channels != 0)
+# endif
#else
if (st->codec && st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
st->codec->sample_rate != 0 && st->codec->channels != 0)
@@ -501,7 +506,11 @@
buf->size = extradata_size + sizeof(xine_waveformatex);
buf->decoder_info[1] = ctx->sample_rate;
buf->decoder_info[2] = ctx->bits_per_coded_sample;
+#if XFF_AUDIO_CHANNEL_LAYOUT < 2
buf->decoder_info[3] = ctx->channels;
+#else
+ buf->decoder_info[3] = ctx->ch_layout.nb_channels;
+#endif
buf->decoder_flags = BUF_FLAG_HEADER | BUF_FLAG_STDHEADER | BUF_FLAG_FRAME_END;
this->stream->audio_fifo->put (this->stream->audio_fifo, buf);
diff -r 250f1c09f424 -r 771f4ae27e58 src/combined/ffmpeg/ff_audio_decoder.c
--- a/src/combined/ffmpeg/ff_audio_decoder.c Wed Jan 25 17:03:55 2023 +0100
+++ b/src/combined/ffmpeg/ff_audio_decoder.c Sat Jan 28 19:04:00 2023 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2001-2022 the xine project
+ * Copyright (C) 2001-2023 the xine project
*
* This file is part of xine, a free video player.
*
@@ -303,7 +303,11 @@
this->context->bits_per_sample = this->ff_bits;
this->context->sample_rate = this->ff_sample_rate;
+#if XFF_AUDIO_CHANNEL_LAYOUT < 2
this->context->channels = this->ff_channels;
+#else
+ this->context->ch_layout.nb_channels = this->ff_channels;
+#endif
this->context->codec_id = this->codec->id;
this->context->codec_type = this->codec->type;
this->context->codec_tag = _x_stream_info_get(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC);
@@ -527,16 +531,75 @@
this->ao_mode = 0;
}
+static unsigned int ff_list_channels (uint8_t *list, uint64_t map) {
+ unsigned int n, bit;
+
+ for (n = bit = 0; map; map >>= 1, bit++) {
+ uint32_t b = map & 1;
+
+ list[n] = bit;
+ n += b;
+ }
+ return n;
+}
+
static void ff_map_channels (ff_audio_decoder_t *this) {
uint64_t ff_map;
+ uint8_t ff_list[64];
+ unsigned int ff_num;
+ const char *type = "native";
int caps = this->stream->audio_out->get_capabilities (this->stream->audio_out);
+#if XFF_AUDIO_CHANNEL_LAYOUT < 2
+
/* safety kludge for very old libavcodec */
-#ifdef AV_CH_FRONT_LEFT
+# ifdef AV_CH_FRONT_LEFT
ff_map = this->context->channel_layout;
if (!ff_map) /* wma2 bug */
+# endif
+ ff_map = ((uint64_t)1 << this->context->channels) - 1;
+ ff_num = ff_list_channels (ff_list, ff_map);
+
+#else /* XFF_AUDIO_CHANNEL_LAYOUT == 2 */
+
+ ff_num = this->context->ch_layout.nb_channels;
+ if (ff_num > (int)(sizeof (ff_list) / sizeof (ff_list[0])))
+ ff_num = sizeof (ff_list) / sizeof (ff_list[0]);
+ switch (this->context->ch_layout.order) {
+ const AVChannelCustom *cmap;
+ unsigned int i;
+
+ case AV_CHANNEL_ORDER_UNSPEC:
+ type = "unknown";
+ goto _fallback;
+
+ case AV_CHANNEL_ORDER_NATIVE:
+ ff_map = this->context->ch_layout.u.mask;
+ if (!ff_map) /* wma2 bug */
+ ff_map = ((uint64_t)1 << ff_num) - 1;
+ ff_num = ff_list_channels (ff_list, ff_map);
+ break;
+
+ case AV_CHANNEL_ORDER_CUSTOM:
+ type = "custom";
+ if (!(cmap = this->context->ch_layout.u.map))
+ goto _fallback;
+ ff_map = 0;
+ for (i = 0; i < ff_num; i++) {
+ ff_list[i] = cmap[i].id;
+ ff_map |= (uint64_t)1 << ff_list[i];
+ }
+ break;
+
+ default:
+ type = "unsupported";
+ /* fall through */
+ _fallback:
+ ff_map = ((uint64_t)1 << ff_num) - 1;
+ ff_num = ff_list_channels (ff_list, ff_map);
+ }
+
#endif
- ff_map = ((uint64_t)1 << this->context->channels) - 1;
if ((caps != this->ao_caps) || (ff_map != this->ff_map)) {
unsigned int i, j;
@@ -562,7 +625,7 @@
this->ao_caps = caps;
this->ff_map = ff_map;
- this->ff_channels = this->context->channels;
+ this->ff_channels = ff_num;
/* silence out */
for (i = 0; i < MAX_CHANNELS; i++)
@@ -576,20 +639,23 @@
this->left[0] = this->right[0] = 0;
tries = wishlist + 0 * num_modes;
} else if (this->ff_channels == 2) { /* stereo */
+ /* FIXME: libxine does not yet support audio selection _after_ decoding.
+ * For now, treat the most common "dual mono" case as stereo. */
name_map[0] = 0;
name_map[1] = 1;
this->left[0] = 0;
this->right[0] = 1;
tries = wishlist + 1 * num_modes;
} else {
- for (i = j = 0; i < sizeof (base_map) / sizeof (base_map[0]); i++) {
- if ((ff_map >> i) & 1) {
- int8_t target = base_map[i];
- if ((target >= 0) && (this->map[target] < 0))
- this->map[target] = j;
- name_map[j] = i; /* for debug output below */
- j++;
- }
+ for (i = 0; i < ff_num; i++) {
+ int8_t target;
+ uint32_t num = ff_list[i];
+ if (num >= sizeof (base_map) / sizeof (base_map[0]))
+ continue;
+ target = base_map[num];
+ if ((target >= 0) && (this->map[target] < 0))
+ this->map[target] = i;
+ name_map[i] = num; /* for debug output below */
}
this->left[0] = this->map[0] < 0 ? 0 : this->map[0];
this->map[0] = -1;
@@ -641,8 +707,8 @@
"rear center",
"side left", "side right"
};
- int8_t buf[200];
- int p = sprintf (buf, "ff_audio_dec: channel layout: ");
+ int8_t buf[256];
+ int p = sprintf (buf, "ff_audio_dec: %s channel layout: ", type);
int8_t *indx = this->left;
for (i = 0; i < 2; i++) {
buf[p++] = '[';

View File

@ -29,8 +29,8 @@
Summary: A multimedia engine
Name: xine-lib
Version: 1.2.12
Release: 11%{?snapshot:.%{date}hg%{revision}}%{?dist}
Version: 1.2.13
Release: 1%{?dist}
License: GPL-2.0-or-later
URL: https://www.xine-project.org/
%if ! 0%{?snapshot}
@ -41,11 +41,9 @@ Source0: xine-lib-%{version}-%{date}hg%{revision}.tar.xz
# Script to make a snapshot
Source1: make_xinelib_snapshot.sh
# https://sourceforge.net/p/xine/xine-lib-1.2/ci/928cdea835e656d6e1411c767eace0d10b6cc452/
Patch1: xine-lib-1.2.12-fix_older_libcaca.patch
# https://sourceforge.net/p/xine/xine-lib-1.2/ci/97248a71021428baa49e2b2af34f566a3257452a/
Patch2: xine-lib-1.2.12-dav1d_100_support.patch
Patch3: ffmpeg51.patch
# ffmpeg6 compatibility
# See: https://sourceforge.net/p/xine/xine-lib-1.2/ci/771f4ae27e582123ff3500444718fc8f96186d74/
Patch0: xine-lib-1.2.13-ffmpeg6-compatibility.patch
Provides: xine-lib(plugin-abi) = %{plugin_abi}
Provides: xine-lib(plugin-abi)%{?_isa} = %{plugin_abi}
@ -330,6 +328,9 @@ mkdir -p %{buildroot}%{codecdir}
%changelog
* Sun Mar 12 2023 Neal Gompa <ngompa@fedoraproject.org> - 1.2.13-1
- Update to 1.2.13
* Wed Feb 15 2023 Tom Callaway <spot@fedoraproject.org> - 1.2.12-11
- rebuild for libvpx