Index: head/multimedia/vdr-plugin-osdpip/Makefile =================================================================== --- head/multimedia/vdr-plugin-osdpip/Makefile (revision 416730) +++ head/multimedia/vdr-plugin-osdpip/Makefile (revision 416731) @@ -1,38 +1,39 @@ # Created by: Juergen Lock # $FreeBSD$ PORTNAME= vdr-plugin-osdpip -PORTVERSION= 0.1.1 -PORTREVISION= 6 +PORTVERSION= 0.1.2 CATEGORIES= multimedia -MASTER_SITES= http://projects.vdr-developer.org/attachments/download/880/ +MASTER_SITES= http://projects.vdr-developer.org/attachments/download/961/ DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX} +DIST_SUBDIR= vdr -PATCH_SITES= http://projects.vdr-developer.org/attachments/download/893/ -PATCHFILES= osdpip-vdr-1.7.26.diff - MAINTAINER= ports@FreeBSD.org COMMENT= Video Disk Recorder - picture-in-picture plugin +LICENSE= GPLv2 +LICENSE_FILE= ${WRKSRC}/COPYING + LIB_DEPENDS+= libavcodec.so:multimedia/ffmpeg USES= pkgconfig tar:tgz -DIST_SUBDIR= vdr -PATCH_STRIP= -p1 -PATCH_DIST_STRIP= -p1 HAVE_CONFIGURE= yes PORTDOCS= COPYING README HISTORY WRKSRC= ${WRKDIR}/${PLUGIN}-${DISTVERSION} +OPTIONS_DEFINE= DOCS + .include "${.CURDIR}/../vdr/Makefile.plugins" post-patch: post-patch-plugin pre-install: ${MKDIR} ${STAGEDIR}${PREFIX}/lib/vdr post-install: post-install-pluginlocales + +post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} (cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}) .include Index: head/multimedia/vdr-plugin-osdpip/distinfo =================================================================== --- head/multimedia/vdr-plugin-osdpip/distinfo (revision 416730) +++ head/multimedia/vdr-plugin-osdpip/distinfo (revision 416731) @@ -1,4 +1,3 @@ -SHA256 (vdr/vdr-osdpip-0.1.1.tgz) = 777f5fd9abbfbf43227c78eb2b363d3bdade2b368425ed78caa836d4c38bfef4 -SIZE (vdr/vdr-osdpip-0.1.1.tgz) = 53272 -SHA256 (vdr/osdpip-vdr-1.7.26.diff) = fa58b9671439b7a5a13d7b3e93b5a7596aecf5169b4400b5bf5a922c90e6132f -SIZE (vdr/osdpip-vdr-1.7.26.diff) = 1057 +TIMESTAMP = 1465488132 +SHA256 (vdr/vdr-osdpip-0.1.2.tgz) = 08761f6474dd2e5bd4d3dc83b4d2d3b9169a04931cb8aca2e54fdb5ad979a0c6 +SIZE (vdr/vdr-osdpip-0.1.2.tgz) = 50756 Index: head/multimedia/vdr-plugin-osdpip/files/patch-vdr-osdpip-0.1.0 =================================================================== --- head/multimedia/vdr-plugin-osdpip/files/patch-vdr-osdpip-0.1.0 (revision 416730) +++ head/multimedia/vdr-plugin-osdpip/files/patch-vdr-osdpip-0.1.0 (nonexistent) @@ -1,15 +0,0 @@ -diff -ur orig/osdpip-0.1.0/Makefile osdpip-0.1.0/Makefile ---- orig/osdpip-0.1.0/Makefile 2010-03-27 16:38:13.000000000 +0100 -+++ osdpip-0.1.0/Makefile 2010-03-29 09:35:59.000000000 +0200 -@@ -155,7 +155,11 @@ - - libvdr-$(PLUGIN).so: $(OBJS) - $(CXX) $(CXXFLAGS) -shared -o $@ $^ $(LIBS) -+ifdef FREEBSD -+ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) -+else - @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) -+endif - - dist: clean - @-rm -rf $(TMPDIR)/$(ARCHIVE) Property changes on: head/multimedia/vdr-plugin-osdpip/files/patch-vdr-osdpip-0.1.0 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/multimedia/vdr-plugin-osdpip/files/patch-i18n.h =================================================================== --- head/multimedia/vdr-plugin-osdpip/files/patch-i18n.h (revision 416730) +++ head/multimedia/vdr-plugin-osdpip/files/patch-i18n.h (nonexistent) @@ -1,12 +0,0 @@ ---- i18n.h.orig -+++ i18n.h -@@ -28,8 +28,8 @@ - #if (APIVERSNUM < 10507) - #define trNOOP(a) a - #define trVDR tr --#endif - - extern const tI18nPhrase Phrases[]; -+#endif - - #endif // VDR_OSDPIP_I18N_H Property changes on: head/multimedia/vdr-plugin-osdpip/files/patch-i18n.h ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/multimedia/vdr-plugin-osdpip/files/patch-receiver.c =================================================================== --- head/multimedia/vdr-plugin-osdpip/files/patch-receiver.c (revision 416730) +++ head/multimedia/vdr-plugin-osdpip/files/patch-receiver.c (nonexistent) @@ -1,20 +0,0 @@ ---- receiver.c.orig -+++ receiver.c -@@ -37,11 +37,16 @@ cOsdPipReceiver::cOsdPipReceiver(const c - cRingBufferFrame *ESBuffer): - #if (APIVERSNUM < 10500) - cReceiver(Channel->Ca(), 0, Channel->Vpid()), --#else -+#elif (APIVERSNUM < 10725) - cReceiver(Channel->GetChannelID(), 0, Channel->Vpid()), -+#else -+ cReceiver(Channel, 0), - #endif - cThread("osdpip_receiver") - { -+#if (APIVERSNUM >= 10725) -+ AddPid(Channel->Vpid()); -+#endif - m_TSBuffer = new cRingBufferLinear(MEGABYTE(3), TS_SIZE * 2, true); - m_TSBuffer->SetTimeouts(0, 100); - m_ESBuffer = ESBuffer; Property changes on: head/multimedia/vdr-plugin-osdpip/files/patch-receiver.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/multimedia/vdr-plugin-osdpip/files/patch-Makefile =================================================================== --- head/multimedia/vdr-plugin-osdpip/files/patch-Makefile (revision 416730) +++ head/multimedia/vdr-plugin-osdpip/files/patch-Makefile (revision 416731) @@ -1,18 +1,21 @@ ---- osdpip-0.1.0/Makefile.orig -+++ osdpip-0.1.0/Makefile -@@ -107,7 +107,7 @@ endif +--- Makefile.orig 2012-05-16 19:06:00 UTC ++++ Makefile +@@ -156,7 +156,11 @@ i18n: $(I18Nmsgs) $(I18Npot) - ### The object files (add further files here): + libvdr-$(PLUGIN).so: $(OBJS) + $(CXX) $(CXXFLAGS) -shared -o $@ $^ $(LIBS) ++ifdef FREEBSD ++ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION) ++else + @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION) ++endif --OBJS = $(PLUGIN).o osd_info.o remux.o osd.o receiver.o setup.o i18n.o pes.o quantize.o decoder.o -+OBJS = $(PLUGIN).o osd_info.o remux.o osd.o receiver.o setup.o pes.o quantize.o decoder.o - - ### The main target: - -@@ -171,3 +173,6 @@ dist: clean + dist: clean + @-rm -rf $(TMPDIR)/$(ARCHIVE) +@@ -168,3 +172,6 @@ dist: clean clean: @-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~ $(PODIR)/*.mo $(PODIR)/*.pot + +install: + ${INSTALL_PROGRAM} $(LIBDIR)/libvdr-$(PLUGIN).so.$(APIVERSION) ${DESTDIR}$(PREFIX)/lib/vdr/libvdr-$(PLUGIN).so.$(APIVERSION) Index: head/multimedia/vdr-plugin-osdpip/files/patch-decoder.c =================================================================== --- head/multimedia/vdr-plugin-osdpip/files/patch-decoder.c (revision 416730) +++ head/multimedia/vdr-plugin-osdpip/files/patch-decoder.c (revision 416731) @@ -1,20 +1,20 @@ ---- decoder.c.orig +--- decoder.c.orig 2012-02-12 12:24:00 UTC +++ decoder.c @@ -55,13 +55,13 @@ int cDecoder::Close() { #ifndef USE_SWSCALE delete[] m_BufferConvert; - free(m_PicConvert); + av_free(m_PicConvert); #endif delete[] m_BufferResample; - free(m_PicResample); + av_free(m_PicResample); avcodec_close(m_Context); - free(m_Context); - free(m_PicDecoded); + av_free(m_Context); + av_free(m_PicDecoded); return 0; } Index: head/multimedia/vdr-plugin-osdpip/files/patch-ffmpeg1 =================================================================== --- head/multimedia/vdr-plugin-osdpip/files/patch-ffmpeg1 (revision 416730) +++ head/multimedia/vdr-plugin-osdpip/files/patch-ffmpeg1 (revision 416731) @@ -1,26 +1,26 @@ -Index: osdpip-0.1.1/decoder.h +Index: decoder.h =================================================================== ---- osdpip-0.1.1.orig/decoder.h -+++ osdpip-0.1.1/decoder.h +--- decoder.h.orig ++++ decoder.h @@ -34,7 +34,7 @@ extern "C" #include #ifdef USE_SWSCALE #include - #include + #include #endif #else #include -Index: osdpip-0.1.1/osdpip.c +Index: osdpip.c =================================================================== ---- osdpip-0.1.1.orig/osdpip.c -+++ osdpip-0.1.1/osdpip.c +--- osdpip.c.orig ++++ osdpip.c @@ -73,8 +73,6 @@ bool cPluginOsdpip::ProcessArgs(int argc bool cPluginOsdpip::Initialize(void) { - // must be called before using avcodec lib - avcodec_init(); // register all the codecs (you can also register only the codec // you wish to have smaller code) avcodec_register_all(); Index: head/multimedia/vdr-plugin-osdpip/files/patch-ffmpeg3 =================================================================== --- head/multimedia/vdr-plugin-osdpip/files/patch-ffmpeg3 (nonexistent) +++ head/multimedia/vdr-plugin-osdpip/files/patch-ffmpeg3 (revision 416731) @@ -0,0 +1,52 @@ +--- decoder.c.orig 2016-06-11 10:45:23.850303000 +0200 ++++ decoder.c 2016-06-11 10:50:57.243181000 +0200 +@@ -28,7 +28,7 @@ + + int cDecoder::Open() + { +- m_Codec = avcodec_find_decoder(CODEC_ID_MPEG2VIDEO); ++ m_Codec = avcodec_find_decoder(AV_CODEC_ID_MPEG2VIDEO); + if (!m_Codec) + { + printf("codec not found\n"); +@@ -40,8 +40,8 @@ + printf("could not open codec\n"); + return -1; + } +- m_PicDecoded = avcodec_alloc_frame(); +- m_PicResample = avcodec_alloc_frame(); ++ m_PicDecoded = av_frame_alloc(); ++ m_PicResample = av_frame_alloc(); + m_BufferResample = new unsigned char[400 * 300 * 4]; // size for RGBA32 + #ifndef USE_SWSCALE + m_PicConvert = avcodec_alloc_frame(); +@@ -99,7 +99,7 @@ + AVPicture pic_crop; + struct SwsContext * context; + +- av_picture_crop(&pic_crop, (AVPicture *) m_PicDecoded, PIX_FMT_YUV420P, OsdPipSetup.CropTop, OsdPipSetup.CropLeft); ++ av_picture_crop(&pic_crop, (AVPicture *) m_PicDecoded, AV_PIX_FMT_YUV420P, OsdPipSetup.CropTop, OsdPipSetup.CropLeft); + #ifdef FF_API_SWS_GETCONTEXT + if (!(context = sws_alloc_context())) { + printf("Error initializing scale context.\n"); +@@ -126,9 +126,9 @@ + #else + context = sws_getContext(m_Context->width - (OsdPipSetup.CropLeft + OsdPipSetup.CropRight), + m_Context->height - (OsdPipSetup.CropTop + OsdPipSetup.CropBottom), +- PIX_FMT_YUV420P, ++ AV_PIX_FMT_YUV420P, + #ifdef USE_NEW_FFMPEG_HEADERS +- m_Width, m_Height, ConvertToRGB ? PIX_FMT_RGB32 : PIX_FMT_YUV420P, ++ m_Width, m_Height, ConvertToRGB ? AV_PIX_FMT_RGB32 : AV_PIX_FMT_YUV420P, + #else + m_Width, m_Height, ConvertToRGB ? PIX_FMT_RGBA32 : PIX_FMT_YUV420P, + #endif +@@ -140,7 +140,7 @@ + #endif + avpicture_fill((AVPicture *) m_PicResample, m_BufferResample, + #ifdef USE_NEW_FFMPEG_HEADERS +- ConvertToRGB ? PIX_FMT_RGB32 : PIX_FMT_YUV420P, ++ ConvertToRGB ? AV_PIX_FMT_RGB32 : AV_PIX_FMT_YUV420P, + #else + ConvertToRGB ? PIX_FMT_RGBA32 : PIX_FMT_YUV420P, + #endif Property changes on: head/multimedia/vdr-plugin-osdpip/files/patch-ffmpeg3 ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/multimedia/vdr-plugin-osdpip/files/patch-libav9 =================================================================== --- head/multimedia/vdr-plugin-osdpip/files/patch-libav9 (revision 416730) +++ head/multimedia/vdr-plugin-osdpip/files/patch-libav9 (revision 416731) @@ -1,40 +1,40 @@ diff -urN osdpip-0.1.2.old/decoder.c osdpip-0.1.2/decoder.c ---- osdpip-0.1.2.old/decoder.c 2013-06-17 21:01:31.795476861 +0200 -+++ osdpip-0.1.2/decoder.c 2013-06-17 21:01:57.153475959 +0200 +--- decoder.c.orig 2013-06-17 21:01:31.795476861 +0200 ++++ decoder.c 2013-06-17 21:01:57.153475959 +0200 @@ -34,8 +34,8 @@ printf("codec not found\n"); return -1; } - m_Context = avcodec_alloc_context(); - if (avcodec_open(m_Context, m_Codec) < 0) + m_Context = avcodec_alloc_context3(m_Codec); + if (avcodec_open2(m_Context, m_Codec, NULL) < 0) { printf("could not open codec\n"); return -1; @@ -106,17 +106,17 @@ return -1; } - av_set_int(context, "srcw", m_Context->width - (OsdPipSetup.CropLeft + OsdPipSetup.CropRight)); - av_set_int(context, "srch", m_Context->height - (OsdPipSetup.CropTop + OsdPipSetup.CropBottom)); - av_set_int(context, "src_format", PIX_FMT_YUV420P); - av_set_int(context, "dstw", m_Width); - av_set_int(context, "dsth", m_Height); + av_opt_set_int(context, "srcw", m_Context->width - (OsdPipSetup.CropLeft + OsdPipSetup.CropRight), 0); + av_opt_set_int(context, "srch", m_Context->height - (OsdPipSetup.CropTop + OsdPipSetup.CropBottom), 0); + av_opt_set_int(context, "src_format", PIX_FMT_YUV420P, 0); + av_opt_set_int(context, "dstw", m_Width, 0); + av_opt_set_int(context, "dsth", m_Height, 0); #ifdef USE_NEW_FFMPEG_HEADERS - av_set_int(context, "dst_format", ConvertToRGB ? PIX_FMT_RGB32 : PIX_FMT_YUV420P); + av_opt_set_int(context, "dst_format", ConvertToRGB ? PIX_FMT_RGB32 : PIX_FMT_YUV420P, 0); #else - av_set_int(context, "dst_format", ConvertToRGB ? PIX_FMT_RGBA32 : PIX_FMT_YUV420P); + av_opt_set_int(context, "dst_format", ConvertToRGB ? PIX_FMT_RGBA32 : PIX_FMT_YUV420P, 0); #endif - av_set_int(context, "sws_flags", SWS_LANCZOS); + av_opt_set_int(context, "sws_flags", SWS_LANCZOS, 0); if (sws_init_context(context, NULL, NULL) < 0) { printf("Error initializing conversion context.\n"); Index: head/multimedia/vdr-plugin-osdpip/files/patch-osd.c =================================================================== --- head/multimedia/vdr-plugin-osdpip/files/patch-osd.c (revision 416730) +++ head/multimedia/vdr-plugin-osdpip/files/patch-osd.c (revision 416731) @@ -1,11 +1,11 @@ ---- osd.c.orig +--- osd.c.orig 2012-05-16 20:25:00 UTC +++ osd.c -@@ -788,7 +788,7 @@ eOSState cOsdPipObject::ProcessKey(eKeys +@@ -780,7 +780,7 @@ eOSState cOsdPipObject::ProcessKey(eKeys if (cControl::Control()) { cControl::Control()->GetIndex(pos, end); - if (pPos == "") + if (*pPos == '\0') { pPos = IndexToHMSF(pos); } Index: head/multimedia/vdr-plugin-osdpip/pkg-descr =================================================================== --- head/multimedia/vdr-plugin-osdpip/pkg-descr (revision 416730) +++ head/multimedia/vdr-plugin-osdpip/pkg-descr (revision 416731) @@ -1,8 +1,8 @@ http://www.linuxtv.org/vdrwiki/index.php/Osdpip-plugin OSD Picture-in-Picture is a VDR PlugIn that displays the current channel in a small box on the screen (default upper right corner). You can switch up and down now, watching the progress of the previous channel in the box. Quality is not too good yet, and only I-Frames are displayed. -WWW: http://projects.vdr-developer.org/projects/show/plg-osdpip +WWW: http://projects.vdr-developer.org/projects/plg-osdpip