summaryrefslogtreecommitdiff
path: root/osd.h
diff options
context:
space:
mode:
Diffstat (limited to 'osd.h')
-rw-r--r--osd.h45
1 files changed, 38 insertions, 7 deletions
diff --git a/osd.h b/osd.h
index a43d6b6..5b30ca1 100644
--- a/osd.h
+++ b/osd.h
@@ -1,22 +1,34 @@
+/*
+ * OSD Picture in Picture plugin for the Video Disk Recorder
+ *
+ * See the README file for copyright information and how to reach the author.
+ */
+
#ifndef VDR_OSDPIP_OSD_H
#define VDR_OSDPIP_OSD_H
+extern "C"
+{
+#ifdef HAVE_FFMPEG_STATIC
+# include <avcodec.h>
+#else
+# include <ffmpeg/avcodec.h>
+#endif
+}
+
#include <vdr/osd.h>
#include <vdr/thread.h>
+#include <vdr/status.h>
#include <vdr/receiver.h>
-extern "C" {
-#include <mpeg2dec/mpeg2.h>
-#include <mpeg2dec/mpeg2convert.h>
-};
-
-class cRingBufferLinear;
+class cRingBufferFrame;
class cOsdPipReceiver;
+class cQuantize;
class cOsdPipObject: public cOsdObject, public cThread {
private:
cOsdBase *m_Osd;
- cRingBufferLinear *m_ESBuffer;
+ cRingBufferFrame *m_ESBuffer;
cOsdPipReceiver *m_Receiver;
const cChannel *m_Channel;
tWindowHandle m_Window;
@@ -25,7 +37,26 @@ private:
bool m_Active;
bool m_Ready;
int m_Width, m_Height;
+ int m_FrameDrop;
+
+ AVCodec * m_Codec;
+ AVCodecContext * m_Context;
+ AVFrame * m_PicDecoded;
+ AVFrame * m_PicResample;
+ AVFrame * m_PicConvert;
+ unsigned char * m_BufferResample;
+ unsigned char * m_BufferConvert;
+
+ unsigned int m_AlphaBase;
+ unsigned int m_Palette[256];
+ int m_PaletteStart;
+
+ cQuantize * quantizer;
+ int Decode(unsigned char * data, int length);
+ int Resample();
+ int ConvertToRGB();
+ void ProcessImage(unsigned char * data, int length);
protected:
virtual void Action(void);