2 Copyright 2004-2005 Chris Tallon
4 This file is part of VOMP.
6 VOMP is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 VOMP is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with VOMP; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29 #include "threadwin.h"
41 #define D3DFVF_OSDVERTEX (D3DFVF_XYZRHW|D3DFVF_DIFFUSE| D3DFVF_TEX1)
47 class OsdWin : public Osd, public ThreadWin
53 int init(void* device);
58 void screenShot(char* fileName);
61 void threadPostStopCleanup();
63 LPDIRECT3DDEVICE9 getD3dDev() ;
64 LPDIRECT3D9 getD3d() ;
65 // This function is called from the WinMain function in order to get Screen updates
67 void RenderDS(LPDIRECT3DSURFACE9 present);
70 void setExternalDriving(DsAllocator* dsall,DWORD width, DWORD height);
72 DWORD getFilterCaps();
73 DWORD getFilterType(){return filter_type;};
74 void setFilterType(D3DTEXTUREFILTERTYPE type) {filter_type=type;};
86 void SetEVRStatus(EVR_state new_state){evrstate=new_state;};
88 IDirect3DDeviceManager9 * getD3dMan() {return d3ddevman;};
89 bool IsEvrSupported() {return evrsupported;};
90 HWND getWindow() {return window;};
97 LPDIRECT3DDEVICE9 d3ddevice;
98 // LPDIRECT3DVERTEXBUFFER9 d3dvb;
99 LPDIRECT3DSURFACE9 d3drtsurf;
100 LPDIRECT3DSWAPCHAIN9 swappy;
101 LPDIRECT3DSURFACE9 swapsurf;
102 DsAllocator* dsallocator;
103 // This indicates, that currently a video is played, thus the osd updates are driven by the Directshow Filtersystem
104 bool external_driving;
106 DWORD lastrendertime;
107 void InternalRendering(LPDIRECT3DSURFACE9 present);
109 LPDIRECT3DVERTEXBUFFER9 InitVertexBuffer(DWORD width, DWORD height);
110 OSDVERTEX osdvertices[4];
112 D3DTEXTUREFILTERTYPE filter_type;
118 IDirect3DDeviceManager9 *d3ddevman;
119 HANDLE dxvadevicehandle;