Chromium Code Reviews| Index: webrtc/test/frame_generator_capturer.h |
| diff --git a/webrtc/test/frame_generator_capturer.h b/webrtc/test/frame_generator_capturer.h |
| index dfd12711d187988560178bc90082b1e4788d472f..1a469889085a3c37d03d6825702f55220c77ebff 100644 |
| --- a/webrtc/test/frame_generator_capturer.h |
| +++ b/webrtc/test/frame_generator_capturer.h |
| @@ -15,7 +15,7 @@ |
| #include "webrtc/api/video/video_frame.h" |
| #include "webrtc/base/criticalsection.h" |
| -#include "webrtc/base/platform_thread.h" |
| +#include "webrtc/base/task_queue.h" |
| #include "webrtc/test/video_capturer.h" |
| #include "webrtc/typedefs.h" |
| @@ -74,6 +74,20 @@ class FrameGeneratorCapturer : public VideoCapturer { |
| bool Init(); |
| private: |
| + class InsertFrameTask : public rtc::QueuedTask { |
| + public: |
| + InsertFrameTask(FrameGeneratorCapturer* frame_generator_capturer, |
| + bool repeat) |
| + : frame_generator_capturer_(frame_generator_capturer), |
| + repeat_(repeat) {} |
| + |
| + private: |
| + bool Run() override; |
| + |
| + FrameGeneratorCapturer* frame_generator_capturer_; |
| + bool repeat_; |
|
tommi
2017/03/09 17:46:52
nit: this could be made const.
However, as Erik po
ilnik
2017/03/09 18:25:56
Done.
|
| + }; |
|
sprang_webrtc
2017/03/09 17:40:05
Don't need to declare this here. Move it to the cc
ilnik
2017/03/09 18:25:56
I'll try to do it with lambdas, but the issue is h
tommi
2017/03/09 18:56:02
Oh, I didn't realize that on the first pass. Righ
|
| + |
| void InsertFrame(); |
| static bool Run(void* obj); |
| @@ -82,9 +96,8 @@ class FrameGeneratorCapturer : public VideoCapturer { |
| rtc::VideoSinkInterface<VideoFrame>* sink_ GUARDED_BY(&lock_); |
| SinkWantsObserver* sink_wants_observer_ GUARDED_BY(&lock_); |
| - std::unique_ptr<EventTimerWrapper> tick_; |
| + rtc::TaskQueue task_queue_; |
| rtc::CriticalSection lock_; |
| - rtc::PlatformThread thread_; |
| std::unique_ptr<FrameGenerator> frame_generator_; |
| int target_fps_; |
| @@ -92,7 +105,7 @@ class FrameGeneratorCapturer : public VideoCapturer { |
| int64_t first_frame_capture_time_; |
| }; |
| -} // test |
| -} // webrtc |
| +} // namespace test |
| +} // namespace webrtc |
| #endif // WEBRTC_TEST_FRAME_GENERATOR_CAPTURER_H_ |