diff options
author | Kacper Michajłow <kasper93@gmail.com> | 2015-09-25 19:54:19 +0300 |
---|---|---|
committer | Kacper Michajłow <kasper93@gmail.com> | 2015-09-25 22:35:46 +0300 |
commit | 895166cc4234c58dbd9d373611338de5fcf406b8 (patch) | |
tree | 18b2f4fdf707343783478d7e7608cb8c21a4f595 /include | |
parent | 59c21cdd4a83f45c784a618474e44b7ae1f46eb6 (diff) |
Update mvrInterfaces.h.
Diffstat (limited to 'include')
-rw-r--r-- | include/mvrInterfaces.h | 148 |
1 files changed, 86 insertions, 62 deletions
diff --git a/include/mvrInterfaces.h b/include/mvrInterfaces.h index fccbef67d..2566c823c 100644 --- a/include/mvrInterfaces.h +++ b/include/mvrInterfaces.h @@ -1,11 +1,12 @@ // *************************************************************** -// mvrInterfaces.h version: 1.0.7 · date: 2014-01-18 +// mvrInterfaces.h version: 1.0.8 · date: 2015-06-21 // ------------------------------------------------------------- // various interfaces exported by madVR // ------------------------------------------------------------- -// Copyright (C) 2011 - 2014 www.madshi.net, BSD license +// Copyright (C) 2011 - 2015 www.madshi.net, BSD license // *************************************************************** +// 2015-06-21 1.0.8 added IMadVRCommand // 2014-01-18 1.0.7 added IMadVRSettings2 // 2013-06-04 1.0.6 added IMadVRInfo // 2013-01-23 1.0.5 added IMadVRSubclassReplacement @@ -56,6 +57,11 @@ DEFINE_GUID(CLSID_madVR, 0xe1a8b82a, 0x32ce, 0x4b0d, 0xbe, 0x0d, 0xaa, 0x68, 0xc // if you want the mouse message to be "eaten" (instead of passed on) typedef void (__stdcall *OSDMOUSECALLBACK)(LPCSTR name, LPVOID context, UINT message, WPARAM wParam, int posX, int posY); +// return values for IOsdRenderCallback::ClearBackground/RenderOsd callbacks +const static HRESULT CALLBACK_EMPTY = 4306; // the render callback didn't do anything at all +const static HRESULT CALLBACK_INFO_DISPLAY = 0; // info display, doesn't need low latency +const static HRESULT CALLBACK_USER_INTERFACE = 77001; // user interface, switches madVR into low latency mode + // when using the (2) render callbacks method, you need to provide // madVR with an instance of the IOsdRenderCallback interface // it contains three callbacks you have to provide @@ -73,12 +79,16 @@ interface IOsdRenderCallback : public IUnknown // fullOutputRect = (0, 0, outputSurfaceWidth, outputSurfaceHeight) // activeVideoRect = active video rendering rect inside of fullOutputRect // background area = the part of fullOutputRect which isn't covered by activeVideoRect - // you can return ERROR_EMPTY to indicate that you didn't actually do anything - // in that case madVR will skip some Direct3D state changes to save performance + // possible return values: CALLBACK_EMPTY etc, see definitions above STDMETHOD(ClearBackground)(LPCSTR name, REFERENCE_TIME frameStart, RECT *fullOutputRect, RECT *activeVideoRect) = 0; STDMETHOD(RenderOsd )(LPCSTR name, REFERENCE_TIME frameStart, RECT *fullOutputRect, RECT *activeVideoRect) = 0; }; +// flags for IMadVROsdServices::OsdSetBitmap +const static int BITMAP_STRETCH_TO_OUTPUT = 1; // stretch OSD bitmap to video/output rect +const static int BITMAP_INFO_DISPLAY = 2; // info display, doesn't need low latency +const static int BITMAP_USER_INTERFACE = 4; // user interface, switches madVR into low latency mode + // this is the main interface which madVR provides to you [uuid("3AE03A88-F613-4BBA-AD3E-EE236976BF9A")] interface IMadVROsdServices : public IUnknown @@ -94,7 +104,7 @@ interface IMadVROsdServices : public IUnknown bool posRelativeToVideoRect = false, // draw relative to TRUE: the active video rect; FALSE: the full output rect int zOrder = 0, // high zOrder OSD elements are drawn on top of those with smaller zOrder values DWORD duration = 0, // how many milliseconds shall the OSD element be shown (0 = infinite)? - DWORD flags = 0, // 0x00000001 = stretch OSD bitmap to video/output rect + DWORD flags = 0, // see definitions above OSDMOUSECALLBACK callback = NULL, // optional callback for mouse events LPVOID callbackContext = NULL, // this context is passed to the callback LPVOID reserved = NULL // undefined - set to NULL @@ -167,33 +177,6 @@ interface IMadVRSubclassReplacement : public IUnknown }; // --------------------------------------------------------------------------- -// IMadVRSeekbarControl -// --------------------------------------------------------------------------- - -// if you draw your own seekbar and absolutely insist on disliking madVR's -// own seekbar, you can forcefully hide it by using this interface -// using this interface only affects the current madVR instance - -[uuid("D2D3A520-7CFA-46EB-BA3B-6194A028781C")] -interface IMadVRSeekbarControl : public IUnknown -{ - STDMETHOD(DisableSeekbar)(BOOL disable) = 0; -}; - -// --------------------------------------------------------------------------- -// IMadVRExclusiveModeControl -// --------------------------------------------------------------------------- - -// you can use this interface to turn madVR's automatic exclusive mode on/off -// using this interface only affects the current madVR instance - -[uuid("88A69329-3CD3-47D6-ADEF-89FA23AFC7F3")] -interface IMadVRExclusiveModeControl : public IUnknown -{ - STDMETHOD(DisableExclusiveMode)(BOOL disable) = 0; -}; - -// --------------------------------------------------------------------------- // IMadVRExclusiveModeCallback // --------------------------------------------------------------------------- @@ -213,36 +196,6 @@ interface IMadVRExclusiveModeCallback : public IUnknown }; // --------------------------------------------------------------------------- -// IMadVRDirect3D9Manager -// --------------------------------------------------------------------------- - -// You can make madVR use your Direct3D9 device(s) instead of creating its -// own. If you do that, madVR will not automatically switch between -// fullscreen and windowed mode, anymore. It's your duty then to enter -// fullscreen exclusive mode, if you want madVR to use it. madVR will still -// reset the devices, though, if necessary (lost device etc). - -[uuid("1CAEE23B-D14B-4DB4-8AEA-F3528CB78922")] -interface IMadVRDirect3D9Manager : public IUnknown -{ - // Creating 3 different devices for scanline reading, rendering and - // presentation can improve overall performance. If you don't like that - // idea, just feed madVR with the same device for all tasks. - // You can't create new devices if one device is already in fullscreen - // exclusive mode. So if you want to provide madVR with 3 different - // devices, while still using exclusive mode, make sure you create the - // scanline reading and rendering devices before setting the presentation - // device to fullscreen exclusive mode. - STDMETHOD(UseTheseDevices)(LPDIRECT3DDEVICE9 scanlineReading, LPDIRECT3DDEVICE9 rendering, LPDIRECT3DDEVICE9 presentation) = 0; - - // madVR contains a display mode changer which, depending on the video - // size and frame rate, may decide to switch display modes. If you don't - // want madVR to change either resolution or refresh rates, you can - // disable this functionality partially or completely. - STDMETHOD(ConfigureDisplayModeChanger)(BOOL allowResolutionChanges, BOOL allowRefreshRateChanges) = 0; -}; - -// --------------------------------------------------------------------------- // IMadVRExternalPixelShaders // --------------------------------------------------------------------------- @@ -301,6 +254,35 @@ interface IMadVRInfo : public IUnknown // osdLatency, int, how much milliseconds will pass for an OSD change to become visible? // --------------------------------------------------------------------------- +// IMadVRCommand +// --------------------------------------------------------------------------- + +// This interface allows you to give commands to madVR. These commands only +// affect the current madVR instance. They don't change permanent settings. + +[uuid("5E9599D1-C5DB-4A84-98A9-09BC5F8F1B79")] +interface IMadVRCommand : public IUnknown +{ + // Command names and LPWSTR values are treated case insensitive. + STDMETHOD(SendCommand )(LPCSTR command) = 0; + STDMETHOD(SendCommandBool )(LPCSTR command, bool parameter) = 0; + STDMETHOD(SendCommandInt )(LPCSTR command, int parameter) = 0; + STDMETHOD(SendCommandSize )(LPCSTR command, SIZE parameter) = 0; + STDMETHOD(SendCommandRect )(LPCSTR command, RECT parameter) = 0; + STDMETHOD(SendCommandUlonglong)(LPCSTR command, ULONGLONG parameter) = 0; + STDMETHOD(SendCommandDouble )(LPCSTR command, double parameter) = 0; + STDMETHOD(SendCommandString )(LPCSTR command, LPWSTR parameter) = 0; + STDMETHOD(SendCommandBin )(LPCSTR command, LPVOID parameter, + int size ) = 0; +}; + +// available commands: +// ------------------- +// disableSeekbar, bool, turn madVR's automatic exclusive mode on/off +// disableExclusiveMode, bool, turn madVR's automatic exclusive mode on/off +// restoreDisplayModeNow, makes madVR immediately restore the original display mode + +// --------------------------------------------------------------------------- // IMadVRSettings // --------------------------------------------------------------------------- @@ -723,5 +705,47 @@ interface IMadVRRefreshRateInfo : public IUnknown }; // --------------------------------------------------------------------------- +// IMadVRSeekbarControl (obsolete) +// --------------------------------------------------------------------------- + +// CAUTION: This interface is obsolete. Use IMadVRCommand instead: +// IMadVRCommand::SendCommandBool("disableSeekbar", true) + +[uuid("D2D3A520-7CFA-46EB-BA3B-6194A028781C")] +interface IMadVRSeekbarControl : public IUnknown +{ + STDMETHOD(DisableSeekbar)(BOOL disable) = 0; +}; + +// --------------------------------------------------------------------------- +// IMadVRExclusiveModeControl (obsolete) +// --------------------------------------------------------------------------- + +// CAUTION: This interface is obsolete. Use IMadVRCommand instead: +// IMadVRCommand::SendCommandBool("disableExclusiveMode", true) + +[uuid("88A69329-3CD3-47D6-ADEF-89FA23AFC7F3")] +interface IMadVRExclusiveModeControl : public IUnknown +{ + STDMETHOD(DisableExclusiveMode)(BOOL disable) = 0; +}; + +// --------------------------------------------------------------------------- +// IMadVRDirect3D9Manager (obsolete) +// --------------------------------------------------------------------------- + +// CAUTION: This interface is obsolete. Instead use texture/surface sharing, +// so that both media player and madVR can render to their own devices. You +// can then blend the media player's GUI on top of madVR's rendered video +// frames in madVR's OSD callback function. + +[uuid("1CAEE23B-D14B-4DB4-8AEA-F3528CB78922")] +interface IMadVRDirect3D9Manager : public IUnknown +{ + STDMETHOD(UseTheseDevices)(LPDIRECT3DDEVICE9 scanlineReading, LPDIRECT3DDEVICE9 rendering, LPDIRECT3DDEVICE9 presentation) = 0; + STDMETHOD(ConfigureDisplayModeChanger)(BOOL allowResolutionChanges, BOOL allowRefreshRateChanges) = 0; +}; + +// --------------------------------------------------------------------------- #endif // __mvrInterfaces__ |