vid_ddraw.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef NULLSOFT_IN_WMVDRM_VID_DDRAW_H
  2. #define NULLSOFT_IN_WMVDRM_VID_DDRAW_H
  3. #include <ddraw.h>
  4. #include "VideoOutputChildDDraw.h"
  5. class SubsItem;
  6. class DDrawVideoOutput : public VideoOutputChildDDraw
  7. {
  8. public:
  9. DDrawVideoOutput();
  10. virtual ~DDrawVideoOutput();
  11. int create(HWND parent, VideoAspectAdjuster *_adjuster, int w, int h, unsigned int ptype, int flipit, double aspectratio);
  12. int needChange() { return needchange; }
  13. int onPaint(HWND hwnd);
  14. void displayFrame(const char *buf, int size, int time);
  15. void timerCallback();
  16. void setPalette(RGBQUAD *pal) { m_palette = pal; }
  17. void drawSubtitle(SubsItem *item);
  18. void resetSubtitle();
  19. void setVFlip(int on) { flip = on; }
  20. void Refresh();
  21. void close();
  22. void SetFrame(void *_frame) { frame = _frame; }
  23. private:
  24. void *frame;
  25. int width, height, flip;
  26. int needchange;
  27. unsigned int type;
  28. LPDIRECTDRAW lpDD;
  29. LPDIRECTDRAWSURFACE lpddsOverlay, lpddsPrimary;
  30. DDCAPS capsDrv;
  31. unsigned int uDestSizeAlign, uSrcSizeAlign;
  32. DWORD dwUpdateFlags;
  33. RECT rs, rd;
  34. RECT lastresizerect;
  35. bool initing;
  36. LPDIRECTDRAWCLIPPER lpddsClipper;
  37. DDPIXELFORMAT m_ddpf;
  38. int m_depth;
  39. RGBQUAD *m_palette;
  40. RECT winRect;
  41. RECT m_monRect;
  42. };
  43. extern DDrawVideoOutput ddraw;
  44. #endif