1 /* 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 17 namespace webrtc { 18 DesktopCapturerWrapper(std::unique_ptr<DesktopCapturer> base_capturer)19DesktopCapturerWrapper::DesktopCapturerWrapper( 20 std::unique_ptr<DesktopCapturer> base_capturer) 21 : base_capturer_(std::move(base_capturer)) { 22 RTC_DCHECK(base_capturer_); 23 } 24 25 DesktopCapturerWrapper::~DesktopCapturerWrapper() = default; 26 Start(Callback * callback)27void DesktopCapturerWrapper::Start(Callback* callback) { 28 base_capturer_->Start(callback); 29 } 30 SetSharedMemoryFactory(std::unique_ptr<SharedMemoryFactory> shared_memory_factory)31void DesktopCapturerWrapper::SetSharedMemoryFactory( 32 std::unique_ptr<SharedMemoryFactory> shared_memory_factory) { 33 base_capturer_->SetSharedMemoryFactory(std::move(shared_memory_factory)); 34 } 35 CaptureFrame()36void DesktopCapturerWrapper::CaptureFrame() { 37 base_capturer_->CaptureFrame(); 38 } 39 SetExcludedWindow(WindowId window)40void DesktopCapturerWrapper::SetExcludedWindow(WindowId window) { 41 base_capturer_->SetExcludedWindow(window); 42 } 43 GetSourceList(SourceList * sources)44bool DesktopCapturerWrapper::GetSourceList(SourceList* sources) { 45 return base_capturer_->GetSourceList(sources); 46 } 47 SelectSource(SourceId id)48bool DesktopCapturerWrapper::SelectSource(SourceId id) { 49 return base_capturer_->SelectSource(id); 50 } 51 FocusOnSelectedSource()52bool DesktopCapturerWrapper::FocusOnSelectedSource() { 53 return base_capturer_->FocusOnSelectedSource(); 54 } 55 IsOccluded(const DesktopVector & pos)56bool DesktopCapturerWrapper::IsOccluded(const DesktopVector& pos) { 57 return base_capturer_->IsOccluded(pos); 58 } 59 60 } // namespace webrtc 61