1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef _INC_EVR 7 #define _INC_EVR 8 9 #if (_WIN32_WINNT >= 0x0600) 10 11 #ifdef __cplusplus 12 extern "C" { 13 #endif 14 15 DEFINE_GUID(MR_VIDEO_RENDER_SERVICE,0x1092a86c,0xab1a,0x459a,0xa3,0x36,0x83,0x1f,0xbc,0x4d,0x11,0xff); 16 DEFINE_GUID(MR_VIDEO_MIXER_SERVICE,0x73cd2fc,0x6cf4,0x40b7,0x88,0x59,0xe8,0x95,0x52,0xc8,0x41,0xf8); 17 DEFINE_GUID(MR_VIDEO_ACCELERATION_SERVICE,0xefef5175,0x5c7d,0x4ce2,0xbb,0xbd,0x34,0xff,0x8b,0xca,0x65,0x54); 18 DEFINE_GUID(MR_BUFFER_SERVICE,0xa562248c,0x9ac6,0x4ffc,0x9f,0xba,0x3a,0xf8,0xf8,0xad,0x1a,0x4d); 19 DEFINE_GUID(VIDEO_ZOOM_RECT,0x7aaa1638,0x1b7f,0x4c93,0xbd,0x89,0x5b,0x9c,0x9f,0xb6,0xfc,0xf0); 20 21 #if (_WIN32_WINNT >= 0x0601) 22 typedef enum _EVRFilterConfig_Prefs { 23 EVRFilterConfigPrefs_EnableQoS = 0x00000001, 24 EVRFilterConfigPrefs_Mask = 0x00000001 25 } EVRFilterConfigPrefs; 26 #endif /*(_WIN32_WINNT >= 0x0601)*/ 27 28 typedef enum MFVideoAspectRatioMode { 29 MFVideoARMode_None = 0x00000000, 30 MFVideoARMode_PreservePicture = 0x00000001, 31 MFVideoARMode_PreservePixel = 0x00000002, 32 MFVideoARMode_NonLinearStretch = 0x00000004, 33 MFVideoARMode_Mask = 0x00000007 34 } MFVideoAspectRatioMode; 35 36 #if (_WIN32_WINNT >= 0x0601) 37 typedef enum _MFVideoMixPrefs { 38 MFVideoMixPrefs_ForceHalfInterlace = 0x00000001, 39 MFVideoMixPrefs_AllowDropToHalfInterlace = 0x00000002, 40 MFVideoMixPrefs_AllowDropToBob = 0x00000004, 41 MFVideoMixPrefs_ForceBob = 0x00000008, 42 MFVideoMixPrefs_Mask = 0x0000000f 43 } MFVideoMixPrefs; 44 #endif /*(_WIN32_WINNT >= 0x0601)*/ 45 46 typedef enum MFVideoRenderPrefs { 47 MFVideoRenderPrefs_DoNotRenderBorder = 0x00000001, 48 MFVideoRenderPrefs_DoNotClipToDevice = 0x00000002, 49 MFVideoRenderPrefs_AllowOutputThrottling = 0x00000004, 50 MFVideoRenderPrefs_ForceOutputThrottling = 0x00000008, 51 MFVideoRenderPrefs_ForceBatching = 0x00000010, 52 MFVideoRenderPrefs_AllowBatching = 0x00000020, 53 MFVideoRenderPrefs_ForceScaling = 0x00000040, 54 MFVideoRenderPrefs_AllowScaling = 0x00000080, 55 MFVideoRenderPrefs_DoNotRepaintOnStop = 0x00000100, 56 MFVideoRenderPrefs_Mask = 0x000001ff 57 } MFVideoRenderPrefs; 58 59 typedef enum _MFVP_MESSAGE_TYPE { 60 MFVP_MESSAGE_FLUSH = 0x00000000, 61 MFVP_MESSAGE_INVALIDATEMEDIATYPE = 0x00000001, 62 MFVP_MESSAGE_PROCESSINPUTNOTIFY = 0x00000002, 63 MFVP_MESSAGE_BEGINSTREAMING = 0x00000003, 64 MFVP_MESSAGE_ENDSTREAMING = 0x00000004, 65 MFVP_MESSAGE_ENDOFSTREAM = 0x00000005, 66 MFVP_MESSAGE_STEP = 0x00000006, 67 MFVP_MESSAGE_CANCELSTEP = 0x00000007 68 } MFVP_MESSAGE_TYPE; 69 70 typedef struct MFVideoNormalizedRect { 71 float left; 72 float top; 73 float right; 74 float bottom; 75 } MFVideoNormalizedRect; 76 77 #ifdef __cplusplus 78 } 79 #endif 80 81 #undef INTERFACE 82 #define INTERFACE IMFVideoPresenter 83 #ifdef __GNUC__ 84 #warning COM interfaces layout in this header has not been verified. 85 #warning COM interfaces with incorrect layout may not work at all. 86 __MINGW_BROKEN_INTERFACE(INTERFACE) 87 #endif 88 DECLARE_INTERFACE_(IMFVideoPresenter,IMFClockStateSink) 89 { 90 BEGIN_INTERFACE 91 92 /* IUnknown methods */ 93 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; 94 STDMETHOD_(ULONG, AddRef)(THIS) PURE; 95 STDMETHOD_(ULONG, Release)(THIS) PURE; 96 97 /* IMFClockStateSink methods */ 98 STDMETHOD_(HRESULT,OnClockPause)(THIS_ MFTIME hnsSystemTime) PURE; 99 STDMETHOD_(HRESULT,OnClockRestart)(THIS_ MFTIME hnsSystemTime) PURE; 100 STDMETHOD_(HRESULT,OnClockSetRate)(THIS_ MFTIME hnsSystemTime,float flRate) PURE; 101 STDMETHOD_(HRESULT,OnClockStart)(THIS_ MFTIME hnsSystemTime,LONGLONG llClockStartOffset) PURE; 102 STDMETHOD_(HRESULT,OnClockStop)(THIS_ MFTIME hnssSystemTime) PURE; 103 104 /* IMFVideoPresenter methods */ 105 STDMETHOD_(HRESULT,GetCurrentMediaType)(THIS_ IMFVideoMediaType **ppMediaType) PURE; 106 STDMETHOD_(HRESULT,ProcessMessage)(THIS_ MFVP_MESSAGE_TYPE eMessage,ULONG_PTR ulParam) PURE; 107 108 END_INTERFACE 109 }; 110 111 #ifdef COBJMACROS 112 #define IMFVideoPresenter_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 113 #define IMFVideoPresenter_AddRef(This) (This)->lpVtbl->AddRef(This) 114 #define IMFVideoPresenter_Release(This) (This)->lpVtbl->Release(This) 115 #define IMFVideoPresenter_OnClockPause(This,hnsSystemTime) (This)->lpVtbl->OnClockPause(This,hnsSystemTime) 116 #define IMFVideoPresenter_OnClockRestart(This,hnsSystemTime) (This)->lpVtbl->OnClockRestart(This,hnsSystemTime) 117 #define IMFVideoPresenter_OnClockSetRate(This,hnsSystemTime,flRate) (This)->lpVtbl->OnClockSetRate(This,hnsSystemTime,flRate) 118 #define IMFVideoPresenter_OnClockStart(This,hnsSystemTime,llClockStartOffset) (This)->lpVtbl->OnClockStart(This,hnsSystemTime,llClockStartOffset) 119 #define IMFVideoPresenter_OnClockStop(This,hnssSystemTime) (This)->lpVtbl->OnClockStop(This,hnssSystemTime) 120 #define IMFVideoPresenter_GetCurrentMediaType(This,ppMediaType) (This)->lpVtbl->GetCurrentMediaType(This,ppMediaType) 121 #define IMFVideoPresenter_ProcessMessage(This,eMessage,ulParam) (This)->lpVtbl->ProcessMessage(This,eMessage,ulParam) 122 #endif /*COBJMACROS*/ 123 124 #undef INTERFACE 125 #define INTERFACE IMFDesiredSample 126 #ifdef __GNUC__ 127 #warning COM interfaces layout in this header has not been verified. 128 #warning COM interfaces with incorrect layout may not work at all. 129 __MINGW_BROKEN_INTERFACE(INTERFACE) 130 #endif 131 DECLARE_INTERFACE_(IMFDesiredSample,IUnknown) 132 { 133 BEGIN_INTERFACE 134 135 /* IUnknown methods */ 136 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; 137 STDMETHOD_(ULONG, AddRef)(THIS) PURE; 138 STDMETHOD_(ULONG, Release)(THIS) PURE; 139 140 /* IMFDesiredSample methods */ 141 STDMETHOD(Clear)(THIS) PURE; 142 STDMETHOD_(HRESULT,GetDesiredSampleTimeAndDuration)(THIS_ LONGLONG *phnsSampleTime,LONGLONG *phnsSampleDuration) PURE; 143 STDMETHOD(SetDesiredSampleTimeAndDuration)(THIS_ LONGLONG hnsSampleTime,LONGLONG hnsSampleDuration) PURE; 144 145 END_INTERFACE 146 }; 147 #ifdef COBJMACROS 148 #define IMFDesiredSample_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 149 #define IMFDesiredSample_AddRef(This) (This)->lpVtbl->AddRef(This) 150 #define IMFDesiredSample_Release(This) (This)->lpVtbl->Release(This) 151 #define IMFDesiredSample_Clear() (This)->lpVtbl->Clear(This) 152 #define IMFDesiredSample_GetDesiredSampleTimeAndDuration(This,phnsSampleTime,phnsSampleDuration) (This)->lpVtbl->GetDesiredSampleTimeAndDuration(This,phnsSampleTime,phnsSampleDuration) 153 #define IMFDesiredSample_SetDesiredSampleTimeAndDuration(This,hnsSampleTime,hnsSampleDuration) (This)->lpVtbl->SetDesiredSampleTimeAndDuration(This,hnsSampleTime,hnsSampleDuration) 154 #endif /*COBJMACROS*/ 155 156 #undef INTERFACE 157 #define INTERFACE IMFTrackedSample 158 DECLARE_INTERFACE_(IMFTrackedSample,IUnknown) 159 { 160 BEGIN_INTERFACE 161 162 /* IUnknown methods */ 163 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; 164 STDMETHOD_(ULONG, AddRef)(THIS) PURE; 165 STDMETHOD_(ULONG, Release)(THIS) PURE; 166 167 /* IMFTrackedSample methods */ 168 STDMETHOD_(HRESULT,SetAllocator)(THIS_ IMFAsyncCallback *pSampleAllocator,IUnknown *pUnkState) PURE; 169 170 END_INTERFACE 171 }; 172 173 #ifdef COBJMACROS 174 #define IMFTrackedSample_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 175 #define IMFTrackedSample_AddRef(This) (This)->lpVtbl->AddRef(This) 176 #define IMFTrackedSample_Release(This) (This)->lpVtbl->Release(This) 177 #define IMFTrackedSample_SetAllocator(This,pSampleAllocator,pUnkState) (This)->lpVtbl->SetAllocator(This,pSampleAllocator,pUnkState) 178 #endif /*COBJMACROS*/ 179 180 #undef INTERFACE 181 #define INTERFACE IMFVideoDeviceID 182 DECLARE_INTERFACE_(IMFVideoDeviceID,IUnknown) 183 { 184 BEGIN_INTERFACE 185 186 /* IUnknown methods */ 187 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; 188 STDMETHOD_(ULONG, AddRef)(THIS) PURE; 189 STDMETHOD_(ULONG, Release)(THIS) PURE; 190 191 /* IMFVideoDeviceID methods */ 192 STDMETHOD_(HRESULT,GetDeviceID)(THIS_ IID *pDeviceID) PURE; 193 194 END_INTERFACE 195 }; 196 #ifdef COBJMACROS 197 #define IMFVideoDeviceID_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 198 #define IMFVideoDeviceID_AddRef(This) (This)->lpVtbl->AddRef(This) 199 #define IMFVideoDeviceID_Release(This) (This)->lpVtbl->Release(This) 200 #define IMFVideoDeviceID_GetDeviceID(This,pDeviceID) (This)->lpVtbl->GetDeviceID(This,pDeviceID) 201 #endif /*COBJMACROS*/ 202 203 #undef INTERFACE 204 #define INTERFACE IMFVideoPositionMapper 205 DECLARE_INTERFACE_(IMFVideoPositionMapper,IUnknown) 206 { 207 BEGIN_INTERFACE 208 209 /* IUnknown methods */ 210 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; 211 STDMETHOD_(ULONG, AddRef)(THIS) PURE; 212 STDMETHOD_(ULONG, Release)(THIS) PURE; 213 214 /* IMFVideoPositionMapper methods */ 215 STDMETHOD_(HRESULT,MapOutputCoordinateToInputStream)(THIS_ float xOut,float yOut,DWORD dwOutputStreamIndex,DWORD dwInputStreamIndex,float *pxIn,float *pyIn) PURE; 216 217 END_INTERFACE 218 }; 219 #ifdef COBJMACROS 220 #define IMFVideoPositionMapper_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 221 #define IMFVideoPositionMapper_AddRef(This) (This)->lpVtbl->AddRef(This) 222 #define IMFVideoPositionMapper_Release(This) (This)->lpVtbl->Release(This) 223 #define IMFVideoPositionMapper_MapOutputCoordinateToInputStream(This,xOut,yOut,dwOutputStreamIndex,dwInputStreamIndex,pxIn,pyIn) (This)->lpVtbl->MapOutputCoordinateToInputStream(This,xOut,yOut,dwOutputStreamIndex,dwInputStreamIndex,pxIn,pyIn) 224 #endif /*COBJMACROS*/ 225 226 #undef INTERFACE 227 #define INTERFACE IMFVideoRenderer 228 DECLARE_INTERFACE_(IMFVideoRenderer,IUnknown) 229 { 230 BEGIN_INTERFACE 231 232 /* IUnknown methods */ 233 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; 234 STDMETHOD_(ULONG, AddRef)(THIS) PURE; 235 STDMETHOD_(ULONG, Release)(THIS) PURE; 236 237 /* IMFVideoRenderer methods */ 238 STDMETHOD_(HRESULT,InitializeRenderer)(THIS_ IMFTransform *pVideoMixer,IMFVideoPresenter *pVideoPresenter) PURE; 239 240 END_INTERFACE 241 }; 242 #ifdef COBJMACROS 243 #define IMFVideoRenderer_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 244 #define IMFVideoRenderer_AddRef(This) (This)->lpVtbl->AddRef(This) 245 #define IMFVideoRenderer_Release(This) (This)->lpVtbl->Release(This) 246 #define IMFVideoRenderer_InitializeRenderer(This,pVideoMixer,pVideoPresenter) (This)->lpVtbl->InitializeRenderer(This,pVideoMixer,pVideoPresenter) 247 #endif /*COBJMACROS*/ 248 249 #undef INTERFACE 250 #define INTERFACE IMFVideoDisplayControl 251 #ifdef __GNUC__ 252 #warning COM interfaces layout in this header has not been verified. 253 #warning COM interfaces with incorrect layout may not work at all. 254 __MINGW_BROKEN_INTERFACE(INTERFACE) 255 #endif 256 DECLARE_INTERFACE_(IMFVideoDisplayControl,IUnknown) 257 { 258 BEGIN_INTERFACE 259 260 /* IUnknown methods */ 261 STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE; 262 STDMETHOD_(ULONG, AddRef)(THIS) PURE; 263 STDMETHOD_(ULONG, Release)(THIS) PURE; 264 265 /* IMFVideoDisplayControl methods */ 266 STDMETHOD_(HRESULT,GetAspectRatioMode)(THIS_ DWORD *pdwAspectRatioMode) PURE; 267 STDMETHOD_(HRESULT,GetBorderColor)(THIS_ COLORREF *pClr) PURE; 268 STDMETHOD_(HRESULT,GetCurrentImage)(THIS_ LONGLONG *pTimeStamp) PURE; 269 STDMETHOD_(HRESULT,GetFullscreen)(THIS_ BOOL *pfFullscreen) PURE; 270 STDMETHOD_(HRESULT,GetIdealVideoSize)(THIS_ SIZE *pszMax) PURE; 271 STDMETHOD_(HRESULT,GetNativeVideoSize)(THIS_ SIZE *pszARVideo) PURE; 272 STDMETHOD_(HRESULT,GetRenderingPrefs)(THIS_ DWORD *pdwRenderFlags) PURE; 273 STDMETHOD_(HRESULT,GetVideoPosition)(THIS_ MFVideoNormalizedRect *pnrcSource,LPRECT prcDest) PURE; 274 STDMETHOD_(HRESULT,GetVideoWindow)(THIS_ HWND *phwndVideo) PURE; 275 STDMETHOD_(HRESULT,RepaintVideo)(THIS) PURE; 276 STDMETHOD_(HRESULT,SetAspectRatioMode)(THIS_ DWORD dwAspectRatioMode) PURE; 277 STDMETHOD_(HRESULT,SetBorderColor)(THIS_ COLORREF Clr) PURE; 278 STDMETHOD_(HRESULT,SetFullscreen)(THIS_ BOOL fFullscreen) PURE; 279 STDMETHOD_(HRESULT,SetRenderingPrefs)(THIS_ DWORD dwRenderFlags) PURE; 280 STDMETHOD_(HRESULT,SetVideoPosition)(THIS_ const MFVideoNormalizedRect *pnrcSource,const LPRECT prcDest) PURE; 281 STDMETHOD_(HRESULT,SetVideoWindow)(THIS_ HWND hwndVideo) PURE; 282 283 END_INTERFACE 284 }; 285 #ifdef COBJMACROS 286 #define IMFVideoDisplayControl_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject) 287 #define IMFVideoDisplayControl_AddRef(This) (This)->lpVtbl->AddRef(This) 288 #define IMFVideoDisplayControl_Release(This) (This)->lpVtbl->Release(This) 289 #define IMFVideoDisplayControl_GetAspectRatioMode(This,pdwAspectRatioMode) (This)->lpVtbl->GetAspectRatioMode(This,pdwAspectRatioMode) 290 #define IMFVideoDisplayControl_GetBorderColor(This,pClr) (This)->lpVtbl->GetBorderColor(This,pClr) 291 #define IMFVideoDisplayControl_GetCurrentImage(This,pTimeStamp) (This)->lpVtbl->GetCurrentImage(This,pTimeStamp) 292 #define IMFVideoDisplayControl_GetFullscreen(This,pfFullscreen) (This)->lpVtbl->GetFullscreen(This,pfFullscreen) 293 #define IMFVideoDisplayControl_GetIdealVideoSize(This,pszMax) (This)->lpVtbl->GetIdealVideoSize(This,pszMax) 294 #define IMFVideoDisplayControl_GetNativeVideoSize(This,pszARVideo) (This)->lpVtbl->GetNativeVideoSize(This,pszARVideo) 295 #define IMFVideoDisplayControl_GetRenderingPrefs(This,pdwRenderFlags) (This)->lpVtbl->GetRenderingPrefs(This,pdwRenderFlags) 296 #define IMFVideoDisplayControl_GetVideoPosition(This,pnrcSource,prcDest) (This)->lpVtbl->GetVideoPosition(This,pnrcSource,prcDest) 297 #define IMFVideoDisplayControl_GetVideoWindow(This,phwndVideo) (This)->lpVtbl->GetVideoWindow(This,phwndVideo) 298 #define IMFVideoDisplayControl_RepaintVideo() (This)->lpVtbl->RepaintVideo(This) 299 #define IMFVideoDisplayControl_SetAspectRatioMode(This,dwAspectRatioMode) (This)->lpVtbl->SetAspectRatioMode(This,dwAspectRatioMode) 300 #define IMFVideoDisplayControl_SetBorderColor(This,Clr) (This)->lpVtbl->SetBorderColor(This,Clr) 301 #define IMFVideoDisplayControl_SetFullscreen(This,fFullscreen) (This)->lpVtbl->SetFullscreen(This,fFullscreen) 302 #define IMFVideoDisplayControl_SetRenderingPrefs(This,dwRenderFlags) (This)->lpVtbl->SetRenderingPrefs(This,dwRenderFlags) 303 #define IMFVideoDisplayControl_SetVideoPosition(This,pnrcSource,prcDest) (This)->lpVtbl->SetVideoPosition(This,pnrcSource,prcDest) 304 #define IMFVideoDisplayControl_SetVideoWindow(This,hwndVideo) (This)->lpVtbl->SetVideoWindow(This,hwndVideo) 305 #endif /*COBJMACROS*/ 306 307 #ifdef __cplusplus 308 extern "C" { 309 #endif 310 311 HRESULT WINAPI MFCreateVideoMixer(IUnknown *pOwner,REFIID riidDevice,REFIID riid,void **ppVideoMixer); 312 HRESULT WINAPI MFCreateVideoMixerAndPresenter(IUnknown *pMixerOwner,IUnknown *pPresenterOwner,REFIID riidMixer,void **ppvVideoMixer,REFIID riidPresenter,void **ppvVideoPresenter); 313 HRESULT WINAPI MFCreateVideoPresenter(IUnknown *pOwner,REFIID riidDevice,REFIID riid,void **ppvVideoPresenter); 314 HRESULT WINAPI MFCreateVideoSampleAllocator(REFIID riid,void** ppSampleAllocator); 315 HRESULT WINAPI MFCreateVideoSampleFromSurface(IUnknown *pUnkSurface,IMFSample **ppSample); 316 317 #ifdef __cplusplus 318 } 319 #endif 320 321 #endif /*(_WIN32_WINNT >= 0x0600)*/ 322 323 #endif /*_INC_EVR*/ 324