/* * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #ifndef MODULES_DESKTOP_CAPTURE_FAKE_DESKTOP_CAPTURER_H_ #define MODULES_DESKTOP_CAPTURE_FAKE_DESKTOP_CAPTURER_H_ #include <memory> #include "modules/desktop_capture/desktop_capturer.h" #include "modules/desktop_capture/desktop_frame_generator.h" #include "modules/desktop_capture/shared_memory.h" #include "rtc_base/system/rtc_export.h" namespace webrtc { // A fake implementation of DesktopCapturer or its derived interfaces to // generate DesktopFrame for testing purpose. // // Consumers can provide a FrameGenerator instance to generate instances of // DesktopFrame to return for each Capture() function call. // If no FrameGenerator provided, FakeDesktopCapturer will always return a // nullptr DesktopFrame. // // Double buffering is guaranteed by the FrameGenerator. FrameGenerator // implements in desktop_frame_generator.h guarantee double buffering, they // creates a new instance of DesktopFrame each time. class RTC_EXPORT FakeDesktopCapturer : public DesktopCapturer { … }; } // namespace webrtc #endif // MODULES_DESKTOP_CAPTURE_FAKE_DESKTOP_CAPTURER_H_