vid_ddraw.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef _VIDEO_DDRAW_H
  2. #define _VIDEO_DDRAW_H
  3. #include <ddraw.h>
  4. #include "video.h"
  5. class SubsItem;
  6. class DDrawVideoOutput : public VideoOutputChild {
  7. public:
  8. DDrawVideoOutput();
  9. virtual ~DDrawVideoOutput();
  10. int create(VideoOutput *parent, int w, int h, unsigned int type, int flipit, double aspectratio); //return 1 if ok
  11. int needChange() { return needchange; }
  12. int onPaint(HWND hwnd, HDC hdc);
  13. void displayFrame(const char *buf, int size, int time);
  14. void goFullScreen();
  15. void removeFullScreen();
  16. void timerCallback();
  17. void setPalette(RGBQUAD *pal) { m_palette=pal; }
  18. int showOSD();
  19. void hideOSD();
  20. void drawSubtitle(SubsItem *item);
  21. void resetSubtitle();
  22. private:
  23. int width, height, flip;
  24. int needchange;
  25. unsigned int type;
  26. VideoOutput *m_parent;
  27. LPDIRECTDRAW lpDD;
  28. LPDIRECTDRAWSURFACE lpddsOverlay, lpddsPrimary, lpddsSTTemp;
  29. int sttmp_w, sttmp_h;
  30. DDCAPS capsDrv;
  31. unsigned int uDestSizeAlign, uSrcSizeAlign;
  32. DWORD dwUpdateFlags;
  33. RECT rs,rd;
  34. RECT lastresizerect;
  35. bool initing;
  36. int is_fullscreen;
  37. LPDIRECTDRAWCLIPPER lpddsClipper;
  38. DDPIXELFORMAT m_ddpf;
  39. int m_depth;
  40. RGBQUAD *m_palette;
  41. HFONT subFont;
  42. RECT subRect;
  43. SubsItem *m_lastsubtitle;
  44. int m_sub_needremeasure;
  45. RECT winRect;
  46. int m_fontsize;
  47. };
  48. #endif