From 15f8e9b463ac432693b114c9b9f40a2155ae9dfb Mon Sep 17 00:00:00 2001 From: Andreas Regel <andreas.regel@powarman.de> Date: Sat, 3 May 2008 22:18:00 +0200 Subject: Release version 0.0.10 - support swscale functions of recent FFMPEG versions. Have a look at README to see how to deactivate it for older FFPMEG versions. - support changed header file structure of recent FFMPEG versions. Have a look at README to see how to activate this. - added zapping through PiP channel based on a patch by pinky666 from vdr-portal. You can activate it via the green button. --- decoder.h | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'decoder.h') diff --git a/decoder.h b/decoder.h index f38870e..f503402 100644 --- a/decoder.h +++ b/decoder.h @@ -10,9 +10,20 @@ extern "C" { #ifdef HAVE_FFMPEG_STATIC -# include <avcodec.h> + #include <avcodec.h> + #ifdef USE_SWSCALE + #include <swscale.h> + #endif +#elif defined USE_NEW_FFMPEG_HEADERS + #include <libavcodec/avcodec.h> + #ifdef USE_SWSCALE + #include <libswscale/swscale.h> + #endif #else -# include <ffmpeg/avcodec.h> + #include <ffmpeg/avcodec.h> + #ifdef USE_SWSCALE + #include <ffmpeg/swscale.h> + #endif #endif } @@ -22,19 +33,22 @@ private: AVCodecContext * m_Context; AVFrame * m_PicDecoded; AVFrame * m_PicResample; - AVFrame * m_PicConvert; unsigned char * m_BufferResample; +#ifndef USE_SWSCALE + AVFrame * m_PicConvert; unsigned char * m_BufferConvert; +#endif int m_Width; int m_Height; public: int Open(); int Close(); int Decode(unsigned char * data, int length); - int Resample(int width, int height); - int ConvertToRGB(); + int Resample(int width, int height, bool ConvertToRGB); AVFrame * PicResample() { return m_PicResample; } +#ifndef USE_SWSCALE AVFrame * PicConvert() { return m_PicConvert; } +#endif double AspectRatio(); }; -- cgit v1.2.3