Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(417)

Unified Diff: webrtc/test/frame_generator_capturer.cc

Issue 2705973002: Replace test::FrameGenerator::ChromaGenerator with new FrameGenerator::SquareGenerator (Closed)
Patch Set: addressed comments. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/test/frame_generator_capturer.h ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/frame_generator_capturer.cc
diff --git a/webrtc/test/frame_generator_capturer.cc b/webrtc/test/frame_generator_capturer.cc
index 65be9562c58a100339cd18693f55c00458d09654..00efbc8b40b467e2248169349ac498997b8de3d2 100644
--- a/webrtc/test/frame_generator_capturer.cc
+++ b/webrtc/test/frame_generator_capturer.cc
@@ -21,12 +21,12 @@
namespace webrtc {
namespace test {
-FrameGeneratorCapturer* FrameGeneratorCapturer::Create(size_t width,
- size_t height,
+FrameGeneratorCapturer* FrameGeneratorCapturer::Create(int width,
+ int height,
int target_fps,
Clock* clock) {
FrameGeneratorCapturer* capturer = new FrameGeneratorCapturer(
- clock, FrameGenerator::CreateChromaGenerator(width, height), target_fps);
+ clock, FrameGenerator::CreateSquareGenerator(width, height), target_fps);
if (!capturer->Init()) {
delete capturer;
return NULL;
@@ -53,19 +53,20 @@ FrameGeneratorCapturer* FrameGeneratorCapturer::CreateFromYuvFile(
return capturer;
}
-FrameGeneratorCapturer::FrameGeneratorCapturer(Clock* clock,
- FrameGenerator* frame_generator,
- int target_fps)
+FrameGeneratorCapturer::FrameGeneratorCapturer(
+ Clock* clock,
+ std::unique_ptr<FrameGenerator> frame_generator,
+ int target_fps)
: clock_(clock),
sending_(false),
sink_(nullptr),
sink_wants_observer_(nullptr),
tick_(EventTimerWrapper::Create()),
thread_(FrameGeneratorCapturer::Run, this, "FrameGeneratorCapturer"),
- frame_generator_(frame_generator),
+ frame_generator_(std::move(frame_generator)),
target_fps_(target_fps),
first_frame_capture_time_(-1) {
- RTC_DCHECK(frame_generator);
+ RTC_DCHECK(frame_generator_);
RTC_DCHECK_GT(target_fps, 0);
}
« no previous file with comments | « webrtc/test/frame_generator_capturer.h ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698