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_ddraw.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_ddraw.h')
| -rw-r--r-- | Src/nsv/nsvplay/vid_ddraw.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/Src/nsv/nsvplay/vid_ddraw.h b/Src/nsv/nsvplay/vid_ddraw.h new file mode 100644 index 00000000..0feea9f5 --- /dev/null +++ b/Src/nsv/nsvplay/vid_ddraw.h @@ -0,0 +1,63 @@ +#ifndef _VIDEO_DDRAW_H +#define _VIDEO_DDRAW_H + +#include <ddraw.h> +#include "video.h" + +class SubsItem; + +class DDrawVideoOutput : public VideoOutputChild { +public: + DDrawVideoOutput(); + virtual ~DDrawVideoOutput(); + + 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(); + + void setPalette(RGBQUAD *pal) { m_palette=pal; } + + int showOSD(); + void hideOSD(); + + void drawSubtitle(SubsItem *item); + void resetSubtitle(); + +private: + int width, height, flip; + int needchange; + unsigned int type; + VideoOutput *m_parent; + LPDIRECTDRAW lpDD; + LPDIRECTDRAWSURFACE lpddsOverlay, lpddsPrimary, lpddsSTTemp; + int sttmp_w, sttmp_h; + DDCAPS capsDrv; + unsigned int uDestSizeAlign, uSrcSizeAlign; + DWORD dwUpdateFlags; + RECT rs,rd; + RECT lastresizerect; + + bool initing; + int is_fullscreen; + + LPDIRECTDRAWCLIPPER lpddsClipper; + DDPIXELFORMAT m_ddpf; + int m_depth; + RGBQUAD *m_palette; + + HFONT subFont; + RECT subRect; + SubsItem *m_lastsubtitle; + int m_sub_needremeasure; + RECT winRect; + int m_fontsize; +}; + +#endif |
