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_ddraw.h | |
parent | 537bcbc86291b32fc04ae4133ce4d7cac8ebe9a7 (diff) | |
download | winamp-20d28e80a5c861a9d5f449ea911ab75b4f37ad0d.tar.gz |
Initial community commit
Diffstat (limited to 'Src/Winamp/vid_ddraw.h')
-rw-r--r-- | Src/Winamp/vid_ddraw.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Src/Winamp/vid_ddraw.h b/Src/Winamp/vid_ddraw.h new file mode 100644 index 00000000..be437a1a --- /dev/null +++ b/Src/Winamp/vid_ddraw.h @@ -0,0 +1,56 @@ +#ifndef _VIDEO_DDRAW_H +#define _VIDEO_DDRAW_H + +#include <ddraw.h> +#include "VideoOutputChildDDraw.h" + +class SubsItem; + +class DDrawVideoOutput : public VideoOutputChildDDraw +{ +public: + DDrawVideoOutput(); + virtual ~DDrawVideoOutput(); + int create(HWND parent, VideoAspectAdjuster *_adjuster, int w, int h, unsigned int ptype, int flipit, double aspectratio); + int needChange() { return needchange; } + int onPaint(HWND hwnd); + void displayFrame(const char *buf, int size, int time); + void timerCallback(); + void setPalette(RGBQUAD *pal) { m_palette = pal; } + void drawSubtitle(SubsItem *item); + void resetSubtitle(); + void setVFlip(int on) { flip = on; } + void Refresh(); + void close(); +private: + bool LockSurface(DDSURFACEDESC *dd); + bool Paint(HWND hwnd); + + int width, height, flip; + int needchange; + unsigned int type; + 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; + + 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; + RECT m_monRect; +}; + +extern DDrawVideoOutput ddrawVideo; +#endif |