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

Unified Diff: media/cast/sender/video_encoder_unittest.cc

Issue 2113783002: Refactoring: Merge VideoSenderConfig and AudioSenderConfig. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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: media/cast/sender/video_encoder_unittest.cc
diff --git a/media/cast/sender/video_encoder_unittest.cc b/media/cast/sender/video_encoder_unittest.cc
index 0941778d8ffd00d895331ada246d710151be890d..aebe0b5cfcc1c584a59dc4c73ec357418a5de79f 100644
--- a/media/cast/sender/video_encoder_unittest.cc
+++ b/media/cast/sender/video_encoder_unittest.cc
@@ -66,7 +66,7 @@ class VideoEncoderTest
void CreateEncoder() {
ASSERT_EQ(STATUS_UNINITIALIZED, operational_status_);
- video_config_.max_number_of_video_buffers_used = 1;
+ video_config_.codec_specific_params.max_number_of_video_buffers_used = 1;
video_encoder_ = VideoEncoder::Create(
cast_environment_, video_config_,
base::Bind(&VideoEncoderTest::OnOperationalStatusChange,
@@ -121,6 +121,7 @@ class VideoEncoderTest
}
void RunTasksAndAdvanceClock() const {
+ DCHECK_GT(video_config_.max_frame_rate, 0);
const base::TimeDelta frame_duration = base::TimeDelta::FromMicroseconds(
1000000.0 / video_config_.max_frame_rate);
#if defined(OS_MACOSX)
@@ -247,7 +248,8 @@ class VideoEncoderTest
} else {
if (expected_frame_id != expected_last_referenced_frame_id) {
EXPECT_EQ(EncodedFrame::DEPENDENT, encoded_frame->dependency);
- } else if (video_config_.max_number_of_video_buffers_used == 1) {
+ } else if (video_config_.codec_specific_params
+ .max_number_of_video_buffers_used == 1) {
EXPECT_EQ(EncodedFrame::KEY, encoded_frame->dependency);
}
EXPECT_EQ(expected_last_referenced_frame_id,
@@ -265,7 +267,7 @@ class VideoEncoderTest
base::SimpleTestTickClock* const testing_clock_; // Owned by CastEnvironment.
const scoped_refptr<FakeSingleThreadTaskRunner> task_runner_;
const scoped_refptr<CastEnvironment> cast_environment_;
- VideoSenderConfig video_config_;
+ FrameSenderConfig video_config_;
std::unique_ptr<FakeVideoEncodeAcceleratorFactory> vea_factory_;
base::TimeTicks first_frame_time_;
OperationalStatus operational_status_;

Powered by Google App Engine
This is Rietveld 408576698