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

Unified Diff: webrtc/modules/desktop_capture/screen_capturer_x11.cc

Issue 2468753002: Add CreateWindowCapturer() and CreateScreenCapturer() in DesktopCapturer (Closed)
Patch Set: Build break without X11 Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/desktop_capture/screen_capturer_x11.cc
diff --git a/webrtc/modules/desktop_capture/screen_capturer_x11.cc b/webrtc/modules/desktop_capture/screen_capturer_x11.cc
index 34653ec362adebe7d2501a7319bba287b7fd17d2..fb8446ea4111c2f31d93e287f58cd8285a5f4d91 100644
--- a/webrtc/modules/desktop_capture/screen_capturer_x11.cc
+++ b/webrtc/modules/desktop_capture/screen_capturer_x11.cc
@@ -424,4 +424,18 @@ ScreenCapturer* ScreenCapturer::Create(const DesktopCaptureOptions& options) {
return capturer.release();
}
+// static
+std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateRawScreenCapturer(
+ const DesktopCaptureOptions& options) {
+ if (!options.x_display())
+ return nullptr;
+
+ std::unique_ptr<ScreenCapturer> capturer(new ScreenCapturerLinux());
+ if (!static_cast<ScreenCapturerLinux*>(capturer.get())->Init(options)) {
+ return nullptr;
+ }
+
+ return capturer;
+}
+
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698