OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 "magnifier initialization failed."; | 65 "magnifier initialization failed."; |
66 StartFallbackCapturer(); | 66 StartFallbackCapturer(); |
67 } | 67 } |
68 } | 68 } |
69 | 69 |
70 void ScreenCapturerWinMagnifier::SetSharedMemoryFactory( | 70 void ScreenCapturerWinMagnifier::SetSharedMemoryFactory( |
71 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) { | 71 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) { |
72 shared_memory_factory_ = std::move(shared_memory_factory); | 72 shared_memory_factory_ = std::move(shared_memory_factory); |
73 } | 73 } |
74 | 74 |
75 void ScreenCapturerWinMagnifier::CaptureFrame() { | 75 void ScreenCapturerWinMagnifier::Capture() { |
76 if (!magnifier_initialized_ || | 76 if (!magnifier_initialized_ || |
77 !magnifier_capture_succeeded_ || | 77 !magnifier_capture_succeeded_ || |
78 GetSystemMetrics(SM_CMONITORS) != 1) { | 78 GetSystemMetrics(SM_CMONITORS) != 1) { |
79 // Do not try to use the magnifier if it failed before and in multi-screen | 79 // Do not try to use the magnifier if it failed before and in multi-screen |
80 // setup (where the API crashes sometimes). | 80 // setup (where the API crashes sometimes). |
81 LOG_F(LS_WARNING) << "Switching to the fallback screen capturer because " | 81 LOG_F(LS_WARNING) << "Switching to the fallback screen capturer because " |
82 "initialization or last capture attempt failed, or " | 82 "initialization or last capture attempt failed, or " |
83 "execute on multi-screen system."; | 83 "execute on multi-screen system."; |
84 StartFallbackCapturer(); | 84 StartFallbackCapturer(); |
85 fallback_capturer_->CaptureFrame(); | 85 fallback_capturer_->CaptureFrame(); |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 RTC_DCHECK(fallback_capturer_); | 380 RTC_DCHECK(fallback_capturer_); |
381 if (!fallback_capturer_started_) { | 381 if (!fallback_capturer_started_) { |
382 fallback_capturer_started_ = true; | 382 fallback_capturer_started_ = true; |
383 | 383 |
384 fallback_capturer_->Start(callback_); | 384 fallback_capturer_->Start(callback_); |
385 fallback_capturer_->SelectScreen(current_screen_id_); | 385 fallback_capturer_->SelectScreen(current_screen_id_); |
386 } | 386 } |
387 } | 387 } |
388 | 388 |
389 } // namespace webrtc | 389 } // namespace webrtc |
OLD | NEW |