Line data Source code
1 : /*
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"
14 : #include "webrtc/modules/desktop_capture/desktop_capturer_differ_wrapper.h"
15 :
16 : namespace webrtc {
17 :
18 : DesktopCapturer::~DesktopCapturer() = default;
19 :
20 0 : void DesktopCapturer::SetSharedMemoryFactory(
21 0 : std::unique_ptr<SharedMemoryFactory> shared_memory_factory) {}
22 :
23 0 : void DesktopCapturer::SetExcludedWindow(WindowId window) {}
24 :
25 0 : bool DesktopCapturer::GetSourceList(SourceList* sources) {
26 0 : return true;
27 : }
28 :
29 0 : bool DesktopCapturer::SelectSource(SourceId id) {
30 0 : return false;
31 : }
32 :
33 0 : bool DesktopCapturer::FocusOnSelectedSource() {
34 0 : return false;
35 : }
36 :
37 : // static
38 0 : std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateWindowCapturer(
39 : const DesktopCaptureOptions& options) {
40 0 : std::unique_ptr<DesktopCapturer> capturer = CreateRawWindowCapturer(options);
41 0 : if (options.detect_updated_region()) {
42 0 : capturer.reset(new DesktopCapturerDifferWrapper(std::move(capturer)));
43 : }
44 :
45 0 : return capturer;
46 : }
47 :
48 : // static
49 0 : std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateScreenCapturer(
50 : const DesktopCaptureOptions& options) {
51 0 : std::unique_ptr<DesktopCapturer> capturer = CreateRawScreenCapturer(options);
52 0 : if (options.detect_updated_region()) {
53 0 : capturer.reset(new DesktopCapturerDifferWrapper(std::move(capturer)));
54 : }
55 :
56 0 : return capturer;
57 : }
58 :
59 : // static
60 0 : std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateAppCapturer(
61 : const DesktopCaptureOptions& options) {
62 0 : std::unique_ptr<DesktopCapturer> capturer = CreateRawAppCapturer(options);
63 0 : if (options.detect_updated_region()) {
64 0 : capturer.reset(new DesktopCapturerDifferWrapper(std::move(capturer)));
65 : }
66 0 : return capturer;
67 : }
68 :
69 : } // namespace webrtc
|