aboutsummaryrefslogtreecommitdiff
path: root/modules/desktop_capture/win/wgc_capturer_win.cc
diff options
context:
space:
mode:
Diffstat (limited to 'modules/desktop_capture/win/wgc_capturer_win.cc')
-rw-r--r--modules/desktop_capture/win/wgc_capturer_win.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/modules/desktop_capture/win/wgc_capturer_win.cc b/modules/desktop_capture/win/wgc_capturer_win.cc
index 0d4848e3e2..442c827a67 100644
--- a/modules/desktop_capture/win/wgc_capturer_win.cc
+++ b/modules/desktop_capture/win/wgc_capturer_win.cc
@@ -57,7 +57,8 @@ std::unique_ptr<DesktopCapturer> WgcCapturerWin::CreateRawWindowCapturer(
const DesktopCaptureOptions& options) {
return std::make_unique<WgcCapturerWin>(
std::make_unique<WgcWindowSourceFactory>(),
- std::make_unique<WindowEnumerator>());
+ std::make_unique<WindowEnumerator>(
+ options.enumerate_current_process_windows()));
}
// static
@@ -77,6 +78,13 @@ bool WgcCapturerWin::SelectSource(DesktopCapturer::SourceId id) {
return capture_source_->IsCapturable();
}
+bool WgcCapturerWin::FocusOnSelectedSource() {
+ if (!capture_source_)
+ return false;
+
+ return capture_source_->FocusOnSource();
+}
+
void WgcCapturerWin::Start(Callback* callback) {
RTC_DCHECK(!callback_);
RTC_DCHECK(callback);
@@ -192,6 +200,7 @@ void WgcCapturerWin::CaptureFrame() {
frame->set_capture_time_ms(capture_time_ms);
frame->set_capturer_id(DesktopCapturerId::kWgcCapturerWin);
frame->set_may_contain_cursor(true);
+ frame->set_top_left(capture_source_->GetTopLeft());
RecordWgcCapturerResult(WgcCapturerResult::kSuccess);
callback_->OnCaptureResult(DesktopCapturer::Result::SUCCESS,
std::move(frame));