public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Alexis Ballier" <aballier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/vlc/files/, media-video/vlc/
Date: Fri,  2 Sep 2016 09:19:02 +0000 (UTC)	[thread overview]
Message-ID: <1472807938.1e7e5cf5b4395cb2ff0207ca4749d11b95a6d4d5.aballier@gentoo> (raw)

commit:     1e7e5cf5b4395cb2ff0207ca4749d11b95a6d4d5
Author:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Fri Sep  2 09:18:37 2016 +0000
Commit:     Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Fri Sep  2 09:18:58 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1e7e5cf5

media-video/vlc: add patches to build with ffmpeg3, bug #574788

Package-Manager: portage-2.3.0

 media-video/vlc/files/vlc-2.2.4-ffmpeg3.patch      | 160 +++++++++++++++++++++
 media-video/vlc/files/vlc-2.2.4-relax_ffmpeg.patch |  45 ++++++
 media-video/vlc/vlc-2.2.4.ebuild                   |  15 +-
 3 files changed, 213 insertions(+), 7 deletions(-)

diff --git a/media-video/vlc/files/vlc-2.2.4-ffmpeg3.patch b/media-video/vlc/files/vlc-2.2.4-ffmpeg3.patch
new file mode 100644
index 00000000..3bc5954
--- /dev/null
+++ b/media-video/vlc/files/vlc-2.2.4-ffmpeg3.patch
@@ -0,0 +1,160 @@
+Index: vlc-2.2.4/configure.ac
+===================================================================
+--- vlc-2.2.4.orig/configure.ac
++++ vlc-2.2.4/configure.ac
+@@ -2323,8 +2323,8 @@ AC_ARG_ENABLE(avcodec,
+ [  --enable-avcodec        libavcodec codec (default enabled)])
+ AS_IF([test "${enable_avcodec}" != "no"], [
+   PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 53.34.0 libavutil >= 51.22.0], [
+-    PKG_CHECK_EXISTS([libavutil < 55],, [
+-      AC_MSG_ERROR([libavutil versions 55 and later are not supported.])
++    PKG_CHECK_EXISTS([libavutil < 56],, [
++      AC_MSG_ERROR([libavutil versions 56 and later are not supported.])
+     ])
+     VLC_SAVE_FLAGS
+     CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
+Index: vlc-2.2.4/modules/codec/avcodec/audio.c
+===================================================================
+--- vlc-2.2.4.orig/modules/codec/avcodec/audio.c
++++ vlc-2.2.4/modules/codec/avcodec/audio.c
+@@ -39,8 +39,6 @@
+ #include <libavcodec/avcodec.h>
+ #include <libavutil/mem.h>
+ 
+-#include <libavutil/audioconvert.h>
+-
+ #include "avcodec.h"
+ 
+ /*****************************************************************************
+Index: vlc-2.2.4/modules/codec/avcodec/encoder.c
+===================================================================
+--- vlc-2.2.4.orig/modules/codec/avcodec/encoder.c
++++ vlc-2.2.4/modules/codec/avcodec/encoder.c
+@@ -41,7 +41,6 @@
+ #include <vlc_cpu.h>
+ 
+ #include <libavcodec/avcodec.h>
+-#include <libavutil/audioconvert.h>
+ 
+ #include "avcodec.h"
+ #include "avcommon.h"
+@@ -311,7 +310,7 @@ int OpenEncoder( vlc_object_t *p_this )
+     else if( !GetFfmpegCodec( p_enc->fmt_out.i_codec, &i_cat, &i_codec_id,
+                              &psz_namecodec ) )
+     {
+-        if( FindFfmpegChroma( p_enc->fmt_out.i_codec ) == PIX_FMT_NONE )
++        if( FindFfmpegChroma( p_enc->fmt_out.i_codec ) == AV_PIX_FMT_NONE )
+             return VLC_EGENERIC; /* handed chroma output */
+ 
+         i_cat      = VIDEO_ES;
+@@ -555,7 +554,7 @@ int OpenEncoder( vlc_object_t *p_this )
+ 
+         if( p_codec->pix_fmts )
+         {
+-            const enum PixelFormat *p = p_codec->pix_fmts;
++            const enum AVPixelFormat *p = p_codec->pix_fmts;
+             for( ; *p != -1; p++ )
+             {
+                 if( *p == p_context->pix_fmt ) break;
+@@ -1017,7 +1016,7 @@ errmsg:
+         }
+     }
+ 
+-    p_sys->frame = avcodec_alloc_frame();
++    p_sys->frame = av_frame_alloc();
+     if( !p_sys->frame )
+     {
+         goto error;
+@@ -1088,7 +1087,7 @@ static block_t *EncodeVideo( encoder_t *
+     AVFrame *frame = NULL;
+     if( likely(p_pict) ) {
+         frame = p_sys->frame;
+-        avcodec_get_frame_defaults( frame );
++        av_frame_unref( frame );
+         for( i_plane = 0; i_plane < p_pict->i_planes; i_plane++ )
+         {
+             p_sys->frame->data[i_plane] = p_pict->p[i_plane].p_pixels;
+@@ -1329,7 +1328,7 @@ static block_t *handle_delay_buffer( enc
+     //How much we need to copy from new packet
+     const int leftover = leftover_samples * p_sys->p_context->channels * p_sys->i_sample_bytes;
+ 
+-    avcodec_get_frame_defaults( p_sys->frame );
++    av_frame_unref( p_sys->frame );
+     p_sys->frame->format     = p_sys->p_context->sample_fmt;
+     p_sys->frame->nb_samples = leftover_samples + p_sys->i_samples_delay;
+ 
+@@ -1451,7 +1450,7 @@ static block_t *EncodeAudio( encoder_t *
+     while( ( p_aout_buf->i_nb_samples >= p_sys->i_frame_size ) ||
+            ( p_sys->b_variable && p_aout_buf->i_nb_samples ) )
+     {
+-        avcodec_get_frame_defaults( p_sys->frame );
++        av_frame_unref( p_sys->frame );
+         if( p_sys->b_variable )
+             p_sys->frame->nb_samples = p_aout_buf->i_nb_samples;
+         else
+Index: vlc-2.2.4/modules/codec/avcodec/vaapi.c
+===================================================================
+--- vlc-2.2.4.orig/modules/codec/avcodec/vaapi.c
++++ vlc-2.2.4/modules/codec/avcodec/vaapi.c
+@@ -598,7 +598,7 @@ static int Create( vlc_va_t *p_va, AVCod
+         return err;
+ 
+     /* Only VLD supported */
+-    p_va->pix_fmt = PIX_FMT_VAAPI_VLD;
++    p_va->pix_fmt = AV_PIX_FMT_VAAPI_VLD;
+     p_va->setup = Setup;
+     p_va->get = Get;
+     p_va->release = Release;
+Index: vlc-2.2.4/modules/codec/avcodec/video.c
+===================================================================
+--- vlc-2.2.4.orig/modules/codec/avcodec/video.c
++++ vlc-2.2.4/modules/codec/avcodec/video.c
+@@ -108,8 +108,8 @@ static int lavc_GetFrame(struct AVCodecC
+ static int  ffmpeg_GetFrameBuf    ( struct AVCodecContext *, AVFrame * );
+ static void ffmpeg_ReleaseFrameBuf( struct AVCodecContext *, AVFrame * );
+ #endif
+-static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *,
+-                                          const enum PixelFormat * );
++static enum AVPixelFormat ffmpeg_GetFormat( AVCodecContext *,
++                                          const enum AVPixelFormat * );
+ 
+ static uint32_t ffmpeg_CodecTag( vlc_fourcc_t fcc )
+ {
+@@ -234,7 +234,7 @@ int InitVideoDec( decoder_t *p_dec, AVCo
+     p_sys->p_codec = p_codec;
+     p_sys->i_codec_id = i_codec_id;
+     p_sys->psz_namecodec = psz_namecodec;
+-    p_sys->p_ff_pic = avcodec_alloc_frame();
++    p_sys->p_ff_pic = av_frame_alloc();
+     p_sys->b_delayed_open = true;
+     p_sys->p_va = NULL;
+     vlc_sem_init( &p_sys->sem_mt, 0 );
+@@ -446,7 +446,7 @@ int InitVideoDec( decoder_t *p_dec, AVCo
+     if( ffmpeg_OpenCodec( p_dec ) < 0 )
+     {
+         msg_Err( p_dec, "cannot open codec (%s)", p_sys->psz_namecodec );
+-        avcodec_free_frame( &p_sys->p_ff_pic );
++        av_frame_free( &p_sys->p_ff_pic );
+         vlc_sem_destroy( &p_sys->sem_mt );
+         free( p_sys );
+         return VLC_EGENERIC;
+@@ -826,7 +826,7 @@ void EndVideoDec( decoder_t *p_dec )
+     wait_mt( p_sys );
+ 
+     if( p_sys->p_ff_pic )
+-        avcodec_free_frame( &p_sys->p_ff_pic );
++        av_frame_free( &p_sys->p_ff_pic );
+ 
+     if( p_sys->p_va )
+         vlc_va_Delete( p_sys->p_va );
+@@ -1313,8 +1313,8 @@ static void ffmpeg_ReleaseFrameBuf( stru
+ }
+ #endif
+ 
+-static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
+-                                          const enum PixelFormat *pi_fmt )
++static enum AVPixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
++                                          const enum AVPixelFormat *pi_fmt )
+ {
+     decoder_t *p_dec = p_context->opaque;
+     decoder_sys_t *p_sys = p_dec->p_sys;

diff --git a/media-video/vlc/files/vlc-2.2.4-relax_ffmpeg.patch b/media-video/vlc/files/vlc-2.2.4-relax_ffmpeg.patch
new file mode 100644
index 00000000..218af58
--- /dev/null
+++ b/media-video/vlc/files/vlc-2.2.4-relax_ffmpeg.patch
@@ -0,0 +1,45 @@
+commit b8869f97ea66ac7ec9912a74c2e8b5e15daf7752
+Author: Rafaël Carré <funman@videolan.org>
+Date:   Fri Feb 26 00:36:26 2016 +0000
+
+    Relax requirements for FFmpeg hwaccel
+    
+    It doesn't error out anymore since 5edd1f62ca1
+
+Index: vlc-2.2.4/configure.ac
+===================================================================
+--- vlc-2.2.4.orig/configure.ac
++++ vlc-2.2.4/configure.ac
+@@ -2383,7 +2383,9 @@ AS_IF([test "${have_vaapi}" = "yes" -a "
+   case "${avfork}" in
+     ffmpeg)
+       PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [
+-        AC_MSG_ERROR([VA API requires FFmpeg libavcodec < 57.10 or libav.])
++        PKG_CHECK_EXISTS([libavcodec <= 57.12.100], [
++          AC_MSG_ERROR([VA API requires FFmpeg libavcodec < 57.10 or > 57.12 or libav.])
++        ])
+       ])
+       ;;
+   esac
+@@ -2417,7 +2419,9 @@ AS_IF([test "${enable_dxva2}" != "no"],
+     case "${avfork}" in
+       ffmpeg)
+         PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [
+-          AC_MSG_ERROR([DXVA2 requires FFmpeg libavcodec < 57.10 or libav.])
++          PKG_CHECK_EXISTS([libavcodec <= 57.12.100], [
++            AC_MSG_ERROR([DXVA2 requires FFmpeg libavcodec < 57.10 or > 57.12 or libav.])
++          ])
+         ])
+         ;;
+     esac
+@@ -3181,7 +3185,9 @@ AS_IF([test "${have_vdpau}" = "yes" -a "
+     libav) av_vdpau_ver="55.26.0" ;;
+     ffmpeg) av_vdpau_ver="55.42.100"
+       PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [
+-        AC_MSG_ERROR([VDPAU requires FFmpeg libavcodec < 57.10 or libav.])
++        PKG_CHECK_EXISTS([libavcodec <= 57.12.100], [
++          AC_MSG_ERROR([VDPAU requires FFmpeg libavcodec < 57.10 or > 57.12 or libav.])
++        ])
+       ])
+       ;;
+   esac

diff --git a/media-video/vlc/vlc-2.2.4.ebuild b/media-video/vlc/vlc-2.2.4.ebuild
index d1958ac..7e3bd58 100644
--- a/media-video/vlc/vlc-2.2.4.ebuild
+++ b/media-video/vlc/vlc-2.2.4.ebuild
@@ -63,15 +63,13 @@ RDEPEND="
 	alsa? ( >=media-libs/alsa-lib-1.0.24:0 )
 	avcodec? (
 		!libav? (
-			>=media-video/ffmpeg-2.2:0=
-			<=media-video/ffmpeg-2.9:0=
+			>=media-video/ffmpeg-2.8:0=
 		)
 		libav? ( >=media-video/libav-11:0= )
 	)
 	avformat? (
 		!libav? (
-			>=media-video/ffmpeg-2.2:0=
-			<=media-video/ffmpeg-2.9:0=
+			>=media-video/ffmpeg-2.8:0=
 		)
 		libav? ( media-video/libav:0= )
 	)
@@ -157,7 +155,7 @@ RDEPEND="
 	v4l? ( media-libs/libv4l:0 )
 	vaapi? (
 		x11-libs/libva:0[X,drm]
-		!libav? ( <=media-video/ffmpeg-2.9:0=[vaapi] )
+		!libav? ( >=media-video/ffmpeg-2.8:0=[vaapi] )
 		libav? ( media-video/libav:0=[vaapi] )
 	)
 	vcdx? ( >=dev-libs/libcdio-0.78.2:0 >=media-video/vcdimager-0.7.22:0 )
@@ -170,8 +168,7 @@ RDEPEND="${RDEPEND}
 	vdpau? (
 		>=x11-libs/libvdpau-0.6:0
 		!libav? (
-					>=media-video/ffmpeg-2.2:0=
-					<=media-video/ffmpeg-2.9:0=
+					>=media-video/ffmpeg-2.8:0=
 		)
 		libav? ( >=media-video/libav-10:0= )
 	)
@@ -234,6 +231,10 @@ PATCHES=(
 
 	# Allow QT5.5 since Gentoo has a patched QTwidgets
 	"${FILESDIR}"/${PN}-2.2.2-qt5widgets.patch
+
+	# Bug #575072
+	"${FILESDIR}"/${PN}-2.2.4-relax_ffmpeg.patch
+	"${FILESDIR}"/${PN}-2.2.4-ffmpeg3.patch
 )
 
 S="${WORKDIR}/${MY_P}"


             reply	other threads:[~2016-09-02  9:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-02  9:19 Alexis Ballier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-29 21:35 [gentoo-commits] repo/gentoo:master commit in: media-video/vlc/files/, media-video/vlc/ Andreas Sturmlechner
2024-11-23 20:28 Andreas Sturmlechner
2023-12-05 13:41 Sam James
2023-06-03 21:01 Sam James
2022-10-28 15:57 Sam James
2022-04-07 22:33 Sam James
2021-05-04 22:47 Sam James
2020-12-25  2:35 Sam James
2020-04-21  9:22 Andreas Sturmlechner
2019-04-06 20:34 Andreas Sturmlechner
2018-08-15 12:36 Andreas Sturmlechner
2018-08-11 16:44 Andreas Sturmlechner
2018-05-31 21:16 Andreas Sturmlechner
2018-05-29 14:41 Andreas Sturmlechner
2018-04-10 21:45 Andreas Sturmlechner
2018-02-27 22:51 Andreas Sturmlechner
2017-12-25 17:42 Andreas Sturmlechner
2017-12-25 17:42 Andreas Sturmlechner
2017-12-09 13:52 Andreas Sturmlechner
2017-01-16  4:06 Aaron Bauman
2016-12-19 13:38 Lars Wendler
2016-02-09 19:51 Lars Wendler
2016-02-09  7:41 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1472807938.1e7e5cf5b4395cb2ff0207ca4749d11b95a6d4d5.aballier@gentoo \
    --to=aballier@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox