From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- Src/nsv/nsvplay/vid_overlay.h | 58 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 Src/nsv/nsvplay/vid_overlay.h (limited to 'Src/nsv/nsvplay/vid_overlay.h') 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 +#include +#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 -- cgit