summaryrefslogtreecommitdiff
path: root/decoder.h
diff options
context:
space:
mode:
authorAndreas Regel <andreas.regel@powarman.de>2008-05-03 22:18:00 +0200
committerAndreas Regel <andreas.regel@powarman.de>2008-05-03 22:18:00 +0200
commit15f8e9b463ac432693b114c9b9f40a2155ae9dfb (patch)
tree75d96af805439e525c3afcc3e6c5abc99dc84159 /decoder.h
parentcac6362d2207752926f9339c1c547d60d5c2a6a0 (diff)
downloadvdr-plugin-osdpip-15f8e9b463ac432693b114c9b9f40a2155ae9dfb.tar.gz
vdr-plugin-osdpip-15f8e9b463ac432693b114c9b9f40a2155ae9dfb.tar.bz2
Release version 0.0.10v0.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.
Diffstat (limited to 'decoder.h')
-rw-r--r--decoder.h24
1 files changed, 19 insertions, 5 deletions
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();
};