Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Apr 2023 12:04:20 GMT
From:      Daniel Engberg <diizzy@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: e20a7d8cb314 - main - multimedia/libxine: Update to 1.2.13
Message-ID:  <202304271204.33RC4K2k046556@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e20a7d8cb314dfcfc84b52f1534a3f20feff31dd

commit e20a7d8cb314dfcfc84b52f1534a3f20feff31dd
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2023-04-27 10:50:08 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2023-04-27 12:01:45 +0000

    multimedia/libxine: Update to 1.2.13
    
    Include upstream commits for FFmpeg 6 support
    
    Changelog: https://sourceforge.net/projects/xine/files/xine-lib/1.2.13/
    
    PR:             270291
    Tested by:      fernape
---
 multimedia/libxine/Makefile                        |  12 +-
 multimedia/libxine/distinfo                        |   6 +-
 multimedia/libxine/files/patch-dav1d-1.0           |  47 -------
 .../libxine/files/patch-include-xine-xineutils.h   |  22 ---
 .../patch-src_combined_ffmpeg_demux__avformat.c    |  35 +++++
 .../patch-src_combined_ffmpeg_ff__audio__decoder.c | 152 +++++++++++++++++++++
 multimedia/libxine/pkg-plist                       |   2 +-
 7 files changed, 197 insertions(+), 79 deletions(-)

diff --git a/multimedia/libxine/Makefile b/multimedia/libxine/Makefile
index a873625481fb..a38dad5418a9 100644
--- a/multimedia/libxine/Makefile
+++ b/multimedia/libxine/Makefile
@@ -1,10 +1,9 @@
 PORTNAME=	xine
-DISTVERSION=	1.2.12
-PORTREVISION=	6
+DISTVERSION=	1.2.13
 CATEGORIES=	multimedia
-MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-lib/${PORTVERSION}
+MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-lib/${DISTVERSION}
 PKGNAMEPREFIX=	lib
-DISTNAME=	${PORTNAME}-lib-${PORTVERSION}
+DISTNAME=	${PORTNAME}-lib-${DISTVERSION}
 
 MAINTAINER=	ports@FreeBSD.org
 COMMENT=	Libraries for xine multimedia player
@@ -50,7 +49,8 @@ USE_LDCONFIG=	yes
 CONFIGURE_ARGS=	--with-libflac \
 		--enable-musepack \
 		--enable-real-codecs \
-		--without-esound
+		--without-esound \
+		--disable-crypto
 
 MAKE_ENV=	V=1
 MAKE_ARGS=	pkgdatadir="${DATADIR}" \
@@ -62,7 +62,7 @@ CFLAGS_i386=	-fomit-frame-pointer
 DOCSDIR=	${PREFIX}/share/doc/xine-lib
 # Please sync with XINE_PLUGINSDIR in multimedia/xine
 # and multimedia/vdr-plugin-xineliboutput
-PLUGINSDIR=	lib/xine/plugins/2.10
+PLUGINSDIR=	lib/xine/plugins/2.11
 PLIST_SUB=	PLUGINSDIR="${PLUGINSDIR}"
 
 OPTIONS_DEFINE=		AALIB ALSA AOM CACA DAV1D DOCS DMX_IMAGE DVB \
diff --git a/multimedia/libxine/distinfo b/multimedia/libxine/distinfo
index a072dcd0da74..15caf696f97f 100644
--- a/multimedia/libxine/distinfo
+++ b/multimedia/libxine/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1646930905
-SHA256 (xine-lib-1.2.12.tar.xz) = d606270468e1540c2a89c0d7f5fdf11e17ecc0c2698cc0bcb1065ff26abee098
-SIZE (xine-lib-1.2.12.tar.xz) = 5341212
+TIMESTAMP = 1679084820
+SHA256 (xine-lib-1.2.13.tar.xz) = 5f10d6d718a4a51c17ed1b32b031d4f9b80b061e8276535b2be31e5ac4b75e6f
+SIZE (xine-lib-1.2.13.tar.xz) = 5004196
diff --git a/multimedia/libxine/files/patch-dav1d-1.0 b/multimedia/libxine/files/patch-dav1d-1.0
deleted file mode 100644
index e18689712281..000000000000
--- a/multimedia/libxine/files/patch-dav1d-1.0
+++ /dev/null
@@ -1,47 +0,0 @@
-https://sourceforge.net/p/xine/tickets/11/
-
-dav1d.c:547:12: error: no member named 'n_frame_threads' in 'struct Dav1dSettings'
-  settings.n_frame_threads = (ncpu > 8) ? 4 : (ncpu < 2) ? 1 : ncpu/2;
-  ~~~~~~~~ ^
-dav1d.c:548:12: error: no member named 'n_tile_threads' in 'struct Dav1dSettings'
-  settings.n_tile_threads = MAX(1, ncpu - settings.n_frame_threads + 1);
-  ~~~~~~~~ ^
-dav1d.c:548:52: error: no member named 'n_frame_threads' in 'struct Dav1dSettings'
-  settings.n_tile_threads = MAX(1, ncpu - settings.n_frame_threads + 1);
-                                          ~~~~~~~~ ^
-dav1d.c:548:52: error: no member named 'n_frame_threads' in 'struct Dav1dSettings'
-  settings.n_tile_threads = MAX(1, ncpu - settings.n_frame_threads + 1);
-                                          ~~~~~~~~ ^
-/usr/include/sys/param.h:306:34: note: expanded from macro 'MAX'
-#define MAX(a,b) (((a)>(b))?(a):(b))
-                                 ^
-dav1d.c:551:22: error: no member named 'n_frame_threads' in 'struct Dav1dSettings'
-            settings.n_frame_threads, settings.n_tile_threads);
-            ~~~~~~~~ ^
-dav1d.c:551:48: error: no member named 'n_tile_threads' in 'struct Dav1dSettings'
-            settings.n_frame_threads, settings.n_tile_threads);
-                                      ~~~~~~~~ ^
-../../include/xine/xineutils.h:687:40: note: expanded from macro 'xprintf'
-        xine_log(xine, XINE_LOG_TRACE, __VA_ARGS__);                        \
-                                       ^~~~~~~~~~~
-
---- src/video_dec/dav1d.c.orig	2022-03-06 16:31:24 UTC
-+++ src/video_dec/dav1d.c
-@@ -544,11 +544,17 @@ static video_decoder_t *_open_plugin(video_decoder_cla
- 
-   /* 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;
diff --git a/multimedia/libxine/files/patch-include-xine-xineutils.h b/multimedia/libxine/files/patch-include-xine-xineutils.h
deleted file mode 100644
index 93609a722522..000000000000
--- a/multimedia/libxine/files/patch-include-xine-xineutils.h
+++ /dev/null
@@ -1,22 +0,0 @@
-Unbreak build of phonon-xine
-
-In file included from xine/plugins.c:23:
-In file included from /usr/local/include/xine/input_plugin.h:27:
-/usr/local/include/xine/xineutils.h:197:8: error: unknown type name 'inline'
-static inline void _x_freep(void *ptr) {
-       ^
-/usr/local/include/xine/xineutils.h:197:15: error: expected identifier or '('
-static inline void _x_freep(void *ptr) {
-              ^
-
---- include/xine/xineutils.h.orig
-+++ include/xine/xineutils.h
-@@ -146,7 +146,7 @@ void *xine_xcalloc(size_t nmemb, size_t 
-  * Free allocated memory and set pointer to NULL
-  * @param ptr Pointer to the pointer to the memory block which should be freed.
-  */
--static inline void _x_freep(void *ptr) {
-+static void _x_freep(void *ptr) {
-   void **p = (void **)ptr;
-   free (*p);
-   *p = NULL;
diff --git a/multimedia/libxine/files/patch-src_combined_ffmpeg_demux__avformat.c b/multimedia/libxine/files/patch-src_combined_ffmpeg_demux__avformat.c
new file mode 100644
index 000000000000..954c65f363e8
--- /dev/null
+++ b/multimedia/libxine/files/patch-src_combined_ffmpeg_demux__avformat.c
@@ -0,0 +1,35 @@
+--- src/combined/ffmpeg/demux_avformat.c.orig	2022-09-08 21:43:29 UTC
++++ src/combined/ffmpeg/demux_avformat.c
+@@ -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 @@ static int find_avformat_streams(avformat_demux_plugin
+     }
+ 
+ #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 @@ static void send_headers_audio(avformat_demux_plugin_t
+   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 --git a/multimedia/libxine/files/patch-src_combined_ffmpeg_ff__audio__decoder.c b/multimedia/libxine/files/patch-src_combined_ffmpeg_ff__audio__decoder.c
new file mode 100644
index 000000000000..2108a84e9540
--- /dev/null
+++ b/multimedia/libxine/files/patch-src_combined_ffmpeg_ff__audio__decoder.c
@@ -0,0 +1,152 @@
+--- src/combined/ffmpeg/ff_audio_decoder.c.orig	2022-09-08 21:43:29 UTC
++++ src/combined/ffmpeg/ff_audio_decoder.c
+@@ -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 @@ static void ff_audio_init_codec(ff_audio_decoder_t *th
+ 
+   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,17 +531,76 @@ static void ff_audio_output_close(ff_audio_decoder_t *
+   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
++#  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
++
+   if ((caps != this->ao_caps) || (ff_map != this->ff_map)) {
+     unsigned int i, j;
+     /* ff: see names[] below; xine: L R RL RR C LFE */
+@@ -562,7 +625,7 @@ static void ff_map_channels (ff_audio_decoder_t *this)
+ 
+     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 @@ static void ff_map_channels (ff_audio_decoder_t *this)
+       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 @@ static void ff_map_channels (ff_audio_decoder_t *this)
+         "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++] = '[';
diff --git a/multimedia/libxine/pkg-plist b/multimedia/libxine/pkg-plist
index ef0cd825e3f3..f38f9f3d9003 100644
--- a/multimedia/libxine/pkg-plist
+++ b/multimedia/libxine/pkg-plist
@@ -49,7 +49,7 @@ lib/libxine.la
 lib/libxine-interface.la
 lib/libxine.so
 lib/libxine.so.2
-lib/libxine.so.2.10.0
+lib/libxine.so.2.11.0
 %%PLUGINSDIR%%/mime.types
 %%PLUGINSDIR%%/post/xineplug_post_audio_filters.so
 %%PLUGINSDIR%%/post/xineplug_post_goom.so



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202304271204.33RC4K2k046556>