/*
 * video.h: A plugin for the Video Disk Recorder
 *
 * See the README file for copyright information and how to reach the author.
 *
 * $Id: video.h,v 1.7 2004/07/12 06:44:30 stefan Exp $
 */

#ifndef VIDEO_H
#define VIDEO_H

#include <vdr/plugin.h>
#include <avcodec.h>

#define DV_FORMAT_UNKNOWN -1
#define DV_FORMAT_NORMAL  1
#define DV_FORMAT_WIDE    2

class cVideoOut {
private:
protected:
    cMutex  osdMutex;
    int     OSDxOfs, OSDyOfs;
    bool    OSDpresent;
    int     Xres, Yres, Bpp; // the child class MUST set these params (for OSD Drawing)
    int     dwidth, dheight,
            fwidth, fheight,
            swidth, sheight,
            sxoff, syoff,
            lwidth, lheight,
            lxoff, lyoff,
            flags,
            display_aspect,
            current_aspect,
            currentPixelFormat,
            aspect_changed,
            current_afd;
    

public:
    virtual ~cVideoOut();
    virtual void OpenOSD(int X, int Y);
    virtual void CloseOSD();
    virtual void YUV(uint8_t *Py, uint8_t *Pu, uint8_t *Pv, int Width, int Height, int Ystride, int UVstride) { return; };
    virtual void Pause(void) {return;};
    virtual void CheckAspect(int new_afd, float new_asp);
    virtual void CheckAspectDimensions (AVFrame *picture, AVCodecContext *context);
    virtual bool Initialize(void) {return 1;};
    virtual bool Reconfigure (int format) {return 1;};
    virtual bool GetInfo(int *fmt, unsigned char **dest,int *w, int *h) {return false;};
    virtual void Refresh(cBitmap *Bitmap) { return; };
    void Draw(cBitmap *Bitmap, unsigned char * buf,
                      int linelen);


};

#endif // VIDEO_H
