/**
 *  GraphTFT plugin for the Video Disk Recorder 
 * 
 *  dvbrenderer.h - A plugin for the Video Disk Recorder
 *
 *  (c) 2004 Lars Tegeler, Sascha Volkenandt  
 *
 * This code is distributed under the terms and conditions of the
 * GNU GENERAL PUBLIC LICENSE. See the file COPYING for details.
 *
 * $Id: dvbrenderer.h,v 1.2 2004/05/08 18:55:45 tegeler Exp $
 *
 **/

#ifndef __GTFT_DVBRENDERER_H
#define __GTFT_DVBRENDERER_H

#include "imlibrenderer.h"
#include "player.h"
#include "mpeg2encoder.h"
#include "vdr/device.h"

class cQuantize;

class DvbRenderer : public ImlibRenderer
{
private:
		int _initialized;
		cGraphTFTPlayer *_player;
		cDevice *_devTo;
		cOsd *_Osd;
		cBitmap *_Bitmap;
		mpeg_frame _iframe;
		cQuantize *_quantizer;
		int _colors;
		int _bpp;

public:	

		DvbRenderer();
		~DvbRenderer();

		void init(int devnum);
		void deinit();

		void refresh();
		void clear();

		int playVideo(const uchar *Data, int Length);
		bool devicePoll(cPoller &Poller, int TimeoutMs = 0);
		void setPlayMode(bool Video);
		void deviceClear(void);
};

#endif //__GTFT_DVBRENDERER_H
