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

Unified Diff: webrtc/modules/video_coding/codecs/test/videoprocessor_unittest.cc

Issue 2995603002: Move ownership of webrtc::VideoCodec into TestConfig. (Closed)
Patch Set: Created 3 years, 4 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
Index: webrtc/modules/video_coding/codecs/test/videoprocessor_unittest.cc
diff --git a/webrtc/modules/video_coding/codecs/test/videoprocessor_unittest.cc b/webrtc/modules/video_coding/codecs/test/videoprocessor_unittest.cc
index 47e27d72f40ae604d8ab46f955c284aec34f14d7..c47f7b941c0718cd86ab1adde8c6727aa71557fe 100644
--- a/webrtc/modules/video_coding/codecs/test/videoprocessor_unittest.cc
+++ b/webrtc/modules/video_coding/codecs/test/videoprocessor_unittest.cc
@@ -45,12 +45,10 @@ class VideoProcessorTest : public testing::Test {
protected:
VideoProcessorTest() {
// Get a codec configuration struct and configure it.
- VideoCodingModule::Codec(kVideoCodecVP8, &codec_settings_);
- config_.codec_settings = &codec_settings_;
- config_.codec_settings->startBitrate = 100;
- config_.codec_settings->width = kWidth;
- config_.codec_settings->height = kHeight;
- config_.codec_settings->maxFramerate = kFramerate;
+ VideoCodingModule::Codec(kVideoCodecVP8, &config_.codec_settings);
+ config_.codec_settings.width = kWidth;
+ config_.codec_settings.height = kHeight;
+ config_.codec_settings.maxFramerate = kFramerate;
EXPECT_CALL(frame_reader_mock_, NumberOfFrames())
.WillRepeatedly(Return(kNumFrames));
@@ -71,13 +69,13 @@ class VideoProcessorTest : public testing::Test {
.Times(AtLeast(1));
}
+ TestConfig config_;
+
MockVideoEncoder encoder_mock_;
MockVideoDecoder decoder_mock_;
MockFrameReader frame_reader_mock_;
MockFrameWriter frame_writer_mock_;
MockPacketManipulator packet_manipulator_mock_;
- VideoCodec codec_settings_;
- TestConfig config_;
Stats stats_;
std::unique_ptr<VideoProcessor> video_processor_;
};

Powered by Google App Engine
This is Rietveld 408576698