blob: 67d3520103241cc8c4765fe4080d8121eeaa2830 [file] [log] [blame]
zijieheb68d6552016-10-28 17:35:11 -07001/*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#include "webrtc/modules/desktop_capture/desktop_capturer.h"
12
13#include "webrtc/modules/desktop_capture/desktop_capture_options.h"
zijiehe54fd5792016-11-02 14:49:35 -070014#include "webrtc/modules/desktop_capture/desktop_capturer_differ_wrapper.h"
zijieheb68d6552016-10-28 17:35:11 -070015
16namespace webrtc {
17
18DesktopCapturer::~DesktopCapturer() = default;
19
20void DesktopCapturer::SetSharedMemoryFactory(
21 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) {}
22
23void DesktopCapturer::SetExcludedWindow(WindowId window) {}
24
25bool DesktopCapturer::GetSourceList(SourceList* sources) {
26 return true;
27}
28
29bool DesktopCapturer::SelectSource(SourceId id) {
30 return false;
31}
32
33bool DesktopCapturer::FocusOnSelectedSource() {
34 return false;
35}
36
Zijie He12827112017-08-29 11:19:13 -070037bool DesktopCapturer::IsOccluded(const DesktopVector& pos) {
38 return false;
39}
40
zijiehe54fd5792016-11-02 14:49:35 -070041// static
42std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateWindowCapturer(
43 const DesktopCaptureOptions& options) {
44 std::unique_ptr<DesktopCapturer> capturer = CreateRawWindowCapturer(options);
sergeyu3eba2d82017-03-17 15:33:27 -070045 if (capturer && options.detect_updated_region()) {
zijiehe54fd5792016-11-02 14:49:35 -070046 capturer.reset(new DesktopCapturerDifferWrapper(std::move(capturer)));
47 }
48
49 return capturer;
50}
51
52// static
53std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateScreenCapturer(
54 const DesktopCaptureOptions& options) {
55 std::unique_ptr<DesktopCapturer> capturer = CreateRawScreenCapturer(options);
sergeyu3eba2d82017-03-17 15:33:27 -070056 if (capturer && options.detect_updated_region()) {
zijiehe54fd5792016-11-02 14:49:35 -070057 capturer.reset(new DesktopCapturerDifferWrapper(std::move(capturer)));
58 }
59
60 return capturer;
61}
zijiehe54fd5792016-11-02 14:49:35 -070062
zijieheb68d6552016-10-28 17:35:11 -070063} // namespace webrtc