comparison data/fileio/test/UnsupportedFormat.cpp @ 1715:9ec3f123f1fb

Build fixes
author Chris Cannam
date Fri, 17 May 2019 11:53:43 +0100
parents 83cb6e9d769b
children a47a23c824ac
comparison
equal deleted inserted replaced
1714:83cb6e9d769b 1715:9ec3f123f1fb
16 16
17 #ifdef Q_OS_WIN 17 #ifdef Q_OS_WIN
18 #include <windows.h> 18 #include <windows.h>
19 #endif 19 #endif
20 20
21 #include <iostream>
22
21 bool 23 bool
22 UnsupportedFormat::isLegitimatelyUnsupported(QString format) 24 UnsupportedFormat::isLegitimatelyUnsupported(QString format)
23 { 25 {
24 #ifdef Q_OS_WIN 26 #ifdef Q_OS_WIN
25 // Our CI tests run on Windows Server, which annoyingly seems to 27 // Our CI tests run on Windows Server, which annoyingly seems to
34 OSVERSIONINFOEXW osInfo; 36 OSVERSIONINFOEXW osInfo;
35 osInfo.dwOSVersionInfoSize = sizeof(osInfo); 37 osInfo.dwOSVersionInfoSize = sizeof(osInfo);
36 RtlGetVersion(&osInfo); 38 RtlGetVersion(&osInfo);
37 39
38 if (osInfo.wProductType != VER_NT_WORKSTATION) { 40 if (osInfo.wProductType != VER_NT_WORKSTATION) {
39 cerr << "NOTE: We appear to be running on Windows Server (wProductType = " << osInfo.wProductType << ") - assuming encumbered media codecs might not be installed and being lenient about them" << endl; 41 std::cerr << "NOTE: We appear to be running on Windows Server (wProductType = " << osInfo.wProductType << ") - assuming encumbered media codecs might not be installed and being lenient about them" << std::endl;
40 return (format == "aac" || 42 return (format == "aac" ||
41 format == "apple_lossless" || 43 format == "apple_lossless" ||
42 format == "m4a" || 44 format == "m4a" ||
43 format == "wma"); 45 format == "wma");
44 } 46 }
45 47
46 } else { 48 } else {
47 cerr << "WARNING: Failed to find RtlGetVersion in NTDLL" << endl; 49 std::cerr << "WARNING: Failed to find RtlGetVersion in NTDLL"
50 << std::endl;
48 } 51 }
49 52
50 return (format == "apple_lossless"); 53 return (format == "apple_lossless");
51 54
52 #else 55 #else