diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2007-07-05 11:34:34 +0000 |
---|---|---|
committer | Matthias Schwarzott <zzam@gentoo.org> | 2007-07-05 11:34:34 +0000 |
commit | b9848d571f44847263f7b0700f3b379582704bec (patch) | |
tree | 6d4abad5ace90dc367c6813088dc681b7cd97504 /media-plugins/vdr-image/files | |
parent | Removed old versions and keep the only version which works with teTeX-3. (diff) | |
download | gentoo-2-b9848d571f44847263f7b0700f3b379582704bec.tar.gz gentoo-2-b9848d571f44847263f7b0700f3b379582704bec.tar.bz2 gentoo-2-b9848d571f44847263f7b0700f3b379582704bec.zip |
Added patch from svn repository to work with newer ffmpeg versions.
(Portage version: 2.1.3_rc6)
Diffstat (limited to 'media-plugins/vdr-image/files')
-rw-r--r-- | media-plugins/vdr-image/files/digest-vdr-image-0.2.7-r1 | 3 | ||||
-rw-r--r-- | media-plugins/vdr-image/files/vdr-image-0.2.7-new-ffmpeg.diff | 309 |
2 files changed, 312 insertions, 0 deletions
diff --git a/media-plugins/vdr-image/files/digest-vdr-image-0.2.7-r1 b/media-plugins/vdr-image/files/digest-vdr-image-0.2.7-r1 new file mode 100644 index 000000000000..f60f848a7e8e --- /dev/null +++ b/media-plugins/vdr-image/files/digest-vdr-image-0.2.7-r1 @@ -0,0 +1,3 @@ +MD5 a8af260d4a4080dbb1bca61b6c26c380 vdr-image-0.2.7.tar.gz 120080 +RMD160 7fb93dff5740e5fdf317f0d7b6d666023eb9b3b9 vdr-image-0.2.7.tar.gz 120080 +SHA256 2e2c57164498e53241486a46542fd38294ece0120438b054539b137cfdafb93f vdr-image-0.2.7.tar.gz 120080 diff --git a/media-plugins/vdr-image/files/vdr-image-0.2.7-new-ffmpeg.diff b/media-plugins/vdr-image/files/vdr-image-0.2.7-new-ffmpeg.diff new file mode 100644 index 000000000000..c4938ff93aa7 --- /dev/null +++ b/media-plugins/vdr-image/files/vdr-image-0.2.7-new-ffmpeg.diff @@ -0,0 +1,309 @@ +diff -ru image-0.2.7/data.h image-svn/data.h +--- image-0.2.7/data.h 2006-01-27 22:31:04.000000000 +0100 ++++ image-svn/data.h 2007-07-05 13:00:01.000000000 +0200 +@@ -42,6 +42,7 @@ + class cScanDir { + char *QuoteString(const char *str); + protected: ++ virtual ~cScanDir() {}; + enum eScanType { stFile, stDir }; + virtual void DoItem(cFileSource *src, const char *subdir, const char *name)=0; + public: +diff -ru image-0.2.7/exif.c image-svn/exif.c +--- image-0.2.7/exif.c 2006-05-30 19:41:21.000000000 +0200 ++++ image-svn/exif.c 2007-07-05 13:00:01.000000000 +0200 +@@ -1,7 +1,7 @@ + /* + * Image plugin to VDR (C++) + * +- * (C) 2006 Andreas Brachold <anbr at users.berlios.de> ++ * (C) 2006-2007 Andreas Brachold <anbr at users.berlios.de> + * + * This code is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License +@@ -19,9 +19,11 @@ + * Or, point your browser to http://www.gnu.org/copyleft/gpl.html + */ + ++extern "C" { + #include <libexif/exif-data.h> + #include <libexif/exif-ifd.h> + #include <libexif/exif-loader.h> ++} + + #include <sstream> + +diff -ru image-0.2.7/HISTORY image-svn/HISTORY +--- image-0.2.7/HISTORY 2007-01-02 14:56:07.000000000 +0100 ++++ image-svn/HISTORY 2007-07-05 13:00:01.000000000 +0200 +@@ -1,7 +1,11 @@ + VDR Plugin 'image' Revision History + ----------------------------------- + +-2006-01-02 ++2007-06-10 ++- for build now 'pkg-config' needed ++- Use swscale to converting image (Thanks to Holger Brunn, for summit a patch) ++ ++2007-01-02 + - Release Version 0.2.7 + + 2006-12-24 +diff -ru image-0.2.7/liboutput/encode.c image-svn/liboutput/encode.c +--- image-0.2.7/liboutput/encode.c 2006-12-24 13:04:16.000000000 +0100 ++++ image-svn/liboutput/encode.c 2007-07-05 12:59:57.000000000 +0200 +@@ -1,7 +1,7 @@ + /*************************************************************************** + * encode.c + * +- * (C) Copyright 2004-2006 Andreas Brachold <anbr at users.berlios.de> ++ * (C) Copyright 2004-2007 Andreas Brachold <anbr at users.berlios.de> + * Created: Thu Aug 5 2004 + * + ****************************************************************************/ +@@ -26,6 +26,16 @@ + #include <string.h> + #include <stdlib.h> + ++extern "C" { ++#ifdef HAVE_SWSCALER ++#ifdef FFMDIR ++#include <swscale.h> ++#else ++#include <ffmpeg/swscale.h> ++#endif ++#endif ++} ++ + #include "encode.h" + #include <vdr/device.h> + #include <vdr/tools.h> +@@ -190,11 +200,29 @@ + } + else + { +- if(img_convert((AVPicture*)frame->data, PIX_FMT_YUV420P, ++ int result; ++#ifndef HAVE_SWSCALER ++ result=img_convert((AVPicture*)frame->data, PIX_FMT_YUV420P, + (AVPicture*)m_pImageFilled, PIX_FMT_RGB24, +- m_nWidth, m_nHeight)) ++ m_nWidth, m_nHeight); ++#else ++ SwsContext* convert_ctx = sws_getContext(m_nWidth, m_nHeight, ++ PIX_FMT_RGB24, m_nWidth, m_nHeight, ++ PIX_FMT_YUV420P, SWS_BICUBIC, NULL, NULL, NULL); ++ ++ if(!convert_ctx) { ++ esyslog("imageplugin: failed to initialize swscaler context"); ++ return false; ++ } ++ ++ result=sws_scale(convert_ctx, ((AVPicture*)m_pImageFilled)->data, ++ ((AVPicture*)m_pImageFilled)->linesize, ++ 0, m_nHeight, frame->data, frame->linesize); ++ sws_freeContext(convert_ctx); ++#endif ++ if(result < 0) + { +- esyslog("imageplugin: failed convert RGB to YUV"); ++ esyslog("imageplugin: failed convert RGB to YUV: %X", result); + return false; + } + } +diff -ru image-0.2.7/liboutput/encode.h image-svn/liboutput/encode.h +--- image-0.2.7/liboutput/encode.h 2006-01-11 20:23:30.000000000 +0100 ++++ image-svn/liboutput/encode.h 2007-07-05 12:59:57.000000000 +0200 +@@ -25,11 +25,13 @@ + #ifndef _ENCODE_H + #define _ENCODE_H + ++extern "C" { + #ifdef FFMDIR + #include <avcodec.h> + #else + #include <ffmpeg/avcodec.h> + #endif ++} + + #include "../setup-image.h" + //#define TESTCODE +diff -ru image-0.2.7/liboutput/Makefile image-svn/liboutput/Makefile +--- image-0.2.7/liboutput/Makefile 2006-01-29 17:04:05.000000000 +0100 ++++ image-svn/liboutput/Makefile 2007-07-05 12:59:57.000000000 +0200 +@@ -9,6 +9,7 @@ + + CXX ?= g++ + CXXFLAGS ?= -O0 -g -Wall -Woverloaded-virtual ++PKG-CONFIG ?= pkg-config + + -include $(VDRDIR)/Make.config + +@@ -18,14 +19,28 @@ + INCLUDES += -I$(VDRDIR)/include -I. + ifdef FFMDIR + INCLUDES += -I$(FFMDIR)/libavcodec -I$(FFMDIR)/libavutil ++DEFINES += -DFFMDIR ++ifndef WITHOUT_SWSCALER ++ DEFINES += -DHAVE_SWSCALER ++ INCLUDES += -I$(FFMDIR)/libswscale ++endif ++else ++ ++ifndef WITHOUT_SWSCALER ++ DEFINES += -DHAVE_SWSCALER ++ PKG-INCLUDES += libswscale ++endif ++ ++ PKG-INCLUDES += libavcodec + endif + + DEFINES += -D_GNU_SOURCE + +-ifdef FFMDIR +-DEFINES += -DFFMDIR ++ifdef PKG-INCLUDES ++INCLUDES += $(shell $(PKG-CONFIG) --cflags $(PKG-INCLUDES)) + endif + ++ + ### The object files (add further files here): + + OBJS = encode.o stillimage.o stillimage-player.o +diff -ru image-0.2.7/LIESMICH image-svn/LIESMICH +--- image-0.2.7/LIESMICH 2006-01-28 08:06:34.000000000 +0100 ++++ image-svn/LIESMICH 2007-07-05 13:00:01.000000000 +0200 +@@ -22,7 +22,9 @@ + - das Plugin ist abhängig vom folgenden Paketen + + ffmpeg (getestet mit ffmpeg-0.4.8/ffmpeg-0.4.9pre1/ffmpeg-cvs) + http://ffmpeg.sourceforge.net +- + libexif-0.6.13 (siehe unten, für Kompilieren ohne diese) ++ + Zum Kompilieren wird 'pkg-config' benötigt ++ http://pkgconfig.freedesktop.org/ ++ + libexif-0.6.13 ... 0.6.15 (siehe unten, für Kompilieren ohne diese) + http://libexif.sourceforge.net/ + + zur Ausführung wird auch das Paket netpbm benötigt + http://netpbm.sourceforge.net/ +@@ -65,6 +67,11 @@ + + $ make plugins FFMDIR=/usr/src/ffmpeg-cvs + ++ Kompilieren ohne swscaler zur Bildconvertierung mittels ffmpeg ++ (WITHOUT_SWSCALER=1 verwendet img_convert, notwendig für ältere Versionen von ffmpeg) ++ ++ $ make plugins WITHOUT_SWSCALER=1 ++ + Kompilieren ohne libexif ¹) + + $ make plugins WITHOUT_LIBEXIF=1 +diff -ru image-0.2.7/Makefile image-svn/Makefile +--- image-0.2.7/Makefile 2006-08-27 15:51:11.000000000 +0200 ++++ image-svn/Makefile 2007-07-05 13:00:01.000000000 +0200 +@@ -1,7 +1,7 @@ + # + # Makefile for Image plugin to VDR + # +-# (C) 2004-2006 Andreas Brachold <anbr at users.berlios.de> ++# (C) 2004-2007 Andreas Brachold <anbr at users.berlios.de> + # + # This code is free software; you can redistribute it and/or + # modify it under the terms of the GNU General Public License +@@ -31,6 +31,7 @@ + + CXX ?= g++ + CXXFLAGS ?= -fPIC -O2 -Wall -Woverloaded-virtual ++PKG-CONFIG ?= pkg-config + + ############################################### + ############################################### +@@ -86,26 +87,38 @@ + INCLUDES += -I$(VDRDIR)/include -I. + + ifdef FFMDIR +-INCLUDES += -I$(FFMDIR)/libavcodec -I$(FFMDIR)/libavutil +-LIBS += -L$(FFMDIR)/libavcodec ++DEFINES += -DFFMDIR ++LIBS += -L$(FFMDIR)/libavcodec -lavcodec -lz + ifeq ($(LIBAVCODECVERSION),51) + LIBS += -L$(FFMDIR)/libavformat -L$(FFMDIR)/libavutil + LIBS += -lavformat -lavutil + endif ++ifndef WITHOUT_SWSCALER ++ DEFINES += -DHAVE_SWSCALER ++ LIBS += -L$(FFMDIR)/libswscale -lswscale ++endif ++else ++ PKG-LIBS += libavcodec ++ifndef WITHOUT_SWSCALER ++ PKG-LIBS += libswscale + endif +- +-LIBS += -lavcodec +-LIBS += -lz +- +-ifdef FFMDIR +-DEFINES += -DFFMDIR + endif + + ifndef WITHOUT_LIBEXIF +- LIBS += -lexif ++ PKG-INCLUDES += libexif ++ PKG-LIBS += libexif + DEFINES += -DHAVE_LIBEXIF + endif + ++ ++ifdef PKG-INCLUDES ++INCLUDES += $(shell $(PKG-CONFIG) --cflags $(PKG-INCLUDES)) ++endif ++ ++ifdef PKG-LIBS ++LIBS += $(shell $(PKG-CONFIG) --libs $(PKG-LIBS)) ++endif ++ + ### The object files (add further files here): + + OBJS = ${PLUGIN}.o i18n.o data.o menu.o data-image.o menu-image.o \ +@@ -166,8 +179,7 @@ + @-rm -rf $(TMPDIR)/$(ARCHIVE) + @echo Distribution package created as $(PACKAGE).tar.gz + +-clean: +- @-rm -f $(OBJS) $(DEPFILE) *.so *.tar.gz core* *~ contrib/*~ examples/*~ scripts/*~ ++subdirs-clean: + @for i in $(SUBDIRS) ;\ + do \ + ( cd $$i;\ +@@ -175,3 +187,6 @@ + ) \ + || exit 1;\ + done ++ ++clean: subdirs-clean ++ @-rm -f $(OBJS) $(DEPFILE) *.so *.tar.gz core* *~ contrib/*~ examples/*~ scripts/*~ +diff -ru image-0.2.7/README image-svn/README +--- image-0.2.7/README 2006-01-14 12:07:29.000000000 +0100 ++++ image-svn/README 2007-07-05 13:00:01.000000000 +0200 +@@ -22,7 +22,9 @@ + - plugin depends follow packages + + ffmpeg (tested with ffmpeg-0.4.8/ffmpeg-0.4.9pre1/ffmpeg-cvs) + http://ffmpeg.sourceforge.net +- + libexif-0.6.13 (see below for build without this) ++ + for build you need 'pkg-config' ++ http://pkgconfig.freedesktop.org/ ++ + libexif-0.6.13 ... 0.6.15 (see below for build without this) + http://libexif.sourceforge.net/ + + for running your will need also package netpbm + http://netpbm.sourceforge.net/ +@@ -65,6 +67,11 @@ + + $ make plugins FFMDIR=/usr/src/ffmpeg-cvs + ++ compile without swscaler to convert images via ffmpeg ++ (WITHOUT_SWSCALER=1 use img_convert, needed for older versions from ffmpeg) ++ ++ $ make plugins WITHOUT_SWSCALER=1 ++ + compile without libexif ¹) + + $ make plugins WITHOUT_LIBEXIF=1 |