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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 GetDeviceCaps(desktop_dc_, LOGPIXELSX), | 91 GetDeviceCaps(desktop_dc_, LOGPIXELSX), |
92 GetDeviceCaps(desktop_dc_, LOGPIXELSY))); | 92 GetDeviceCaps(desktop_dc_, LOGPIXELSY))); |
93 frame->mutable_updated_region()->SetRect( | 93 frame->mutable_updated_region()->SetRect( |
94 DesktopRect::MakeSize(frame->size())); | 94 DesktopRect::MakeSize(frame->size())); |
95 frame->set_capture_time_ms( | 95 frame->set_capture_time_ms( |
96 (rtc::TimeNanos() - capture_start_time_nanos) / | 96 (rtc::TimeNanos() - capture_start_time_nanos) / |
97 rtc::kNumNanosecsPerMillisec); | 97 rtc::kNumNanosecsPerMillisec); |
98 callback_->OnCaptureResult(Result::SUCCESS, std::move(frame)); | 98 callback_->OnCaptureResult(Result::SUCCESS, std::move(frame)); |
99 } | 99 } |
100 | 100 |
101 bool ScreenCapturerWinGdi::GetScreenList(ScreenList* screens) { | 101 bool ScreenCapturerWinGdi::GetSourceList(SourceList* sources) { |
102 return webrtc::GetScreenList(screens); | 102 return webrtc::GetScreenList(sources); |
103 } | 103 } |
104 | 104 |
105 bool ScreenCapturerWinGdi::SelectScreen(ScreenId id) { | 105 bool ScreenCapturerWinGdi::SelectSource(SourceId id) { |
106 bool valid = IsScreenValid(id, ¤t_device_key_); | 106 bool valid = IsScreenValid(id, ¤t_device_key_); |
107 if (valid) | 107 if (valid) |
108 current_screen_id_ = id; | 108 current_screen_id_ = id; |
109 return valid; | 109 return valid; |
110 } | 110 } |
111 | 111 |
112 void ScreenCapturerWinGdi::Start(Callback* callback) { | 112 void ScreenCapturerWinGdi::Start(Callback* callback) { |
113 assert(!callback_); | 113 assert(!callback_); |
114 assert(callback); | 114 assert(callback); |
115 | 115 |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 SRCCOPY | CAPTUREBLT); | 219 SRCCOPY | CAPTUREBLT); |
220 | 220 |
221 // Select back the previously selected object to that the device contect | 221 // Select back the previously selected object to that the device contect |
222 // could be destroyed independently of the bitmap if needed. | 222 // could be destroyed independently of the bitmap if needed. |
223 SelectObject(memory_dc_, previous_object); | 223 SelectObject(memory_dc_, previous_object); |
224 } | 224 } |
225 return true; | 225 return true; |
226 } | 226 } |
227 | 227 |
228 } // namespace webrtc | 228 } // namespace webrtc |
OLD | NEW |