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

Unified Diff: webrtc/media/engine/webrtcvideoengine2_unittest.cc

Issue 2250123002: Reland of Add task queue to Call. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 4 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
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | webrtc/test/call_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideoengine2_unittest.cc
diff --git a/webrtc/media/engine/webrtcvideoengine2_unittest.cc b/webrtc/media/engine/webrtcvideoengine2_unittest.cc
index b0a751323bd5e125f2e716e72cbf43169316ba5a..26b13ed3986d819110aaa1032458f6ea594bc672 100644
--- a/webrtc/media/engine/webrtcvideoengine2_unittest.cc
+++ b/webrtc/media/engine/webrtcvideoengine2_unittest.cc
@@ -1153,7 +1153,8 @@ class WebRtcVideoChannel2Test : public WebRtcVideoEngine2Test {
EXPECT_TRUE(streams.size() > 0);
FakeVideoSendStream* stream = streams[streams.size() - 1];
- webrtc::VideoEncoderConfig encoder_config = stream->GetEncoderConfig();
+ webrtc::VideoEncoderConfig encoder_config =
+ stream->GetEncoderConfig().Copy();
EXPECT_EQ(1, encoder_config.streams.size());
return encoder_config.streams[0].max_bitrate_bps;
}
@@ -1645,7 +1646,8 @@ TEST_F(WebRtcVideoChannel2Test, UsesCorrectSettingsForScreencast) {
EXPECT_EQ(1, send_stream->GetNumberOfSwappedFrames());
// Verify non-screencast settings.
- webrtc::VideoEncoderConfig encoder_config = send_stream->GetEncoderConfig();
+ webrtc::VideoEncoderConfig encoder_config =
+ send_stream->GetEncoderConfig().Copy();
EXPECT_EQ(webrtc::VideoEncoderConfig::ContentType::kRealtimeVideo,
encoder_config.content_type);
EXPECT_EQ(codec.width, encoder_config.streams.front().width);
@@ -1666,7 +1668,7 @@ TEST_F(WebRtcVideoChannel2Test, UsesCorrectSettingsForScreencast) {
EXPECT_EQ(3, send_stream->GetNumberOfSwappedFrames());
// Verify screencast settings.
- encoder_config = send_stream->GetEncoderConfig();
+ encoder_config = send_stream->GetEncoderConfig().Copy();
EXPECT_EQ(webrtc::VideoEncoderConfig::ContentType::kScreen,
encoder_config.content_type);
EXPECT_EQ(kScreenshareMinBitrateKbps * 1000,
@@ -1693,7 +1695,7 @@ TEST_F(WebRtcVideoChannel2Test, NoRecreateStreamForScreencast) {
ASSERT_EQ(1, fake_call_->GetNumCreatedSendStreams());
FakeVideoSendStream* stream = fake_call_->GetVideoSendStreams().front();
- webrtc::VideoEncoderConfig encoder_config = stream->GetEncoderConfig();
+ webrtc::VideoEncoderConfig encoder_config = stream->GetEncoderConfig().Copy();
EXPECT_EQ(webrtc::VideoEncoderConfig::ContentType::kRealtimeVideo,
encoder_config.content_type);
@@ -1710,7 +1712,7 @@ TEST_F(WebRtcVideoChannel2Test, NoRecreateStreamForScreencast) {
ASSERT_EQ(stream, fake_call_->GetVideoSendStreams().front());
EXPECT_EQ(2, stream->GetNumberOfSwappedFrames());
- encoder_config = stream->GetEncoderConfig();
+ encoder_config = stream->GetEncoderConfig().Copy();
EXPECT_EQ(webrtc::VideoEncoderConfig::ContentType::kScreen,
encoder_config.content_type);
@@ -1723,7 +1725,7 @@ TEST_F(WebRtcVideoChannel2Test, NoRecreateStreamForScreencast) {
ASSERT_EQ(stream, fake_call_->GetVideoSendStreams().front());
EXPECT_EQ(3, stream->GetNumberOfSwappedFrames());
- encoder_config = stream->GetEncoderConfig();
+ encoder_config = stream->GetEncoderConfig().Copy();
EXPECT_EQ(webrtc::VideoEncoderConfig::ContentType::kRealtimeVideo,
encoder_config.content_type);
@@ -1752,10 +1754,11 @@ TEST_F(WebRtcVideoChannel2Test,
ASSERT_EQ(1u, fake_call_->GetVideoSendStreams().size());
FakeVideoSendStream* send_stream = fake_call_->GetVideoSendStreams().front();
- webrtc::VideoEncoderConfig encoder_config = send_stream->GetEncoderConfig();
+ webrtc::VideoEncoderConfig encoder_config =
+ send_stream->GetEncoderConfig().Copy();
// Verify screencast settings.
- encoder_config = send_stream->GetEncoderConfig();
+ encoder_config = send_stream->GetEncoderConfig().Copy();
EXPECT_EQ(webrtc::VideoEncoderConfig::ContentType::kScreen,
encoder_config.content_type);
ASSERT_EQ(1u, encoder_config.streams.size());
@@ -2310,7 +2313,7 @@ TEST_F(WebRtcVideoChannel2Test, SetDefaultSendCodecs) {
const std::vector<uint32_t> rtx_ssrcs = MAKE_VECTOR(kRtxSsrcs1);
FakeVideoSendStream* stream = AddSendStream(
cricket::CreateSimWithRtxStreamParams("cname", ssrcs, rtx_ssrcs));
- webrtc::VideoSendStream::Config config = stream->GetConfig();
+ webrtc::VideoSendStream::Config config = stream->GetConfig().Copy();
// Make sure NACK and FEC are enabled on the correct payload types.
EXPECT_EQ(1000, config.rtp.nack.rtp_history_ms);
@@ -2329,7 +2332,7 @@ TEST_F(WebRtcVideoChannel2Test, SetSendCodecsWithoutFec) {
ASSERT_TRUE(channel_->SetSendParameters(parameters));
FakeVideoSendStream* stream = AddSendStream();
- webrtc::VideoSendStream::Config config = stream->GetConfig();
+ webrtc::VideoSendStream::Config config = stream->GetConfig().Copy();
EXPECT_EQ(-1, config.rtp.fec.ulpfec_payload_type);
EXPECT_EQ(-1, config.rtp.fec.red_payload_type);
@@ -2368,7 +2371,7 @@ TEST_F(WebRtcVideoChannel2Test, SetSendCodecsWithoutFecDisablesFec) {
ASSERT_TRUE(channel_->SetSendParameters(parameters));
FakeVideoSendStream* stream = AddSendStream();
- webrtc::VideoSendStream::Config config = stream->GetConfig();
+ webrtc::VideoSendStream::Config config = stream->GetConfig().Copy();
EXPECT_EQ(kUlpfecCodec.id, config.rtp.fec.ulpfec_payload_type);
@@ -2376,7 +2379,7 @@ TEST_F(WebRtcVideoChannel2Test, SetSendCodecsWithoutFecDisablesFec) {
ASSERT_TRUE(channel_->SetSendParameters(parameters));
stream = fake_call_->GetVideoSendStreams()[0];
ASSERT_TRUE(stream != NULL);
- config = stream->GetConfig();
+ config = stream->GetConfig().Copy();
EXPECT_EQ(-1, config.rtp.fec.ulpfec_payload_type)
<< "SetSendCodec without FEC should disable current FEC.";
}
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | webrtc/test/call_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698