Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(819)

Side by Side Diff: webrtc/modules/desktop_capture/win/screen_capturer_win_directx.cc

Issue 2759493002: Add DesktopCapturerId and attach it to DesktopFrame (Closed)
Patch Set: Remove dependency of webrtc/media:rtc_media_base Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/desktop_frame.cc ('k') | webrtc/modules/desktop_capture/win/screen_capturer_win_gdi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698