summaryrefslogtreecommitdiff
path: root/media
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-09-30 02:11:33 +0000
committerMoonchild <moonchild@palemoon.org>2022-04-01 14:38:31 +0200
commita7b63631b0e84c9a5ab1ef266f8f5e26c0f62d6a (patch)
tree521fbd6d7c6b866fbc8d58aa538af14312a57667 /media
parentcdff23ad0b3e0be2121c77a5b2415b15c7c4f0b2 (diff)
downloaduxp-a7b63631b0e84c9a5ab1ef266f8f5e26c0f62d6a.tar.gz
No issue - Clean up some obsolete/archaic code paths.
Diffstat (limited to 'media')
-rw-r--r--media/webrtc/trunk/webrtc/base/cpumonitor.cc1
-rw-r--r--media/webrtc/trunk/webrtc/base/nethelpers.cc40
-rw-r--r--media/webrtc/trunk/webrtc/base/systeminfo.cc1
-rw-r--r--media/webrtc/trunk/webrtc/modules/audio_device/win/audio_device_utility_win.cc72
-rw-r--r--media/webrtc/trunk/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc5
5 files changed, 8 insertions, 111 deletions
diff --git a/media/webrtc/trunk/webrtc/base/cpumonitor.cc b/media/webrtc/trunk/webrtc/base/cpumonitor.cc
index c881b48c5a..20aea554f2 100644
--- a/media/webrtc/trunk/webrtc/base/cpumonitor.cc
+++ b/media/webrtc/trunk/webrtc/base/cpumonitor.cc
@@ -107,7 +107,6 @@ bool CpuSampler::Init() {
return false;
}
#if defined(WEBRTC_WIN)
- // Note that GetSystemTimes is available in Windows XP SP1 or later.
// http://msdn.microsoft.com/en-us/library/ms724400.aspx
// NtQuerySystemInformation is used as a fallback.
if (!force_fallback_) {
diff --git a/media/webrtc/trunk/webrtc/base/nethelpers.cc b/media/webrtc/trunk/webrtc/base/nethelpers.cc
index 0c7cce6b7c..f8150939fd 100644
--- a/media/webrtc/trunk/webrtc/base/nethelpers.cc
+++ b/media/webrtc/trunk/webrtc/base/nethelpers.cc
@@ -116,45 +116,7 @@ int inet_pton(int af, const char* src, void *dst) {
}
bool HasIPv6Enabled() {
-#if !defined(WEBRTC_WIN)
- // We only need to check this for Windows XP (so far).
+ // All supported OSes have IPv6.
return true;
-#else
- if (IsWindowsVistaOrLater()) {
- return true;
- }
- if (!IsWindowsXpOrLater()) {
- return false;
- }
- DWORD protbuff_size = 4096;
- scoped_ptr<char[]> protocols;
- LPWSAPROTOCOL_INFOW protocol_infos = NULL;
- int requested_protocols[2] = {AF_INET6, 0};
-
- int err = 0;
- int ret = 0;
- // Check for protocols in a do-while loop until we provide a buffer large
- // enough. (WSCEnumProtocols sets protbuff_size to its desired value).
- // It is extremely unlikely that this will loop more than once.
- do {
- protocols.reset(new char[protbuff_size]);
- protocol_infos = reinterpret_cast<LPWSAPROTOCOL_INFOW>(protocols.get());
- ret = WSCEnumProtocols(requested_protocols, protocol_infos,
- &protbuff_size, &err);
- } while (ret == SOCKET_ERROR && err == WSAENOBUFS);
-
- if (ret == SOCKET_ERROR) {
- return false;
- }
-
- // Even if ret is positive, check specifically for IPv6.
- // Non-IPv6 enabled WinXP will still return a RAW protocol.
- for (int i = 0; i < ret; ++i) {
- if (protocol_infos[i].iAddressFamily == AF_INET6) {
- return true;
- }
- }
- return false;
-#endif
}
} // namespace rtc
diff --git a/media/webrtc/trunk/webrtc/base/systeminfo.cc b/media/webrtc/trunk/webrtc/base/systeminfo.cc
index 6d8d5ba751..4d9b819613 100644
--- a/media/webrtc/trunk/webrtc/base/systeminfo.cc
+++ b/media/webrtc/trunk/webrtc/base/systeminfo.cc
@@ -47,7 +47,6 @@ typedef BOOL (WINAPI *LPFN_GLPI)(
PDWORD);
static void GetProcessorInformation(int* physical_cpus, int* cache_size) {
- // GetLogicalProcessorInformation() is available on Windows XP SP3 and beyond.
LPFN_GLPI glpi = reinterpret_cast<LPFN_GLPI>(GetProcAddress(
GetModuleHandle(L"kernel32"),
"GetLogicalProcessorInformation"));
diff --git a/media/webrtc/trunk/webrtc/modules/audio_device/win/audio_device_utility_win.cc b/media/webrtc/trunk/webrtc/modules/audio_device/win/audio_device_utility_win.cc
index 9cfd6bea6c..4ee434d94b 100644
--- a/media/webrtc/trunk/webrtc/modules/audio_device/win/audio_device_utility_win.cc
+++ b/media/webrtc/trunk/webrtc/modules/audio_device/win/audio_device_utility_win.cc
@@ -115,33 +115,8 @@ BOOL AudioDeviceUtilityWindows::GetOSDisplayString(LPTSTR pszOS)
{
StringCchCopy(pszOS, STRING_MAX_SIZE, TEXT("Microsoft "));
- // Test for the specific product
- //
- // Operating system Version number
- // --------------------------------------
- // Windows 7 6.1
- // Windows Server 2008 R2 6.1
- // Windows Server 2008 6.0
- // Windows Vista 6.0
- // - - - - - - - - - - - - - - - - - - -
- // Windows Server 2003 R2 5.2
- // Windows Server 2003 5.2
- // Windows XP 5.1
- // Windows 2000 5.0
- //
- // see http://msdn.microsoft.com/en-us/library/ms724832(VS.85).aspx for details
- //
if (osvi.dwMajorVersion == 6)
{
- if (osvi.dwMinorVersion == 0)
- {
- // Windows Vista or Server 2008
- if (osvi.wProductType == VER_NT_WORKSTATION)
- StringCchCat(pszOS, STRING_MAX_SIZE, TEXT("Windows Vista "));
- else
- StringCchCat(pszOS, STRING_MAX_SIZE, TEXT("Windows Server 2008 " ));
- }
-
if (osvi.dwMinorVersion == 1)
{
// Windows 7 or Server 2008 R2
@@ -152,38 +127,6 @@ BOOL AudioDeviceUtilityWindows::GetOSDisplayString(LPTSTR pszOS)
}
}
- if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 2)
- {
- StringCchCat(pszOS, STRING_MAX_SIZE, TEXT("Windows Server 2003"));
- }
-
- if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 1)
- {
- StringCchCat(pszOS, STRING_MAX_SIZE, TEXT("Windows XP "));
- if (osvi.wSuiteMask & VER_SUITE_PERSONAL)
- StringCchCat(pszOS, STRING_MAX_SIZE, TEXT( "Home Edition" ));
- else
- StringCchCat(pszOS, STRING_MAX_SIZE, TEXT( "Professional" ));
- }
-
- if (osvi.dwMajorVersion == 5 && osvi.dwMinorVersion == 0)
- {
- StringCchCat(pszOS, STRING_MAX_SIZE, TEXT("Windows 2000 "));
-
- if (osvi.wProductType == VER_NT_WORKSTATION )
- {
- StringCchCat(pszOS, STRING_MAX_SIZE, TEXT( "Professional" ));
- }
- else
- {
- if (osvi.wSuiteMask & VER_SUITE_DATACENTER)
- StringCchCat(pszOS, STRING_MAX_SIZE, TEXT( "Datacenter Server" ));
- else if (osvi.wSuiteMask & VER_SUITE_ENTERPRISE)
- StringCchCat(pszOS, STRING_MAX_SIZE, TEXT( "Advanced Server" ));
- else StringCchCat(pszOS, STRING_MAX_SIZE, TEXT( "Server" ));
- }
- }
-
// Include service pack (if any)
//
if (_tcslen(osvi.szCSDVersion) > 0)
@@ -207,16 +150,13 @@ BOOL AudioDeviceUtilityWindows::GetOSDisplayString(LPTSTR pszOS)
else
GetSystemInfo(&si);
- // Add 64-bit or 32-bit for OS versions "later than" Vista
+ // Add 64-bit or 32-bit
//
- if (osvi.dwMajorVersion >= 6)
- {
- if ((si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) ||
- (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64))
- StringCchCat(pszOS, STRING_MAX_SIZE, TEXT( ", 64-bit" ));
- else if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL )
- StringCchCat(pszOS, STRING_MAX_SIZE, TEXT(", 32-bit"));
- }
+ if ((si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) ||
+ (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_IA64))
+ StringCchCat(pszOS, STRING_MAX_SIZE, TEXT( ", 64-bit" ));
+ else if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_INTEL )
+ StringCchCat(pszOS, STRING_MAX_SIZE, TEXT(", 32-bit"));
return TRUE;
}
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc
index 756bdcb3cd..81caa38e3f 100644
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc
@@ -279,12 +279,9 @@ bool ScreenCapturerWinGdi::CaptureImage() {
BOOL enabled;
(*composition_enabled_func_)(&enabled);
if (!enabled) {
- // Vista or Windows 7, Aero disabled
+ // Aero disabled
rop |= CAPTUREBLT;
}
- } else {
- // Windows XP, required to get layered windows
- rop |= CAPTUREBLT;
}
if (previous_object != NULL) {
BitBlt(memory_dc_,