| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 void ScreenCapturerDifferWrapper::Start(DesktopCapturer::Callback* callback) { | 154 void ScreenCapturerDifferWrapper::Start(DesktopCapturer::Callback* callback) { |
| 155 callback_ = callback; | 155 callback_ = callback; |
| 156 base_capturer_->Start(this); | 156 base_capturer_->Start(this); |
| 157 } | 157 } |
| 158 | 158 |
| 159 void ScreenCapturerDifferWrapper::SetSharedMemoryFactory( | 159 void ScreenCapturerDifferWrapper::SetSharedMemoryFactory( |
| 160 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) { | 160 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) { |
| 161 base_capturer_->SetSharedMemoryFactory(std::move(shared_memory_factory)); | 161 base_capturer_->SetSharedMemoryFactory(std::move(shared_memory_factory)); |
| 162 } | 162 } |
| 163 | 163 |
| 164 void ScreenCapturerDifferWrapper::Capture(const DesktopRegion& region) { | 164 void ScreenCapturerDifferWrapper::CaptureFrame() { |
| 165 base_capturer_->Capture(region); | 165 base_capturer_->CaptureFrame(); |
| 166 } | 166 } |
| 167 | 167 |
| 168 bool ScreenCapturerDifferWrapper::GetScreenList(ScreenList* screens) { | 168 bool ScreenCapturerDifferWrapper::GetScreenList(ScreenList* screens) { |
| 169 return base_capturer_->GetScreenList(screens); | 169 return base_capturer_->GetScreenList(screens); |
| 170 } | 170 } |
| 171 | 171 |
| 172 bool ScreenCapturerDifferWrapper::SelectScreen(ScreenId id) { | 172 bool ScreenCapturerDifferWrapper::SelectScreen(ScreenId id) { |
| 173 return base_capturer_->SelectScreen(id); | 173 return base_capturer_->SelectScreen(id); |
| 174 } | 174 } |
| 175 | 175 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 205 } | 205 } |
| 206 last_frame_ = frame->Share(); | 206 last_frame_ = frame->Share(); |
| 207 | 207 |
| 208 frame->set_capture_time_ms(frame->GetUnderlyingFrame()->capture_time_ms() + | 208 frame->set_capture_time_ms(frame->GetUnderlyingFrame()->capture_time_ms() + |
| 209 (rtc::TimeNanos() - start_time_nanos) / | 209 (rtc::TimeNanos() - start_time_nanos) / |
| 210 rtc::kNumNanosecsPerMillisec); | 210 rtc::kNumNanosecsPerMillisec); |
| 211 callback_->OnCaptureResult(result, std::move(frame)); | 211 callback_->OnCaptureResult(result, std::move(frame)); |
| 212 } | 212 } |
| 213 | 213 |
| 214 } // namespace webrtc | 214 } // namespace webrtc |
| OLD | NEW |