Chromium Code Reviews| Index: webrtc/test/frame_generator.h |
| diff --git a/webrtc/test/frame_generator.h b/webrtc/test/frame_generator.h |
| index 7f20c749e8eea9b920ce8b0afde26445eaa10499..95a79152becc4868220c904444ed8e097cf20223 100644 |
| --- a/webrtc/test/frame_generator.h |
| +++ b/webrtc/test/frame_generator.h |
| @@ -7,12 +7,14 @@ |
| * in the file PATENTS. All contributing project authors may |
| * be found in the AUTHORS file in the root of the source tree. |
| */ |
| -#ifndef WEBRTC_COMMON_VIDEO_TEST_FRAME_GENERATOR_H_ |
| -#define WEBRTC_COMMON_VIDEO_TEST_FRAME_GENERATOR_H_ |
| +#ifndef WEBRTC_TEST_FRAME_GENERATOR_H_ |
| +#define WEBRTC_TEST_FRAME_GENERATOR_H_ |
| #include <string> |
| #include <vector> |
| +#include "webrtc/base/criticalsection.h" |
| +#include "webrtc/media/base/videosourceinterface.h" |
| #include "webrtc/typedefs.h" |
| #include "webrtc/video_frame.h" |
| @@ -20,6 +22,19 @@ namespace webrtc { |
| class Clock; |
| namespace test { |
| +class FrameForwarder : public rtc::VideoSourceInterface<VideoFrame> { |
|
nisse-webrtc
2016/08/22 07:20:29
Is this class intended as a temporary hack?
perkj_webrtc
2016/09/01 11:46:16
This is in test and intended to be used as an adap
|
| + public: |
| + void IncomingCapturedFrame(const VideoFrame& video_frame); |
| + |
| + private: |
| + void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink, |
| + const rtc::VideoSinkWants& wants) override; |
| + void RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) override; |
| + |
| + rtc::CriticalSection crit_; |
| + rtc::VideoSinkInterface<VideoFrame>* sink_ GUARDED_BY(crit_) = nullptr; |
| +}; |
| + |
| class FrameGenerator { |
| public: |
| FrameGenerator() {} |
| @@ -61,4 +76,4 @@ class FrameGenerator { |
| } // namespace test |
| } // namespace webrtc |
| -#endif // WEBRTC_COMMON_VIDEO_TEST_FRAME_GENERATOR_H_ |
| +#endif // WEBRTC_TEST_FRAME_GENERATOR_H_ |