| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 return -1; | 226 return -1; |
| 227 } | 227 } |
| 228 //Reduce the frame rate if possible. | 228 //Reduce the frame rate if possible. |
| 229 if (capability.maxFPS > requestedCapability.maxFPS) | 229 if (capability.maxFPS > requestedCapability.maxFPS) |
| 230 { | 230 { |
| 231 capability.maxFPS = requestedCapability.maxFPS; | 231 capability.maxFPS = requestedCapability.maxFPS; |
| 232 } else if (capability.maxFPS <= 0) | 232 } else if (capability.maxFPS <= 0) |
| 233 { | 233 { |
| 234 capability.maxFPS = 30; | 234 capability.maxFPS = 30; |
| 235 } | 235 } |
| 236 // Store the new expected capture delay | |
| 237 _captureDelay = capability.expectedCaptureDelay; | |
| 238 | 236 |
| 239 // Convert it to the windows capability index since they are not nexessary | 237 // Convert it to the windows capability index since they are not nexessary |
| 240 // the same | 238 // the same |
| 241 VideoCaptureCapabilityWindows windowsCapability; | 239 VideoCaptureCapabilityWindows windowsCapability; |
| 242 if (_dsInfo.GetWindowsCapability(capabilityIndex, windowsCapability) != 0) | 240 if (_dsInfo.GetWindowsCapability(capabilityIndex, windowsCapability) != 0) |
| 243 { | 241 { |
| 244 return -1; | 242 return -1; |
| 245 } | 243 } |
| 246 | 244 |
| 247 IAMStreamConfig* streamConfig = NULL; | 245 IAMStreamConfig* streamConfig = NULL; |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, 0, | 403 WEBRTC_TRACE(webrtc::kTraceError, webrtc::kTraceVideoCapture, 0, |
| 406 "Failed to connect capture device to the send graph: 0x
%x", | 404 "Failed to connect capture device to the send graph: 0x
%x", |
| 407 hr); | 405 hr); |
| 408 } | 406 } |
| 409 return hr; | 407 return hr; |
| 410 } | 408 } |
| 411 return hr; | 409 return hr; |
| 412 } | 410 } |
| 413 } // namespace videocapturemodule | 411 } // namespace videocapturemodule |
| 414 } // namespace webrtc | 412 } // namespace webrtc |
| OLD | NEW |