1
0

vid_overlay.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef _VIDEO_OVERLAY_H
  2. #define _VIDEO_OVERLAY_H
  3. #include <ddraw.h>
  4. #include <multimon.h>
  5. #include "video.h"
  6. class SubsItem;
  7. class OverlayVideoOutput : public VideoOutputChild {
  8. public:
  9. OverlayVideoOutput();
  10. virtual ~OverlayVideoOutput();
  11. int create(VideoOutput *parent, int w, int h, unsigned int type, int flipit, double aspectratio); //return 1 if ok
  12. int needChange() { return needchange; }
  13. int onPaint(HWND hwnd, HDC hdc);
  14. void displayFrame(const char *buf, int size, int time);
  15. void goFullScreen();
  16. void removeFullScreen();
  17. void timerCallback();
  18. int showOSD();
  19. void hideOSD();
  20. void drawSubtitle(SubsItem *item);
  21. virtual 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;
  29. DDCAPS capsDrv;
  30. unsigned int uDestSizeAlign, uSrcSizeAlign;
  31. DWORD dwUpdateFlags;
  32. DDOVERLAYFX ovfx;
  33. RECT rs,rd;
  34. RECT m_oldrd;
  35. RECT winRect;
  36. bool initing;
  37. int is_fullscreen, yuy2_output, uyvy_output;
  38. void getRects(RECT *drs, RECT *drd);
  39. HFONT subFont;
  40. RECT subRect;
  41. SubsItem *curSubtitle;
  42. int m_fontsize;
  43. };
  44. #endif