diff options
| author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
| commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
| tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/nsv/nsvplay/vid_overlay.h | |
| parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
| parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
| download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz | |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/nsv/nsvplay/vid_overlay.h')
| -rw-r--r-- | Src/nsv/nsvplay/vid_overlay.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/Src/nsv/nsvplay/vid_overlay.h b/Src/nsv/nsvplay/vid_overlay.h new file mode 100644 index 00000000..f4772e69 --- /dev/null +++ b/Src/nsv/nsvplay/vid_overlay.h @@ -0,0 +1,58 @@ +#ifndef _VIDEO_OVERLAY_H +#define _VIDEO_OVERLAY_H + +#include <ddraw.h> +#include <multimon.h> +#include "video.h" + +class SubsItem; + +class OverlayVideoOutput : public VideoOutputChild { +public: + OverlayVideoOutput(); + virtual ~OverlayVideoOutput(); + + int create(VideoOutput *parent, int w, int h, unsigned int type, int flipit, double aspectratio); //return 1 if ok + int needChange() { return needchange; } + + int onPaint(HWND hwnd, HDC hdc); + void displayFrame(const char *buf, int size, int time); + + void goFullScreen(); + void removeFullScreen(); + + void timerCallback(); + + int showOSD(); + void hideOSD(); + + void drawSubtitle(SubsItem *item); + virtual void resetSubtitle(); + +private: + int width, height, flip; + int needchange; + unsigned int type; + VideoOutput *m_parent; + LPDIRECTDRAW lpDD; + LPDIRECTDRAWSURFACE lpddsOverlay, lpddsPrimary; + DDCAPS capsDrv; + unsigned int uDestSizeAlign, uSrcSizeAlign; + DWORD dwUpdateFlags; + DDOVERLAYFX ovfx; + RECT rs,rd; + RECT m_oldrd; + RECT winRect; + + bool initing; + int is_fullscreen, yuy2_output, uyvy_output; + + void getRects(RECT *drs, RECT *drd); + + HFONT subFont; + RECT subRect; + SubsItem *curSubtitle; + int m_fontsize; +}; + +#endif
\ No newline at end of file |
