blob: 4bbdd6c94f1bcf6a36621ba42ff9630a60e152ca [file] [log] [blame]
Zijie Hea7567a92017-09-15 09:12:25 -07001/*
2 * Copyright (c) 2017 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 "modules/desktop_capture/desktop_capturer_wrapper.h"
12
13#include <utility>
14
15#include "rtc_base/checks.h"
16
17namespace webrtc {
18
19DesktopCapturerWrapper::DesktopCapturerWrapper(
20 std::unique_ptr<DesktopCapturer> base_capturer)
21 : base_capturer_(std::move(base_capturer)) {
22 RTC_DCHECK(base_capturer_);
23}
24
25DesktopCapturerWrapper::~DesktopCapturerWrapper() = default;
26
27void DesktopCapturerWrapper::Start(Callback* callback) {
28 base_capturer_->Start(callback);
29}
30
31void DesktopCapturerWrapper::SetSharedMemoryFactory(
32 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) {
33 base_capturer_->SetSharedMemoryFactory(std::move(shared_memory_factory));
34}
35
36void DesktopCapturerWrapper::CaptureFrame() {
37 base_capturer_->CaptureFrame();
38}
39
40void DesktopCapturerWrapper::SetExcludedWindow(WindowId window) {
41 base_capturer_->SetExcludedWindow(window);
42}
43
44bool DesktopCapturerWrapper::GetSourceList(SourceList* sources) {
45 return base_capturer_->GetSourceList(sources);
46}
47
48bool DesktopCapturerWrapper::SelectSource(SourceId id) {
49 return base_capturer_->SelectSource(id);
50}
51
52bool DesktopCapturerWrapper::FocusOnSelectedSource() {
53 return base_capturer_->FocusOnSelectedSource();
54}
55
56bool DesktopCapturerWrapper::IsOccluded(const DesktopVector& pos) {
57 return base_capturer_->IsOccluded(pos);
58}
59
60} // namespace webrtc