[108722] trunk/dports/multimedia/transcode

devans at macports.org devans at macports.org
Wed Jul 31 11:18:14 PDT 2013


Revision: 108722
          https://trac.macports.org/changeset/108722
Author:   devans at macports.org
Date:     2013-07-31 11:18:14 -0700 (Wed, 31 Jul 2013)
Log Message:
-----------
transcode: fix ffmpeg deprecations that cause build with ffmpeg-devel to fail.

Modified Paths:
--------------
    trunk/dports/multimedia/transcode/Portfile

Added Paths:
-----------
    trunk/dports/multimedia/transcode/files/patch-ffmpeg-2.0.diff

Modified: trunk/dports/multimedia/transcode/Portfile
===================================================================
--- trunk/dports/multimedia/transcode/Portfile	2013-07-31 18:16:43 UTC (rev 108721)
+++ trunk/dports/multimedia/transcode/Portfile	2013-07-31 18:18:14 UTC (rev 108722)
@@ -5,7 +5,7 @@
 
 name        transcode
 version     1.1.7
-revision    9
+revision    10
 epoch       1
 license     GPL-2+
 categories  multimedia
@@ -50,7 +50,8 @@
                 patch-avilib-avidump.c.diff \
                 patch-ffmpeg-0.11.diff \
                 patch-filter-filter_pp.c.diff \
-                patch-encode-Makefile.in.diff
+                patch-encode-Makefile.in.diff \
+                patch-ffmpeg-2.0.diff
 
 configure.args  --disable-mmx \
                 --enable-libmpeg2 \

Added: trunk/dports/multimedia/transcode/files/patch-ffmpeg-2.0.diff
===================================================================
--- trunk/dports/multimedia/transcode/files/patch-ffmpeg-2.0.diff	                        (rev 0)
+++ trunk/dports/multimedia/transcode/files/patch-ffmpeg-2.0.diff	2013-07-31 18:18:14 UTC (rev 108722)
@@ -0,0 +1,227 @@
+diff -ur export.orig/export_ffmpeg.c export/export_ffmpeg.c
+--- export.orig/export_ffmpeg.c	2013-07-30 06:22:41.000000000 -0700
++++ export/export_ffmpeg.c	2013-07-30 06:25:01.000000000 -0700
+@@ -838,8 +838,6 @@
+     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;
+     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 +868,6 @@
+     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;
+     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;
+diff -ur export.orig/ffmpeg_cfg.c export/ffmpeg_cfg.c
+--- export.orig/ffmpeg_cfg.c	2013-07-30 06:22:41.000000000 -0700
++++ export/ffmpeg_cfg.c	2013-07-30 06:28:26.000000000 -0700
+@@ -50,8 +50,6 @@
+ //int lavc_param_vpass = 0;
+ int lavc_param_vrc_strategy = 2;
+ int lavc_param_vb_strategy = 0;
+-int lavc_param_luma_elim_threshold = 0;
+-int lavc_param_chroma_elim_threshold = 0;
+ int lavc_param_packet_size= 0;
+ int lavc_param_strict= 0;
+ int lavc_param_data_partitioning= 0;
+@@ -105,7 +103,6 @@
+ int lavc_param_mv0= 0;
+ int lavc_param_noise_reduction= 0;
+ int lavc_param_qp_rd= 0;
+-int lavc_param_inter_threshold= 0;
+ int lavc_param_sc_threshold= 0;
+ int lavc_param_ss= 0;
+ int lavc_param_top= -1;
+@@ -156,8 +153,6 @@
+     {"vrc_strategy", &lavc_param_vrc_strategy, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 2},
+     {"vb_strategy", &lavc_param_vb_strategy, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 0, 10},
+     {"vb_qoffset", &lavc_param_vb_qoffset, TCCONF_TYPE_FLOAT, TCCONF_FLAG_RANGE, 0.0, 31.0},
+-    {"vlelim", &lavc_param_luma_elim_threshold, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -99, 99},
+-    {"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},
+     {"vdpart", &lavc_param_data_partitioning, TCCONF_TYPE_FLAG, 0, 0, 1},
+@@ -227,7 +222,6 @@
+     {"svcd_sof", &lavc_param_scan_offset, TCCONF_TYPE_FLAG, 0, 0, 1},
+     {"alt", &lavc_param_alt, TCCONF_TYPE_FLAG, 0, 0, 1},
+     {"ilme", &lavc_param_ilme, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_INTERLACED_ME},
+-    {"inter_threshold", &lavc_param_inter_threshold, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -1000000, 1000000},
+     {"sc_threshold", &lavc_param_sc_threshold, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -1000000, 1000000},
+     {"top", &lavc_param_top, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, -1, 1},
+     {"gmc", &lavc_param_gmc, TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_GMC},
+diff -ur export.orig/ffmpeg_cfg.h export/ffmpeg_cfg.h
+--- export.orig/ffmpeg_cfg.h	2013-07-30 06:22:41.000000000 -0700
++++ export/ffmpeg_cfg.h	2013-07-30 06:29:18.000000000 -0700
+@@ -29,8 +29,6 @@
+ //extern int lavc_param_vpass;
+ extern int lavc_param_vrc_strategy;
+ extern int lavc_param_vb_strategy;
+-extern int lavc_param_luma_elim_threshold;
+-extern int lavc_param_chroma_elim_threshold;
+ extern int lavc_param_packet_size;
+ extern int lavc_param_strict;
+ extern int lavc_param_data_partitioning;
+@@ -84,7 +82,6 @@
+ extern int lavc_param_mv0;
+ extern int lavc_param_noise_reduction;
+ extern int lavc_param_qp_rd;
+-extern int lavc_param_inter_threshold;
+ extern int lavc_param_sc_threshold;
+ extern int lavc_param_ss;
+ extern int lavc_param_top;
+diff -ur encode.orig/encode_lavc.c encode/encode_lavc.c
+--- encode.orig/encode_lavc.c	2013-07-30 06:22:30.000000000 -0700
++++ encode/encode_lavc.c	2013-07-30 06:26:20.000000000 -0700
+@@ -978,8 +978,6 @@
+     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->ff_vcontext.strict_std_compliance   = 0;
+     pd->ff_vcontext.dct_algo                = FF_DCT_AUTO;
+     pd->ff_vcontext.idct_algo               = FF_IDCT_AUTO;
+@@ -1159,8 +1157,6 @@
+         { "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 },
+         { "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 },
+diff -ur encode.orig/encode_lavc.c encode/encode_lavc.c
+--- encode.orig/encode_lavc.c	2013-07-30 18:06:41.000000000 -0700
++++ encode/encode_lavc.c	2013-07-30 18:09:11.000000000 -0700
+@@ -1187,7 +1187,6 @@
+         { "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 },
+         { "qpel", PAUX(flags.qpel), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_QPEL },
+         { "alt", PAUX(flags.alt), TCCONF_TYPE_FLAG, 0, 0, 1 },
+         { "ilme", PAUX(flags.ilme), TCCONF_TYPE_FLAG, 0, 0, CODEC_FLAG_INTERLACED_ME },
+diff -ur export.orig/export_ffmpeg.c export/export_ffmpeg.c
+--- export.orig/export_ffmpeg.c	2013-07-30 18:18:50.000000000 -0700
++++ export/export_ffmpeg.c	2013-07-30 18:21:45.000000000 -0700
+@@ -1063,9 +1063,7 @@
+     lavc_venc_context->flags |= lavc_param_trunc;
+     lavc_venc_context->flags |= lavc_param_aic;
+     lavc_venc_context->flags |= lavc_param_v4mv;
+-    lavc_venc_context->flags |= lavc_param_cbp;
+     lavc_venc_context->flags |= lavc_param_mv0;
+-    lavc_venc_context->flags |= lavc_param_qp_rd;
+     lavc_venc_context->flags |= lavc_param_ilme;
+ #if LIBAVCODEC_VERSION_INT < ((52<<16)+(0<<8)+0)   
+     lavc_venc_context->flags |= lavc_param_trell;
+diff -ur export.orig/ffmpeg_cfg.c export/ffmpeg_cfg.c
+--- export.orig/ffmpeg_cfg.c	2013-07-30 18:18:50.000000000 -0700
++++ export/ffmpeg_cfg.c	2013-07-30 18:20:12.000000000 -0700
+@@ -99,10 +99,8 @@
+ int lavc_param_context=0;
+ char *lavc_param_intra_matrix = NULL;
+ char *lavc_param_inter_matrix = NULL;
+-int lavc_param_cbp= 0;
+ int lavc_param_mv0= 0;
+ int lavc_param_noise_reduction= 0;
+-int lavc_param_qp_rd= 0;
+ int lavc_param_sc_threshold= 0;
+ int lavc_param_ss= 0;
+ int lavc_param_top= -1;
+@@ -213,10 +211,8 @@
+     {"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},
+     {"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},
+     {"threads", &lavc_param_threads, TCCONF_TYPE_INT, TCCONF_FLAG_RANGE, 1, 16},
+     {"ss", &lavc_param_ss, TCCONF_TYPE_FLAG, 0, 0, 1},
+     {"svcd_sof", &lavc_param_scan_offset, TCCONF_TYPE_FLAG, 0, 0, 1},
+diff -ur export.orig/ffmpeg_cfg.h export/ffmpeg_cfg.h
+--- export.orig/ffmpeg_cfg.h	2013-07-30 18:18:50.000000000 -0700
++++ export/ffmpeg_cfg.h	2013-07-30 18:23:28.000000000 -0700
+@@ -78,10 +78,8 @@
+ extern int lavc_param_context;
+ extern char *lavc_param_intra_matrix;
+ extern char *lavc_param_inter_matrix;
+-extern int lavc_param_cbp;
+ extern int lavc_param_mv0;
+ extern int lavc_param_noise_reduction;
+-extern int lavc_param_qp_rd;
+ extern int lavc_param_sc_threshold;
+ extern int lavc_param_ss;
+ extern int lavc_param_top;
+diff -ur export.orig/aud_aux.c export/aud_aux.c
+--- export.orig/aud_aux.c	2013-07-30 20:00:53.000000000 -0700
++++ export/aud_aux.c	2013-07-30 20:01:55.000000000 -0700
+@@ -359,7 +359,7 @@
+     //-- 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 -ur export.orig/export_ffmpeg.c export/export_ffmpeg.c
+--- export.orig/export_ffmpeg.c	2013-07-30 20:00:53.000000000 -0700
++++ export/export_ffmpeg.c	2013-07-30 20:05:35.000000000 -0700
+@@ -486,7 +486,7 @@
+ 		            codec->name, codec->fourCC, codec->comments);
+     }
+ 
+-    lavc_venc_context = avcodec_alloc_context();
++    lavc_venc_context = avcodec_alloc_context3(NULL);
+     lavc_venc_frame   = avcodec_alloc_frame();
+ 
+     lavc_convert_frame= avcodec_alloc_frame();
+diff -ur import.orig/decode_lavc.c import/decode_lavc.c
+--- import.orig/decode_lavc.c	2013-07-30 20:01:01.000000000 -0700
++++ import/decode_lavc.c	2013-07-30 20:03:30.000000000 -0700
+@@ -170,7 +170,7 @@
+ 
+   // 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;
+@@ -186,7 +186,7 @@
+   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 -ur import.orig/import_ffmpeg.c import/import_ffmpeg.c
+--- import.orig/import_ffmpeg.c	2013-07-30 20:01:01.000000000 -0700
++++ import/import_ffmpeg.c	2013-07-30 20:04:56.000000000 -0700
+@@ -302,7 +302,7 @@
+ 
+     // 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(MOD_NAME, "Could not allocate enough memory.");
+       return TC_IMPORT_ERROR;
+@@ -344,7 +344,7 @@
+     }
+ 
+     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.",
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130731/7a9912d4/attachment.html>


More information about the macports-changes mailing list