diff --git a/test/BUILD.gn b/test/BUILD.gn index b38486541f..a44dd1d6a2 100644 --- a/test/BUILD.gn +++ b/test/BUILD.gn @@ -55,7 +55,6 @@ rtc_source_set("video_test_common") { "../api:libjingle_peerconnection_api", "../api:scoped_refptr", "../api/task_queue", - "../api/task_queue:global_task_queue_factory", "../api/video:video_frame", "../api/video:video_frame_i010", "../api/video:video_frame_i420", diff --git a/test/frame_generator_capturer.cc b/test/frame_generator_capturer.cc index 5419d939d7..30fa9a5c23 100644 --- a/test/frame_generator_capturer.cc +++ b/test/frame_generator_capturer.cc @@ -16,8 +16,6 @@ #include #include -#include "absl/memory/memory.h" -#include "api/task_queue/global_task_queue_factory.h" #include "rtc_base/checks.h" #include "rtc_base/critical_section.h" #include "rtc_base/logging.h" @@ -29,77 +27,6 @@ namespace webrtc { namespace test { -FrameGeneratorCapturer* FrameGeneratorCapturer::Create( - int width, - int height, - absl::optional type, - absl::optional num_squares, - int target_fps, - Clock* clock) { - auto capturer = absl::make_unique( - clock, - FrameGenerator::CreateSquareGenerator(width, height, type, num_squares), - target_fps); - if (!capturer->Init()) - return nullptr; - - return capturer.release(); -} - -FrameGeneratorCapturer* FrameGeneratorCapturer::CreateFromYuvFile( - const std::string& file_name, - size_t width, - size_t height, - int target_fps, - Clock* clock) { - auto capturer = absl::make_unique( - clock, - FrameGenerator::CreateFromYuvFile(std::vector(1, file_name), - width, height, 1), - target_fps); - if (!capturer->Init()) - return nullptr; - - return capturer.release(); -} - -FrameGeneratorCapturer* FrameGeneratorCapturer::CreateSlideGenerator( - int width, - int height, - int frame_repeat_count, - int target_fps, - Clock* clock) { - auto capturer = absl::make_unique( - clock, - FrameGenerator::CreateSlideGenerator(width, height, frame_repeat_count), - target_fps); - if (!capturer->Init()) - return nullptr; - - return capturer.release(); -} - -FrameGeneratorCapturer* FrameGeneratorCapturer::Create( - std::unique_ptr frame_generator, - int target_fps, - Clock* clock) { - auto capturer = absl::make_unique( - clock, std::move(frame_generator), target_fps); - if (!capturer->Init()) - return nullptr; - - return capturer.release(); -} - -FrameGeneratorCapturer::FrameGeneratorCapturer( - Clock* clock, - std::unique_ptr frame_generator, - int target_fps) - : FrameGeneratorCapturer(clock, - std::move(frame_generator), - target_fps, - GlobalTaskQueueFactory()) {} - FrameGeneratorCapturer::FrameGeneratorCapturer( Clock* clock, std::unique_ptr frame_generator, diff --git a/test/frame_generator_capturer.h b/test/frame_generator_capturer.h index 52fdd8b943..d6faf7c828 100644 --- a/test/frame_generator_capturer.h +++ b/test/frame_generator_capturer.h @@ -39,33 +39,10 @@ class FrameGeneratorCapturer : public TestVideoCapturer { virtual ~SinkWantsObserver() {} }; - // |type| has the default value OutputType::I420. |num_squares| has the - // default value 10. - static FrameGeneratorCapturer* Create( - int width, - int height, - absl::optional type, - absl::optional num_squares, - int target_fps, - Clock* clock); - - static FrameGeneratorCapturer* CreateFromYuvFile(const std::string& file_name, - size_t width, - size_t height, - int target_fps, - Clock* clock); - - static FrameGeneratorCapturer* CreateSlideGenerator(int width, - int height, - int frame_repeat_count, - int target_fps, - Clock* clock); - - static FrameGeneratorCapturer* Create( - std::unique_ptr frame_generator, - int target_fps, - Clock* clock); - + FrameGeneratorCapturer(Clock* clock, + std::unique_ptr frame_generator, + int target_fps, + TaskQueueFactory& task_queue_factory); virtual ~FrameGeneratorCapturer(); void Start(); @@ -85,13 +62,6 @@ class FrameGeneratorCapturer : public TestVideoCapturer { int64_t first_frame_capture_time() const { return first_frame_capture_time_; } - FrameGeneratorCapturer(Clock* clock, - std::unique_ptr frame_generator, - int target_fps); - FrameGeneratorCapturer(Clock* clock, - std::unique_ptr frame_generator, - int target_fps, - TaskQueueFactory& task_queue_factory); bool Init(); private: