Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/nsv/nsvplay/vid_ddraw.h

64 lines
1.3 KiB
C
Raw Normal View History

2024-09-24 12:54:57 +00:00
#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