Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Apr 2016 17:40:32 +0000 (UTC)
From:      Jan Beich <jbeich@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r413357 - in head/multimedia/transcode: . files
Message-ID:  <201604151740.u3FHeWUh018591@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Fri Apr 15 17:40:32 2016
New Revision: 413357
URL: https://svnweb.freebsd.org/changeset/ports/413357

Log:
  multimedia/transcode: unbreak build with ffmpeg 3.0
  
  aud_aux.c:329:18: error: use of undeclared identifier 'CODEC_ID_MP2'; did you mean 'AV_CODEC_ID_MP2'?
          codeid = CODEC_ID_MP2;
                   ^~~~~~~~~~~~
                   AV_CODEC_ID_MP2
  /usr/local/include/libavcodec/avcodec.h:419:5: note: 'AV_CODEC_ID_MP2' declared here
      AV_CODEC_ID_MP2 = 0x15000,
      ^
  
  PR:		208818
  Reported by:	antoine (via exp-run)
  Submitted by:	Ben Woods <woodsb02@gmail.com>
  Obtained from:	Arch Linux
  Approved by:	Naram Qashat <cyberbotx@cyberbotx.com> (maintainer)

Added:
  head/multimedia/transcode/files/patch-ffmpeg29   (contents, props changed)
  head/multimedia/transcode/files/patch-ffmpeg3   (contents, props changed)
Modified:
  head/multimedia/transcode/Makefile   (contents, props changed)

Modified: head/multimedia/transcode/Makefile
==============================================================================
--- head/multimedia/transcode/Makefile	Fri Apr 15 17:39:48 2016	(r413356)
+++ head/multimedia/transcode/Makefile	Fri Apr 15 17:40:32 2016	(r413357)
@@ -3,7 +3,7 @@
 
 PORTNAME=	transcode
 PORTVERSION=	1.1.7
-PORTREVISION=	25
+PORTREVISION=	26
 CATEGORIES=	multimedia
 MASTER_SITES=	https://bitbucket.org/france/transcode-tcforge/downloads/
 

Added: head/multimedia/transcode/files/patch-ffmpeg29
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/transcode/files/patch-ffmpeg29	Fri Apr 15 17:40:32 2016	(r413357)
@@ -0,0 +1,352 @@
+Index: encode/encode_lavc.c
+===================================================================
+--- encode/encode_lavc.c.orig
++++ encode/encode_lavc.c
+@@ -233,7 +233,7 @@ static void pre_encode_video_yuv420p(TCL
+                                      vframe_list_t *vframe)
+ {
+     avpicture_fill((AVPicture *)&pd->ff_venc_frame, vframe->video_buf,
+-                    PIX_FMT_YUV420P,
++                    AV_PIX_FMT_YUV420P,
+                     pd->ff_vcontext.width, pd->ff_vcontext.height);
+ }
+ 
+@@ -247,7 +247,7 @@ static void pre_encode_video_yuv420p_huf
+                     IMG_YUV_DEFAULT,
+                     pd->ff_vcontext.width, pd->ff_vcontext.height);
+     avpicture_fill((AVPicture *)&pd->ff_venc_frame, pd->vframe_buf->video_buf,
+-                   PIX_FMT_YUV422P,
++                   AV_PIX_FMT_YUV422P,
+                    pd->ff_vcontext.width, pd->ff_vcontext.height);
+     ac_imgconvert(src, IMG_YUV_DEFAULT,
+                   pd->ff_venc_frame.data, IMG_YUV422P,
+@@ -263,7 +263,7 @@ static void pre_encode_video_yuv422p(TCL
+                     IMG_YUV422P,
+                     pd->ff_vcontext.width, pd->ff_vcontext.height);
+     avpicture_fill((AVPicture *)&pd->ff_venc_frame, pd->vframe_buf->video_buf,
+-                   PIX_FMT_YUV420P,
++                   AV_PIX_FMT_YUV420P,
+                    pd->ff_vcontext.width, pd->ff_vcontext.height);
+     ac_imgconvert(src, IMG_YUV422P,
+                   pd->ff_venc_frame.data, IMG_YUV420P,
+@@ -275,7 +275,7 @@ static void pre_encode_video_yuv422p_huf
+                                              vframe_list_t *vframe)
+ {
+     avpicture_fill((AVPicture *)&pd->ff_venc_frame, vframe->video_buf,
+-                   PIX_FMT_YUV422P,
++                   AV_PIX_FMT_YUV422P,
+                    pd->ff_vcontext.width, pd->ff_vcontext.height);
+ 
+ }
+@@ -285,7 +285,7 @@ static void pre_encode_video_rgb24(TCLav
+                                    vframe_list_t *vframe)
+ {
+     avpicture_fill((AVPicture *)&pd->ff_venc_frame, pd->vframe_buf->video_buf,
+-                   PIX_FMT_YUV420P,
++                   AV_PIX_FMT_YUV420P,
+                    pd->ff_vcontext.width, pd->ff_vcontext.height);
+     ac_imgconvert(&vframe->video_buf, IMG_RGB_DEFAULT,
+                   pd->ff_venc_frame.data, IMG_YUV420P,
+@@ -610,21 +610,21 @@ static int tc_lavc_set_pix_fmt(TCLavcPri
+       case CODEC_YUV:
+         if (TC_VCODEC_ID(pd) == TC_CODEC_HUFFYUV) {
+             pd->tc_pix_fmt = TC_CODEC_YUV422P;
+-            pd->ff_vcontext.pix_fmt = PIX_FMT_YUV422P;
++            pd->ff_vcontext.pix_fmt = AV_PIX_FMT_YUV422P;
+             pd->pre_encode_video = pre_encode_video_yuv420p_huffyuv;
+         } else {
+             pd->tc_pix_fmt = TC_CODEC_YUV420P;
+             pd->ff_vcontext.pix_fmt = (TC_VCODEC_ID(pd) == TC_CODEC_MJPEG) 
+-                                       ? PIX_FMT_YUVJ420P
+-                                       : PIX_FMT_YUV420P;
++                                       ? AV_PIX_FMT_YUVJ420P
++                                       : AV_PIX_FMT_YUV420P;
+             pd->pre_encode_video = pre_encode_video_yuv420p;
+         }
+         break;
+       case CODEC_YUV422:
+         pd->tc_pix_fmt = TC_CODEC_YUV422P;
+         pd->ff_vcontext.pix_fmt = (TC_VCODEC_ID(pd) == TC_CODEC_MJPEG) 
+-                                   ? PIX_FMT_YUVJ422P
+-                                   : PIX_FMT_YUV422P;
++                                   ? AV_PIX_FMT_YUVJ422P
++                                   : AV_PIX_FMT_YUV422P;
+         if (TC_VCODEC_ID(pd) == TC_CODEC_HUFFYUV) {
+             pd->pre_encode_video = pre_encode_video_yuv422p_huffyuv;
+         } else {
+@@ -634,10 +634,10 @@ static int tc_lavc_set_pix_fmt(TCLavcPri
+       case CODEC_RGB:
+         pd->tc_pix_fmt = TC_CODEC_RGB;
+         pd->ff_vcontext.pix_fmt = (TC_VCODEC_ID(pd) == TC_CODEC_HUFFYUV)
+-                                        ? PIX_FMT_YUV422P
++                                        ? AV_PIX_FMT_YUV422P
+                                         : (TC_VCODEC_ID(pd) == TC_CODEC_MJPEG) 
+-                                           ? PIX_FMT_YUVJ420P
+-                                           : PIX_FMT_YUV420P;
++                                           ? AV_PIX_FMT_YUVJ420P
++                                           : AV_PIX_FMT_YUV420P;
+         pd->pre_encode_video = pre_encode_video_rgb24;
+         break;
+       default:
+@@ -1390,7 +1390,7 @@ static int tc_lavc_configure(TCModuleIns
+     /* FIXME: move into core? */
+     TC_INIT_LIBAVCODEC;
+ 
+-    avcodec_get_frame_defaults(&pd->ff_venc_frame);
++    av_frame_unref(&pd->ff_venc_frame);
+     /*
+      * auxiliary config data needs to be blanked too
+      * before any other operation
+@@ -1523,6 +1523,8 @@ static int tc_lavc_encode_video(TCModule
+                                 vframe_list_t *outframe)
+ {
+     TCLavcPrivateData *pd = NULL;
++    AVPacket pkt;
++    int ret, got_packet = 0;
+ 
+     TC_MODULE_SELF_CHECK(self, "encode_video");
+ 
+@@ -1537,12 +1539,15 @@ static int tc_lavc_encode_video(TCModule
+ 
+     pd->pre_encode_video(pd, inframe); 
+ 
++    av_init_packet(&pkt);
++    pkt.data = outframe->video_buf;
++    pkt.size = inframe->video_size;
++
+     TC_LOCK_LIBAVCODEC;
+-    outframe->video_len = avcodec_encode_video(&pd->ff_vcontext,
+-                                               outframe->video_buf,
+-                                               inframe->video_size,
+-                                               &pd->ff_venc_frame);
++    ret = avcodec_encode_video2(&pd->ff_vcontext,   &pkt,
++    				&pd->ff_venc_frame, &got_packet);
+     TC_UNLOCK_LIBAVCODEC;
++    outframe->video_len = ret ? ret : pkt.size;
+ 
+     if (outframe->video_len < 0) {
+         tc_log_warn(MOD_NAME, "encoder error: size (%i)",
+Index: export/export_ffmpeg.c
+===================================================================
+--- export/export_ffmpeg.c.orig
++++ export/export_ffmpeg.c
+@@ -250,9 +250,9 @@ int opt_default(const char *opt, const c
+     for(type=0; type<AVMEDIA_TYPE_NB && ret>= 0; type++){
+ 		/* GLUE: +if */
+ 		if (type == AVMEDIA_TYPE_VIDEO) {
+-        const AVOption *o2 = av_find_opt(avcodec_opts[0], opt, NULL, opt_types[type], opt_types[type]);
+-        if(o2)
+-            ret = av_set_string3(avcodec_opts[type], opt, arg, 1, &o);
++        o = av_opt_find(avcodec_opts[0], opt, NULL, opt_types[type], opt_types[type]);
++        if(o)
++            ret = av_opt_set(avcodec_opts[type], opt, arg, 0);
+ 		/* GLUE: +if */
+ 		}
+     }
+@@ -267,7 +267,10 @@ int opt_default(const char *opt, const c
+         if(opt[0] == 'a')
+             ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_AUDIO], opt+1, arg, 1, &o);
+         else */ if(opt[0] == 'v')
+-            ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_VIDEO], opt+1, arg, 1, &o);
++	{
++	    o = av_opt_find(avcodec_opts[AVMEDIA_TYPE_VIDEO], opt+1, NULL, 0, 0);
++            ret = av_opt_set(avcodec_opts[AVMEDIA_TYPE_VIDEO], opt+1, arg, 0);
++	}
+ 		/* GLUE: disabling
+         else if(opt[0] == 's')
+             ret = av_set_string3(avcodec_opts[AVMEDIA_TYPE_SUBTITLE], opt+1, arg, 1, &o);
+@@ -487,10 +490,10 @@ MOD_init
+     }
+ 
+     lavc_venc_context = avcodec_alloc_context3(lavc_venc_codec);
+-    lavc_venc_frame   = avcodec_alloc_frame();
++    lavc_venc_frame   = av_frame_alloc();
+ 
+-    lavc_convert_frame= avcodec_alloc_frame();
+-    size = avpicture_get_size(PIX_FMT_RGB24, vob->ex_v_width, vob->ex_v_height);
++    lavc_convert_frame= av_frame_alloc();
++    size = avpicture_get_size(AV_PIX_FMT_RGB24, vob->ex_v_width, vob->ex_v_height);
+     enc_buffer = tc_malloc(size);
+ 
+     if (lavc_venc_context == NULL || !enc_buffer || !lavc_convert_frame) {
+@@ -1114,7 +1117,7 @@ MOD_init
+     lavc_venc_context->prediction_method = lavc_param_prediction_method;
+ 
+     if(is_huffyuv)
+-        lavc_venc_context->pix_fmt = PIX_FMT_YUV422P;
++        lavc_venc_context->pix_fmt = AV_PIX_FMT_YUV422P;
+     else
+     {
+         switch(pix_fmt)
+@@ -1123,18 +1126,18 @@ MOD_init
+             case CODEC_RGB:
+             {
+                 if(is_mjpeg)
+-                    lavc_venc_context->pix_fmt = PIX_FMT_YUVJ420P;
++                    lavc_venc_context->pix_fmt = AV_PIX_FMT_YUVJ420P;
+                 else
+-                    lavc_venc_context->pix_fmt = PIX_FMT_YUV420P;
++                    lavc_venc_context->pix_fmt = AV_PIX_FMT_YUV420P;
+                 break;
+             }
+ 
+             case CODEC_YUV422:
+             {
+                 if(is_mjpeg)
+-                    lavc_venc_context->pix_fmt = PIX_FMT_YUVJ422P;
++                    lavc_venc_context->pix_fmt = AV_PIX_FMT_YUVJ422P;
+                 else
+-                    lavc_venc_context->pix_fmt = PIX_FMT_YUV422P;
++                    lavc_venc_context->pix_fmt = AV_PIX_FMT_YUV422P;
+                 break;
+             }
+ 
+@@ -1596,6 +1599,8 @@ MOD_encode
+ 
+   int out_size;
+   const char pict_type_char[5]= {'?', 'I', 'P', 'B', 'S'};
++  AVPacket pkt;
++  int ret, got_packet = 0;
+ 
+   if (param->flag == TC_VIDEO) {
+ 
+@@ -1620,7 +1625,7 @@ MOD_encode
+ 	        	YUV_INIT_PLANES(src, param->buffer, IMG_YUV_DEFAULT,
+ 			                	lavc_venc_context->width, lavc_venc_context->height);
+                 avpicture_fill((AVPicture *)lavc_venc_frame, img_buffer,
+-                               PIX_FMT_YUV422P, lavc_venc_context->width,
++                               AV_PIX_FMT_YUV422P, lavc_venc_context->width,
+                                lavc_venc_context->height);
+         		/* FIXME: can't use tcv_convert (see decode_lavc.c) */
+                 ac_imgconvert(src, IMG_YUV_DEFAULT,
+@@ -1650,7 +1655,7 @@ MOD_encode
+ 		                		lavc_venc_context->width,
+                                 lavc_venc_context->height);
+                 avpicture_fill((AVPicture *)lavc_venc_frame, img_buffer,
+-                               PIX_FMT_YUV420P, lavc_venc_context->width,
++                               AV_PIX_FMT_YUV420P, lavc_venc_context->width,
+                                lavc_venc_context->height);
+                 ac_imgconvert(src, IMG_YUV422P,
+                               lavc_venc_frame->data, IMG_YUV420P,
+@@ -1661,7 +1666,7 @@ MOD_encode
+ 
+         case CODEC_RGB:
+             avpicture_fill((AVPicture *)lavc_venc_frame, img_buffer,
+-                           PIX_FMT_YUV420P, lavc_venc_context->width,
++                           AV_PIX_FMT_YUV420P, lavc_venc_context->width,
+                            lavc_venc_context->height);
+     	    ac_imgconvert(&param->buffer, IMG_RGB_DEFAULT,
+                               lavc_venc_frame->data, IMG_YUV420P,
+@@ -1674,13 +1679,17 @@ MOD_encode
+               return TC_EXPORT_ERROR;
+     }
+ 
++    av_init_packet(&pkt);
++    pkt.data = enc_buffer;
++    pkt.size = size;
+ 
+     TC_LOCK_LIBAVCODEC;
+-    out_size = avcodec_encode_video(lavc_venc_context,
+-                                    enc_buffer, size,
+-                                    lavc_venc_frame);
++    ret = avcodec_encode_video2(lavc_venc_context, &pkt,
++                                    lavc_venc_frame, &got_packet);
+     TC_UNLOCK_LIBAVCODEC;
+ 
++    out_size = ret ? ret : pkt.size;
++
+     if (out_size < 0) {
+       tc_log_warn(MOD_NAME, "encoder error: size (%d)", out_size);
+       return TC_EXPORT_ERROR;
+Index: import/decode_lavc.c
+===================================================================
+--- import/decode_lavc.c.orig
++++ import/decode_lavc.c
+@@ -327,8 +327,8 @@ void decode_lavc(decode_t *decode)
+ 
+       // Convert avcodec image to the requested YUV or RGB format
+       switch (lavc_dec_context->pix_fmt) {
+-	case PIX_FMT_YUVJ420P:
+-	case PIX_FMT_YUV420P:
++	case AV_PIX_FMT_YUVJ420P:
++	case AV_PIX_FMT_YUV420P:
+ 	    // Remove "dead space" at right edge of planes, if any
+ 	    if (picture.linesize[0] != lavc_dec_context->width) {
+ 		int y;
+@@ -352,7 +352,7 @@ void decode_lavc(decode_t *decode)
+ 			  pix_fmt==TC_CODEC_YUV420P ? IMG_YUV420P : IMG_RGB_DEFAULT,
+ 			  lavc_dec_context->width, lavc_dec_context->height);
+ 	    break;
+-	case PIX_FMT_YUV411P:
++	case AV_PIX_FMT_YUV411P:
+ 	    if (picture.linesize[0] != lavc_dec_context->width) {
+ 		int y;
+ 		for (y = 0; y < lavc_dec_context->height; y++) {
+@@ -371,8 +371,8 @@ void decode_lavc(decode_t *decode)
+ 			  pix_fmt==TC_CODEC_YUV420P ? IMG_YUV420P : IMG_RGB_DEFAULT,
+ 			  lavc_dec_context->width, lavc_dec_context->height);
+ 	    break;
+-	case PIX_FMT_YUVJ422P:
+-	case PIX_FMT_YUV422P:
++	case AV_PIX_FMT_YUVJ422P:
++	case AV_PIX_FMT_YUV422P:
+ 	    if (picture.linesize[0] != lavc_dec_context->width) {
+ 		int y;
+ 		for (y = 0; y < lavc_dec_context->height; y++) {
+@@ -391,8 +391,8 @@ void decode_lavc(decode_t *decode)
+ 			  pix_fmt==TC_CODEC_YUV420P ? IMG_YUV420P : IMG_RGB_DEFAULT,
+ 			  lavc_dec_context->width, lavc_dec_context->height);
+ 	    break;
+-	case PIX_FMT_YUVJ444P:
+-	case PIX_FMT_YUV444P:
++	case AV_PIX_FMT_YUVJ444P:
++	case AV_PIX_FMT_YUV444P:
+ 	    if (picture.linesize[0] != lavc_dec_context->width) {
+ 		int y;
+ 		for (y = 0; y < lavc_dec_context->height; y++) {
+Index: import/import_ffmpeg.c
+===================================================================
+--- import/import_ffmpeg.c.orig
++++ import/import_ffmpeg.c
+@@ -661,8 +661,8 @@ retry:
+ 
+     // Convert avcodec image to our internal YUV or RGB format
+     switch (lavc_dec_context->pix_fmt) {
+-      case PIX_FMT_YUVJ420P:
+-      case PIX_FMT_YUV420P:
++      case AV_PIX_FMT_YUVJ420P:
++      case AV_PIX_FMT_YUV420P:
+         src_fmt = IMG_YUV420P;
+         YUV_INIT_PLANES(src_planes, frame, src_fmt,
+                         lavc_dec_context->width, lavc_dec_context->height);
+@@ -693,7 +693,7 @@ retry:
+ 	}
+         break;
+ 
+-      case PIX_FMT_YUV411P:
++      case AV_PIX_FMT_YUV411P:
+         src_fmt = IMG_YUV411P;
+         YUV_INIT_PLANES(src_planes, frame, src_fmt,
+                         lavc_dec_context->width, lavc_dec_context->height);
+@@ -721,8 +721,8 @@ retry:
+         }
+         break;
+ 
+-      case PIX_FMT_YUVJ422P:
+-      case PIX_FMT_YUV422P:
++      case AV_PIX_FMT_YUVJ422P:
++      case AV_PIX_FMT_YUV422P:
+         src_fmt = IMG_YUV422P;
+         YUV_INIT_PLANES(src_planes, frame, src_fmt,
+                         lavc_dec_context->width, lavc_dec_context->height);
+@@ -750,8 +750,8 @@ retry:
+         }
+ 	break;
+ 
+-      case PIX_FMT_YUVJ444P:
+-      case PIX_FMT_YUV444P:
++      case AV_PIX_FMT_YUVJ444P:
++      case AV_PIX_FMT_YUV444P:
+         src_fmt = IMG_YUV444P;
+         YUV_INIT_PLANES(src_planes, frame, src_fmt,
+                         lavc_dec_context->width, lavc_dec_context->height);

Added: head/multimedia/transcode/files/patch-ffmpeg3
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/multimedia/transcode/files/patch-ffmpeg3	Fri Apr 15 17:40:32 2016	(r413357)
@@ -0,0 +1,213 @@
+--- export/aud_aux.c.orig	2016-02-16 23:38:40.162690789 +0000
++++ export/aud_aux.c	2016-02-16 23:40:50.335488439 +0000
+@@ -326,10 +326,10 @@
+ 
+     switch (o_codec) {
+       case   0x50:
+-        codeid = CODEC_ID_MP2;
++        codeid = AV_CODEC_ID_MP2;
+         break;
+       case 0x2000:
+-        codeid = CODEC_ID_AC3;
++        codeid = AV_CODEC_ID_AC3;
+         break;
+       default:
+         tc_warn("cannot init ffmpeg with %x", o_codec);
+@@ -363,7 +363,7 @@
+     TC_UNLOCK_LIBAVCODEC;
+     if (ret < 0) {
+         tc_warn("tc_audio_init_ffmpeg: could not open %s codec !",
+-                (codeid == CODEC_ID_MP2) ?"mpa" :"ac3");
++                (codeid == AV_CODEC_ID_MP2) ?"mpa" :"ac3");
+         return(TC_EXPORT_ERROR);
+     }
+ 
+--- import/import_ffmpeg.c.orig	2016-02-16 23:52:36.192589648 +0000
++++ import/import_ffmpeg.c	2016-02-16 23:54:38.728757498 +0000
+@@ -59,51 +59,51 @@
+ 
+ // fourCC to ID mapping taken from MPlayer's codecs.conf
+ static struct ffmpeg_codec ffmpeg_codecs[] = {
+-  {CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41",
++  {AV_CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41",
+     {"MP41", "DIV1", ""}},
+-  {CODEC_ID_MSMPEG4V2, TC_CODEC_MP42, "mp42",
++  {AV_CODEC_ID_MSMPEG4V2, TC_CODEC_MP42, "mp42",
+     {"MP42", "DIV2", ""}},
+-  {CODEC_ID_MSMPEG4V3, TC_CODEC_DIVX3, "msmpeg4",
++  {AV_CODEC_ID_MSMPEG4V3, TC_CODEC_DIVX3, "msmpeg4",
+     {"DIV3", "DIV5", "AP41", "MPG3", "MP43", ""}},
+-  {CODEC_ID_MPEG4, TC_CODEC_DIVX4, "mpeg4",
++  {AV_CODEC_ID_MPEG4, TC_CODEC_DIVX4, "mpeg4",
+     {"DIVX", "XVID", "MP4S", "M4S2", "MP4V", "UMP4", "DX50", ""}},
+-  {CODEC_ID_MJPEG, TC_CODEC_MJPEG, "mjpeg",
++  {AV_CODEC_ID_MJPEG, TC_CODEC_MJPEG, "mjpeg",
+     {"MJPG", "AVRN", "AVDJ", "JPEG", "MJPA", "JFIF", ""}},
+-  {CODEC_ID_MPEG1VIDEO, TC_CODEC_MPG1, "mpeg1video",
++  {AV_CODEC_ID_MPEG1VIDEO, TC_CODEC_MPG1, "mpeg1video",
+     {"MPG1", ""}},
+-  {CODEC_ID_DVVIDEO, TC_CODEC_DV, "dvvideo",
++  {AV_CODEC_ID_DVVIDEO, TC_CODEC_DV, "dvvideo",
+     {"DVSD", ""}},
+-  {CODEC_ID_WMV1, TC_CODEC_WMV1, "wmv1",
++  {AV_CODEC_ID_WMV1, TC_CODEC_WMV1, "wmv1",
+     {"WMV1", ""}},
+-  {CODEC_ID_WMV2, TC_CODEC_WMV2, "wmv2",
++  {AV_CODEC_ID_WMV2, TC_CODEC_WMV2, "wmv2",
+     {"WMV2", ""}},
+-  {CODEC_ID_HUFFYUV, TC_CODEC_HUFFYUV, "hfyu",
++  {AV_CODEC_ID_HUFFYUV, TC_CODEC_HUFFYUV, "hfyu",
+     {"HFYU", ""}},
+-  {CODEC_ID_H263I, TC_CODEC_H263I, "h263i",
++  {AV_CODEC_ID_H263I, TC_CODEC_H263I, "h263i",
+     {"I263", ""}},
+-  {CODEC_ID_H263P, TC_CODEC_H263P, "h263p",
++  {AV_CODEC_ID_H263P, TC_CODEC_H263P, "h263p",
+     {"H263", "U263", "VIV1", ""}},
+-  {CODEC_ID_H264, TC_CODEC_H264, "h264",
++  {AV_CODEC_ID_H264, TC_CODEC_H264, "h264",
+     {"H264", "h264", "X264", "x264", "avc1", ""}},
+-  {CODEC_ID_RV10, TC_CODEC_RV10, "rv10",
++  {AV_CODEC_ID_RV10, TC_CODEC_RV10, "rv10",
+     {"RV10", "RV13", ""}},
+-  {CODEC_ID_SVQ1, TC_CODEC_SVQ1, "svq1",
++  {AV_CODEC_ID_SVQ1, TC_CODEC_SVQ1, "svq1",
+     {"SVQ1", ""}},
+-  {CODEC_ID_SVQ3, TC_CODEC_SVQ3, "svq3",
++  {AV_CODEC_ID_SVQ3, TC_CODEC_SVQ3, "svq3",
+     {"SVQ3", ""}},
+-  {CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG2, "mpeg2video",
++  {AV_CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG2, "mpeg2video",
+     {"MPG2", ""}},
+-  {CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG, "mpeg2video",
++  {AV_CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG, "mpeg2video",
+     {"MPG2", ""}},
+-  {CODEC_ID_ASV1, TC_CODEC_ASV1, "asv1",
++  {AV_CODEC_ID_ASV1, TC_CODEC_ASV1, "asv1",
+     {"ASV1", ""}},
+-  {CODEC_ID_ASV2, TC_CODEC_ASV2, "asv2",
++  {AV_CODEC_ID_ASV2, TC_CODEC_ASV2, "asv2",
+     {"ASV2", ""}},
+-  {CODEC_ID_FFV1, TC_CODEC_FFV1, "ffv1",
++  {AV_CODEC_ID_FFV1, TC_CODEC_FFV1, "ffv1",
+     {"FFV1", ""}},
+-  {CODEC_ID_RAWVIDEO, TC_CODEC_YUV420P, "raw",
++  {AV_CODEC_ID_RAWVIDEO, TC_CODEC_YUV420P, "raw",
+     {"I420", "IYUV", ""}},
+-  {CODEC_ID_RAWVIDEO, TC_CODEC_YUV422P, "raw",
++  {AV_CODEC_ID_RAWVIDEO, TC_CODEC_YUV422P, "raw",
+     {"Y42B", ""}},
+   {0, TC_CODEC_UNKNOWN, NULL, {""}}};
+ 
+@@ -324,13 +324,13 @@
+     // XXX: some codecs need extra data
+     switch (codec->id)
+     {
+-      case CODEC_ID_MJPEG: extra_data_size  = 28; break;
+-      case CODEC_ID_LJPEG: extra_data_size  = 28; break;
+-      case CODEC_ID_HUFFYUV: extra_data_size = 1000; break;
+-      case CODEC_ID_ASV1: extra_data_size = 8; break;
+-      case CODEC_ID_ASV2: extra_data_size = 8; break;
+-      case CODEC_ID_WMV1: extra_data_size = 4; break;
+-      case CODEC_ID_WMV2: extra_data_size = 4; break;
++      case AV_CODEC_ID_MJPEG: extra_data_size  = 28; break;
++      case AV_CODEC_ID_LJPEG: extra_data_size  = 28; break;
++      case AV_CODEC_ID_HUFFYUV: extra_data_size = 1000; break;
++      case AV_CODEC_ID_ASV1: extra_data_size = 8; break;
++      case AV_CODEC_ID_ASV2: extra_data_size = 8; break;
++      case AV_CODEC_ID_WMV1: extra_data_size = 4; break;
++      case AV_CODEC_ID_WMV2: extra_data_size = 4; break;
+       default: extra_data_size = 0; break;
+     }
+ 
+@@ -360,7 +360,7 @@
+         frame_size = x_dim*y_dim + 2*UV_PLANE_SIZE(IMG_YUV_DEFAULT,x_dim,y_dim);
+ 
+ 	// we adapt the color space
+-        if(codec->id == CODEC_ID_MJPEG) {
++        if(codec->id == AV_CODEC_ID_MJPEG) {
+ 	  enable_levels_filter();
+         }
+         break;
+@@ -434,7 +434,7 @@
+       }
+ 
+       // we adapt the color space
+-      if(codec->id == CODEC_ID_MJPEG) {
++      if(codec->id == AV_CODEC_ID_MJPEG) {
+         enable_levels_filter();
+       }
+ 
+@@ -504,13 +504,13 @@
+       int bkey = 0;
+ 
+       // check for keyframes
+-      if (codec->id == CODEC_ID_MSMPEG4V3) {
++      if (codec->id == AV_CODEC_ID_MSMPEG4V3) {
+ 	if (divx3_is_key(buffer)) bkey = 1;
+       }
+-      else if (codec->id == CODEC_ID_MPEG4) {
++      else if (codec->id == AV_CODEC_ID_MPEG4) {
+ 	if (mpeg4_is_key(buffer, bytes_read)) bkey = 1;
+       }
+-      else if (codec->id == CODEC_ID_MJPEG) {
++      else if (codec->id == AV_CODEC_ID_MJPEG) {
+ 	bkey = 1;
+       }
+ 
+--- import/decode_lavc.c.orig	2016-02-16 23:56:35.488282034 +0000
++++ import/decode_lavc.c	2016-02-16 23:56:55.201535074 +0000
+@@ -58,37 +58,37 @@
+ 
+ // fourCC to ID mapping taken from MPlayer's codecs.conf
+ static struct ffmpeg_codec ffmpeg_codecs[] = {
+-  {CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41",
++  {AV_CODEC_ID_MSMPEG4V1, TC_CODEC_ERROR, "mp41",
+     {"MP41", "DIV1", ""}},
+-  {CODEC_ID_MSMPEG4V2, TC_CODEC_MP42, "mp42",
++  {AV_CODEC_ID_MSMPEG4V2, TC_CODEC_MP42, "mp42",
+     {"MP42", "DIV2", ""}},
+-  {CODEC_ID_MSMPEG4V3, TC_CODEC_DIVX3, "msmpeg4",
++  {AV_CODEC_ID_MSMPEG4V3, TC_CODEC_DIVX3, "msmpeg4",
+     {"DIV3", "DIV5", "AP41", "MPG3", "MP43", ""}},
+-  {CODEC_ID_MPEG4, TC_CODEC_DIVX4, "mpeg4",
++  {AV_CODEC_ID_MPEG4, TC_CODEC_DIVX4, "mpeg4",
+     {"DIVX", "XVID", "MP4S", "M4S2", "MP4V", "UMP4", "DX50", ""}},
+-  {CODEC_ID_MJPEG, TC_CODEC_MJPEG, "mjpeg",
++  {AV_CODEC_ID_MJPEG, TC_CODEC_MJPEG, "mjpeg",
+     {"MJPG", "AVRN", "AVDJ", "JPEG", "MJPA", "JFIF", ""}},
+-  {CODEC_ID_MPEG1VIDEO, TC_CODEC_MPEG1VIDEO, "mpeg1video",
++  {AV_CODEC_ID_MPEG1VIDEO, TC_CODEC_MPEG1VIDEO, "mpeg1video",
+     {"MPG1", ""}},
+-  {CODEC_ID_DVVIDEO, TC_CODEC_DV, "dvvideo",
++  {AV_CODEC_ID_DVVIDEO, TC_CODEC_DV, "dvvideo",
+     {"DVSD", ""}},
+-  {CODEC_ID_WMV1, TC_CODEC_WMV1, "wmv1",
++  {AV_CODEC_ID_WMV1, TC_CODEC_WMV1, "wmv1",
+     {"WMV1", ""}},
+-  {CODEC_ID_WMV2, TC_CODEC_WMV2, "wmv2",
++  {AV_CODEC_ID_WMV2, TC_CODEC_WMV2, "wmv2",
+     {"WMV2", ""}},
+-  {CODEC_ID_HUFFYUV, TC_CODEC_HUFFYUV, "hfyu",
++  {AV_CODEC_ID_HUFFYUV, TC_CODEC_HUFFYUV, "hfyu",
+     {"HFYU", ""}},
+-  {CODEC_ID_H263I, TC_CODEC_H263I, "h263i",
++  {AV_CODEC_ID_H263I, TC_CODEC_H263I, "h263i",
+     {"I263", ""}},
+-  {CODEC_ID_H263P, TC_CODEC_H263P, "h263p",
++  {AV_CODEC_ID_H263P, TC_CODEC_H263P, "h263p",
+     {"H263", "U263", "VIV1", ""}},
+-  {CODEC_ID_RV10, TC_CODEC_RV10, "rv10",
++  {AV_CODEC_ID_RV10, TC_CODEC_RV10, "rv10",
+     {"RV10", "RV13", ""}},
+-  {CODEC_ID_SVQ1, TC_CODEC_SVQ1, "svq1",
++  {AV_CODEC_ID_SVQ1, TC_CODEC_SVQ1, "svq1",
+     {"SVQ1", ""}},
+-  {CODEC_ID_SVQ3, TC_CODEC_SVQ3, "svq3",
++  {AV_CODEC_ID_SVQ3, TC_CODEC_SVQ3, "svq3",
+     {"SVQ3", ""}},
+-  {CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG2, "mpeg2video",
++  {AV_CODEC_ID_MPEG2VIDEO, TC_CODEC_MPEG2, "mpeg2video",
+     {"MPG2", ""}},
+   {0, TC_CODEC_UNKNOWN, NULL, {""}}};
+ 



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