diff --git a/pc/test/fakevideotracksource.h b/pc/test/fakevideotracksource.h index 46216c7366..62e3e50cf6 100644 --- a/pc/test/fakevideotracksource.h +++ b/pc/test/fakevideotracksource.h @@ -12,11 +12,13 @@ #define PC_TEST_FAKEVIDEOTRACKSOURCE_H_ #include "api/mediastreaminterface.h" -#include "media/base/fakevideocapturer.h" +#include "api/videosourceinterface.h" #include "pc/videotracksource.h" namespace webrtc { +// A minimal implementation of VideoTrackSource, which doesn't produce +// any frames. class FakeVideoTrackSource : public VideoTrackSource { public: static rtc::scoped_refptr Create(bool is_screencast) { @@ -27,20 +29,24 @@ class FakeVideoTrackSource : public VideoTrackSource { return Create(false); } - cricket::FakeVideoCapturer* fake_video_capturer() { - return &fake_video_capturer_; - } - bool is_screencast() const override { return is_screencast_; } protected: explicit FakeVideoTrackSource(bool is_screencast) - : VideoTrackSource(&fake_video_capturer_, false /* remote */), + : VideoTrackSource(&source_, false /* remote */), is_screencast_(is_screencast) {} virtual ~FakeVideoTrackSource() {} private: - cricket::FakeVideoCapturer fake_video_capturer_; + class Source : public rtc::VideoSourceInterface { + public: + void AddOrUpdateSink(rtc::VideoSinkInterface* sink, + const rtc::VideoSinkWants& wants) override {} + + void RemoveSink(rtc::VideoSinkInterface* sink) override {} + }; + + Source source_; const bool is_screencast_; };