Loading content/media/directshow/DirectShowDecoder.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -8,9 +8,7 @@ #include "DirectShowReader.h" #include "MediaDecoderStateMachine.h" #include "mozilla/Preferences.h" #include "WinUtils.h" using namespace mozilla::widget; #include "mozilla/WindowsVersion.h" namespace mozilla { Loading Loading @@ -47,7 +45,7 @@ DirectShowDecoder::GetSupportedCodecs(const nsACString& aType, bool DirectShowDecoder::IsEnabled() { return (WinUtils::GetWindowsVersion() < WinUtils::VISTA_VERSION) && return !IsVistaOrLater() && Preferences::GetBool("media.directshow.enabled"); } Loading content/media/fmp4/MP4Decoder.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -10,8 +10,7 @@ #include "mozilla/Preferences.h" #ifdef XP_WIN #include "WinUtils.h" using namespace mozilla::widget; #include "mozilla/WindowsVersion.h" #endif namespace mozilla { Loading Loading @@ -72,7 +71,7 @@ HavePlatformMPEGDecoders() Preferences::GetBool("media.fragmented-mp4.use-blank-decoder") || #ifdef XP_WIN // We have H.264/AAC platform decoders on Windows Vista and up. WinUtils::GetWindowsVersion() >= WinUtils::VISTA_VERSION || IsVistaOrLater() || #endif // TODO: Other platforms... false; Loading content/media/fmp4/wmf/WMFVideoDecoder.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ #include "VideoUtils.h" #include "DXVA2Manager.h" #include "nsThreadUtils.h" #include "WinUtils.h" #include "Layers.h" #include "mozilla/layers/LayersTypes.h" #include "prlog.h" Loading @@ -35,7 +34,6 @@ WMFVideoDecoder::WMFVideoDecoder(bool aDXVAEnabled) mVideoHeight(0), mLastStreamOffset(0), mDXVAEnabled(aDXVAEnabled), mIsRunningOnVista(widget::WinUtils::GetWindowsVersion() == widget::WinUtils::WIN7_VERSION), mUseHwAccel(false) { NS_ASSERTION(!NS_IsMainThread(), "Must be on main thread."); Loading content/media/fmp4/wmf/WMFVideoDecoder.h +0 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,6 @@ private: nsAutoPtr<DXVA2Manager> mDXVA2Manager; const bool mDXVAEnabled; const bool mIsRunningOnVista; bool mUseHwAccel; }; Loading content/media/wmf/WMFDecoder.cpp +6 −14 Original line number Diff line number Diff line Loading @@ -10,15 +10,13 @@ #include "WMFUtils.h" #include "MediaDecoderStateMachine.h" #include "mozilla/Preferences.h" #include "WinUtils.h" #include "mozilla/WindowsVersion.h" #include "nsCharSeparatedTokenizer.h" #ifdef MOZ_DIRECTSHOW #include "DirectShowDecoder.h" #endif using namespace mozilla::widget; namespace mozilla { MediaDecoderStateMachine* WMFDecoder::CreateStateMachine() Loading @@ -41,18 +39,12 @@ WMFDecoder::IsMP3Supported() if (!MediaDecoder::IsWMFEnabled()) { return false; } if (WinUtils::GetWindowsVersion() != WinUtils::WIN7_VERSION) { if (!IsWin7OrLater()) { return true; } // We're on Windows 7. MP3 support is disabled if no service pack // MP3 support is disabled if we're on Windows 7 and no service pack // is installed, as it's crashy on Win7 SP0. UINT spMajorVer = 0, spMinorVer = 0; if (!WinUtils::GetWindowsServicePackVersion(spMajorVer, spMinorVer)) { // Um... We can't determine the service pack version... Just block // MP3 as a precaution... return false; } return spMajorVer != 0; return IsWin7SP1OrLater(); } static bool Loading Loading @@ -163,7 +155,7 @@ bool WMFDecoder::IsEnabled() { // We only use WMF on Windows Vista and up return WinUtils::GetWindowsVersion() >= WinUtils::VISTA_VERSION && return IsVistaOrLater() && Preferences::GetBool("media.windows-media-foundation.enabled"); } Loading Loading
content/media/directshow/DirectShowDecoder.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -8,9 +8,7 @@ #include "DirectShowReader.h" #include "MediaDecoderStateMachine.h" #include "mozilla/Preferences.h" #include "WinUtils.h" using namespace mozilla::widget; #include "mozilla/WindowsVersion.h" namespace mozilla { Loading Loading @@ -47,7 +45,7 @@ DirectShowDecoder::GetSupportedCodecs(const nsACString& aType, bool DirectShowDecoder::IsEnabled() { return (WinUtils::GetWindowsVersion() < WinUtils::VISTA_VERSION) && return !IsVistaOrLater() && Preferences::GetBool("media.directshow.enabled"); } Loading
content/media/fmp4/MP4Decoder.cpp +2 −3 Original line number Diff line number Diff line Loading @@ -10,8 +10,7 @@ #include "mozilla/Preferences.h" #ifdef XP_WIN #include "WinUtils.h" using namespace mozilla::widget; #include "mozilla/WindowsVersion.h" #endif namespace mozilla { Loading Loading @@ -72,7 +71,7 @@ HavePlatformMPEGDecoders() Preferences::GetBool("media.fragmented-mp4.use-blank-decoder") || #ifdef XP_WIN // We have H.264/AAC platform decoders on Windows Vista and up. WinUtils::GetWindowsVersion() >= WinUtils::VISTA_VERSION || IsVistaOrLater() || #endif // TODO: Other platforms... false; Loading
content/media/fmp4/wmf/WMFVideoDecoder.cpp +0 −2 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ #include "VideoUtils.h" #include "DXVA2Manager.h" #include "nsThreadUtils.h" #include "WinUtils.h" #include "Layers.h" #include "mozilla/layers/LayersTypes.h" #include "prlog.h" Loading @@ -35,7 +34,6 @@ WMFVideoDecoder::WMFVideoDecoder(bool aDXVAEnabled) mVideoHeight(0), mLastStreamOffset(0), mDXVAEnabled(aDXVAEnabled), mIsRunningOnVista(widget::WinUtils::GetWindowsVersion() == widget::WinUtils::WIN7_VERSION), mUseHwAccel(false) { NS_ASSERTION(!NS_IsMainThread(), "Must be on main thread."); Loading
content/media/fmp4/wmf/WMFVideoDecoder.h +0 −1 Original line number Diff line number Diff line Loading @@ -68,7 +68,6 @@ private: nsAutoPtr<DXVA2Manager> mDXVA2Manager; const bool mDXVAEnabled; const bool mIsRunningOnVista; bool mUseHwAccel; }; Loading
content/media/wmf/WMFDecoder.cpp +6 −14 Original line number Diff line number Diff line Loading @@ -10,15 +10,13 @@ #include "WMFUtils.h" #include "MediaDecoderStateMachine.h" #include "mozilla/Preferences.h" #include "WinUtils.h" #include "mozilla/WindowsVersion.h" #include "nsCharSeparatedTokenizer.h" #ifdef MOZ_DIRECTSHOW #include "DirectShowDecoder.h" #endif using namespace mozilla::widget; namespace mozilla { MediaDecoderStateMachine* WMFDecoder::CreateStateMachine() Loading @@ -41,18 +39,12 @@ WMFDecoder::IsMP3Supported() if (!MediaDecoder::IsWMFEnabled()) { return false; } if (WinUtils::GetWindowsVersion() != WinUtils::WIN7_VERSION) { if (!IsWin7OrLater()) { return true; } // We're on Windows 7. MP3 support is disabled if no service pack // MP3 support is disabled if we're on Windows 7 and no service pack // is installed, as it's crashy on Win7 SP0. UINT spMajorVer = 0, spMinorVer = 0; if (!WinUtils::GetWindowsServicePackVersion(spMajorVer, spMinorVer)) { // Um... We can't determine the service pack version... Just block // MP3 as a precaution... return false; } return spMajorVer != 0; return IsWin7SP1OrLater(); } static bool Loading Loading @@ -163,7 +155,7 @@ bool WMFDecoder::IsEnabled() { // We only use WMF on Windows Vista and up return WinUtils::GetWindowsVersion() >= WinUtils::VISTA_VERSION && return IsVistaOrLater() && Preferences::GetBool("media.windows-media-foundation.enabled"); } Loading