[SCM] vlc/experimental: try to build with ffmpeg3
mati75-guest at users.alioth.debian.org
mati75-guest at users.alioth.debian.org
Wed Oct 12 12:10:03 UTC 2016
The following commit has been merged in the experimental branch:
commit 85e0d5098600e177ea04a7702f1efc2663cd8adc
Author: Mateusz Łukasik <mati75 at linuxmint.pl>
Date: Wed Oct 12 14:09:42 2016 +0200
try to build with ffmpeg3
diff --git a/debian/changelog b/debian/changelog
index c7c39f4..9b91845 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+vlc (2.2.4-7) UNRELEASED; urgency=medium
+
+ *
+
+ -- Mateusz Łukasik <mati75 at linuxmint.pl> Thu, 29 Sep 2016 15:15:36 +0200
+
vlc (2.2.4-6) unstable; urgency=medium
* debian/*.maintscript: Bump all versions to fix symlink-to-directory
diff --git a/debian/control b/debian/control
index 7333961..618585e 100644
--- a/debian/control
+++ b/debian/control
@@ -20,8 +20,9 @@ Build-Depends: autopoint,
libass-dev (>= 0.9.8),
libavahi-client-dev,
libavc1394-dev (>= 0.5.3) [linux-any],
-# libavcodec-dev (>= 6:9),
-# libavformat-dev (>= 4:0.6),
+ libavcodec-dev (>= 6:9),
+ libavformat-dev (>= 4:0.6),
+ libavutil-dev,
libbluray-dev (>= 1:0.3.0),
libcaca-dev (>= 0.99.beta4),
libcairo2-dev (>= 1.13.1),
@@ -67,7 +68,7 @@ Build-Depends: autopoint,
libomxil-bellagio-dev [linux-any],
libopus-dev (>= 1.0.3),
libpng-dev,
-# libpostproc-dev (>= 4:0.6),
+ libpostproc-dev (>= 4:0.6),
libpulse-dev (>= 1.0),
libqt5x11extras5-dev,
libraw1394-dev (>= 2.0.1) [linux-any],
@@ -85,7 +86,7 @@ Build-Depends: autopoint,
libspeex-dev (>= 1.0.5),
libspeexdsp-dev (>= 1.0.5),
libssh2-1-dev,
-# libswscale-dev (>= 4:0.6),
+ libswscale-dev (>= 4:0.6),
libtag1-dev (>= 1.9),
libtheora-dev (>= 1.0),
libtwolame-dev (>= 0.3.8),
@@ -118,22 +119,7 @@ Build-Depends: autopoint,
python3,
qtbase5-dev (>= 5.1),
zlib1g-dev,
- zsh,
-# for embedded ffmpeg
- libbz2-dev,
- libgme-dev,
- libgsm1-dev,
- liblzma-dev,
- libmp3lame-dev,
- librtmp-dev,
- libsnappy-dev,
- libsoxr-dev,
- libssh-gcrypt-dev,
- libvpx-dev,
- libwavpack-dev,
- libwebp-dev,
- libxvidcore-dev,
- yasm
+ zsh
Standards-Version: 3.9.8
Homepage: http://www.videolan.org/vlc/
Vcs-Git: https://anonscm.debian.org/git/pkg-multimedia/vlc.git
diff --git a/debian/patches/ffmpeg3.patch b/debian/patches/ffmpeg3.patch
new file mode 100644
index 0000000..c0d06a9
--- /dev/null
+++ b/debian/patches/ffmpeg3.patch
@@ -0,0 +1,208 @@
+diff -ruNp vlc-2.2.3.orig/configure.ac vlc-2.2.3/configure.ac
+--- vlc-2.2.3.orig/configure.ac 2016-04-05 02:45:40.000000000 +0200
++++ vlc-2.2.3/configure.ac 2016-05-21 19:19:05.527202127 +0200
+@@ -2323,9 +2323,6 @@ 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.])
+- ])
+ VLC_SAVE_FLAGS
+ CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
+ CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
+@@ -2382,9 +2379,6 @@ have_avcodec_vaapi="no"
+ AS_IF([test "${have_vaapi}" = "yes" -a "${have_avcodec}" = "yes"], [
+ case "${avfork}" in
+ ffmpeg)
+- PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [
+- AC_MSG_ERROR([VA API requires FFmpeg libavcodec < 57.10 or libav.])
+- ])
+ ;;
+ esac
+ VLC_SAVE_FLAGS
+@@ -2416,9 +2410,6 @@ AS_IF([test "${enable_dxva2}" != "no"],
+ AS_IF([test "x${have_avcodec}" = "xyes"], [
+ case "${avfork}" in
+ ffmpeg)
+- PKG_CHECK_EXISTS([libavcodec >= 57.10.100], [
+- AC_MSG_ERROR([DXVA2 requires FFmpeg libavcodec < 57.10 or libav.])
+- ])
+ ;;
+ esac
+ AC_CHECK_HEADERS(dxva2api.h,
+@@ -3180,9 +3171,6 @@ AS_IF([test "${have_vdpau}" = "yes" -a "
+ case "${avfork}" in
+ 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.])
+- ])
+ ;;
+ esac
+ PKG_CHECK_EXISTS([libavutil >= 52.4.0 libavcodec >= ${av_vdpau_ver}], [
+diff -ruNp vlc-2.2.3.orig/modules/codec/avcodec/audio.c vlc-2.2.3/modules/codec/avcodec/audio.c
+--- vlc-2.2.3.orig/modules/codec/avcodec/audio.c 2015-12-08 17:18:56.000000000 +0100
++++ vlc-2.2.3/modules/codec/avcodec/audio.c 2016-05-21 19:19:05.527202127 +0200
+@@ -39,7 +39,6 @@
+ #include <libavcodec/avcodec.h>
+ #include <libavutil/mem.h>
+
+-#include <libavutil/audioconvert.h>
+
+ #include "avcodec.h"
+
+diff -ruNp vlc-2.2.3.orig/modules/codec/avcodec/encoder.c vlc-2.2.3/modules/codec/avcodec/encoder.c
+--- vlc-2.2.3.orig/modules/codec/avcodec/encoder.c 2015-10-21 18:36:45.000000000 +0200
++++ vlc-2.2.3/modules/codec/avcodec/encoder.c 2016-05-21 19:19:07.451194268 +0200
+@@ -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
+@@ -1514,7 +1513,7 @@ void CloseEncoder( vlc_object_t *p_this
+ encoder_t *p_enc = (encoder_t *)p_this;
+ encoder_sys_t *p_sys = p_enc->p_sys;
+
+- /*FIXME: we should use avcodec_free_frame, but we don't require so new avcodec that has it*/
++ /*FIXME: we should use av_frame_free, but we don't require so new avcodec that has it*/
+ av_freep( &p_sys->frame );
+
+ vlc_avcodec_lock();
+diff -ruNp vlc-2.2.3.orig/modules/codec/avcodec/vaapi.c vlc-2.2.3/modules/codec/avcodec/vaapi.c
+--- vlc-2.2.3.orig/modules/codec/avcodec/vaapi.c 2014-11-16 19:57:58.000000000 +0100
++++ vlc-2.2.3/modules/codec/avcodec/vaapi.c 2016-05-21 19:19:07.452194264 +0200
+@@ -595,7 +595,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;
+diff -ruNp vlc-2.2.3.orig/modules/codec/avcodec/video.c vlc-2.2.3/modules/codec/avcodec/video.c
+--- vlc-2.2.3.orig/modules/codec/avcodec/video.c 2016-04-05 02:45:24.000000000 +0200
++++ vlc-2.2.3/modules/codec/avcodec/video.c 2016-05-21 19:19:07.453194260 +0200
+@@ -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;
+@@ -1341,6 +1341,15 @@ static enum PixelFormat ffmpeg_GetFormat
+ if (!can_hwaccel)
+ goto end;
+
++#if (LIBAVCODEC_VERSION_MICRO >= 100) /* FFmpeg only */
++ if (p_context->active_thread_type)
++ {
++ msg_Warn(p_dec, "thread type %d: disabling hardware acceleration",
++ p_context->active_thread_type);
++ goto end;
++ }
++#endif
++
+ /* Profile and level information is needed now.
+ * TODO: avoid code duplication with avcodec.c */
+ if( p_context->profile != FF_PROFILE_UNKNOWN)
diff --git a/debian/patches/series b/debian/patches/series
index b278588..1ca98f3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ generated-mimetypes.patch
vlc_atomic-atomic_compare_exchange_weak_explicit-tak.patch
vlc_atomic-atomic_compare_exchange_strong_explicit-t.patch
Fix-build-using-old-GCC-intrinsics.patch
+ffmpeg3.patch
diff --git a/debian/rules b/debian/rules
index f8bd46e..8eeba83 100755
--- a/debian/rules
+++ b/debian/rules
@@ -232,95 +232,6 @@ DEB_CXXFLAGS_MAINT_APPEND += -mtune=8548
endif
endif
-# configuration for embedded ffmpeg
-ffmpegprefix = $(CURDIR)/ffmpeg/install
-ffmpegbuild = $(CURDIR)/ffmpeg/build
-
-ffmpegflags = \
- --prefix=$(ffmpegprefix) \
- --enable-pic \
- --disable-stripping \
- --enable-static \
- --disable-shared
-
-# mostly based on contrib/src/ffmpeg/rules.mak
-ffmpegflags += \
- --disable-doc \
- --disable-avdevice \
- --disable-devices \
- --disable-avfilter \
- --disable-avresample \
- --disable-swresample \
- --disable-programs \
- --disable-filters \
- --disable-bsfs \
- --disable-protocol=concat
-
-# from ffmpeg 7:2.8.6-1 debian/rules and contrib/src/ffmpeg/rules.mak
-ffmpegflags += \
- --enable-gpl \
- --disable-decoder=libschroedinger \
- --enable-gnutls \
- --disable-libass \
- --enable-libbluray \
- --disable-libbs2b \
- --disable-libcaca \
- --disable-libcdio \
- --disable-libflite \
- --disable-libfontconfig \
- --disable-libfreetype \
- --disable-libfribidi \
- --disable-libopenjpeg \
- --enable-libgme \
- --enable-libgsm \
- --enable-libmodplug \
- --enable-libmp3lame \
- --enable-libopus \
- --enable-librtmp \
- --enable-libschroedinger \
- --enable-libshine \
- --enable-libsnappy \
- --enable-libsoxr \
- --enable-libspeex \
- --enable-libssh \
- --enable-libtheora \
- --enable-libtwolame \
- --enable-libvorbis \
- --enable-libvpx \
- --enable-libwavpack \
- --enable-libwebp \
- --enable-libx265 \
- --enable-libxvid \
- --enable-libzvbi \
- --disable-openal \
- --disable-opengl \
- --disable-x11grab
-
-# Disable altivec optimizations on powerpc, because they are not always
-# available on this architecture.
-ifeq ($(DEB_HOST_ARCH),powerpc)
-ffmpegflags += --disable-altivec
-endif
-
-# Disable assembly optimizations on x32, because they don't work (yet).
-ifneq (,$(filter $(DEB_HOST_ARCH),x32))
-ffmpegflags += --disable-asm
-endif
-
-# Disable optimizations on mips(el) and some on mips64(el), because they are not
-# always available on these architectures.
-ifneq (,$(filter $(DEB_HOST_ARCH),mips mipsel mips64 mips64el))
-ffmpegflags += --disable-mipsdspr1 \
- --disable-mipsdspr2 \
- --disable-loongson3
-endif
-ifneq (,$(filter $(DEB_HOST_ARCH),mips mipsel))
-ffmpegflags += --disable-mipsfpu
-endif
-
-# merge ffmpeg based plugins to reduce installation size
-confflags += --enable-merge-ffmpeg
-
export DEB_CFLAGS_MAINT_APPEND
export DEB_CXXFLAGS_MAINT_APPEND
export DEB_LDFLAGS_MAINT_APPEND
@@ -329,20 +240,10 @@ export removeplugins
%:
dh $@
-override_dh_auto_clean:
- rm -rf $(ffmpegprefix) $(ffmpegbuild)
- dh_auto_clean
-
override_dh_autoreconf:
dh_autoreconf --as-needed
override_dh_auto_configure:
- mkdir -p $(ffmpegbuild) $(ffmpegprefix)
- cd $(ffmpegbuild) && \
- $(CURDIR)/ffmpeg-2-8-8/configure $(ffmpegflags)
- dh_auto_build --sourcedirectory $(ffmpegbuild) -- V=1
- $(MAKE) -C $(ffmpegbuild) install-libs install-headers V=1
- PKG_CONFIG_PATH=$(ffmpegprefix)/lib/pkgconfig \
dh_auto_configure -- $(confflags)
override_dh_auto_build:
diff --git a/debian/vlc-nox.install b/debian/vlc-nox.install
index a988b16..e8d4b85 100755
--- a/debian/vlc-nox.install
+++ b/debian/vlc-nox.install
@@ -12,6 +12,7 @@ usr/lib/vlc/plugins/access/libaccess_mtp_plugin.so
usr/lib/vlc/plugins/access/libaccess_oss_plugin.so [oss]
usr/lib/vlc/plugins/access/libaccess_realrtsp_plugin.so
usr/lib/vlc/plugins/access/libattachment_plugin.so
+usr/lib/vlc/plugins/access/libavio_plugin.so
usr/lib/vlc/plugins/access/libcdda_plugin.so [cdda]
usr/lib/vlc/plugins/access/libdc1394_plugin.so [dc1394]
usr/lib/vlc/plugins/access/libdtv_plugin.so [dtv]
--
VLC media player packaging
More information about the pkg-multimedia-commits
mailing list