diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-09-28 12:40:42 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-09-29 14:55:11 +0200 |
commit | 0dd2e602e5c1b46e82abc6051677aeaab1d265b8 (patch) | |
tree | 7f7a1cbc9cb87c38c732d4691129bf81dc1d04ff /avmedia | |
parent | 8b12c98ec7ec0b5ba20c28890ee63803fb9518d5 (diff) |
Drop check for Windows versions we don't support
Since we dropped support of Vista and below in master toward 6.0,
those checks are needless. Removing the code that only worked in
older versions, and streamlining the resulting code.
Also, use kernel32.dll version for Windows version, instead of
deprecated GetVersionEx, and inconvenient VersionHelpers. Since both
GetVersion(Ex) and VersionHelpers (based on VerifyVersionInfo) are
subject to manifest-based behavior since Windows 8.1, this move will
hopefully result in more reliable OS version detection.
Change-Id: I3edd8fc1843e64b6a65bd3a126be6a085511f13c
Reviewed-on: https://gerrit.libreoffice.org/42905
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'avmedia')
-rw-r--r-- | avmedia/source/win/player.cxx | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/avmedia/source/win/player.cxx b/avmedia/source/win/player.cxx index c0579c225dde..4ba72ca9a368 100644 --- a/avmedia/source/win/player.cxx +++ b/avmedia/source/win/player.cxx @@ -26,9 +26,6 @@ #include <control.h> #include <uuids.h> #include <evcode.h> -#ifdef _WIN32_WINNT_WINBLUE -#include <VersionHelpers.h> -#endif #if defined _MSC_VER #pragma warning(pop) #endif @@ -69,22 +66,6 @@ LRESULT CALLBACK MediaPlayerWndProc_2( HWND hWnd,UINT nMsg, WPARAM nPar1, LPARAM } -bool isWindowsVistaOrHigher() -{ -// the Win32 SDK 8.1 deprecates GetVersionEx() -#ifdef _WIN32_WINNT_WINBLUE - return IsWindowsVistaOrGreater(); -#else - // POST: return true if we are at least on Windows Vista - OSVERSIONINFO osvi; - ZeroMemory(&osvi, sizeof(osvi)); - osvi.dwOSVersionInfoSize = sizeof(osvi); - GetVersionEx(&osvi); - return osvi.dwMajorVersion >= 6; -#endif -} - - Player::Player( const uno::Reference< lang::XMultiServiceFactory >& rxMgr ) : Player_BASE(m_aMutex), mxMgr( rxMgr ), @@ -166,13 +147,6 @@ bool Player::create( const OUString& rURL ) // Don't use the overlay mixer on Windows Vista // It disables the desktop composition as soon as RenderFile is called // also causes some other problems: video rendering is not reliable - if( !isWindowsVistaOrHigher() && SUCCEEDED( CoCreateInstance( CLSID_OverlayMixer, nullptr, CLSCTX_INPROC_SERVER, IID_IBaseFilter, reinterpret_cast<void**>(&mpOMF) ) ) ) - { - mpGB->AddFilter( mpOMF, L"com_sun_star_media_OverlayMixerFilter" ); - - if( !SUCCEEDED( mpOMF->QueryInterface( IID_IDDrawExclModeVideo, reinterpret_cast<void**>(&mpEV) ) ) ) - mpEV = nullptr; - } if( SUCCEEDED( hR = mpGB->RenderFile( reinterpret_cast<LPCWSTR>(rURL.getStr()), nullptr ) ) && SUCCEEDED( hR = mpGB->QueryInterface( IID_IMediaControl, reinterpret_cast<void**>(&mpMC) ) ) && |