summaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/transcode/Makefile13
-rw-r--r--multimedia/transcode/PLIST4
-rw-r--r--multimedia/transcode/distinfo26
-rw-r--r--multimedia/transcode/options.mk18
-rw-r--r--multimedia/transcode/patches/patch-avilib_avidump.c (renamed from multimedia/transcode/patches/patch-ax)4
-rw-r--r--multimedia/transcode/patches/patch-configure (renamed from multimedia/transcode/patches/patch-ac)6
-rw-r--r--multimedia/transcode/patches/patch-encode_encode_lavc.c164
-rw-r--r--multimedia/transcode/patches/patch-export_aud__aux.c24
-rw-r--r--multimedia/transcode/patches/patch-export_export_ffmpeg.c73
-rw-r--r--multimedia/transcode/patches/patch-export_ffmpeg_cfg.c45
-rw-r--r--multimedia/transcode/patches/patch-export_ffmpeg_cfg.h15
-rw-r--r--multimedia/transcode/patches/patch-filter_filter__pp.c (renamed from multimedia/transcode/patches/patch-ba)4
-rw-r--r--multimedia/transcode/patches/patch-import_decode_lavc.c21
-rw-r--r--multimedia/transcode/patches/patch-import_import_ffmpeg.c22
-rw-r--r--multimedia/transcode/patches/patch-import_nuv_import__nuv.c (renamed from multimedia/transcode/patches/patch-aw)8
-rw-r--r--multimedia/transcode/patches/patch-import_probe_ffmpeg.c22
-rw-r--r--multimedia/transcode/patches/patch-libtc_tcavcodec.h4
17 files changed, 385 insertions, 88 deletions
diff --git a/multimedia/transcode/Makefile b/multimedia/transcode/Makefile
index dbb1b0cf02a..e667eb03e2a 100644
--- a/multimedia/transcode/Makefile
+++ b/multimedia/transcode/Makefile
@@ -1,21 +1,22 @@
-# $NetBSD: Makefile,v 1.97 2015/11/18 14:19:53 ryoon Exp $
+# $NetBSD: Makefile,v 1.98 2015/11/21 17:14:26 adam Exp $
DISTNAME= transcode-1.1.7
-PKGREVISION= 16
+PKGREVISION= 17
CATEGORIES= multimedia
-#MASTER_SITES= http://download.berlios.de/tcforge/
MASTER_SITES= http://bitbucket.org/france/transcode-tcforge/downloads/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://tcforge.berlios.de/
COMMENT= Command line video-stream processing tool
+LICENSE= gnu-gpl-v2
USE_LANGUAGES= c c++
USE_LIBTOOL= yes
USE_TOOLS+= awk:run gmake pkg-config
GNU_CONFIGURE= yes
CONFIGURE_ARGS+= --disable-xio
+CONFIGURE_ARGS+= --enable-freetype2
CONFIGURE_ARGS+= --enable-libmpeg2
CONFIGURE_ARGS+= --enable-libmpeg2convert
CONFIGURE_ARGS+= --enable-libpostproc
@@ -31,12 +32,12 @@ PTHREAD_OPTS= require
.include "../../mk/bsd.prefs.mk"
+PLIST_VARS+= i386 oss x11
+
.if ${MACHINE_ARCH} == "i386"
PLIST.i386= yes
.endif
-PLIST_VARS+= i386 oss x11
-
.if ${OPSYS} != "Darwin"
CONFIGURE_ARGS+= --enable-oss
PLIST.oss= yes
@@ -52,7 +53,7 @@ LIBS+= ${LIBOSSAUDIO}
.include "../../devel/zlib/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../graphics/png/buildlink3.mk"
-.include "../../multimedia/ffmpeg1/buildlink3.mk"
+.include "../../multimedia/ffmpeg2/buildlink3.mk"
.include "../../multimedia/libdvdread/buildlink3.mk"
.include "../../multimedia/libmpeg2/buildlink3.mk"
.include "../../multimedia/libogg/buildlink3.mk"
diff --git a/multimedia/transcode/PLIST b/multimedia/transcode/PLIST
index 1b6ef015556..3b1776e12fd 100644
--- a/multimedia/transcode/PLIST
+++ b/multimedia/transcode/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.17 2012/07/07 15:50:19 adam Exp $
+@comment $NetBSD: PLIST,v 1.18 2015/11/21 17:14:26 adam Exp $
bin/avifix
bin/aviindex
bin/avimerge
@@ -89,7 +89,7 @@ lib/transcode/filter_smooth.la
lib/transcode/filter_stabilize.la
${PLIST.x11}lib/transcode/filter_subtitler.la
lib/transcode/filter_testframe.la
-${PLIST.freetype2}lib/transcode/filter_text.la
+lib/transcode/filter_text.la
${PLIST.i386}lib/transcode/filter_tomsmocomp.la
lib/transcode/filter_transform.la
lib/transcode/filter_unsharp.la
diff --git a/multimedia/transcode/distinfo b/multimedia/transcode/distinfo
index 8844890ccda..d1f84b12bc2 100644
--- a/multimedia/transcode/distinfo
+++ b/multimedia/transcode/distinfo
@@ -1,18 +1,20 @@
-$NetBSD: distinfo,v 1.24 2015/11/03 23:54:33 agc Exp $
+$NetBSD: distinfo,v 1.25 2015/11/21 17:14:26 adam Exp $
SHA1 (transcode-1.1.7.tar.bz2) = e35df68b960eb56ef0a59a4cdbed1491be56aee6
RMD160 (transcode-1.1.7.tar.bz2) = faa854acbbfd52faaa216505176f94d756d77841
SHA512 (transcode-1.1.7.tar.bz2) = d6f9674f3f5c3346194120585741ca660eb9ee133085cfce9460a14eaa0cf16fdf291761bd1db78e1c784e4d69a9481c7470cf8357dc7638ee3017620500f45f
Size (transcode-1.1.7.tar.bz2) = 2183627 bytes
-SHA1 (patch-ac) = 3a738bc76d427d28a1c03edfcef7dc227537bc3b
-SHA1 (patch-aw) = a2a118bad9e3783f98e8cbfa62cff8771118ac17
-SHA1 (patch-ax) = 4e767e6ab77e49bb375de55457e3956e1531c7bb
-SHA1 (patch-ba) = 92f31ca0d49cee2883d278b443b1d616381fee2d
-SHA1 (patch-encode_encode_lavc.c) = b93926d54f149fabfc35051c7bfb800efd3892cf
-SHA1 (patch-export_export_ffmpeg.c) = 1559892fb1c13c3bd6be32ae9b5a1d04348139e9
-SHA1 (patch-export_ffmpeg_cfg.c) = c48acb7c9163f45fc1aa02216e083594fee67331
+SHA1 (patch-avilib_avidump.c) = 640aac6fc274a685b1847b48870b37b2c2ab1e88
+SHA1 (patch-configure) = 43010b1f4679be42fd3d7e6ac0948a0e08988b44
+SHA1 (patch-encode_encode_lavc.c) = c33f40dab212b601e5d808d972d132db4eee2d2e
+SHA1 (patch-export_aud__aux.c) = 84b774d13e363721db692b1edc53589e165b094e
+SHA1 (patch-export_export_ffmpeg.c) = 4367d16ba83ccc5c868f0dc470dcd0b64770b185
+SHA1 (patch-export_ffmpeg_cfg.c) = 216f7970f3885a3f7fc8c229e4d1950cd6430cff
+SHA1 (patch-export_ffmpeg_cfg.h) = 7cf230de948de004cc0500f0ae2511561081e952
+SHA1 (patch-filter_filter__pp.c) = a7a3f9c49e65e87bed343dd2d045457341e42114
SHA1 (patch-filter_subtitler_load_font.c) = 2c496c63f4fe27190761d170cc825633eb63c11f
-SHA1 (patch-import_decode_lavc.c) = 2a3b9b9f0909794a9fba0f13901121dd48fc9f5f
-SHA1 (patch-import_import_ffmpeg.c) = 2b1782d0d87de873f2d5e8397a8f3a1b618e21d4
-SHA1 (patch-import_probe_ffmpeg.c) = c755ed421f7cae0d89555c9faffcdce8610178ea
-SHA1 (patch-libtc_tcavcodec.h) = 9c8ea3ac1b8bc048becb92ae1e854911cfd6c3eb
+SHA1 (patch-import_decode_lavc.c) = adf9274c5085012adcfeeb2f2366600155f0994c
+SHA1 (patch-import_import_ffmpeg.c) = bbbbdec6a1c20a9c02a1e2ef4cca10919eb2854c
+SHA1 (patch-import_nuv_import__nuv.c) = e4a57c29b97b23aed068c06a2ed29dd9e29a9919
+SHA1 (patch-import_probe_ffmpeg.c) = 6bbf65b513e999ac770bafc6aa9b508bfdb5ae15
+SHA1 (patch-libtc_tcavcodec.h) = 6fcef1e338e53c974b295b1a10b2cb06e6fcfbd3
diff --git a/multimedia/transcode/options.mk b/multimedia/transcode/options.mk
index cbfc5ecde7e..757bf08c797 100644
--- a/multimedia/transcode/options.mk
+++ b/multimedia/transcode/options.mk
@@ -1,12 +1,8 @@
-# $NetBSD: options.mk,v 1.8 2010/05/08 16:04:05 drochner Exp $
-#
+# $NetBSD: options.mk,v 1.9 2015/11/21 17:14:26 adam Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.transcode
-PKG_SUPPORTED_OPTIONS= a52 freetype2 mjpegtools lzo libxml2
-PKG_SUPPORTED_OPTIONS+= dv imagemagick x264 faac
-
-PKG_SUGGESTED_OPTIONS= a52 freetype2 mjpegtools libxml2
-PKG_SUGGESTED_OPTIONS+= imagemagick x264
+PKG_SUPPORTED_OPTIONS= a52 dv faac imagemagick mjpegtools lzo libxml2 x264
+PKG_SUGGESTED_OPTIONS= a52 imagemagick mjpegtools libxml2 x264
.include "../../mk/bsd.options.mk"
@@ -21,14 +17,6 @@ PLIST.a52= yes
CONFIGURE_ARGS+= --disable-a52
.endif
-.if !empty(PKG_OPTIONS:Mfreetype2)
-. include "../../graphics/freetype2/buildlink3.mk"
-CONFIGURE_ARGS+= --enable-freetype2
-PLIST.freetype2= yes
-.else
-CONFIGURE_ARGS+= --disable-freetype2
-.endif
-
.if !empty(PKG_OPTIONS:Mmjpegtools)
. include "../../multimedia/mjpegtools/buildlink3.mk"
PLIST.mjpegtools= yes
diff --git a/multimedia/transcode/patches/patch-ax b/multimedia/transcode/patches/patch-avilib_avidump.c
index bc714bfec4c..cb81663d07a 100644
--- a/multimedia/transcode/patches/patch-ax
+++ b/multimedia/transcode/patches/patch-avilib_avidump.c
@@ -1,4 +1,6 @@
-$NetBSD: patch-ax,v 1.4 2012/10/10 13:37:25 drochner Exp $
+$NetBSD: patch-avilib_avidump.c,v 1.1 2015/11/21 17:14:26 adam Exp $
+
+Compatibility fix.
--- avilib/avidump.c.orig 2012-02-01 17:07:24.000000000 +0000
+++ avilib/avidump.c
diff --git a/multimedia/transcode/patches/patch-ac b/multimedia/transcode/patches/patch-configure
index ca17812b49b..bc03bf30386 100644
--- a/multimedia/transcode/patches/patch-ac
+++ b/multimedia/transcode/patches/patch-configure
@@ -1,4 +1,8 @@
-$NetBSD: patch-ac,v 1.6 2012/10/10 13:37:25 drochner Exp $
+$NetBSD: patch-configure,v 1.1 2015/11/21 17:14:26 adam Exp $
+
+Add DragonFly support.
+Make use of PTHREAD_LDFLAGS.
+Portability fix.
--- configure.orig 2011-11-19 16:50:37.000000000 +0000
+++ configure
diff --git a/multimedia/transcode/patches/patch-encode_encode_lavc.c b/multimedia/transcode/patches/patch-encode_encode_lavc.c
index 3bbc9f5a302..dd63790571e 100644
--- a/multimedia/transcode/patches/patch-encode_encode_lavc.c
+++ b/multimedia/transcode/patches/patch-encode_encode_lavc.c
@@ -1,20 +1,102 @@
-$NetBSD: patch-encode_encode_lavc.c,v 1.1 2012/11/17 21:46:44 markd Exp $
+$NetBSD: patch-encode_encode_lavc.c,v 1.2 2015/11/21 17:14:26 adam Exp $
-Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
+Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- encode/encode_lavc.c.orig 2011-11-19 16:50:27.000000000 +0000
+++ encode/encode_lavc.c
-@@ -114,6 +114,7 @@ struct tclavcprivatedata_ {
+@@ -74,6 +74,9 @@ struct tclavcconfigdata_ {
+ int lmin;
+ int lmax;
+ int me_method;
++ int luma_elim_threshold;
++ int chroma_elim_threshold;
++ int quantizer_noise_shaping;
+
+ /* same as above for flags */
+ struct {
+@@ -114,6 +117,7 @@ struct tclavcprivatedata_ {
AVFrame ff_venc_frame;
AVCodecContext ff_vcontext;
-+ AVDictionary ** ff_opts;
++ AVDictionary * ff_opts;
AVCodec *ff_vcodec;
-@@ -1036,14 +1037,10 @@ static void tc_lavc_dispatch_settings(TC
+@@ -164,6 +168,7 @@ static const TCCodecID tc_lavc_codecs_ou
+ TC_CODEC_ERROR
+ };
+
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ static const enum CodecID tc_lavc_internal_codecs[] = {
+ CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO, CODEC_ID_MPEG4,
+ CODEC_ID_H263I, CODEC_ID_H263P,
+@@ -176,6 +181,20 @@ static const enum CodecID tc_lavc_intern
+ CODEC_ID_MSMPEG4V2, CODEC_ID_MSMPEG4V3,
+ CODEC_ID_NONE
+ };
++#else
++static const enum AVCodecID tc_lavc_internal_codecs[] = {
++ AV_CODEC_ID_MPEG1VIDEO, AV_CODEC_ID_MPEG2VIDEO, AV_CODEC_ID_MPEG4,
++ AV_CODEC_ID_H263I, AV_CODEC_ID_H263P,
++ AV_CODEC_ID_H264,
++ AV_CODEC_ID_WMV1, AV_CODEC_ID_WMV2,
++ AV_CODEC_ID_RV10,
++ AV_CODEC_ID_HUFFYUV, AV_CODEC_ID_FFV1,
++ AV_CODEC_ID_DVVIDEO,
++ AV_CODEC_ID_MJPEG, AV_CODEC_ID_LJPEG,
++ AV_CODEC_ID_MSMPEG4V2, AV_CODEC_ID_MSMPEG4V3,
++ AV_CODEC_ID_NONE
++};
++#endif
+
+ static const TCFormatID tc_lavc_formats[] = { TC_FORMAT_ERROR };
+
+@@ -937,7 +956,11 @@ static int tc_lavc_settings_from_vob(TCL
+ static void tc_lavc_config_defaults(TCLavcPrivateData *pd)
+ {
+ /* first of all reinitialize lavc data */
++#if LIBAVCODEC_VERSION_MAJOR < 55
+ avcodec_get_context_defaults(&pd->ff_vcontext);
++#else
++ avcodec_get_context_defaults3(&pd->ff_vcontext, NULL);
++#endif
+
+ pd->confdata.thread_count = 1;
+
+@@ -955,8 +978,6 @@ static void tc_lavc_config_defaults(TCLa
+ /*
+ * context *transcode* (not libavcodec) defaults
+ */
+- pd->ff_vcontext.mb_qmin = 2;
+- pd->ff_vcontext.mb_qmax = 31;
+ pd->ff_vcontext.max_qdiff = 3;
+ pd->ff_vcontext.max_b_frames = 0;
+ pd->ff_vcontext.me_range = 0;
+@@ -977,8 +998,8 @@ static void tc_lavc_config_defaults(TCLa
+ pd->ff_vcontext.mpeg_quant = 0;
+ pd->ff_vcontext.rc_initial_cplx = 0.0;
+ pd->ff_vcontext.rc_qsquish = 1.0;
+- pd->ff_vcontext.luma_elim_threshold = 0;
+- pd->ff_vcontext.chroma_elim_threshold = 0;
++ pd->confdata.luma_elim_threshold = 0;
++ pd->confdata.chroma_elim_threshold = 0;
+ pd->ff_vcontext.strict_std_compliance = 0;
+ pd->ff_vcontext.dct_algo = FF_DCT_AUTO;
+ pd->ff_vcontext.idct_algo = FF_IDCT_AUTO;
+@@ -1002,7 +1023,7 @@ static void tc_lavc_config_defaults(TCLa
+ pd->ff_vcontext.intra_quant_bias = FF_DEFAULT_QUANT_BIAS;
+ pd->ff_vcontext.inter_quant_bias = FF_DEFAULT_QUANT_BIAS;
+ pd->ff_vcontext.noise_reduction = 0;
+- pd->ff_vcontext.quantizer_noise_shaping = 0;
++ pd->confdata.quantizer_noise_shaping = 0;
+ pd->ff_vcontext.flags = 0;
+ }
+
+@@ -1034,16 +1055,11 @@ static void tc_lavc_dispatch_settings(TC
+
+ pd->ff_vcontext.flags = 0;
SET_FLAG(pd, mv0);
- SET_FLAG(pd, cbp);
+- SET_FLAG(pd, cbp);
SET_FLAG(pd, qpel);
- SET_FLAG(pd, alt);
- SET_FLAG(pd, vdpart);
@@ -27,28 +109,69 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
SET_FLAG(pd, psnr);
SET_FLAG(pd, trell);
SET_FLAG(pd, gray);
-@@ -1064,6 +1061,18 @@ static void tc_lavc_dispatch_settings(TC
+@@ -1064,6 +1080,30 @@ static void tc_lavc_dispatch_settings(TC
pd->ff_vcontext.flags |= CODEC_FLAG_INTERLACED_DCT;
pd->ff_vcontext.flags |= CODEC_FLAG_INTERLACED_ME;
}
+ if (pd->confdata.flags.alt) {
-+ av_dict_set(pd->ff_opts, "alternate_scan", "1", 0);
++ av_dict_set(&(pd->ff_opts), "alternate_scan", "1", 0);
+ }
+ if (pd->confdata.flags.vdpart) {
-+ av_dict_set(pd->ff_opts, "data_partitioning", "1", 0);
++ av_dict_set(&(pd->ff_opts), "data_partitioning", "1", 0);
+ }
+ if (pd->confdata.flags.umv) {
-+ av_dict_set(pd->ff_opts, "umv", "1", 0);
++ av_dict_set(&(pd->ff_opts), "umv", "1", 0);
+ }
+ if (pd->confdata.flags.aiv) {
-+ av_dict_set(pd->ff_opts, "aiv", "1", 0);
++ av_dict_set(&(pd->ff_opts), "aiv", "1", 0);
+ }
++ if (pd->confdata.flags.cbp) {
++ av_dict_set(&(pd->ff_opts), "mpv_flags", "+cbp_rd", 0);
++ }
++
++ char buf[1024];
++#define set_dict_opt(val, opt) \
++ snprintf(buf, sizeof(buf), "%i", pd->confdata.val);\
++ av_dict_set(&(pd->ff_opts), opt, buf, 0)
++
++ set_dict_opt(luma_elim_threshold, "luma_elim_threshold");
++ set_dict_opt(chroma_elim_threshold, "chroma_elim_threshold");
++ set_dict_opt(quantizer_noise_shaping, "quantizer_noise_shaping");
}
#undef SET_FLAG
-@@ -1184,18 +1193,18 @@ static int tc_lavc_read_config(TCLavcPri
+@@ -1116,8 +1156,6 @@ static int tc_lavc_read_config(TCLavcPri
+ // handled by transcode core
+ // { "vqmax", PCTX(qmax), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 60 },
+ // handled by transcode core
+- { "mbqmin", PCTX(mb_qmin), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 60 },
+- { "mbqmax", PCTX(mb_qmax), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 60 },
+ { "lmin", PAUX(lmin), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0 },
+ { "lmax", PAUX(lmax), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0 },
+ { "vqdiff", PCTX(max_qdiff), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31 },
+@@ -1150,8 +1188,8 @@ static int tc_lavc_read_config(TCLavcPri
+ { "vrc_init_cplx", PCTX(rc_initial_cplx), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.0, 9999999.0 },
+ // { "vrc_init_occupancy", }, // not yet supported
+ { "vqsquish", PCTX(rc_qsquish), TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.0, 99.0 },
+- { "vlelim", PCTX(luma_elim_threshold), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
+- { "vcelim", PCTX(chroma_elim_threshold), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
++ { "vlelim", PAUX(luma_elim_threshold), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
++ { "vcelim", PAUX(chroma_elim_threshold), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
+ { "vstrict", PCTX(strict_std_compliance), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99 },
+ { "vpsize", PCTX(rtp_payload_size), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 100000000 },
+ { "dct", PCTX(dct_algo), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 10 },
+@@ -1177,25 +1215,25 @@ static int tc_lavc_read_config(TCLavcPri
+ { "ibias", PCTX(intra_quant_bias), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -512, 512 },
+ { "pbias", PCTX(inter_quant_bias), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -512, 512 },
+ { "nr", PCTX(noise_reduction), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 1000000},
+- { "qns", PCTX(quantizer_noise_shaping), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 3 },
++ { "qns", PAUX(quantizer_noise_shaping), TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 3 },
+ { "inter_matrix_file", inter_matrix_file, TCCONF_TYPE_STRING, 0, 0, 0 },
+ { "intra_matrix_file", intra_matrix_file, TCCONF_TYPE_STRING, 0, 0, 0 },
+
{ "mv0", PAUX(flags.mv0), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_MV0 },
- { "cbp", PAUX(flags.cbp), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_CBP_RD },
+- { "cbp", PAUX(flags.cbp), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_CBP_RD },
++ { "cbp", PAUX(flags.cbp), TCCONF_TYPE_FLAG, 0, 0, 1 },
{ "qpel", PAUX(flags.qpel), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QPEL },
- { "alt", PAUX(flags.alt), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_ALT_SCAN },
+ { "alt", PAUX(flags.alt), TCCONF_TYPE_FLAG, 0, 0, 1 },
@@ -69,7 +192,16 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
{ "psnr", PAUX(flags.psnr), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_PSNR },
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
{ "trell", PAUX(flags.trell), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_TRELLIS_QUANT },
-@@ -1387,7 +1396,7 @@ static int tc_lavc_configure(TCModuleIns
+@@ -1345,6 +1383,8 @@ static int tc_lavc_configure(TCModuleIns
+
+ pd = self->userdata;
+
++ pd->ff_opts = NULL;
++
+ pd->flush_flag = vob->encoder_flush;
+
+ /* FIXME: move into core? */
+@@ -1387,7 +1427,7 @@ static int tc_lavc_configure(TCModuleIns
pd->confdata.thread_count,
(pd->confdata.thread_count > 1) ?"s" :"");
}
@@ -78,12 +210,12 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
pd->ff_vcodec = avcodec_find_encoder(FF_VCODEC_ID(pd));
if (pd->ff_vcodec == NULL) {
-@@ -1397,11 +1406,11 @@ static int tc_lavc_configure(TCModuleIns
+@@ -1397,11 +1437,11 @@ static int tc_lavc_configure(TCModuleIns
}
TC_LOCK_LIBAVCODEC;
- ret = avcodec_open(&pd->ff_vcontext, pd->ff_vcodec);
-+ ret = avcodec_open2(&pd->ff_vcontext, pd->ff_vcodec, pd->ff_opts);
++ ret = avcodec_open2(&pd->ff_vcontext, pd->ff_vcodec, &(pd->ff_opts));
TC_UNLOCK_LIBAVCODEC;
if (ret < 0) {
diff --git a/multimedia/transcode/patches/patch-export_aud__aux.c b/multimedia/transcode/patches/patch-export_aud__aux.c
new file mode 100644
index 00000000000..00776e9ff78
--- /dev/null
+++ b/multimedia/transcode/patches/patch-export_aud__aux.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-export_aud__aux.c,v 1.1 2015/11/21 17:14:26 adam Exp $
+
+Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
+
+--- export/aud_aux.c.orig 2011-11-19 16:50:27.000000000 +0000
++++ export/aud_aux.c
+@@ -346,7 +346,7 @@ static int tc_audio_init_ffmpeg(vob_t *v
+
+ //-- set parameters (bitrate, channels and sample-rate) --
+ //--------------------------------------------------------
+- avcodec_get_context_defaults(&mpa_ctx);
++ avcodec_get_context_defaults3(&mpa_ctx, mpa_codec);
+ #if LIBAVCODEC_VERSION_MAJOR < 53
+ mpa_ctx.codec_type = CODEC_TYPE_AUDIO;
+ #else
+@@ -359,7 +359,7 @@ static int tc_audio_init_ffmpeg(vob_t *v
+ //-- open codec --
+ //----------------
+ TC_LOCK_LIBAVCODEC;
+- ret = avcodec_open(&mpa_ctx, mpa_codec);
++ ret = avcodec_open2(&mpa_ctx, mpa_codec, NULL);
+ TC_UNLOCK_LIBAVCODEC;
+ if (ret < 0) {
+ tc_warn("tc_audio_init_ffmpeg: could not open %s codec !",
diff --git a/multimedia/transcode/patches/patch-export_export_ffmpeg.c b/multimedia/transcode/patches/patch-export_export_ffmpeg.c
index d1d0d4f453d..c410c69e4a3 100644
--- a/multimedia/transcode/patches/patch-export_export_ffmpeg.c
+++ b/multimedia/transcode/patches/patch-export_export_ffmpeg.c
@@ -1,6 +1,6 @@
-$NetBSD: patch-export_export_ffmpeg.c,v 1.1 2012/11/17 21:46:44 markd Exp $
+$NetBSD: patch-export_export_ffmpeg.c,v 1.2 2015/11/21 17:14:26 adam Exp $
-Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
+Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- export/export_ffmpeg.c.orig 2011-11-19 16:50:27.000000000 +0000
+++ export/export_ffmpeg.c
@@ -8,7 +8,7 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
static AVFrame *lavc_convert_frame = NULL;
static AVCodec *lavc_venc_codec = NULL;
-+static AVDictionary **lavc_venc_opts = NULL;
++static AVDictionary *lavc_venc_opts = NULL;
static AVFrame *lavc_venc_frame = NULL;
static AVCodecContext *lavc_venc_context;
static avi_t *avifile = NULL;
@@ -29,6 +29,15 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
avcodec_register_all();
TC_UNLOCK_LIBAVCODEC;
+@@ -486,7 +486,7 @@ MOD_init
+ codec->name, codec->fourCC, codec->comments);
+ }
+
+- lavc_venc_context = avcodec_alloc_context();
++ lavc_venc_context = avcodec_alloc_context3(lavc_venc_codec);
+ lavc_venc_frame = avcodec_alloc_frame();
+
+ lavc_convert_frame= avcodec_alloc_frame();
@@ -634,7 +634,7 @@ MOD_init
lavc_param_rc_max_rate = 2516;
lavc_param_rc_buffer_size = 224 * 8;
@@ -47,7 +56,32 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
break;
-@@ -887,7 +887,7 @@ MOD_init
+@@ -838,8 +838,13 @@ MOD_init
+ lavc_venc_context->rc_strategy = lavc_param_vrc_strategy;
+ lavc_venc_context->b_frame_strategy = lavc_param_vb_strategy;
+ lavc_venc_context->b_quant_offset = lavc_param_vb_qoffset;
+- lavc_venc_context->luma_elim_threshold= lavc_param_luma_elim_threshold;
+- lavc_venc_context->chroma_elim_threshold= lavc_param_chroma_elim_threshold;
++
++ char buf[1024];
++#define set_dict_opt(val, opt) \
++ snprintf(buf, sizeof(buf), "%i", val); \
++ av_dict_set(&lavc_venc_opts, opt, buf, 0)
++ set_dict_opt(lavc_param_luma_elim_threshold, "luma_elim_threshold");
++ set_dict_opt(lavc_param_chroma_elim_threshold, "chroma_elim_threshold");
+ lavc_venc_context->rtp_payload_size = lavc_param_packet_size;
+ #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
+ if (lavc_param_packet_size)
+@@ -870,7 +875,7 @@ MOD_init
+ lavc_venc_context->context_model = lavc_param_context;
+ lavc_venc_context->scenechange_threshold= lavc_param_sc_threshold;
+ lavc_venc_context->noise_reduction = lavc_param_noise_reduction;
+- lavc_venc_context->inter_threshold = lavc_param_inter_threshold;
++ set_dict_opt(lavc_param_inter_threshold, "inter_threshold");
+ lavc_venc_context->intra_dc_precision = lavc_param_intra_dc_precision;
+ lavc_venc_context->skip_top = lavc_param_skip_top;
+ lavc_venc_context->skip_bottom = lavc_param_skip_bottom;
+@@ -887,7 +892,7 @@ MOD_init
lavc_venc_context->thread_count);
}
@@ -56,59 +90,66 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
if (lavc_param_intra_matrix) {
char *tmp;
-@@ -1065,15 +1065,10 @@ MOD_init
+@@ -1065,15 +1070,12 @@ MOD_init
lavc_venc_context->flags |= lavc_param_closedgop;
lavc_venc_context->flags |= lavc_param_trunc;
lavc_venc_context->flags |= lavc_param_aic;
- lavc_venc_context->flags |= lavc_param_umv;
lavc_venc_context->flags |= lavc_param_v4mv;
- lavc_venc_context->flags |= lavc_param_data_partitioning;
- lavc_venc_context->flags |= lavc_param_cbp;
+- lavc_venc_context->flags |= lavc_param_cbp;
++ if(lavc_param_cbp)
++ av_dict_set(&lavc_venc_opts, "mpv_flags", "+cbp_rd", 0);
lavc_venc_context->flags |= lavc_param_mv0;
- lavc_venc_context->flags |= lavc_param_qp_rd;
+- lavc_venc_context->flags |= lavc_param_qp_rd;
- lavc_venc_context->flags |= lavc_param_scan_offset;
- lavc_venc_context->flags |= lavc_param_ss;
- lavc_venc_context->flags |= lavc_param_alt;
++ if(lavc_param_qp_rd)
++ av_dict_set(&lavc_venc_opts, "mpv_flags", "+qp_rd", 0);
lavc_venc_context->flags |= lavc_param_ilme;
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
lavc_venc_context->flags |= lavc_param_trell;
-@@ -1203,7 +1198,6 @@ MOD_init
+@@ -1203,9 +1205,8 @@ MOD_init
lavc_venc_context->me_method = ME_ZERO + lavc_param_vme;
-
/* FIXME: transcode itself contains "broken ffmpeg default settings", thus we need to override them! */
- if (lavc_param_video_preset) {
+- if (lavc_param_video_preset) {
++ if (lavc_param_video_preset && strcmp(lavc_param_video_preset, "none")) {
avcodec_opts[AVMEDIA_TYPE_VIDEO] = lavc_venc_context;
-@@ -1241,20 +1235,39 @@ MOD_init
+ video_codec_name = ffmpeg_codec_name(codec->name);
+
+@@ -1241,20 +1242,39 @@ MOD_init
}
}
+ if (lavc_param_scan_offset) {
-+ av_dict_set(lavc_venc_opts, "scan_offset", "1", 0);
++ av_dict_set(&lavc_venc_opts, "scan_offset", "1", 0);
+ }
+
+ if (lavc_param_ss) {
-+ av_dict_set(lavc_venc_opts, "structured_slices", "1", 0);
++ av_dict_set(&lavc_venc_opts, "structured_slices", "1", 0);
+ }
+
+ if (lavc_param_alt) {
-+ av_dict_set(lavc_venc_opts, "alternate_scan", "1", 0);
++ av_dict_set(&lavc_venc_opts, "alternate_scan", "1", 0);
+ }
+
+ if (lavc_param_umv) {
-+ av_dict_set(lavc_venc_opts, "umv", "1", 0);
++ av_dict_set(&lavc_venc_opts, "umv", "1", 0);
+ }
+
+ if (lavc_param_data_partitioning) {
-+ av_dict_set(lavc_venc_opts, "vdpart", "1", 0);
++ av_dict_set(&lavc_venc_opts, "vdpart", "1", 0);
+ }
//-- open codec --
//----------------
TC_LOCK_LIBAVCODEC;
- ret = avcodec_open(lavc_venc_context, lavc_venc_codec);
-+ ret = avcodec_open2(lavc_venc_context, lavc_venc_codec, lavc_venc_opts);
++ ret = avcodec_open2(lavc_venc_context, lavc_venc_codec, &lavc_venc_opts);
TC_UNLOCK_LIBAVCODEC;
if (ret < 0) {
tc_log_warn(MOD_NAME, "could not open FFMPEG codec");
diff --git a/multimedia/transcode/patches/patch-export_ffmpeg_cfg.c b/multimedia/transcode/patches/patch-export_ffmpeg_cfg.c
index 0548e63816e..f2b9ed7f202 100644
--- a/multimedia/transcode/patches/patch-export_ffmpeg_cfg.c
+++ b/multimedia/transcode/patches/patch-export_ffmpeg_cfg.c
@@ -1,10 +1,37 @@
-$NetBSD: patch-export_ffmpeg_cfg.c,v 1.1 2012/11/17 21:46:44 markd Exp $
+$NetBSD: patch-export_ffmpeg_cfg.c,v 1.2 2015/11/21 17:14:26 adam Exp $
-Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
+Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- export/ffmpeg_cfg.c.orig 2011-11-19 16:50:27.000000000 +0000
+++ export/ffmpeg_cfg.c
-@@ -160,9 +160,9 @@ TCConfigEntry lavcopts_conf[]={
+@@ -34,8 +34,6 @@ int lavc_param_vme = 4;
+ //int lavc_param_vqscale = 0;
+ //int lavc_param_vqmin = 2;
+ //int lavc_param_vqmax = 31;
+-int lavc_param_mb_qmin = 2;
+-int lavc_param_mb_qmax = 31;
+ int lavc_param_lmin = 2;
+ int lavc_param_lmax = 31;
+ int lavc_param_vqdiff = 3;
+@@ -126,7 +124,7 @@ int lavc_param_gmc = 0;
+ //int lavc_param_atag = 0;
+ //int lavc_param_abitrate = 224;
+
+-char *lavc_param_video_preset = "medium";
++char *lavc_param_video_preset = "none";
+ char *lavc_param_ffmpeg_datadir = "/usr/share/ffmpeg";
+
+ TCConfigEntry lavcopts_conf[]={
+@@ -143,8 +141,6 @@ TCConfigEntry lavcopts_conf[]={
+ // {"vqscale", &lavc_param_vqscale, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
+ // {"vqmin", &lavc_param_vqmin, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
+ // {"vqmax", &lavc_param_vqmax, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
+- {"mbqmin", &lavc_param_mb_qmin, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
+- {"mbqmax", &lavc_param_mb_qmax, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
+ {"lmin", &lavc_param_lmin, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0},
+ {"lmax", &lavc_param_lmax, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.01, 255.0},
+ {"vqdiff", &lavc_param_vqdiff, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 31},
+@@ -160,9 +156,9 @@ TCConfigEntry lavcopts_conf[]={
{"vcelim", &lavc_param_chroma_elim_threshold, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99},
{"vpsize", &lavc_param_packet_size, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 100000000},
{"vstrict", &lavc_param_strict, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99},
@@ -16,7 +43,7 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
{"mpeg_quant", &lavc_param_mpeg_quant, TCCONF_TYPE_FLAG, 0, 0, 1},
{"vi_qfactor", &lavc_param_vi_qfactor, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, -31.0, 31.0},
{"vi_qoffset", &lavc_param_vi_qoffset, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.0, 31.0},
-@@ -211,7 +211,7 @@ TCConfigEntry lavcopts_conf[]={
+@@ -211,21 +207,21 @@ TCConfigEntry lavcopts_conf[]={
#else
{"aic", &lavc_param_aic, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_AC_PRED},
#endif
@@ -25,9 +52,15 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
{"ibias", &lavc_param_ibias, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -512, 512},
{"pbias", &lavc_param_pbias, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -512, 512},
{"coder", &lavc_param_coder, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 10},
-@@ -223,9 +223,9 @@ TCConfigEntry lavcopts_conf[]={
+ {"context", &lavc_param_context, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 10},
+ {"intra_matrix", &lavc_param_intra_matrix, TCCONF_TYPE_STRING, 0, 0, 0},
+ {"inter_matrix", &lavc_param_inter_matrix, TCCONF_TYPE_STRING, 0, 0, 0},
+- {"cbp", &lavc_param_cbp, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_CBP_RD},
++ {"cbp", &lavc_param_cbp, TCCONF_TYPE_FLAG, 0, 0, 1},
+ {"mv0", &lavc_param_mv0, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_MV0},
{"nr", &lavc_param_noise_reduction, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 1000000},
- {"qprd", &lavc_param_qp_rd, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QP_RD},
+- {"qprd", &lavc_param_qp_rd, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QP_RD},
++ {"qprd", &lavc_param_qp_rd, TCCONF_TYPE_FLAG, 0, 0, 1},
{"threads", &lavc_param_threads, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 16},
- {"ss", &lavc_param_ss, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_H263P_SLICE_STRUCT},
- {"svcd_sof", &lavc_param_scan_offset, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_SVCD_SCAN_OFFSET},
diff --git a/multimedia/transcode/patches/patch-export_ffmpeg_cfg.h b/multimedia/transcode/patches/patch-export_ffmpeg_cfg.h
new file mode 100644
index 00000000000..1292d5e1f4a
--- /dev/null
+++ b/multimedia/transcode/patches/patch-export_ffmpeg_cfg.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-export_ffmpeg_cfg.h,v 1.1 2015/11/21 17:14:26 adam Exp $
+
+Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
+
+--- export/ffmpeg_cfg.h.orig 2011-11-19 16:50:27.000000000 +0000
++++ export/ffmpeg_cfg.h
+@@ -13,8 +13,6 @@ extern int lavc_param_vme;
+ //extern int lavc_param_vqscale;
+ //extern int lavc_param_vqmin;
+ //extern int lavc_param_vqmax;
+-extern int lavc_param_mb_qmin;
+-extern int lavc_param_mb_qmax;
+ extern int lavc_param_lmin;
+ extern int lavc_param_lmax;
+ extern int lavc_param_vqdiff;
diff --git a/multimedia/transcode/patches/patch-ba b/multimedia/transcode/patches/patch-filter_filter__pp.c
index 44d183e8f68..f9f7240a6fa 100644
--- a/multimedia/transcode/patches/patch-ba
+++ b/multimedia/transcode/patches/patch-filter_filter__pp.c
@@ -1,4 +1,6 @@
-$NetBSD: patch-ba,v 1.4 2012/10/10 13:37:25 drochner Exp $
+$NetBSD: patch-filter_filter__pp.c,v 1.1 2015/11/21 17:14:26 adam Exp $
+
+Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- filter/filter_pp.c.orig 2011-11-19 16:50:27.000000000 +0000
+++ filter/filter_pp.c
diff --git a/multimedia/transcode/patches/patch-import_decode_lavc.c b/multimedia/transcode/patches/patch-import_decode_lavc.c
index ff32c0a6122..870c34a5bef 100644
--- a/multimedia/transcode/patches/patch-import_decode_lavc.c
+++ b/multimedia/transcode/patches/patch-import_decode_lavc.c
@@ -1,10 +1,19 @@
-$NetBSD: patch-import_decode_lavc.c,v 1.1 2012/11/17 21:46:44 markd Exp $
+$NetBSD: patch-import_decode_lavc.c,v 1.2 2015/11/21 17:14:26 adam Exp $
-Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
+Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- import/decode_lavc.c.orig 2011-11-19 16:50:27.000000000 +0000
+++ import/decode_lavc.c
-@@ -181,7 +181,7 @@ void decode_lavc(decode_t *decode)
+@@ -170,7 +170,7 @@ void decode_lavc(decode_t *decode)
+
+ // Set these to the expected values so that ffmpeg's decoder can
+ // properly detect interlaced input.
+- lavc_dec_context = avcodec_alloc_context();
++ lavc_dec_context = avcodec_alloc_context3(NULL);
+ if (lavc_dec_context == NULL) {
+ tc_log_error(__FILE__, "Could not allocate enough memory.");
+ goto decoder_error;
+@@ -181,12 +181,12 @@ void decode_lavc(decode_t *decode)
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
lavc_dec_context->error_resilience = 2;
#else
@@ -13,3 +22,9 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
#endif
lavc_dec_context->error_concealment = 3;
lavc_dec_context->workaround_bugs = FF_BUG_AUTODETECT;
+
+- if (avcodec_open(lavc_dec_context, lavc_dec_codec) < 0) {
++ if (avcodec_open2(lavc_dec_context, lavc_dec_codec, NULL) < 0) {
+ tc_log_error(__FILE__, "Could not initialize the '%s' codec.",
+ codec->name);
+ goto decoder_error;
diff --git a/multimedia/transcode/patches/patch-import_import_ffmpeg.c b/multimedia/transcode/patches/patch-import_import_ffmpeg.c
index 708a594ebd6..b986710047c 100644
--- a/multimedia/transcode/patches/patch-import_import_ffmpeg.c
+++ b/multimedia/transcode/patches/patch-import_import_ffmpeg.c
@@ -1,9 +1,18 @@
-$NetBSD: patch-import_import_ffmpeg.c,v 1.1 2012/11/17 21:46:44 markd Exp $
+$NetBSD: patch-import_import_ffmpeg.c,v 1.2 2015/11/21 17:14:26 adam Exp $
-Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
+Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- import/import_ffmpeg.c.orig 2011-11-19 16:50:27.000000000 +0000
+++ import/import_ffmpeg.c
+@@ -302,7 +302,7 @@ do_avi:
+
+ // Set these to the expected values so that ffmpeg's decoder can
+ // properly detect interlaced input.
+- lavc_dec_context = avcodec_alloc_context();
++ lavc_dec_context = avcodec_alloc_context3(lavc_dec_codec);
+ if (lavc_dec_context == NULL) {
+ tc_log_error(MOD_NAME, "Could not allocate enough memory.");
+ return TC_IMPORT_ERROR;
@@ -314,7 +314,7 @@ do_avi:
#if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)
lavc_dec_context->error_resilience = 2;
@@ -13,3 +22,12 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
#endif
lavc_dec_context->error_concealment = 3;
lavc_dec_context->workaround_bugs = FF_BUG_AUTODETECT;
+@@ -344,7 +344,7 @@ do_avi:
+ }
+
+ TC_LOCK_LIBAVCODEC;
+- ret = avcodec_open(lavc_dec_context, lavc_dec_codec);
++ ret = avcodec_open2(lavc_dec_context, lavc_dec_codec, NULL);
+ TC_UNLOCK_LIBAVCODEC;
+ if (ret < 0) {
+ tc_log_warn(MOD_NAME, "Could not initialize the '%s' codec.",
diff --git a/multimedia/transcode/patches/patch-aw b/multimedia/transcode/patches/patch-import_nuv_import__nuv.c
index 41a6d0a5ef7..250a085cd8a 100644
--- a/multimedia/transcode/patches/patch-aw
+++ b/multimedia/transcode/patches/patch-import_nuv_import__nuv.c
@@ -1,7 +1,9 @@
-$NetBSD: patch-aw,v 1.5 2009/07/07 16:38:29 drochner Exp $
+$NetBSD: patch-import_nuv_import__nuv.c,v 1.1 2015/11/21 17:14:26 adam Exp $
---- ./import/nuv/import_nuv.c.orig 2009-02-21 22:01:57.000000000 +0100
-+++ ./import/nuv/import_nuv.c
+Optionally build LZO support.
+
+--- import/nuv/import_nuv.c.orig 2009-02-21 22:01:57.000000000 +0100
++++ import/nuv/import_nuv.c
@@ -15,7 +15,9 @@
#include "aclib/ac.h"
#include "nuppelvideo.h"
diff --git a/multimedia/transcode/patches/patch-import_probe_ffmpeg.c b/multimedia/transcode/patches/patch-import_probe_ffmpeg.c
index 97e439f2758..220a9746639 100644
--- a/multimedia/transcode/patches/patch-import_probe_ffmpeg.c
+++ b/multimedia/transcode/patches/patch-import_probe_ffmpeg.c
@@ -1,6 +1,6 @@
-$NetBSD: patch-import_probe_ffmpeg.c,v 1.1 2012/11/17 21:46:44 markd Exp $
+$NetBSD: patch-import_probe_ffmpeg.c,v 1.2 2015/11/21 17:14:26 adam Exp $
-Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
+Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- import/probe_ffmpeg.c.orig 2011-11-19 16:50:27.000000000 +0000
+++ import/probe_ffmpeg.c
@@ -15,3 +15,21 @@ Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
if (ret != 0) {
tc_log_error(__FILE__, "unable to open '%s'"
" (libavformat failure)",
+@@ -109,7 +109,7 @@ void probe_ffmpeg(info_t *ipipe)
+ return;
+ }
+
+- ret = av_find_stream_info(lavf_dmx_context);
++ ret = avformat_find_stream_info(lavf_dmx_context, NULL);
+ if (ret < 0) {
+ tc_log_error(__FILE__, "unable to fetch informations from '%s'"
+ " (libavformat failure)",
+@@ -120,7 +120,7 @@ void probe_ffmpeg(info_t *ipipe)
+
+ translate_info(lavf_dmx_context, ipipe->probe_info);
+
+- av_close_input_file(lavf_dmx_context);
++ avformat_close_input(&lavf_dmx_context);
+ return;
+ }
+
diff --git a/multimedia/transcode/patches/patch-libtc_tcavcodec.h b/multimedia/transcode/patches/patch-libtc_tcavcodec.h
index 82757c436df..350ff2ac77f 100644
--- a/multimedia/transcode/patches/patch-libtc_tcavcodec.h
+++ b/multimedia/transcode/patches/patch-libtc_tcavcodec.h
@@ -1,6 +1,6 @@
-$NetBSD: patch-libtc_tcavcodec.h,v 1.1 2012/11/17 21:46:44 markd Exp $
+$NetBSD: patch-libtc_tcavcodec.h,v 1.2 2015/11/21 17:14:26 adam Exp $
-Fix build with ffmpeg 0.11. gentoo patch from Brennan Shacklett
+Fixes building against FFmpeg version >= 2.0.0 (gentoo patch).
--- libtc/tcavcodec.h.orig 2011-11-19 16:50:27.000000000 +0000
+++ libtc/tcavcodec.h