OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 { | 37 { |
38 | 38 |
39 // static | 39 // static |
40 bool CheckOSVersion() | 40 bool CheckOSVersion() |
41 { | 41 { |
42 // Check OSX version | 42 // Check OSX version |
43 OSErr err = noErr; | 43 OSErr err = noErr; |
44 | 44 |
45 SInt32 version; | 45 SInt32 version; |
46 | 46 |
| 47 // TODO(5478): Update deprecated APIs. |
| 48 #pragma clang diagnostic push |
| 49 #pragma clang diagnostic ignored "-Wdeprecated" |
47 err = Gestalt(gestaltSystemVersion, &version); | 50 err = Gestalt(gestaltSystemVersion, &version); |
| 51 #pragma clang diagnostic pop |
48 if (err != noErr) | 52 if (err != noErr) |
49 { | 53 { |
50 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, 0, | 54 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, 0, |
51 "Could not get OS version"); | 55 "Could not get OS version"); |
52 return false; | 56 return false; |
53 } | 57 } |
54 | 58 |
55 if (version < 0x00001040) // Older version than Mac OSX 10.4 | 59 if (version < 0x00001040) // Older version than Mac OSX 10.4 |
56 { | 60 { |
57 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, 0, | 61 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, 0, |
58 "OS version too old: 0x%x", version); | 62 "OS version too old: 0x%x", version); |
59 return false; | 63 return false; |
60 } | 64 } |
61 | 65 |
62 WEBRTC_TRACE(webrtc::kTraceDebug, webrtc::kTraceVideoCapture, 0, | 66 WEBRTC_TRACE(webrtc::kTraceDebug, webrtc::kTraceVideoCapture, 0, |
63 "OS version compatible: 0x%x", version); | 67 "OS version compatible: 0x%x", version); |
64 | 68 |
65 return true; | 69 return true; |
66 } | 70 } |
67 | 71 |
68 // static | 72 // static |
69 bool CheckQTVersion() | 73 bool CheckQTVersion() |
70 { | 74 { |
71 // Check OSX version | 75 // Check OSX version |
72 OSErr err = noErr; | 76 OSErr err = noErr; |
73 | 77 |
74 SInt32 version; | 78 SInt32 version; |
75 | 79 |
| 80 // TODO(5478): Update deprecated APIs. |
| 81 #pragma clang diagnostic push |
| 82 #pragma clang diagnostic ignored "-Wdeprecated" |
76 err = Gestalt(gestaltQuickTime, &version); | 83 err = Gestalt(gestaltQuickTime, &version); |
| 84 #pragma clang diagnostic pop |
77 if (err != noErr) | 85 if (err != noErr) |
78 { | 86 { |
79 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, 0, | 87 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, 0, |
80 "Could not get QuickTime version"); | 88 "Could not get QuickTime version"); |
81 return false; | 89 return false; |
82 } | 90 } |
83 | 91 |
84 if (version < 0x07000000) // QT v. 7.x or newer (QT 5.0.2 0x05020000) | 92 if (version < 0x07000000) // QT v. 7.x or newer (QT 5.0.2 0x05020000) |
85 { | 93 { |
86 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, 0, | 94 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, 0, |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 | 270 |
263 } | 271 } |
264 | 272 |
265 /************************************************************************** | 273 /************************************************************************** |
266 * | 274 * |
267 * End Create/Destroy VideoCaptureModule | 275 * End Create/Destroy VideoCaptureModule |
268 * | 276 * |
269 ***************************************************************************/ | 277 ***************************************************************************/ |
270 } // namespace videocapturemodule | 278 } // namespace videocapturemodule |
271 } // namespace webrtc | 279 } // namespace webrtc |
OLD | NEW |