Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 May 2016 15:35:20 +0000 (UTC)
From:      Ben Woods <woodsb02@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r414944 - in head/multimedia/vdr-plugin-markad: . files
Message-ID:  <201605101535.u4AFZK0x070603@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: woodsb02
Date: Tue May 10 15:35:19 2016
New Revision: 414944
URL: https://svnweb.freebsd.org/changeset/ports/414944

Log:
  multimedia/vdr-plugin-markad: Fix build with ffmpeg 3.0.x
  - Update patch of command/decoder.cpp to allow vdr-plugin-markad to
    build successfully once multimedia/ffmpeg is updated to 3.0.x.
    Note that multimedia/ffmpeg is currently still on the 2.8.x branch,
    however this patch is backwards compatible with ffmpeg 2.8.x.
    The additional changes to this file were based on upstream bug
    report #1898 [1], and also the requirement to replace
    s/avcodec_alloc_frame/av_frame_alloc/g.
  - Regenerate patches with makepatch (pet portlint), and remove
    PATCH_STRIP=-p1 from Makefile.
  
    [1] https://projects.vdr-developer.org/issues/1898
  
  PR:		209386
  Reported by:	antoine (PR207547)
  Reviewed by:	mat (mentor)
  Approved by:	adamw (mentor)
  Differential Revision:	https://reviews.freebsd.org/D6283

Added:
  head/multimedia/vdr-plugin-markad/files/patch-command_Makefile
     - copied, changed from r414943, head/multimedia/vdr-plugin-markad/files/patch-command-Makefile
  head/multimedia/vdr-plugin-markad/files/patch-command_decoder.cpp
     - copied, changed from r414943, head/multimedia/vdr-plugin-markad/files/patch-command-decoder.cpp
  head/multimedia/vdr-plugin-markad/files/patch-command_decoder.h
     - copied, changed from r414943, head/multimedia/vdr-plugin-markad/files/patch-vdr-markad-0.1.4-libav9
  head/multimedia/vdr-plugin-markad/files/patch-command_markad-standalone.cpp
     - copied, changed from r414943, head/multimedia/vdr-plugin-markad/files/patch-command-markad-standalone.cpp
  head/multimedia/vdr-plugin-markad/files/patch-plugin_Makefile
     - copied, changed from r414943, head/multimedia/vdr-plugin-markad/files/patch-plugin-Makefile
  head/multimedia/vdr-plugin-markad/files/patch-plugin_markad.cpp
     - copied, changed from r414943, head/multimedia/vdr-plugin-markad/files/patch-plugin-markad.cpp
  head/multimedia/vdr-plugin-markad/files/patch-plugin_status.cpp
     - copied, changed from r414943, head/multimedia/vdr-plugin-markad/files/patch-plugin-status.cpp
Deleted:
  head/multimedia/vdr-plugin-markad/files/patch-command-Makefile
  head/multimedia/vdr-plugin-markad/files/patch-command-decoder.cpp
  head/multimedia/vdr-plugin-markad/files/patch-command-decoder.cpp-ffmpeg1
  head/multimedia/vdr-plugin-markad/files/patch-command-markad-standalone.cpp
  head/multimedia/vdr-plugin-markad/files/patch-plugin-Makefile
  head/multimedia/vdr-plugin-markad/files/patch-plugin-markad.cpp
  head/multimedia/vdr-plugin-markad/files/patch-plugin-status.cpp
  head/multimedia/vdr-plugin-markad/files/patch-vdr-markad-0.1.4-libav9
Modified:
  head/multimedia/vdr-plugin-markad/Makefile
  head/multimedia/vdr-plugin-markad/files/patch-Makefile

Modified: head/multimedia/vdr-plugin-markad/Makefile
==============================================================================
--- head/multimedia/vdr-plugin-markad/Makefile	Tue May 10 15:20:42 2016	(r414943)
+++ head/multimedia/vdr-plugin-markad/Makefile	Tue May 10 15:35:19 2016	(r414944)
@@ -13,7 +13,6 @@ COMMENT=	Video Disk Recorder - MarkAd pl
 LIB_DEPENDS+=	libavcodec.so:multimedia/ffmpeg
 
 USES=		execinfo pkgconfig tar:tgz
-PATCH_STRIP=	-p1
 HAVE_CONFIGURE=	yes
 PORTDOCS=	COPYING README HISTORY
 PORTDATA=	logos

Modified: head/multimedia/vdr-plugin-markad/files/patch-Makefile
==============================================================================
--- head/multimedia/vdr-plugin-markad/files/patch-Makefile	Tue May 10 15:20:42 2016	(r414943)
+++ head/multimedia/vdr-plugin-markad/files/patch-Makefile	Tue May 10 15:35:19 2016	(r414944)
@@ -1,5 +1,5 @@
---- a/Makefile
-+++ b/Makefile
+--- Makefile.orig	2012-09-11 07:55:41 UTC
++++ Makefile
 @@ -13,10 +13,10 @@ ARCHIVE = markad-$(VERSION)
  PACKAGE = vdr-$(ARCHIVE)
  

Copied and modified: head/multimedia/vdr-plugin-markad/files/patch-command_Makefile (from r414943, head/multimedia/vdr-plugin-markad/files/patch-command-Makefile)
==============================================================================
--- head/multimedia/vdr-plugin-markad/files/patch-command-Makefile	Tue May 10 15:20:42 2016	(r414943, copy source)
+++ head/multimedia/vdr-plugin-markad/files/patch-command_Makefile	Tue May 10 15:35:19 2016	(r414944)
@@ -1,5 +1,5 @@
---- a/command/Makefile
-+++ b/command/Makefile
+--- command/Makefile.orig	2012-09-11 07:54:03 UTC
++++ command/Makefile
 @@ -16,6 +16,10 @@ CXXFLAGS ?= -g -rdynamic -O3 -funroll-lo
  PKG-CONFIG ?= pkg-config
  STRIP ?= strip

Copied and modified: head/multimedia/vdr-plugin-markad/files/patch-command_decoder.cpp (from r414943, head/multimedia/vdr-plugin-markad/files/patch-command-decoder.cpp)
==============================================================================
--- head/multimedia/vdr-plugin-markad/files/patch-command-decoder.cpp	Tue May 10 15:20:42 2016	(r414943, copy source)
+++ head/multimedia/vdr-plugin-markad/files/patch-command_decoder.cpp	Tue May 10 15:35:19 2016	(r414944)
@@ -1,6 +1,6 @@
---- a/command/decoder.cpp
-+++ b/command/decoder.cpp
-@@ -6,7 +6,12 @@
+--- command/decoder.cpp.orig	2012-04-02 19:41:15 UTC
++++ command/decoder.cpp
+@@ -6,11 +6,17 @@
   */
  
  #include <stdint.h>
@@ -13,15 +13,20 @@
  #include <errno.h>
  #include <sys/types.h>
  #include <string.h>
-@@ -107,6 +112,7 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH
-     noticeERRMP2=false;
-     noticeERRAC3=false;
+ #include <cstdlib>
++#include <stdio.h>
+ 
+ #include "decoder.h"
+ 
+@@ -113,6 +119,7 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH
+ 
+     noticeERRVID=false;
  
 +#ifndef __FreeBSD__
      cpu_set_t cpumask;
      uint len = sizeof(cpumask);
-     int cpucount;
-@@ -118,6 +124,12 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH
+     int cpucount=1;
+@@ -120,6 +127,12 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH
      {
          cpucount=CPU_COUNT(&cpumask);
      }
@@ -34,3 +39,127 @@
  
      if (Threads==-1)
      {
+@@ -151,28 +164,28 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH
+     }
+ 
+     video_codec=NULL;
+-    CodecID video_codecid;
++    AVCodecID video_codecid;
+ 
+     if (useH264)
+     {
+-        video_codecid=CODEC_ID_H264;
++        video_codecid=AV_CODEC_ID_H264;
+     }
+     else
+     {
+-        video_codecid=CODEC_ID_MPEG2VIDEO_XVMC;
++        video_codecid=AV_CODEC_ID_MPEG2VIDEO_XVMC;
+     }
+ 
+     video_codec = avcodec_find_decoder(video_codecid);
+-    if ((!video_codec) && (video_codecid==CODEC_ID_MPEG2VIDEO_XVMC))
++    if ((!video_codec) && (video_codecid==AV_CODEC_ID_MPEG2VIDEO_XVMC))
+     {
+         // fallback to MPEG2VIDEO
+-        video_codecid=CODEC_ID_MPEG2VIDEO;
++        video_codecid=AV_CODEC_ID_MPEG2VIDEO;
+         video_codec=avcodec_find_decoder(video_codecid);
+     }
+ 
+     if (video_codec)
+     {
+-        video_context = avcodec_alloc_context();
++        video_context = avcodec_alloc_context3(NULL);
+         if (video_context)
+         {
+             if (video_codec->capabilities & CODEC_CAP_TRUNCATED)
+@@ -183,7 +196,7 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH
+ 
+             av_log_set_level(AV_LOG_FATAL); // silence decoder output
+ 
+-            if (video_codecid==CODEC_ID_H264)
++            if (video_codecid==AV_CODEC_ID_H264)
+             {
+                 video_context->flags2|=CODEC_FLAG2_CHUNKS; // needed for H264!
+             }
+@@ -198,15 +211,15 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH
+ #else
+             int ret=avcodec_open(video_context, video_codec);
+ #endif
+-            if ((ret < 0) && (video_codecid==CODEC_ID_MPEG2VIDEO_XVMC))
++            if ((ret < 0) && (video_codecid==AV_CODEC_ID_MPEG2VIDEO_XVMC))
+             {
+                 // fallback to MPEG2VIDEO
+-                video_codecid=CODEC_ID_MPEG2VIDEO;
++                video_codecid=AV_CODEC_ID_MPEG2VIDEO;
+                 video_codec=avcodec_find_decoder(video_codecid);
+                 if (video_codec)
+                 {
+                     video_context->codec_type=AVMEDIA_TYPE_UNKNOWN;
+-                    video_context->codec_id=CODEC_ID_NONE;
++                    video_context->codec_id=AV_CODEC_ID_NONE;
+                     video_context->codec_tag=0;
+                     memset(video_context->codec_name,0,sizeof(video_context->codec_name));
+ #if LIBAVCODEC_VERSION_INT >= ((53<<16)+(5<<8)+0)
+@@ -225,13 +238,13 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH
+             {
+                 switch (video_codecid)
+                 {
+-                case CODEC_ID_H264:
++                case AV_CODEC_ID_H264:
+                     esyslog("could not open codec for H264");
+                     break;
+-                case CODEC_ID_MPEG2VIDEO_XVMC:
++                case AV_CODEC_ID_MPEG2VIDEO_XVMC:
+                     esyslog("could not open codec MPEG2 (XVMC)");
+                     break;
+-                case CODEC_ID_MPEG2VIDEO:
++                case AV_CODEC_ID_MPEG2VIDEO:
+                     esyslog("could not open codec MPEG2");
+                     break;
+                 default:
+@@ -256,7 +269,7 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH
+                 }
+ #endif
+ 
+-                video_frame = avcodec_alloc_frame();
++                video_frame = av_frame_alloc();
+                 if (!video_frame)
+                 {
+                     esyslog("could not allocate frame");
+@@ -286,13 +299,13 @@ cMarkAdDecoder::cMarkAdDecoder(bool useH
+     {
+         switch (video_codecid)
+         {
+-        case CODEC_ID_H264:
++        case AV_CODEC_ID_H264:
+             esyslog("codec for H264 not found");
+             break;
+-        case CODEC_ID_MPEG2VIDEO_XVMC:
++        case AV_CODEC_ID_MPEG2VIDEO_XVMC:
+             esyslog("codec for MPEG2 (XVMC) not found");
+             break;
+-        case CODEC_ID_MPEG2VIDEO:
++        case AV_CODEC_ID_MPEG2VIDEO:
+             esyslog("codec for MPEG2 not found");
+             break;
+         default:
+@@ -321,7 +334,7 @@ bool cMarkAdDecoder::Clear()
+     {
+         avcodec_flush_buffers(video_context);
+         AVCodecContext *dest;
+-        dest=avcodec_alloc_context();
++        dest=avcodec_alloc_context3(NULL);
+         if (dest)
+         {
+             if (avcodec_copy_context(dest,video_context)!=0) ret=false;
+@@ -384,7 +397,7 @@ bool cMarkAdDecoder::DecodeVideo(MarkAdC
+     if (!video_frame) return false;
+     maContext->Video.Data.Valid=false;
+ 
+-    if ((video_context->codec_id==CODEC_ID_H264) && (!video_context->skip_frame))
++    if ((video_context->codec_id==AV_CODEC_ID_H264) && (!video_context->skip_frame))
+     {
+         // with H264 we cannot set skip_frame just to NONKEY, is depends on Interlaced...
+         if (maContext->Video.Info.Height)

Copied and modified: head/multimedia/vdr-plugin-markad/files/patch-command_decoder.h (from r414943, head/multimedia/vdr-plugin-markad/files/patch-vdr-markad-0.1.4-libav9)
==============================================================================
--- head/multimedia/vdr-plugin-markad/files/patch-vdr-markad-0.1.4-libav9	Tue May 10 15:20:42 2016	(r414943, copy source)
+++ head/multimedia/vdr-plugin-markad/files/patch-command_decoder.h	Tue May 10 15:35:19 2016	(r414944)
@@ -1,36 +1,6 @@
-diff -urN markad-0.1.4.old/command/decoder.cpp markad-0.1.4/command/decoder.cpp
---- markad-0.1.4.old/command/decoder.cpp	2013-06-17 21:52:44.333367552 +0200
-+++ markad-0.1.4/command/decoder.cpp	2013-06-17 21:53:03.708366863 +0200
-@@ -11,6 +11,7 @@
- #include <sys/types.h>
- #include <string.h>
- #include <cstdlib>
-+#include <stdio.h>
- 
- #include "decoder.h"
- 
-@@ -172,7 +173,7 @@
- 
-     if (video_codec)
-     {
--        video_context = avcodec_alloc_context();
-+        video_context = avcodec_alloc_context3(NULL);
-         if (video_context)
-         {
-             if (video_codec->capabilities & CODEC_CAP_TRUNCATED)
-@@ -321,7 +322,7 @@
-     {
-         avcodec_flush_buffers(video_context);
-         AVCodecContext *dest;
--        dest=avcodec_alloc_context();
-+        dest=avcodec_alloc_context3(NULL);
-         if (dest)
-         {
-             if (avcodec_copy_context(dest,video_context)!=0) ret=false;
-diff -urN markad-0.1.4.old/command/decoder.h markad-0.1.4/command/decoder.h
---- markad-0.1.4.old/command/decoder.h	2013-06-17 21:52:44.333367552 +0200
-+++ markad-0.1.4/command/decoder.h	2013-06-17 21:53:03.708366863 +0200
-@@ -18,6 +18,7 @@
+--- command/decoder.h.orig	2012-02-24 20:08:34 UTC
++++ command/decoder.h
+@@ -18,6 +18,7 @@ extern "C"
  #include <avcodec.h>
  #else
  #include <libavcodec/avcodec.h>

Copied and modified: head/multimedia/vdr-plugin-markad/files/patch-command_markad-standalone.cpp (from r414943, head/multimedia/vdr-plugin-markad/files/patch-command-markad-standalone.cpp)
==============================================================================
--- head/multimedia/vdr-plugin-markad/files/patch-command-markad-standalone.cpp	Tue May 10 15:20:42 2016	(r414943, copy source)
+++ head/multimedia/vdr-plugin-markad/files/patch-command_markad-standalone.cpp	Tue May 10 15:35:19 2016	(r414944)
@@ -1,5 +1,5 @@
---- a/command/markad-standalone.cpp
-+++ b/command/markad-standalone.cpp
+--- command/markad-standalone.cpp.orig	2012-09-11 11:06:28 UTC
++++ command/markad-standalone.cpp
 @@ -24,7 +24,13 @@
  #include <locale.h>
  #include <libintl.h>

Copied and modified: head/multimedia/vdr-plugin-markad/files/patch-plugin_Makefile (from r414943, head/multimedia/vdr-plugin-markad/files/patch-plugin-Makefile)
==============================================================================
--- head/multimedia/vdr-plugin-markad/files/patch-plugin-Makefile	Tue May 10 15:20:42 2016	(r414943, copy source)
+++ head/multimedia/vdr-plugin-markad/files/patch-plugin_Makefile	Tue May 10 15:35:19 2016	(r414944)
@@ -1,5 +1,5 @@
---- a/plugin/Makefile
-+++ b/plugin/Makefile
+--- plugin/Makefile.orig	2012-02-13 19:32:27 UTC
++++ plugin/Makefile
 @@ -99,11 +99,19 @@ i18n: $(I18Nmsgs) $(I18Npot)
  ### Targets:
  

Copied and modified: head/multimedia/vdr-plugin-markad/files/patch-plugin_markad.cpp (from r414943, head/multimedia/vdr-plugin-markad/files/patch-plugin-markad.cpp)
==============================================================================
--- head/multimedia/vdr-plugin-markad/files/patch-plugin-markad.cpp	Tue May 10 15:20:42 2016	(r414943, copy source)
+++ head/multimedia/vdr-plugin-markad/files/patch-plugin_markad.cpp	Tue May 10 15:35:19 2016	(r414944)
@@ -1,5 +1,5 @@
---- a/plugin/markad.cpp
-+++ b/plugin/markad.cpp
+--- plugin/markad.cpp.orig	2012-09-10 12:45:12 UTC
++++ plugin/markad.cpp
 @@ -15,8 +15,16 @@
  
  #include "markad.h"

Copied and modified: head/multimedia/vdr-plugin-markad/files/patch-plugin_status.cpp (from r414943, head/multimedia/vdr-plugin-markad/files/patch-plugin-status.cpp)
==============================================================================
--- head/multimedia/vdr-plugin-markad/files/patch-plugin-status.cpp	Tue May 10 15:20:42 2016	(r414943, copy source)
+++ head/multimedia/vdr-plugin-markad/files/patch-plugin_status.cpp	Tue May 10 15:35:19 2016	(r414944)
@@ -1,5 +1,5 @@
---- a/plugin/status.cpp
-+++ b/plugin/status.cpp
+--- plugin/status.cpp.orig	2012-09-09 23:00:32 UTC
++++ plugin/status.cpp
 @@ -6,6 +6,12 @@
   */
  



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