| 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr); | 130 callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr); |
| 131 } | 131 } |
| 132 return; | 132 return; |
| 133 } | 133 } |
| 134 } | 134 } |
| 135 | 135 |
| 136 std::unique_ptr<DesktopFrame> result = frames_.current_frame()->Share(); | 136 std::unique_ptr<DesktopFrame> result = frames_.current_frame()->Share(); |
| 137 result->set_capture_time_ms( | 137 result->set_capture_time_ms( |
| 138 (rtc::TimeNanos() - capture_start_time_nanos) / | 138 (rtc::TimeNanos() - capture_start_time_nanos) / |
| 139 rtc::kNumNanosecsPerMillisec); | 139 rtc::kNumNanosecsPerMillisec); |
| 140 result->set_capturer_id(DesktopCapturerId::kScreenCapturerWinDirectx); |
| 140 callback_->OnCaptureResult(Result::SUCCESS, std::move(result)); | 141 callback_->OnCaptureResult(Result::SUCCESS, std::move(result)); |
| 141 } | 142 } |
| 142 | 143 |
| 143 bool ScreenCapturerWinDirectx::GetSourceList(SourceList* sources) { | 144 bool ScreenCapturerWinDirectx::GetSourceList(SourceList* sources) { |
| 144 int screen_count = DxgiDuplicatorController::Instance()->ScreenCount(); | 145 int screen_count = DxgiDuplicatorController::Instance()->ScreenCount(); |
| 145 for (int i = 0; i < screen_count; i++) { | 146 for (int i = 0; i < screen_count; i++) { |
| 146 sources->push_back({i}); | 147 sources->push_back({i}); |
| 147 } | 148 } |
| 148 return true; | 149 return true; |
| 149 } | 150 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 164 int screen_count = DxgiDuplicatorController::Instance()->ScreenCount(); | 165 int screen_count = DxgiDuplicatorController::Instance()->ScreenCount(); |
| 165 if (id >= 0 && id < screen_count) { | 166 if (id >= 0 && id < screen_count) { |
| 166 current_screen_id_ = id; | 167 current_screen_id_ = id; |
| 167 context_.Reset(); | 168 context_.Reset(); |
| 168 return true; | 169 return true; |
| 169 } | 170 } |
| 170 return false; | 171 return false; |
| 171 } | 172 } |
| 172 | 173 |
| 173 } // namespace webrtc | 174 } // namespace webrtc |
| OLD | NEW |