diff options
| author | root <root@elwms02.(none)> | 2010-04-06 16:13:08 +0200 |
|---|---|---|
| committer | root <root@elwms02.(none)> | 2010-04-06 16:13:08 +0200 |
| commit | 0e7005fcc7483c01aa102fbea358c5ac65a48d62 (patch) | |
| tree | 11517ce0d3d2977c6732b3aa583b0008083e0bd3 /plugins/osdpip | |
| download | x-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.gz x-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.bz2 | |
hello world
Diffstat (limited to 'plugins/osdpip')
| -rw-r--r-- | plugins/osdpip/patches/osdpip-0.0.10-ffmpeg-svn.diff | 57 | ||||
| -rw-r--r-- | plugins/osdpip/patches/osdpip-0.0.10_ffmpeg.diff | 26 | ||||
| -rw-r--r-- | plugins/osdpip/plugin.sh | 52 |
3 files changed, 135 insertions, 0 deletions
diff --git a/plugins/osdpip/patches/osdpip-0.0.10-ffmpeg-svn.diff b/plugins/osdpip/patches/osdpip-0.0.10-ffmpeg-svn.diff new file mode 100644 index 0000000..bc897d3 --- /dev/null +++ b/plugins/osdpip/patches/osdpip-0.0.10-ffmpeg-svn.diff @@ -0,0 +1,57 @@ +diff -ruN osdpip-0.0.10/decoder.c osdpip-0.0.10-fixed/decoder.c +--- osdpip-0.0.10/decoder.c 2008-05-03 20:55:47.000000000 +0200 ++++ osdpip-0.0.10-fixed/decoder.c 2009-03-23 14:37:40.000000000 +0100 +@@ -79,18 +79,33 @@ + struct SwsContext * context; + + av_picture_crop(&pic_crop, (AVPicture *) m_PicDecoded, PIX_FMT_YUV420P, OsdPipSetup.CropTop, OsdPipSetup.CropLeft); ++#if LIBAVCODEC_VERSION_INT < ((52<<16)+(21<<8)+0) + context = sws_getContext(m_Context->width - (OsdPipSetup.CropLeft + OsdPipSetup.CropRight), + m_Context->height - (OsdPipSetup.CropTop + OsdPipSetup.CropBottom), + PIX_FMT_YUV420P, + m_Width, m_Height, ConvertToRGB ? PIX_FMT_RGBA32 : PIX_FMT_YUV420P, + SWS_LANCZOS, NULL, NULL, NULL); ++#else ++ context = sws_getContext(m_Context->width - (OsdPipSetup.CropLeft + OsdPipSetup.CropRight), ++ m_Context->height - (OsdPipSetup.CropTop + OsdPipSetup.CropBottom), ++ PIX_FMT_YUV420P, ++ m_Width, m_Height, ConvertToRGB ? PIX_FMT_RGB32 : PIX_FMT_YUV420P, ++ SWS_LANCZOS, NULL, NULL, NULL); ++#endif ++ + if (!context) { + printf("Error initializing scale context.\n"); + return -1; + } ++#if LIBAVCODEC_VERSION_INT < ((52<<16)+(21<<8)+0) + avpicture_fill((AVPicture *) m_PicResample, m_BufferResample, + ConvertToRGB ? PIX_FMT_RGBA32 : PIX_FMT_YUV420P, + m_Width, m_Height); ++#else ++ avpicture_fill((AVPicture *) m_PicResample, m_BufferResample, ++ ConvertToRGB ? PIX_FMT_RGB32 : PIX_FMT_YUV420P, ++ m_Width, m_Height); ++#endif + sws_scale(context, pic_crop.data, pic_crop.linesize, + 0, m_Context->height - (OsdPipSetup.CropTop + OsdPipSetup.CropBottom), + m_PicResample->data, m_PicResample->linesize); +@@ -120,11 +135,19 @@ + img_resample_close(contextResample); + if (ConvertToRGB) + { ++#if LIBAVCODEC_VERSION_INT < ((52<<16)+(21<<8)+0) + avpicture_fill((AVPicture *) m_PicConvert, m_BufferConvert, + PIX_FMT_RGBA32, m_Width, m_Height); + img_convert((AVPicture *) m_PicConvert, PIX_FMT_RGBA32, + (AVPicture *) m_PicResample, PIX_FMT_YUV420P, + m_Width, m_Height); ++#else ++ avpicture_fill((AVPicture *) m_PicConvert, m_BufferConvert, ++ PIX_FMT_RGB32, m_Width, m_Height); ++ img_convert((AVPicture *) m_PicConvert, PIX_FMT_RGB32, ++ (AVPicture *) m_PicResample, PIX_FMT_YUV420P, ++ m_Width, m_Height); ++#endif + } + #endif + diff --git a/plugins/osdpip/patches/osdpip-0.0.10_ffmpeg.diff b/plugins/osdpip/patches/osdpip-0.0.10_ffmpeg.diff new file mode 100644 index 0000000..cffd3c2 --- /dev/null +++ b/plugins/osdpip/patches/osdpip-0.0.10_ffmpeg.diff @@ -0,0 +1,26 @@ +--- Makefile~ 2008-05-03 21:30:09.000000000 +0200 ++++ Makefile 2009-01-10 00:22:56.000000000 +0100 +@@ -13,7 +13,7 @@ + # + ### uncomment the following line, if you have a recent FFMPEG version that + ### has a changed structure of its header files. +-#WITH_NEW_FFMPEG_HEADERS=1 ++WITH_NEW_FFMPEG_HEADERS=1 + + # The official name of this plugin. + # This name will be used in the '-P...' option of VDR to load the plugin. +@@ -53,8 +53,12 @@ + + ### Includes and Defines (add further entries here): + +-INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/include -I. -I$(FFMDIR)/libavcodec +-LIBS = -L$(FFMDIR)/libavcodec -lavcodec ++INCLUDES += -I$(VDRDIR)/include -I$(DVBDIR)/include -I. -I$(FFMDIR) ++ifneq ($(shell which pkg-config),) ++ LIBS = $(shell pkg-config --silence-errors --libs libavcodec) ++else ++ LIBS = -lavcodec ++endif + DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' + DEFINES += -D_GNU_SOURCE + diff --git a/plugins/osdpip/plugin.sh b/plugins/osdpip/plugin.sh new file mode 100644 index 0000000..e6a094e --- /dev/null +++ b/plugins/osdpip/plugin.sh @@ -0,0 +1,52 @@ +#!/bin/sh + +# x-vdr (Installations-Skript fuer einen VDR mit Debian als Basis) +# von Marc Wernecke - www.zulu-entertainment.de +# 04.05.2008 +# +# vdr-osdpip + +# defaults +source ./../../x-vdr.conf +source ./../../setup.conf +source ./../../functions + +WEB="http://home.arcor.de/andreas.regel/files/osdpip/vdr-osdpip-0.0.10.tgz" +VERSION="osdpip-0.0.10" +LINK="osdpip" + +VAR=`basename $WEB` +DIR=`pwd` + +# plugin entfernen +function clean_plugin() { + cd $SOURCEDIR/VDR/PLUGINS/src + rm -rf $LINK* + rm -f $VDRLIBDIR/libvdr-$LINK* + log "cleaning $LINK" +} + +# plugin installieren +function install_plugin() { + download_plugin + extract_plugin + cd $SOURCEDIR/VDR/PLUGINS/src + rm -f $LINK + ln -vfs $VERSION $LINK + patch_plugin + + ## plugin specials - start ## + + ## plugin specials - ende ## +} + +# plugin commands +if [ $# \> 0 ]; then + cmd=$1 + cmd_plugin +else + install_plugin + log "install-plugin fuer $VERSION ist fertig" +fi + +exit 0 |
