diff options
author | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
---|---|---|
committer | Jef <jef@targetspot.com> | 2024-09-24 08:54:57 -0400 |
commit | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/Winamp/vid_overlay.h | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/Winamp/vid_overlay.h')
-rw-r--r-- | Src/Winamp/vid_overlay.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Src/Winamp/vid_overlay.h b/Src/Winamp/vid_overlay.h new file mode 100644 index 00000000..3e93b173 --- /dev/null +++ b/Src/Winamp/vid_overlay.h @@ -0,0 +1,56 @@ +#ifndef _VIDEO_OVERLAY_H +#define _VIDEO_OVERLAY_H + +#include <ddraw.h> +#include <multimon.h> +#include "VideoOutputChildDDraw.h" + +class SubsItem; + +class OverlayVideoOutput : public VideoOutputChildDDraw { + +public: + OverlayVideoOutput(); + virtual ~OverlayVideoOutput(); + int create(HWND parent,VideoAspectAdjuster *_adjuster, int w, int h, unsigned int type, int flipit, double aspectratio); //return 1 if ok + int needChange() { return needchange; } + int onPaint(HWND hwnd); + void displayFrame(const char *buf, int size, int time); + void timerCallback(); + void close(); + + void drawSubtitle(SubsItem *item); + void resetSubtitle(); + void setVFlip(int on) { flip=on; } + void Refresh() { InvalidateRect(parent, NULL, TRUE); } +private: + bool LockSurface(DDSURFACEDESC *dd); + int width, height, flip; + int m_closed; + int needchange; + unsigned int type; + LPDIRECTDRAW lpDD; + LPDIRECTDRAWSURFACE lpddsOverlay, lpddsPrimary; + LPDIRECTDRAWSURFACE lpBackBuffer; + + DDCAPS capsDrv; + unsigned int uDestSizeAlign, uSrcSizeAlign; + DWORD dwUpdateFlags; + DDOVERLAYFX ovfx; + RECT rs,rd; + RECT m_oldrd; + RECT winRect; + + int overlay_color; + bool initing; + int yuy2_output, uyvy_output; + + void getRects(RECT *drs, RECT *drd, int fixmultimon=1) const; + + HFONT subFont; + RECT subRect; + SubsItem *curSubtitle; + int m_fontsize; +}; +extern OverlayVideoOutput overlayVideo; +#endif
\ No newline at end of file |